Fixed stupid bug and some comments in 24bit color reduction.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@986 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									d01f573e57
								
							
						
					
					
						commit
						d5b5ba6de3
					
				
							
								
								
									
										9
									
								
								op_c.c
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								op_c.c
									
									
									
									
									
								
							@ -855,13 +855,13 @@ void CS_Sort_by_luminance(T_Cluster_set * cs)
 | 
			
		||||
	T_Cluster* place;
 | 
			
		||||
	T_Cluster* newlist = NULL;
 | 
			
		||||
 | 
			
		||||
	while((nc = cs->clusters))
 | 
			
		||||
	while(cs->clusters)
 | 
			
		||||
	{
 | 
			
		||||
		// Remove the first cluster from the original list
 | 
			
		||||
		nc = cs->clusters;
 | 
			
		||||
		cs->clusters = cs->clusters->next;
 | 
			
		||||
 | 
			
		||||
		// Find his position in the new list
 | 
			
		||||
		// Find its position in the new list
 | 
			
		||||
		for(place = newlist;place != NULL; place = place->next)
 | 
			
		||||
		{
 | 
			
		||||
			if(place->l > nc->l) break;
 | 
			
		||||
@ -873,9 +873,12 @@ void CS_Sort_by_luminance(T_Cluster_set * cs)
 | 
			
		||||
		if(prev) prev->next = nc;
 | 
			
		||||
		else newlist = nc;
 | 
			
		||||
 | 
			
		||||
		// reset prev pointer
 | 
			
		||||
		prev = NULL;
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Put the new list bavk in place
 | 
			
		||||
	// Put the new list back in place
 | 
			
		||||
	cs->clusters = newlist;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user