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:
Adrien Destugues
2013-01-06 12:46:46 +00:00
parent 65194af002
commit 878c926ce4
19 changed files with 173 additions and 175 deletions

View File

@@ -1435,14 +1435,14 @@ void Draw_curve_cross(short x_pos, short y_pos)
for (i=start_x; i<=end_x; i++)
{
temp=x_pos+i-3;
Pixel_preview(temp,y_pos,~Read_pixel(temp -Main_offset_X,
y_pos-Main_offset_Y));
Pixel_preview(temp,y_pos,xor_lut[Read_pixel(temp -Main_offset_X,
y_pos-Main_offset_Y)]);
}
for (i=start_y; i<=end_y; i++)
{
temp=y_pos+i-3;
Pixel_preview(x_pos,temp,~Read_pixel(x_pos-Main_offset_X,
temp -Main_offset_Y));
Pixel_preview(x_pos,temp,xor_lut[Read_pixel(x_pos-Main_offset_X,
temp -Main_offset_Y)]);
}
Update_part_of_screen(x_pos+start_x-3,y_pos+start_y-3,end_x-start_x+1,end_y-start_y+1);
}