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:
@@ -126,11 +126,11 @@ void Horizontal_XOR_line_tall(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)];
|
||||
|
||||
dest=(y_pos*ZOOMY+1)*VIDEO_LINE_WIDTH+x_pos+Screen_pixels;
|
||||
for (x=0;x<width;x++)
|
||||
*(dest+x)=~*(dest+x);
|
||||
*(dest+x)=xor_lut[*(dest+x)];
|
||||
}
|
||||
|
||||
void Vertical_XOR_line_tall(word x_pos,word y_pos,word height)
|
||||
@@ -140,7 +140,7 @@ void Vertical_XOR_line_tall(word x_pos,word y_pos,word height)
|
||||
for (i=y_pos*ZOOMY;i<(y_pos+height)*ZOOMY;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