Fix issue 185 (XOR highlight) :
* Use a simple optimization algorithm to compute a good set of XOR color pairs * Algorothm is not very optimized (complexity is up to n^3). In practize, it stabilizes after 2 to 3 rounds of swapping colors * Use this color table for all XOR effects * Setting for grid color is now removed git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2048 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
@@ -119,7 +119,7 @@ void Horizontal_XOR_line_simple(word x_pos,word y_pos,word width)
|
||||
int x;
|
||||
|
||||
for (x=0;x<width;x++)
|
||||
*(dest+x)=~*(dest+x);
|
||||
*(dest+x)=xor_lut[*(dest+x)];
|
||||
}
|
||||
|
||||
void Vertical_XOR_line_simple(word x_pos,word y_pos,word height)
|
||||
@@ -129,7 +129,7 @@ void Vertical_XOR_line_simple(word x_pos,word y_pos,word height)
|
||||
for (i=y_pos;i<y_pos+height;i++)
|
||||
{
|
||||
color=*(Screen_pixels+x_pos+i*VIDEO_LINE_WIDTH);
|
||||
*(Screen_pixels+x_pos+i*VIDEO_LINE_WIDTH)=~color;
|
||||
*(Screen_pixels+x_pos+i*VIDEO_LINE_WIDTH)=xor_lut[color];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user