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:
@@ -134,7 +134,7 @@ void Horizontal_XOR_line_double(word x_pos,word y_pos,word width)
|
||||
int x;
|
||||
|
||||
for (x=0;x<width*ZOOMX;x+=ZOOMX)
|
||||
*(dest+x+VIDEO_LINE_WIDTH+1)=*(dest+x+VIDEO_LINE_WIDTH)=*(dest+x+1)=*(dest+x)=~*(dest+x);
|
||||
*(dest+x+VIDEO_LINE_WIDTH+1)=*(dest+x+VIDEO_LINE_WIDTH)=*(dest+x+1)=*(dest+x)=xor_lut[*(dest+x)];
|
||||
}
|
||||
|
||||
void Vertical_XOR_line_double(word x_pos,word y_pos,word height)
|
||||
@@ -143,7 +143,7 @@ void Vertical_XOR_line_double(word x_pos,word y_pos,word height)
|
||||
byte *dest=Screen_pixels+x_pos*ZOOMX+y_pos*VIDEO_LINE_WIDTH*ZOOMY;
|
||||
for (i=height;i>0;i--)
|
||||
{
|
||||
*dest=*(dest+1)=*(dest+VIDEO_LINE_WIDTH)=*(dest+VIDEO_LINE_WIDTH+1)=~*dest;
|
||||
*dest=*(dest+1)=*(dest+VIDEO_LINE_WIDTH)=*(dest+VIDEO_LINE_WIDTH+1)=xor_lut[*dest];
|
||||
dest+=VIDEO_LINE_WIDTH*ZOOMY;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user