escape non ascii chars to HEX \xNN in C source (not in comments)

add "" where needed.

also fix extra space at end of lines (only in modified files)
This commit is contained in:
Thomas Bernard 2018-06-26 10:49:33 +02:00
parent b8ac772922
commit 6731a57999
9 changed files with 801 additions and 801 deletions

View File

@ -259,7 +259,7 @@ byte Rightclick_colorpick(byte cursor_visible)
if (!Config.Right_click_colorpick) if (!Config.Right_click_colorpick)
return 0; return 0;
if (Mouse_K!=RIGHT_SIDE) if (Mouse_K!=RIGHT_SIDE)
return 0; return 0;
// In these modes, the Foreground color is ignored, // In these modes, the Foreground color is ignored,
// so the RMB should act as normal. // so the RMB should act as normal.
if (Shade_mode||Quick_shade_mode||Tiling_mode) if (Shade_mode||Quick_shade_mode||Tiling_mode)
@ -268,20 +268,20 @@ byte Rightclick_colorpick(byte cursor_visible)
Colorpicker_color=-1; Colorpicker_color=-1;
Colorpicker_X=-1; Colorpicker_X=-1;
Colorpicker_Y=-1; Colorpicker_Y=-1;
if (cursor_visible) if (cursor_visible)
Hide_cursor(); Hide_cursor();
Start_operation_stack(OPERATION_RMB_COLORPICK); Start_operation_stack(OPERATION_RMB_COLORPICK);
Init_start_operation(); Init_start_operation();
// Just an indicator to go to next step // Just an indicator to go to next step
Operation_push(1); Operation_push(1);
Rightclick_colorpick_2_1(); Rightclick_colorpick_2_1();
if (cursor_visible) if (cursor_visible)
Display_cursor(); Display_cursor();
return 1; return 1;
} }
@ -333,13 +333,13 @@ void Rightclick_colorpick_0_1(void)
short dummy; short dummy;
Hide_cursor(); Hide_cursor();
Operation_pop(&dummy); Operation_pop(&dummy);
Set_fore_color(Colorpicker_color); Set_fore_color(Colorpicker_color);
// Restore previous operation // Restore previous operation
Start_operation_stack(Operation_before_interrupt); Start_operation_stack(Operation_before_interrupt);
// Erase the color block which shows the picked color // Erase the color block which shows the picked color
if (Operation_before_interrupt!=OPERATION_REPLACE) if (Operation_before_interrupt!=OPERATION_REPLACE)
if ( (Mouse_Y<Menu_Y) && (Menu_is_visible) && if ( (Mouse_Y<Menu_Y) && (Menu_is_visible) &&
@ -347,7 +347,7 @@ void Rightclick_colorpick_0_1(void)
Print_in_menu("X: Y: ",0); Print_in_menu("X: Y: ",0);
Print_coordinates(); Print_coordinates();
Display_cursor(); Display_cursor();
} }
@ -490,7 +490,7 @@ void Brush_0_5(void)
Brush_offset_X=(Brush_offset_X/Snap_width)*Snap_width; Brush_offset_X=(Brush_offset_X/Snap_width)*Snap_width;
Brush_offset_Y=(Brush_offset_Y/Snap_height)*Snap_height; Brush_offset_Y=(Brush_offset_Y/Snap_height)*Snap_height;
} }
End_of_modification(); End_of_modification();
Return_to_draw_mode(); Return_to_draw_mode();
} }
@ -618,7 +618,7 @@ void Polybrush_12_8(void)
Brush_offset_X=(Brush_offset_X/Snap_width)*Snap_width; Brush_offset_X=(Brush_offset_X/Snap_width)*Snap_width;
Brush_offset_Y=(Brush_offset_Y/Snap_height)*Snap_height; Brush_offset_Y=(Brush_offset_Y/Snap_height)*Snap_height;
} }
Return_to_draw_mode(); Return_to_draw_mode();
Display_cursor(); Display_cursor();
} }
@ -926,7 +926,7 @@ void Rotate_brush_12_0(void)
Operation_push(1); // State précédent Operation_push(1); // State précédent
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("Angle: 0° ",0); Print_in_menu("Angle: 0\xb0 ",0);
} }
else else
{ {
@ -995,7 +995,7 @@ void Rotate_brush_1_5(void)
Operation_push(cursor_x); Operation_push(cursor_x);
Operation_push(cursor_y); Operation_push(cursor_y);
} }
Operation_push(cursor_x); Operation_push(cursor_x);
Operation_push(cursor_y); Operation_push(cursor_y);
@ -1023,7 +1023,7 @@ void Rotate_brush_0_5(void)
double angle=0.0; double angle=0.0;
int dx,dy; int dx,dy;
short cursor_x, cursor_y; short cursor_x, cursor_y;
Operation_pop(&prev_state); Operation_pop(&prev_state);
Operation_pop(&old_y); Operation_pop(&old_y);
@ -1188,32 +1188,32 @@ void Distort_brush_1_0(void)
Init_start_operation(); Init_start_operation();
Paintbrush_hidden=1; Paintbrush_hidden=1;
Hide_cursor(); Hide_cursor();
// Top left angle // Top left angle
x_pos=Paintbrush_X-Brush_offset_X; x_pos=Paintbrush_X-Brush_offset_X;
y_pos=Paintbrush_Y-Brush_offset_Y; y_pos=Paintbrush_Y-Brush_offset_Y;
Draw_stretch_spot(x_pos,y_pos); Draw_stretch_spot(x_pos,y_pos);
Operation_push(x_pos); Operation_push(x_pos);
Operation_push(y_pos); Operation_push(y_pos);
// Top right angle // Top right angle
x_pos+=Brush_width; x_pos+=Brush_width;
Draw_stretch_spot(x_pos,y_pos); Draw_stretch_spot(x_pos,y_pos);
Operation_push(x_pos); Operation_push(x_pos);
Operation_push(y_pos); Operation_push(y_pos);
// Bottom right angle // Bottom right angle
y_pos+=Brush_height; y_pos+=Brush_height;
Draw_stretch_spot(x_pos,y_pos); Draw_stretch_spot(x_pos,y_pos);
Operation_push(x_pos); Operation_push(x_pos);
Operation_push(y_pos); Operation_push(y_pos);
// Bottom left angle // Bottom left angle
x_pos-=Brush_width; x_pos-=Brush_width;
Draw_stretch_spot(x_pos,y_pos); Draw_stretch_spot(x_pos,y_pos);
Operation_push(x_pos); Operation_push(x_pos);
Operation_push(y_pos); Operation_push(y_pos);
Distort_brush_preview( Distort_brush_preview(
Operation_stack[1], Operation_stack[1],
Operation_stack[2], Operation_stack[2],
@ -1262,13 +1262,13 @@ void Distort_brush_1_8(void)
best_distance=distance; best_distance=distance;
} }
} }
for (i=0;i<4;i++) for (i=0;i<4;i++)
{ {
Operation_push(x[i]); Operation_push(x[i]);
Operation_push(y[i]); Operation_push(y[i]);
} }
if (best_spot>-1) if (best_spot>-1)
{ {
Operation_push(best_spot); Operation_push(best_spot);
@ -1301,11 +1301,11 @@ void Distort_brush_1_9(void)
Operation_pop(&y[i]); Operation_pop(&y[i]);
Operation_pop(&x[i]); Operation_pop(&x[i]);
} }
if (Paintbrush_X!=x[selected_corner] || Paintbrush_Y!=y[selected_corner]) if (Paintbrush_X!=x[selected_corner] || Paintbrush_Y!=y[selected_corner])
{ {
Hide_cursor(); Hide_cursor();
// Easiest refresh mode: make no assumptions on how the brush was // Easiest refresh mode: make no assumptions on how the brush was
// displayed before. // displayed before.
Display_all_screen(); Display_all_screen();
@ -1319,7 +1319,7 @@ void Distort_brush_1_9(void)
Distort_brush_preview(x[0],y[0],x[1],y[1],x[2],y[2],x[3],y[3]); Distort_brush_preview(x[0],y[0],x[1],y[1],x[2],y[2],x[3],y[3]);
Display_cursor(); Display_cursor();
if ( (Config.Coords_rel) && (Menu_is_visible) ) if ( (Config.Coords_rel) && (Menu_is_visible) )
{ {
Print_in_menu("X: Y: ",0); Print_in_menu("X: Y: ",0);
@ -1327,7 +1327,7 @@ void Distort_brush_1_9(void)
} }
Update_rect(0,0,Screen_width,Menu_Y); Update_rect(0,0,Screen_width,Menu_Y);
} }
// Push back all arguments // Push back all arguments
for (i=0;i<4;i++) for (i=0;i<4;i++)
{ {
@ -1348,7 +1348,7 @@ void Distort_brush_0_9(void)
{ {
short selected_corner; short selected_corner;
Operation_pop(&selected_corner); Operation_pop(&selected_corner);
} }
void Distort_brush_2_0(void) void Distort_brush_2_0(void)
@ -1390,10 +1390,10 @@ void Distort_brush_2_8(void)
Operation_pop(&x[i]); Operation_pop(&x[i]);
} }
Distort_brush(x[0],y[0],x[1],y[1],x[2],y[2],x[3],y[3]); Distort_brush(x[0],y[0],x[1],y[1],x[2],y[2],x[3],y[3]);
Paintbrush_hidden=0; Paintbrush_hidden=0;
Display_all_screen(); Display_all_screen();
Return_to_draw_mode(); Return_to_draw_mode();
} }

File diff suppressed because it is too large Load Diff

View File

@ -203,8 +203,8 @@ static const T_Help_table helptable_help[] =
HELP_LINK ("Restore brush: %s", 0x200+BUTTON_BRUSH) HELP_LINK ("Restore brush: %s", 0x200+BUTTON_BRUSH)
HELP_LINK ("Flip brush X: %s", SPECIAL_FLIP_X) HELP_LINK ("Flip brush X: %s", SPECIAL_FLIP_X)
HELP_LINK ("Flip brush Y: %s", SPECIAL_FLIP_Y) HELP_LINK ("Flip brush Y: %s", SPECIAL_FLIP_Y)
HELP_LINK ("90° brush rotation: %s", SPECIAL_ROTATE_90) HELP_LINK ("90\xb0 brush rotation: %s", SPECIAL_ROTATE_90)
HELP_LINK ("180° brush rotation: %s", SPECIAL_ROTATE_180) HELP_LINK ("180\xb0 brush rotation: %s", SPECIAL_ROTATE_180)
HELP_LINK ("Stretch brush: %s", SPECIAL_STRETCH) HELP_LINK ("Stretch brush: %s", SPECIAL_STRETCH)
HELP_LINK ("Distort brush: %s", SPECIAL_DISTORT) HELP_LINK ("Distort brush: %s", SPECIAL_DISTORT)
HELP_LINK ("Outline brush: %s", SPECIAL_OUTLINE) HELP_LINK ("Outline brush: %s", SPECIAL_OUTLINE)
@ -456,7 +456,7 @@ static const T_Help_table helptable_credits[] =
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD (" FREEBSD PORT") HELP_BOLD (" FREEBSD PORT")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT (" Jean-Baptiste Berlioz (Tobé)") HELP_TEXT (" Jean-Baptiste Berlioz (Tob\xe9)")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD (" OPENBSD PORT") HELP_BOLD (" OPENBSD PORT")
HELP_TEXT ("") HELP_TEXT ("")
@ -470,7 +470,7 @@ static const T_Help_table helptable_credits[] =
HELP_BOLD (" LINUX BINARIES") HELP_BOLD (" LINUX BINARIES")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT (" Gentoo : Matteo 'Peach' Pescarin") HELP_TEXT (" Gentoo : Matteo 'Peach' Pescarin")
HELP_TEXT (" Debian : Gürkan Sengün") HELP_TEXT (" Debian : G\xfcrkan Seng\xfcn")
HELP_TEXT (" Android : pelya") HELP_TEXT (" Android : pelya")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD (" WIZ & CAANOO PORT") HELP_BOLD (" WIZ & CAANOO PORT")
@ -495,7 +495,7 @@ static const T_Help_table helptable_credits[] =
HELP_TEXT (" DarkDefende DawnBringer El Topo ") HELP_TEXT (" DarkDefende DawnBringer El Topo ")
HELP_TEXT (" falenblood fanickbux fano ") HELP_TEXT (" falenblood fanickbux fano ")
HELP_TEXT (" finticemo fogbot121 freehand ") HELP_TEXT (" finticemo fogbot121 freehand ")
HELP_TEXT (" Frost Grimmy Gürkan Sengün") HELP_TEXT (" Frost Grimmy G\xfcrkan Seng\xfcn")
HELP_TEXT (" Hatch HoraK-FDF iLKke ") HELP_TEXT (" Hatch HoraK-FDF iLKke ")
HELP_TEXT (" Iw2evk jackfrost128 Jamon ") HELP_TEXT (" Iw2evk jackfrost128 Jamon ")
HELP_TEXT (" keito kusma lmemsm ") HELP_TEXT (" keito kusma lmemsm ")
@ -506,7 +506,7 @@ static const T_Help_table helptable_credits[] =
HELP_TEXT (" Ravey1138 richienyhus rixard ") HELP_TEXT (" Ravey1138 richienyhus rixard ")
HELP_TEXT (" sm4tik spratek Surt ") HELP_TEXT (" sm4tik spratek Surt ")
HELP_TEXT (" tape.yrm TeeEmCee tempest ") HELP_TEXT (" tape.yrm TeeEmCee tempest ")
HELP_TEXT (" Timo Kurrpa titus^Rab Tobé ") HELP_TEXT (" Timo Kurrpa titus^Rab Tob\xe9 ")
HELP_TEXT (" yakumo2975 00ai99") HELP_TEXT (" yakumo2975 00ai99")
HELP_TEXT (" ... posted the annoying bug reports.") HELP_TEXT (" ... posted the annoying bug reports.")
HELP_TEXT ("") HELP_TEXT ("")
@ -564,7 +564,7 @@ static const T_Help_table helptable_credits[] =
HELP_TEXT (" Acryl Fred Prowler") HELP_TEXT (" Acryl Fred Prowler")
HELP_TEXT (" Alexel FreddyV Puznik") HELP_TEXT (" Alexel FreddyV Puznik")
HELP_TEXT (" Alias Frost Quick") HELP_TEXT (" Alias Frost Quick")
HELP_TEXT (" Amiral Gaël(GDC) Ra") HELP_TEXT (" Amiral Ga\xebl(GDC) Ra")
HELP_TEXT (" Arrakis GainX Raster") HELP_TEXT (" Arrakis GainX Raster")
HELP_TEXT (" Avocado Gandalf Ravian") HELP_TEXT (" Avocado Gandalf Ravian")
HELP_TEXT (" Baloo Goblin RedBug") HELP_TEXT (" Baloo Goblin RedBug")
@ -575,10 +575,10 @@ static const T_Help_table helptable_credits[] =
HELP_TEXT (" BlackAxe Haplo Sam") HELP_TEXT (" BlackAxe Haplo Sam")
HELP_TEXT (" Bonnie Hof SandMan") HELP_TEXT (" Bonnie Hof SandMan")
HELP_TEXT (" Boo Hornet Scape") HELP_TEXT (" Boo Hornet Scape")
HELP_TEXT (" Boz Hulud Sébastien") HELP_TEXT (" Boz Hulud S\xe9""bastien")
HELP_TEXT (" Carine Java Shodan") HELP_TEXT (" Carine Java Shodan")
HELP_TEXT (" Chandra JBT Skal") HELP_TEXT (" Chandra JBT Skal")
HELP_TEXT (" Cheetah Jérôme Skyfire") HELP_TEXT (" Cheetah J\xe9r\xf4me Skyfire")
HELP_TEXT (" Chill Julien(JCA) Sphair") HELP_TEXT (" Chill Julien(JCA) Sphair")
HELP_TEXT (" Cougar KalMinDo Sprocket") HELP_TEXT (" Cougar KalMinDo Sprocket")
HELP_TEXT (" Cremax KaneWood Stef") HELP_TEXT (" Cremax KaneWood Stef")
@ -793,7 +793,7 @@ static const T_Help_table helptable_adjust[] =
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("In 'Ratio' mode, you can set 2 numbers for") HELP_TEXT ("In 'Ratio' mode, you can set 2 numbers for")
HELP_TEXT ("each dimension, and the resizing factor will") HELP_TEXT ("each dimension, and the resizing factor will")
HELP_TEXT ("be of 'new'÷'old'. For example you can use") HELP_TEXT ("be of 'new'\xf7'old'. For example you can use")
HELP_TEXT ("1:3 to divide the image by three, 2:1 to") HELP_TEXT ("1:3 to divide the image by three, 2:1 to")
HELP_TEXT ("double it, and any fraction like 15:16.") HELP_TEXT ("double it, and any fraction like 15:16.")
HELP_TEXT ("") HELP_TEXT ("")
@ -810,12 +810,12 @@ static const T_Help_table helptable_adjust[] =
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD ("ROTATE") HELP_BOLD ("ROTATE")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("-90°: Rotates the image by 90°") HELP_TEXT ("-90\xb0: Rotates the image by 90\xb0")
HELP_TEXT (" clockwise.") HELP_TEXT (" clockwise.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("+90°: Rotates the image by 90°") HELP_TEXT ("+90\xb0: Rotates the image by 90\xb0")
HELP_TEXT (" counter-clockwise.") HELP_TEXT (" counter-clockwise.")
HELP_TEXT ("180°: Rotates the image by 180°") HELP_TEXT ("180\xb0: Rotates the image by 180\xb0")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("") HELP_TEXT ("")
}; };
@ -1301,10 +1301,10 @@ static const T_Help_table helptable_brush_fx[] =
HELP_LINK ("- Y: (Key:%s)",SPECIAL_FLIP_Y) HELP_LINK ("- Y: (Key:%s)",SPECIAL_FLIP_Y)
HELP_TEXT ("Flip vertically.") HELP_TEXT ("Flip vertically.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_LINK ("- Rotate by 90°: (Key:%s)",SPECIAL_ROTATE_90) HELP_LINK ("- Rotate by 90\xb0: (Key:%s)",SPECIAL_ROTATE_90)
HELP_TEXT ("Rotates the brush by an angle of 90 degrees.") HELP_TEXT ("Rotates the brush by an angle of 90 degrees.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_LINK ("- Rotate by 180°: (Key:%s)",SPECIAL_ROTATE_180) HELP_LINK ("- Rotate by 180\xb0: (Key:%s)",SPECIAL_ROTATE_180)
HELP_TEXT ("Rotates the brush by an angle of 180") HELP_TEXT ("Rotates the brush by an angle of 180")
HELP_TEXT ("degrees.") HELP_TEXT ("degrees.")
HELP_TEXT ("") HELP_TEXT ("")
@ -2515,14 +2515,14 @@ static const T_Help_table helptable_settings_details[] =
HELP_TEXT ("window. (Set it to 'no' if you have a slow") HELP_TEXT ("window. (Set it to 'no' if you have a slow")
HELP_TEXT ("computer or if you edit huge pictures)") HELP_TEXT ("computer or if you edit huge pictures)")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD (" Right click colorpick") HELP_BOLD (" Right click colorpick")
HELP_TEXT ("This enables a mode where the right mouse") HELP_TEXT ("This enables a mode where the right mouse")
HELP_TEXT ("buttons acts as a color picker until") HELP_TEXT ("buttons acts as a color picker until")
HELP_TEXT ("it's released, and selects Foreground color.") HELP_TEXT ("it's released, and selects Foreground color.")
HELP_TEXT ("This mode prevents you from painting with") HELP_TEXT ("This mode prevents you from painting with")
HELP_TEXT ("Background color.") HELP_TEXT ("Background color.")
HELP_TEXT ("This option is ignored when the Shade,") HELP_TEXT ("This option is ignored when the Shade,")
HELP_TEXT ("Quick-shade, or Tiling mode is used.") HELP_TEXT ("Quick-shade, or Tiling mode is used.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT (" Multi shortcuts") HELP_TEXT (" Multi shortcuts")
HELP_TEXT ("When this setting is disabled, and you") HELP_TEXT ("When this setting is disabled, and you")
@ -2909,7 +2909,7 @@ static const T_Help_table helptable_layertrans[] =
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("The current Background color becomes the") HELP_TEXT ("The current Background color becomes the")
HELP_TEXT ("color considered transparent for the layers.") HELP_TEXT ("color considered transparent for the layers.")
}; };
static const T_Help_table helptable_layermerge[] = static const T_Help_table helptable_layermerge[] =
{ {
@ -3138,7 +3138,7 @@ T_Help_section Help_section[] =
HELP_TABLE_DECLARATION(helptable_pal_scroll) HELP_TABLE_DECLARATION(helptable_pal_scroll)
HELP_TABLE_DECLARATION(helptable_color_select) HELP_TABLE_DECLARATION(helptable_color_select)
// End of buttons list // End of buttons list
// NB_BUTTONS+0 // NB_BUTTONS+0
HELP_TABLE_DECLARATION(helptable_settings_details) HELP_TABLE_DECLARATION(helptable_settings_details)
// NB_BUTTONS+1 // NB_BUTTONS+1
@ -3146,5 +3146,5 @@ T_Help_section Help_section[] =
// NB_BUTTONS+2 // NB_BUTTONS+2
// HELP_TABLE_DECLARATION() // HELP_TABLE_DECLARATION()
// ... // ...
}; };

View File

@ -689,17 +689,17 @@ T_Key_config ConfigKey[NB_SHORTCUTS] = {
SDLK_y, // Y SDLK_y, // Y
0}, 0},
{72, {72,
"90° brush rotation", "90\xb0 brush rotation",
"Rotate the user-defined brush by 90°", "Rotate the user-defined brush by 90\xb0",
"(counter-clockwise).", "(counter-clockwise).",
"", "",
true, true,
SDLK_z, // Z (W en AZERTY) SDLK_z, // Z (W en AZERTY)
0}, 0},
{73, {73,
"180° brush rotation", "180\xb0 brush rotation",
"Rotate the user-defined brush by", "Rotate the user-defined brush by",
"180°.", "180\xb0.",
"", "",
true, true,
SDLK_z|MOD_SHIFT, // Shift + Z SDLK_z|MOD_SHIFT, // Shift + Z
@ -1981,7 +1981,7 @@ word Ordering[NB_SHORTCUTS]=
SPECIAL_BIGGER_PAINTBRUSH, // Sets paintbrush size: bigger SPECIAL_BIGGER_PAINTBRUSH, // Sets paintbrush size: bigger
SPECIAL_EFFECTS_OFF, // Turns off all effects SPECIAL_EFFECTS_OFF, // Turns off all effects
SPECIAL_TRANSPARENCY_1, // Sets transparency level 10% SPECIAL_TRANSPARENCY_1, // Sets transparency level 10%
SPECIAL_TRANSPARENCY_2, // Sets transparency level 20% SPECIAL_TRANSPARENCY_2, // Sets transparency level 20%
SPECIAL_TRANSPARENCY_3, // Sets transparency level 30% SPECIAL_TRANSPARENCY_3, // Sets transparency level 30%
SPECIAL_TRANSPARENCY_4, // Sets transparency level 40% SPECIAL_TRANSPARENCY_4, // Sets transparency level 40%
SPECIAL_TRANSPARENCY_5, // Sets transparency level 50% SPECIAL_TRANSPARENCY_5, // Sets transparency level 50%

View File

@ -45,262 +45,262 @@
// Dans l'ordre des colonnes: Normal, +Shift, +Control, +Alt // Dans l'ordre des colonnes: Normal, +Shift, +Control, +Alt
const word Scancode_to_sym[256][4] = const word Scancode_to_sym[256][4] =
{ {
/* 00 ??? */ { SDLK_UN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NOWN },
/* 09 8 * */ { SDLK_8 ,SDLK_8 ,SDLK_8 ,SDLK_UNKNOWN }, /* 09 8 * */ { SDLK_8 ,SDLK_8 ,SDLK_8 ,SDLK_UNKNOWN },
/* 0A 9 ( */ { SDLK_9 ,SDLK_9 ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* 0A 9 ( */ { SDLK_9 ,SDLK_9 ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 0B 0 ) */ { SDLK_0 ,SDLK_0 ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* 0B 0 ) */ { SDLK_0 ,SDLK_0 ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 0C - _ */ { SDLK_MINUS ,SDLK_MINUS ,SDLK_MINUS ,SDLK_UNKNOWN }, /* 0C - _ */ { SDLK_MINUS ,SDLK_MINUS ,SDLK_MINUS ,SDLK_UNKNOWN },
/* 0D = + */ { SDLK_EQUALS ,SDLK_EQUALS ,SDLK_EQUALS ,SDLK_UNKNOWN }, /* 0D = + */ { SDLK_EQUALS ,SDLK_EQUALS ,SDLK_EQUALS ,SDLK_UNKNOWN },
/* 0E BkSpc */ { SDLK_BACKSPACE ,SDLK_BACKSPACE ,SDLK_BACKSPACE ,SDLK_BACKSPACE }, /* 0E BkSpc */ { SDLK_BACKSPACE ,SDLK_BACKSPACE ,SDLK_BACKSPACE ,SDLK_BACKSPACE },
/* 0F Tab */ { SDLK_TAB ,SDLK_TAB ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* 0F Tab */ { SDLK_TAB ,SDLK_TAB ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 10 Q */ { SDLK_q ,SDLK_q ,SDLK_q ,SDLK_q }, /* 10 Q */ { SDLK_q ,SDLK_q ,SDLK_q ,SDLK_q },
/* 11 W */ { SDLK_w ,SDLK_w ,SDLK_w ,SDLK_w }, /* 11 W */ { SDLK_w ,SDLK_w ,SDLK_w ,SDLK_w },
/* 12 E */ { SDLK_e ,SDLK_e ,SDLK_e ,SDLK_e }, /* 12 E */ { SDLK_e ,SDLK_e ,SDLK_e ,SDLK_e },
/* 13 R */ { SDLK_r ,SDLK_r ,SDLK_r ,SDLK_r }, /* 13 R */ { SDLK_r ,SDLK_r ,SDLK_r ,SDLK_r },
/* 14 T */ { SDLK_t ,SDLK_t ,SDLK_t ,SDLK_t }, /* 14 T */ { SDLK_t ,SDLK_t ,SDLK_t ,SDLK_t },
/* 15 Y */ { SDLK_y ,SDLK_y ,SDLK_y ,SDLK_y }, /* 15 Y */ { SDLK_y ,SDLK_y ,SDLK_y ,SDLK_y },
/* 16 U */ { SDLK_u ,SDLK_u ,SDLK_u ,SDLK_u }, /* 16 U */ { SDLK_u ,SDLK_u ,SDLK_u ,SDLK_u },
/* 17 I */ { SDLK_i ,SDLK_i ,SDLK_i ,SDLK_i }, /* 17 I */ { SDLK_i ,SDLK_i ,SDLK_i ,SDLK_i },
/* 18 O */ { SDLK_o ,SDLK_o ,SDLK_o ,SDLK_o }, /* 18 O */ { SDLK_o ,SDLK_o ,SDLK_o ,SDLK_o },
/* 19 P */ { SDLK_p ,SDLK_p ,SDLK_p ,SDLK_p }, /* 19 P */ { SDLK_p ,SDLK_p ,SDLK_p ,SDLK_p },
/* 1A [ */ { SDLK_LEFTBRACKET ,SDLK_LEFTBRACKET ,SDLK_LEFTBRACKET ,SDLK_LEFTBRACKET }, /* 1A [ */ { SDLK_LEFTBRACKET ,SDLK_LEFTBRACKET ,SDLK_LEFTBRACKET ,SDLK_LEFTBRACKET },
/* 1B ] */ { SDLK_RIGHTBRACKET,SDLK_RIGHTBRACKET,SDLK_RIGHTBRACKET,SDLK_RIGHTBRACKET}, /* 1B ] */ { SDLK_RIGHTBRACKET,SDLK_RIGHTBRACKET,SDLK_RIGHTBRACKET,SDLK_RIGHTBRACKET},
/* 1C Retrn */ { SDLK_RETURN ,SDLK_RETURN ,SDLK_RETURN ,SDLK_RETURN }, /* 1C Retrn */ { SDLK_RETURN ,SDLK_RETURN ,SDLK_RETURN ,SDLK_RETURN },
/* 1D ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* 1D ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 1E A */ { SDLK_a ,SDLK_a ,SDLK_a ,SDLK_a }, /* 1E A */ { SDLK_a ,SDLK_a ,SDLK_a ,SDLK_a },
/* 1F S */ { SDLK_s ,SDLK_s ,SDLK_s ,SDLK_s }, /* 1F S */ { SDLK_s ,SDLK_s ,SDLK_s ,SDLK_s },
/* 20 D */ { SDLK_d ,SDLK_d ,SDLK_d ,SDLK_d }, /* 20 D */ { SDLK_d ,SDLK_d ,SDLK_d ,SDLK_d },
/* 21 F */ { SDLK_f ,SDLK_f ,SDLK_f ,SDLK_f }, /* 21 F */ { SDLK_f ,SDLK_f ,SDLK_f ,SDLK_f },
/* 22 G */ { SDLK_g ,SDLK_g ,SDLK_g ,SDLK_g }, /* 22 G */ { SDLK_g ,SDLK_g ,SDLK_g ,SDLK_g },
/* 23 H */ { SDLK_h ,SDLK_h ,SDLK_h ,SDLK_h }, /* 23 H */ { SDLK_h ,SDLK_h ,SDLK_h ,SDLK_h },
/* 24 J */ { SDLK_j ,SDLK_j ,SDLK_j ,SDLK_j }, /* 24 J */ { SDLK_j ,SDLK_j ,SDLK_j ,SDLK_j },
/* 25 K */ { SDLK_k ,SDLK_k ,SDLK_k ,SDLK_k }, /* 25 K */ { SDLK_k ,SDLK_k ,SDLK_k ,SDLK_k },
/* 26 L */ { SDLK_l ,SDLK_l ,SDLK_l ,SDLK_l }, /* 26 L */ { SDLK_l ,SDLK_l ,SDLK_l ,SDLK_l },
/* 27 ; : */ { SDLK_SEMICOLON ,SDLK_SEMICOLON ,SDLK_SEMICOLON ,SDLK_SEMICOLON }, /* 27 ; : */ { SDLK_SEMICOLON ,SDLK_SEMICOLON ,SDLK_SEMICOLON ,SDLK_SEMICOLON },
/* 28 ' */ { SDLK_QUOTE ,SDLK_QUOTE ,SDLK_UNKNOWN ,SDLK_QUOTE }, /* 28 ' */ { SDLK_QUOTE ,SDLK_QUOTE ,SDLK_UNKNOWN ,SDLK_QUOTE },
/* 29 ` ~ */ { SDLK_BACKQUOTE ,SDLK_BACKQUOTE ,SDLK_UNKNOWN ,SDLK_BACKQUOTE }, /* 29 ` ~ */ { SDLK_BACKQUOTE ,SDLK_BACKQUOTE ,SDLK_UNKNOWN ,SDLK_BACKQUOTE },
/* 2A ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* 2A ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 2B \\ */ { SDLK_BACKSLASH ,SDLK_BACKSLASH ,SDLK_BACKSLASH ,SDLK_BACKSLASH }, /* 2B \\ */ { SDLK_BACKSLASH ,SDLK_BACKSLASH ,SDLK_BACKSLASH ,SDLK_BACKSLASH },
/* 2C Z */ { SDLK_z ,SDLK_z ,SDLK_z ,SDLK_z }, /* 2C Z */ { SDLK_z ,SDLK_z ,SDLK_z ,SDLK_z },
/* 2D X */ { SDLK_x ,SDLK_x ,SDLK_x ,SDLK_x }, /* 2D X */ { SDLK_x ,SDLK_x ,SDLK_x ,SDLK_x },
/* 2E C */ { SDLK_c ,SDLK_c ,SDLK_c ,SDLK_c }, /* 2E C */ { SDLK_c ,SDLK_c ,SDLK_c ,SDLK_c },
/* 2F V */ { SDLK_v ,SDLK_v ,SDLK_v ,SDLK_v }, /* 2F V */ { SDLK_v ,SDLK_v ,SDLK_v ,SDLK_v },
/* 30 B */ { SDLK_b ,SDLK_b ,SDLK_b ,SDLK_b }, /* 30 B */ { SDLK_b ,SDLK_b ,SDLK_b ,SDLK_b },
/* 31 N */ { SDLK_n ,SDLK_n ,SDLK_n ,SDLK_n }, /* 31 N */ { SDLK_n ,SDLK_n ,SDLK_n ,SDLK_n },
/* 32 M */ { SDLK_m ,SDLK_m ,SDLK_m ,SDLK_m }, /* 32 M */ { SDLK_m ,SDLK_m ,SDLK_m ,SDLK_m },
/* 33 , < */ { SDLK_COMMA ,SDLK_COMMA ,SDLK_UNKNOWN ,SDLK_COMMA }, /* 33 , < */ { SDLK_COMMA ,SDLK_COMMA ,SDLK_UNKNOWN ,SDLK_COMMA },
/* 34 . > */ { SDLK_PERIOD ,SDLK_PERIOD ,SDLK_UNKNOWN ,SDLK_PERIOD }, /* 34 . > */ { SDLK_PERIOD ,SDLK_PERIOD ,SDLK_UNKNOWN ,SDLK_PERIOD },
/* 35 / ? */ { SDLK_SLASH ,SDLK_SLASH ,SDLK_UNKNOWN ,SDLK_SLASH }, /* 35 / ? */ { SDLK_SLASH ,SDLK_SLASH ,SDLK_UNKNOWN ,SDLK_SLASH },
/* 36 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* 36 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 37 Grey* */ { SDLK_KP_MULTIPLY ,SDLK_KP_MULTIPLY ,SDLK_UNKNOWN ,SDLK_KP_MULTIPLY }, /* 37 Grey* */ { SDLK_KP_MULTIPLY ,SDLK_KP_MULTIPLY ,SDLK_UNKNOWN ,SDLK_KP_MULTIPLY },
/* 38 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* 38 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 39 Space */ { SDLK_SPACE ,SDLK_SPACE ,SDLK_SPACE ,SDLK_SPACE }, /* 39 Space */ { SDLK_SPACE ,SDLK_SPACE ,SDLK_SPACE ,SDLK_SPACE },
/* 3A ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,S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, /* 42 F8 */ { SDLK_F8 ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 43 F9 */ { SDLK_F9 ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* 43 F9 */ { SDLK_F9 ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 44 F10 */ { SDLK_F10 ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* 44 F10 */ { SDLK_F10 ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 45 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* 45 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 46 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* 46 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 47 Home */ { SDLK_HOME ,SDLK_HOME ,SDLK_UNKNOWN ,SDLK_HOME }, /* 47 Home */ { SDLK_HOME ,SDLK_HOME ,SDLK_UNKNOWN ,SDLK_HOME },
/* 48 Up */ { SDLK_UP ,SDLK_UP ,SDLK_UNKNOWN ,SDLK_UP }, /* 48 Up */ { SDLK_UP ,SDLK_UP ,SDLK_UNKNOWN ,SDLK_UP },
/* 49 PgUp */ { SDLK_PAGEUP ,SDLK_PAGEUP ,SDLK_UNKNOWN ,SDLK_PAGEUP }, /* 49 PgUp */ { SDLK_PAGEUP ,SDLK_PAGEUP ,SDLK_UNKNOWN ,SDLK_PAGEUP },
/* 4A Grey- */ { SDLK_KP_MINUS ,SDLK_KP_MINUS ,SDLK_UNKNOWN ,SDLK_KP_MINUS }, /* 4A Grey- */ { SDLK_KP_MINUS ,SDLK_KP_MINUS ,SDLK_UNKNOWN ,SDLK_KP_MINUS },
/* 4B Left */ { SDLK_LEFT ,SDLK_LEFT ,SDLK_UNKNOWN ,SDLK_LEFT }, /* 4B Left */ { SDLK_LEFT ,SDLK_LEFT ,SDLK_UNKNOWN ,SDLK_LEFT },
/* 4C Kpad5 */ { SDLK_KP5 ,SDLK_KP5 ,SDLK_UNKNOWN ,SDLK_KP5 }, /* 4C Kpad5 */ { SDLK_KP5 ,SDLK_KP5 ,SDLK_UNKNOWN ,SDLK_KP5 },
/* 4D Right */ { SDLK_RIGHT ,SDLK_RIGHT ,SDLK_UNKNOWN ,SDLK_RIGHT }, /* 4D Right */ { SDLK_RIGHT ,SDLK_RIGHT ,SDLK_UNKNOWN ,SDLK_RIGHT },
/* 4E Grey+ */ { SDLK_KP_PLUS ,SDLK_KP_PLUS ,SDLK_UNKNOWN ,SDLK_KP_PLUS }, /* 4E Grey+ */ { SDLK_KP_PLUS ,SDLK_KP_PLUS ,SDLK_UNKNOWN ,SDLK_KP_PLUS },
/* 4F End */ { SDLK_END ,SDLK_END ,SDLK_UNKNOWN ,SDLK_END }, /* 4F End */ { SDLK_END ,SDLK_END ,SDLK_UNKNOWN ,SDLK_END },
/* 50 Down */ { SDLK_DOWN ,SDLK_DOWN ,SDLK_UNKNOWN ,SDLK_DOWN }, /* 50 Down */ { SDLK_DOWN ,SDLK_DOWN ,SDLK_UNKNOWN ,SDLK_DOWN },
/* 51 PgDn */ { SDLK_PAGEDOWN ,SDLK_PAGEDOWN ,SDLK_UNKNOWN ,SDLK_PAGEDOWN }, /* 51 PgDn */ { SDLK_PAGEDOWN ,SDLK_PAGEDOWN ,SDLK_UNKNOWN ,SDLK_PAGEDOWN },
/* 52 Ins */ { SDLK_INSERT ,SDLK_INSERT ,SDLK_UNKNOWN ,SDLK_INSERT }, /* 52 Ins */ { SDLK_INSERT ,SDLK_INSERT ,SDLK_UNKNOWN ,SDLK_INSERT },
/* 53 Del */ { SDLK_DELETE ,SDLK_DEL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KNOWN ,SDLK_LEFT },
/* 9C ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* 9C ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 9D ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_RIGHT }, /* 9D ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_RIGHT },
/* 9E ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* 9E ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* 9F ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_END }, /* 9F ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_END },
/* A0 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_DOWN }, /* A0 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_DOWN },
/* A1 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_PAGEUP }, /* A1 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_PAGEUP },
/* A2 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_INSERT }, /* A2 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_INSERT },
/* A3 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_DELETE }, /* A3 ??? */ { SDLK_UNKNOWN ,SDLK_UNKN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WN }, /* AB ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* AC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* AC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* AD ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* AD ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* AE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* AE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* AF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* AF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* B0 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* B0 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* B1 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* B1 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* B2 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* B2 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* B3 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* B3 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* B4 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* B4 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* B5 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* B5 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* B6 Win L */ { SDLK_LSUPER ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* B6 Win L */ { SDLK_LSUPER ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* B7 Win R */ { SDLK_RSUPER ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* B7 Win R */ { SDLK_RSUPER ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* B8 Win M */ { SDLK_MENU ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* B8 Win M */ { SDLK_MENU ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* B9 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* B9 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* BA ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* BA ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* BB ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* BB ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* BC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* BC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* BD ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* BD ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* BE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* BE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* BF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* BF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* C0 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* C0 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* C1 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* C1 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* C2 ??? */ { SDLK_UNKNOWN ,SDLK_LSUPER ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* C2 ??? */ { SDLK_UNKNOWN ,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,SDLK_UNKNOWN }, /* CA ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* CB ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* CB ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* CC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* CC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* CD ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* CD ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* CE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_LSUPER ,SDLK_UNKNOWN }, /* CE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_LSUPER ,SDLK_UNKNOWN },
/* CF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_RSUPER ,SDLK_UNKNOWN }, /* CF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_RSUPER ,SDLK_UNKNOWN },
/* D0 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_MENU ,SDLK_UNKNOWN }, /* D0 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_MENU ,SDLK_UNKNOWN },
/* D1 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* D1 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* D2 ??? */ { SDLK_UNKNOWN ,SDLK_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WN ,SDLK_UNKNOWN },
/* DA ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_LSUPER }, /* DA ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_LSUPER },
/* DB ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_RSUPER }, /* DB ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_RSUPER },
/* DC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_MENU }, /* DC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_MENU },
/* DD ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* DD ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* DE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* DE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* DF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* DF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* E0 Enter */ { SDLK_KP_ENTER ,SDLK_KP_ENTER ,SDLK_KP_ENTER ,SDLK_UNKNOWN }, /* E0 Enter */ { SDLK_KP_ENTER ,SDLK_KP_ENTER ,SDLK_KP_ENTER ,SDLK_UNKNOWN },
/* E1 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* E1 ??? */ { SDLK_UNKNOWN ,SDLK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OWN ,SDLK_UNKNOWN }, /* E9 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* EA ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* EA ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* EB ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* EB ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* EC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* EC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* ED ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* ED ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* EE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* EE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* EF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* EF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* F0 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* F0 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* F1 ??? */ { S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NKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* F9 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* F9 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* FA ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* FA ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* FB ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* FB ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* FC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* FC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* FD ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* FD ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* FE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* FE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
/* FF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, /* FF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN },
}; };
// Conversion de l'ancien codage des touches: // Conversion de l'ancien codage des touches:
@ -327,7 +327,7 @@ word Key_for_scancode(word scancode)
word Key_modifiers(SDLMod mod) word Key_modifiers(SDLMod mod)
{ {
word modifiers=0; word modifiers=0;
if (mod & KMOD_CTRL ) if (mod & KMOD_CTRL )
modifiers|=MOD_CTRL; modifiers|=MOD_CTRL;
if (mod & KMOD_SHIFT ) if (mod & KMOD_SHIFT )
@ -352,7 +352,7 @@ word Keysym_to_keycode(SDL_keysym keysym)
keysym.sym == SDLK_RMETA || keysym.sym == SDLK_LMETA || keysym.sym == SDLK_RMETA || keysym.sym == SDLK_LMETA ||
keysym.sym == SDLK_MODE) // AltGr keysym.sym == SDLK_MODE) // AltGr
return 0; return 0;
// Les touches qui n'ont qu'une valeur unicode (très rares) // Les touches qui n'ont qu'une valeur unicode (très rares)
// seront codées sur 11 bits, le 12e bit est mis à 1 (0x0800) // seront codées sur 11 bits, le 12e bit est mis à 1 (0x0800)
if (keysym.sym != 0) if (keysym.sym != 0)
@ -361,7 +361,7 @@ word Keysym_to_keycode(SDL_keysym keysym)
{ {
key_code = (keysym.scancode & 0x07FF) | 0x0800; key_code = (keysym.scancode & 0x07FF) | 0x0800;
} }
// Normally I should test keysym.mod here, but on windows the implementation // Normally I should test keysym.mod here, but on windows the implementation
// is buggy: if you release a modifier key, the following keys (when they repeat) // is buggy: if you release a modifier key, the following keys (when they repeat)
// still name the original modifiers. // still name the original modifiers.
@ -481,7 +481,7 @@ const char * Key_name(word key)
if (key == SDLK_UNKNOWN) if (key == SDLK_UNKNOWN)
return "None"; return "None";
#ifdef GCWZERO #ifdef GCWZERO
if (key & MOD_CTRL) if (key & MOD_CTRL)
strcat(buffer, "A+"); strcat(buffer, "A+");
if (key & MOD_ALT) if (key & MOD_ALT)
@ -495,16 +495,16 @@ const char * Key_name(word key)
strcat(buffer, "Alt+"); strcat(buffer, "Alt+");
if (key & MOD_SHIFT) if (key & MOD_SHIFT)
strcat(buffer, "Shift+"); strcat(buffer, "Shift+");
#endif #endif
if (key & MOD_META) if (key & MOD_META)
strcat(buffer, META_KEY_PREFIX); strcat(buffer, META_KEY_PREFIX);
key=key & ~(MOD_CTRL|MOD_ALT|MOD_SHIFT); key=key & ~(MOD_CTRL|MOD_ALT|MOD_SHIFT);
// 99 is only a sanity check // 99 is only a sanity check
if (key>=KEY_JOYBUTTON && key<=KEY_JOYBUTTON+99) if (key>=KEY_JOYBUTTON && key<=KEY_JOYBUTTON+99)
{ {
char *button_name; char *button_name;
switch(key-KEY_JOYBUTTON) switch(key-KEY_JOYBUTTON)
{ {
@ -583,14 +583,14 @@ const char * Key_name(word key)
#ifdef JOY_BUTTON_JOY #ifdef JOY_BUTTON_JOY
case JOY_BUTTON_JOY: button_name="[THUMB JOY]"; break; case JOY_BUTTON_JOY: button_name="[THUMB JOY]"; break;
#endif #endif
default: sprintf(buffer+strlen(buffer), "[B%d]", key-KEY_JOYBUTTON);return buffer; default: sprintf(buffer+strlen(buffer), "[B%d]", key-KEY_JOYBUTTON);return buffer;
} }
strcat(buffer,button_name); strcat(buffer,button_name);
return buffer; return buffer;
} }
if (key & 0x800) if (key & 0x800)
{ {
sprintf(buffer+strlen(buffer), "[%d]", key & 0x7FF); sprintf(buffer+strlen(buffer), "[%d]", key & 0x7FF);
@ -609,7 +609,7 @@ const char * Key_name(word key)
sprintf(buffer+strlen(buffer), "w%d", key - SDLK_WORLD_0); sprintf(buffer+strlen(buffer), "w%d", key - SDLK_WORLD_0);
return buffer; return buffer;
} }
// Touches au libellé connu // Touches au libellé connu
for (index=0; index < (long)sizeof(key_labels)/(long)sizeof(T_key_label);index++) for (index=0; index < (long)sizeof(key_labels)/(long)sizeof(T_key_label);index++)
{ {
@ -653,7 +653,7 @@ word Keysym_to_ANSI(SDL_keysym keysym)
return '\n'; return '\n';
return keysym.sym; return keysym.sym;
default: default:
return 0; return 0;
} }
} }
#endif #endif
@ -662,70 +662,70 @@ word Keysym_to_ANSI(SDL_keysym keysym)
{ {
return keysym.unicode; // Pas de souci, on est en ASCII standard return keysym.unicode; // Pas de souci, on est en ASCII standard
} }
// Quelques conversions Unicode-ANSI // Quelques conversions Unicode-ANSI
switch(keysym.unicode) switch(keysym.unicode)
{ {
case 0x8100: case 0x8100:
return 'ü'; // ü return '\xfc'; // ü
case 0x1A20: case 0x1A20:
return 'é'; // é return '\xe9'; // é
case 0x201A: case 0x201A:
return 'è'; // è return '\xe8'; // è
case 0x9201: case 0x9201:
return 'â'; // â return '\xe2'; // â
case 0x1E20: case 0x1E20:
return 'ä'; // ä return '\xe4'; // ä
case 0x2620: case 0x2620:
return 'à'; // à return '\xe0'; // à
case 0x2020: case 0x2020:
return 'å'; // å return '\xe5'; // å
case 0x2120: case 0x2120:
return 'ç'; // ç return '\xe7'; // ç
case 0xC602: case 0xC602:
return 'ê'; // ê return '\xea'; // ê
case 0x3020: case 0x3020:
return 'ë'; // ë return '\xeb'; // ë
case 0x6001: case 0x6001:
return 'è'; // è return '\xe8'; // è
case 0x3920: case 0x3920:
return 'ï'; // ï return '\xef'; // ï
case 0x5201: case 0x5201:
return 'î'; // î return '\xee'; // î
case 0x8D00: case 0x8D00:
return 'ì'; // ì return '\xec'; // ì
case 0x1C20: case 0x1C20:
return 'ô'; // ô return '\xf4'; // ô
case 0x1D20: case 0x1D20:
return 'ö'; // ö return '\xf6'; // ö
case 0x2220: case 0x2220:
return 'ò'; // ò return '\xf2'; // ò
case 0x1320: case 0x1320:
return 'û'; // û return '\xfb'; // û
case 0x1420: case 0x1420:
return 'ù'; // ù return '\xf9'; // ù
case 0xDC02: case 0xDC02:
return 'ÿ'; // ÿ return '\xff'; // ÿ
case 0x5301: case 0x5301:
return '£'; // £ return '\xa3'; // £
case 0xA000: case 0xA000:
return 'á'; // á return '\xe1'; // á
case 0xA100: case 0xA100:
return 'í'; // í return '\xed'; // í
case 0xA200: case 0xA200:
return 'ó'; // ó return '\xf3'; // ó
case 0xA300: case 0xA300:
return 'ú'; // ú return '\xfa'; // ú
case 0xA400: case 0xA400:
return 'ñ'; // ñ return '\xf1'; // ñ
case 0xA700: case 0xA700:
return 'º'; // º return '\xba'; // º
case 0xC600: case 0xC600:
return 'ã'; // ã return '\xe3'; // ã
case 0x20AC: case 0x20AC:
return '\x80'; // Euro sign is 20AC in unicode, 80 in CP1252 return '\x80'; // Euro sign is 20AC in unicode, 80 in CP1252
} }
// Key entre 127 et 255 // Key entre 127 et 255
if (keysym.unicode<256) if (keysym.unicode<256)
{ {

View File

@ -42,7 +42,7 @@
// PI is NOT part of math.h according to C standards... // PI is NOT part of math.h according to C standards...
#if defined(__GP2X__) || defined(__VBCC__) #if defined(__GP2X__) || defined(__VBCC__)
#define M_PI 3.14159265358979323846 #define M_PI 3.14159265358979323846
#endif #endif
/// Time (in SDL ticks) when the next airbrush drawing should be done. Also used /// Time (in SDL ticks) when the next airbrush drawing should be done. Also used
@ -55,7 +55,7 @@ static enum OPERATIONS Operation_before_pan;
void Start_operation_stack(word new_operation) void Start_operation_stack(word new_operation)
{ {
// This part handles things that must be done when exiting an operation. // This part handles things that must be done when exiting an operation.
Brush_rotation_center_is_defined=0; Brush_rotation_center_is_defined=0;
switch(Current_operation) switch(Current_operation)
{ {
@ -64,7 +64,7 @@ void Start_operation_stack(word new_operation)
break; break;
default: default:
break; break;
} }
// On mémorise l'opération précédente si on démarre une interruption // On mémorise l'opération précédente si on démarre une interruption
@ -169,7 +169,7 @@ void Display_coords_rel_or_abs(short start_x, short start_y)
str[0]='-'; str[0]='-';
} }
else else
strcpy(str,"± 0"); strcpy(str,"\xb1 0");
Print_in_menu(str,2); Print_in_menu(str,2);
if (Paintbrush_Y>start_y) if (Paintbrush_Y>start_y)
@ -183,7 +183,7 @@ void Display_coords_rel_or_abs(short start_x, short start_y)
str[0]='-'; str[0]='-';
} }
else else
strcpy(str,"± 0"); strcpy(str,"\xb1 0");
Print_in_menu(str,12); Print_in_menu(str,12);
} }
} }
@ -257,7 +257,7 @@ void Freehand_mode1_2_0(void)
{ {
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
Backup(); Backup();
Shade_table=Shade_table_right; Shade_table=Shade_table_right;
@ -356,7 +356,7 @@ void Freehand_mode2_2_0(void)
{ {
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
Backup(); Backup();
Shade_table=Shade_table_right; Shade_table=Shade_table_right;
@ -427,7 +427,7 @@ void Freehand_Mode3_2_0(void)
{ {
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
Backup(); Backup();
Shade_table=Shade_table_right; Shade_table=Shade_table_right;
@ -462,7 +462,7 @@ void Line_12_0(void)
{ {
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
Backup(); Backup();
Paintbrush_shape_before_operation=Paintbrush_shape; Paintbrush_shape_before_operation=Paintbrush_shape;
@ -484,7 +484,7 @@ void Line_12_0(void)
} }
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0); Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Paintbrush_X); Operation_push(Paintbrush_X);
Operation_push(Paintbrush_Y); Operation_push(Paintbrush_Y);
@ -500,14 +500,14 @@ void Line_12_5(void)
// //
// Souris effacée: Non // Souris effacée: Non
// Poursuite du tracé d'une ligne (déplacement de la souris en gardant le // Poursuite du tracé d'une ligne (déplacement de la souris en gardant le
// curseur appuyé) // curseur appuyé)
{ {
short start_x; short start_x;
short start_y; short start_y;
short end_x; short end_x;
short end_y; short end_y;
short cursor_x; short cursor_x;
short cursor_y; short cursor_y;
@ -610,7 +610,7 @@ void K_line_12_0(void)
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
Backup(); Backup();
Shade_table=(Mouse_K==LEFT_SIDE)?Shade_table_left:Shade_table_right; Shade_table=(Mouse_K==LEFT_SIDE)?Shade_table_left:Shade_table_right;
@ -623,7 +623,7 @@ void K_line_12_0(void)
Pixel_figure_preview(Paintbrush_X,Paintbrush_Y,color); Pixel_figure_preview(Paintbrush_X,Paintbrush_Y,color);
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0); Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Mouse_K | 0x80); Operation_push(Mouse_K | 0x80);
Operation_push(color); Operation_push(color);
@ -697,7 +697,7 @@ void K_line_0_6(void)
Operation_pop(&direction); Operation_pop(&direction);
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0); Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Pixel_figure_preview_auto (start_x,start_y); Pixel_figure_preview_auto (start_x,start_y);
Hide_line_preview (start_x,start_y,end_x,end_y); Hide_line_preview (start_x,start_y,end_x,end_y);
@ -789,7 +789,7 @@ void Rectangle_12_0(void)
{ {
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
@ -963,7 +963,7 @@ void Circle_12_0(void)
{ {
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
Backup(); Backup();
@ -1076,7 +1076,7 @@ void Empty_circle_0_5(void)
Draw_empty_circle_permanent(center_x,center_y,limit,color); Draw_empty_circle_permanent(center_x,center_y,limit,color);
End_of_modification(); End_of_modification();
if ( (Config.Coords_rel) && (Menu_is_visible) ) if ( (Config.Coords_rel) && (Menu_is_visible) )
{ {
Print_in_menu("X: Y:",0); Print_in_menu("X: Y:",0);
@ -1139,7 +1139,7 @@ void Ellipse_12_0(void)
{ {
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
Backup(); Backup();
@ -1158,7 +1158,7 @@ void Ellipse_12_0(void)
} }
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0); Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Paintbrush_X); Operation_push(Paintbrush_X);
Operation_push(Paintbrush_Y); Operation_push(Paintbrush_Y);
@ -1189,7 +1189,7 @@ void Ellipse_12_5(void)
Operation_pop(&center_y); Operation_pop(&center_y);
Operation_pop(&center_x); Operation_pop(&center_x);
Operation_pop(&color); Operation_pop(&color);
if ( (tangent_x!=Paintbrush_X) || (tangent_y!=Paintbrush_Y) ) if ( (tangent_x!=Paintbrush_X) || (tangent_y!=Paintbrush_Y) )
{ {
@ -1269,7 +1269,7 @@ void Empty_ellipse_0_5(void)
} }
End_of_modification(); End_of_modification();
if ( (Config.Coords_rel) && (Menu_is_visible) ) if ( (Config.Coords_rel) && (Menu_is_visible) )
{ {
Print_in_menu("X: Y: ",0); Print_in_menu("X: Y: ",0);
@ -1365,7 +1365,7 @@ void Fill_2_0(void)
{ {
if (Rightclick_colorpick(1)) if (Rightclick_colorpick(1))
return; return;
Hide_cursor(); Hide_cursor();
// Pas besoin d'initialiser le début d'opération car le Smear n'affecte pas // Pas besoin d'initialiser le début d'opération car le Smear n'affecte pas
// le Fill, et on se fout de savoir si on est dans la partie gauche ou // le Fill, et on se fout de savoir si on est dans la partie gauche ou
@ -1414,7 +1414,7 @@ void Replace_2_0(void)
{ {
if (Rightclick_colorpick(1)) if (Rightclick_colorpick(1))
return; return;
Hide_cursor(); Hide_cursor();
Init_start_operation(); Init_start_operation();
Backup(); Backup();
@ -1458,7 +1458,7 @@ void Draw_curve_cross(short x_pos, short y_pos)
end_y=3+(Limit_visible_bottom-y_pos); end_y=3+(Limit_visible_bottom-y_pos);
if (start_x<=end_x && start_y<=end_y) if (start_x<=end_x && start_y<=end_y)
{ {
for (i=start_x; i<=end_x; i++) for (i=start_x; i<=end_x; i++)
{ {
temp=x_pos+i-3; temp=x_pos+i-3;
@ -1495,7 +1495,7 @@ void Curve_34_points_1_0(void)
Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1); Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1);
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0); Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Fore_color); Operation_push(Fore_color);
Operation_push(Paintbrush_X); Operation_push(Paintbrush_X);
@ -1515,7 +1515,7 @@ void Curve_34_points_2_0(void)
{ {
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
Backup(); Backup();
Shade_table=Shade_table_right; Shade_table=Shade_table_right;
@ -1526,7 +1526,7 @@ void Curve_34_points_2_0(void)
Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1); Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1);
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0); Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Back_color); Operation_push(Back_color);
Operation_push(Paintbrush_X); Operation_push(Paintbrush_X);
@ -1769,7 +1769,7 @@ void Curve_4_points_2_9(void)
Operation_pop(&color); Operation_pop(&color);
Hide_cursor(); Hide_cursor();
Draw_curve_cross(x2,y2); Draw_curve_cross(x2,y2);
Draw_curve_cross(x3,y3); Draw_curve_cross(x3,y3);
@ -1851,14 +1851,14 @@ void Curve_3_points_0_5(void)
Operation_push(y4); Operation_push(y4);
Operation_push(Paintbrush_X); Operation_push(Paintbrush_X);
Operation_push(Paintbrush_Y); Operation_push(Paintbrush_Y);
if (Config.Stylus_mode) if (Config.Stylus_mode)
{ {
Display_cursor(); Display_cursor();
while(!Mouse_K) while(!Mouse_K)
Get_input(20); Get_input(20);
Hide_cursor(); Hide_cursor();
Hide_line_preview(x1,y1,x4,y4); Hide_line_preview(x1,y1,x4,y4);
} }
} }
@ -1924,7 +1924,7 @@ void Curve_finalize(void)
Operation_pop(&color); Operation_pop(&color);
Paintbrush_hidden=0; Paintbrush_hidden=0;
Hide_cursor(); Hide_cursor();
Hide_curve_preview (x1,y1,x2,y2,x3,y3,x4,y4,color); Hide_curve_preview (x1,y1,x2,y2,x3,y3,x4,y4,color);
@ -2046,7 +2046,7 @@ void Airbrush_12_2(void)
//Airbrush_next_time+=Airbrush_delay*10; //Airbrush_next_time+=Airbrush_delay*10;
// Time is now reset, because the += was death spiral // Time is now reset, because the += was death spiral
// if drawing took more time than the frequency. // if drawing took more time than the frequency.
Airbrush_next_time=now+Airbrush_delay*10; Airbrush_next_time=now+Airbrush_delay*10;
Airbrush(Mouse_K_unique); Airbrush(Mouse_K_unique);
} }
@ -2082,7 +2082,7 @@ void Polygon_12_0(void)
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
Backup(); Backup();
Shade_table=(Mouse_K==LEFT_SIDE)?Shade_table_left:Shade_table_right; Shade_table=(Mouse_K==LEFT_SIDE)?Shade_table_left:Shade_table_right;
@ -2096,7 +2096,7 @@ void Polygon_12_0(void)
Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1); Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1);
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0); Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Paintbrush_X); Operation_push(Paintbrush_X);
Operation_push(Paintbrush_Y); Operation_push(Paintbrush_Y);
@ -2186,7 +2186,7 @@ void Polyfill_12_0(void)
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
Backup(); Backup();
Shade_table=(Mouse_K==LEFT_SIDE)?Shade_table_left:Shade_table_right; Shade_table=(Mouse_K==LEFT_SIDE)?Shade_table_left:Shade_table_right;
@ -2202,9 +2202,9 @@ void Polyfill_12_0(void)
// On place temporairement le début de la ligne qui ne s'afficherait pas sinon // On place temporairement le début de la ligne qui ne s'afficherait pas sinon
Pixel_figure_preview_xor(Paintbrush_X,Paintbrush_Y,0); Pixel_figure_preview_xor(Paintbrush_X,Paintbrush_Y,0);
Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1); Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1);
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0); Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Paintbrush_X); Operation_push(Paintbrush_X);
Operation_push(Paintbrush_Y); Operation_push(Paintbrush_Y);
@ -2240,7 +2240,7 @@ void Polyfill_0_8(void)
Operation_pop(&direction); Operation_pop(&direction);
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0); Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Draw_line_preview_xor(start_x,start_y,end_x,end_y,0); Draw_line_preview_xor(start_x,start_y,end_x,end_y,0);
@ -2387,7 +2387,7 @@ void Polyform_12_0(void)
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
Backup(); Backup();
Shade_table=(Mouse_K==LEFT_SIDE)?Shade_table_left:Shade_table_right; Shade_table=(Mouse_K==LEFT_SIDE)?Shade_table_left:Shade_table_right;
@ -2548,7 +2548,7 @@ void Filled_polyform_12_0(void)
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
// Cette opération étant également utilisée pour le lasso, on ne fait pas de // Cette opération étant également utilisée pour le lasso, on ne fait pas de
@ -2569,7 +2569,7 @@ void Filled_polyform_12_0(void)
// On place temporairement le début de la ligne qui ne s'afficherait pas sinon // On place temporairement le début de la ligne qui ne s'afficherait pas sinon
Pixel_figure_preview_xor(Paintbrush_X,Paintbrush_Y,0); Pixel_figure_preview_xor(Paintbrush_X,Paintbrush_Y,0);
Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1); Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1);
Operation_push(Paintbrush_X); // X Initial Operation_push(Paintbrush_X); // X Initial
Operation_push(Paintbrush_Y); // X Initial Operation_push(Paintbrush_Y); // X Initial
Operation_push(color); // color de remplissage Operation_push(color); // color de remplissage
@ -2822,11 +2822,11 @@ void Scroll_12_0(void)
} }
} }
Update_screen_targets(); Update_screen_targets();
Cursor_hidden_before_scroll=Cursor_hidden; Cursor_hidden_before_scroll=Cursor_hidden;
Cursor_hidden=1; Cursor_hidden=1;
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0); Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
} }
@ -2853,7 +2853,7 @@ void Scroll_12_5(void)
Operation_pop(&x_pos); Operation_pop(&x_pos);
Operation_pop(&center_y); Operation_pop(&center_y);
Operation_pop(&center_x); Operation_pop(&center_x);
if ( (Paintbrush_X!=x_pos) || (Paintbrush_Y!=y_pos) ) if ( (Paintbrush_X!=x_pos) || (Paintbrush_Y!=y_pos) )
{ {
// L'utilisateur a bougé, il faut scroller l'image // L'utilisateur a bougé, il faut scroller l'image
@ -2946,7 +2946,7 @@ void Scroll_0_5(void)
} }
if (Main.tilemap_mode) if (Main.tilemap_mode)
Tilemap_update(); Tilemap_update();
Cursor_hidden=Cursor_hidden_before_scroll; Cursor_hidden=Cursor_hidden_before_scroll;
End_of_modification(); End_of_modification();
@ -2983,7 +2983,7 @@ void Grad_circle_12_0(void)
Pixel_figure_preview(Paintbrush_X,Paintbrush_Y,color); Pixel_figure_preview(Paintbrush_X,Paintbrush_Y,color);
Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1); Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1);
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("Radius: 0 ",0); Print_in_menu("Radius: 0 ",0);
@ -3149,7 +3149,7 @@ void Grad_circle_12_8(void)
Operation_pop(&center_x); Operation_pop(&center_x);
Operation_pop(&color); Operation_pop(&color);
Operation_pop(&old_mouse_k); Operation_pop(&old_mouse_k);
Hide_cursor(); Hide_cursor();
// On efface la croix XOR au centre du cercle // On efface la croix XOR au centre du cercle
Draw_curve_cross(center_x,center_y); Draw_curve_cross(center_x,center_y);
@ -3240,9 +3240,9 @@ void Grad_ellipse_12_0(void)
Pixel_figure_preview(Paintbrush_X,Paintbrush_Y,color); Pixel_figure_preview(Paintbrush_X,Paintbrush_Y,color);
Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1); Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1);
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0); Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Mouse_K); Operation_push(Mouse_K);
Operation_push(color); Operation_push(color);
@ -3561,7 +3561,7 @@ void Draw_xor_rect(short start_x, short start_y, short end_x, short end_y)
short offset_top = 0; short offset_top = 0;
short width = end_x-start_x; short width = end_x-start_x;
short height = end_y-start_y; short height = end_y-start_y;
// Handle clipping // Handle clipping
if (end_x-Main.offset_X > Min(Main.image_width, if (end_x-Main.offset_X > Min(Main.image_width,
Main.magnifier_mode?Main.separator_position:Screen_width)) Main.magnifier_mode?Main.separator_position:Screen_width))
@ -3597,12 +3597,12 @@ void Draw_xor_rect(short start_x, short start_y, short end_x, short end_y)
Horizontal_XOR_line(start_x - Main.offset_X, end_y Horizontal_XOR_line(start_x - Main.offset_X, end_y
- Main.offset_Y, width - offset_width + 1); - Main.offset_Y, width - offset_width + 1);
} }
if (height > offset_height + 2) if (height > offset_height + 2)
{ {
Vertical_XOR_line(start_x-Main.offset_X, start_y Vertical_XOR_line(start_x-Main.offset_X, start_y
- Main.offset_Y + 1, height - offset_height - 1); - Main.offset_Y + 1, height - offset_height - 1);
if (offset_width == 0) if (offset_width == 0)
{ {
Vertical_XOR_line(end_x - Main.offset_X, start_y Vertical_XOR_line(end_x - Main.offset_X, start_y
@ -3610,7 +3610,7 @@ void Draw_xor_rect(short start_x, short start_y, short end_x, short end_y)
} }
} }
} }
Update_rect(start_x - Main.offset_X, start_y - Main.offset_Y, Update_rect(start_x - Main.offset_X, start_y - Main.offset_Y,
width + 1 - offset_width, height + 1 - offset_height); width + 1 - offset_width, height + 1 - offset_height);
@ -3660,7 +3660,7 @@ void Draw_xor_rect(short start_x, short start_y, short end_x, short end_y)
{ {
if(offset_left==0) // La ligne de gauche est visible if(offset_left==0) // La ligne de gauche est visible
Vertical_XOR_line_zoom(start_x,offset_top!=0?offset_top:(start_y+1),height-offset_height-(offset_top==0)+(end_y>Limit_bottom_zoom)); Vertical_XOR_line_zoom(start_x,offset_top!=0?offset_top:(start_y+1),height-offset_height-(offset_top==0)+(end_y>Limit_bottom_zoom));
if(end_x<=Limit_right_zoom) // La ligne de droite est visible if(end_x<=Limit_right_zoom) // La ligne de droite est visible
Vertical_XOR_line_zoom(end_x,offset_top!=0?offset_top:(start_y+1),height-offset_height-(offset_top==0)+(end_y>Limit_bottom_zoom)); Vertical_XOR_line_zoom(end_x,offset_top!=0?offset_top:(start_y+1),height-offset_height-(offset_top==0)+(end_y>Limit_bottom_zoom));
} }
@ -3690,17 +3690,17 @@ void Grad_rectangle_0_5(void)
Operation_pop(&start_y); Operation_pop(&start_y);
Operation_pop(&start_x); Operation_pop(&start_x);
// This trick will erase the large crosshair at original position, // This trick will erase the large crosshair at original position,
// in normal and zoomed views. // in normal and zoomed views.
Paintbrush_X = start_x; Paintbrush_X = start_x;
Paintbrush_Y = start_y; Paintbrush_Y = start_y;
if (start_x>end_x) if (start_x>end_x)
SWAP_SHORTS(start_x, end_x) SWAP_SHORTS(start_x, end_x)
if (start_y>end_y) if (start_y>end_y)
SWAP_SHORTS(start_y, end_y) SWAP_SHORTS(start_y, end_y)
Hide_cursor(); Hide_cursor();
// Check if the rectangle is not fully outside the picture // Check if the rectangle is not fully outside the picture
@ -3808,7 +3808,7 @@ void Grad_rectangle_12_9(void)
// On corrige les coordonnées de la ligne si la touche shift est appuyée... // On corrige les coordonnées de la ligne si la touche shift est appuyée...
if(SDL_GetModState() & KMOD_SHIFT) if(SDL_GetModState() & KMOD_SHIFT)
Clamp_coordinates_regular_angle(start_x,start_y,&cursor_x,&cursor_y); Clamp_coordinates_regular_angle(start_x,start_y,&cursor_x,&cursor_y);
if ((cursor_x!=end_x) || (cursor_y!=end_y)) if ((cursor_x!=end_x) || (cursor_y!=end_y))
{ {
Display_coords_rel_or_abs(start_x,start_y); Display_coords_rel_or_abs(start_x,start_y);
@ -3890,13 +3890,13 @@ void Centered_lines_12_0(void)
{ {
if (Rightclick_colorpick(0)) if (Rightclick_colorpick(0))
return; return;
Init_start_operation(); Init_start_operation();
Backup(); Backup();
Shade_table=(Mouse_K==LEFT_SIDE)?Shade_table_left:Shade_table_right; Shade_table=(Mouse_K==LEFT_SIDE)?Shade_table_left:Shade_table_right;
if ((Config.Coords_rel) && (Menu_is_visible)) if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0); Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Mouse_K); Operation_push(Mouse_K);
Operation_push(Paintbrush_X); Operation_push(Paintbrush_X);
@ -4113,7 +4113,7 @@ void Pan_view_12_0(void)
// First time the user clicks // First time the user clicks
{ {
Init_start_operation(); Init_start_operation();
Operation_push(Paintbrush_X); Operation_push(Paintbrush_X);
Operation_push(Paintbrush_Y); Operation_push(Paintbrush_Y);
} }
@ -4129,10 +4129,10 @@ void Pan_view_12_2(void)
{ {
short start_x; short start_x;
short start_y; short start_y;
Operation_pop(&start_y); Operation_pop(&start_y);
Operation_pop(&start_x); Operation_pop(&start_x);
if (Paintbrush_X!=start_x || Paintbrush_Y!=start_y) if (Paintbrush_X!=start_x || Paintbrush_Y!=start_y)
{ {
// User moved // User moved
@ -4164,7 +4164,7 @@ void Pan_view_0_2(void)
Operation_pop(&start_y); Operation_pop(&start_y);
Operation_pop(&start_x); Operation_pop(&start_x);
if (!Pan_shortcut_pressed) if (!Pan_shortcut_pressed)
{ {
// End of operation, return to previous // End of operation, return to previous

View File

@ -245,7 +245,7 @@ void Spread_colors(short start,short end,T_Palette palette)
T_Components * backup_palette; T_Components * backup_palette;
T_Components * temp_palette; T_Components * temp_palette;
T_Components * working_palette; T_Components * working_palette;
byte Palette_undo_state = 0; byte Palette_undo_state = 0;
byte Palette_change_state = 0; byte Palette_change_state = 0;
@ -684,7 +684,7 @@ void Reduce_palette(short * used_colors,int nb_colors_asked,T_Palette palette,dw
} }
} }
} }
// Stop condition: when no more duplicates exist // Stop condition: when no more duplicates exist
// and the number of colors has reached the target. // and the number of colors has reached the target.
if (best_difference!=0 && (*used_colors)<=nb_colors_asked) if (best_difference!=0 && (*used_colors)<=nb_colors_asked)
@ -817,9 +817,9 @@ void Display_sliders(T_Scroller_button * red_slider,
if (block_is_selected) if (block_is_selected)
{ {
Set_palette_slider(red_slider,Color_max*2+1,Color_max,"± 0",NUMERIC_R_X); Set_palette_slider(red_slider,Color_max*2+1,Color_max,"\xb1 0",NUMERIC_R_X);
Set_palette_slider(green_slider,Color_max*2+1,Color_max,"± 0",NUMERIC_G_X); Set_palette_slider(green_slider,Color_max*2+1,Color_max,"\xb1 0",NUMERIC_G_X);
Set_palette_slider(blue_slider,Color_max*2+1,Color_max,"± 0",NUMERIC_B_X); Set_palette_slider(blue_slider,Color_max*2+1,Color_max,"\xb1 0",NUMERIC_B_X);
} }
else else
{ {
@ -855,15 +855,15 @@ void Draw_all_palette_sliders(T_Scroller_button * red_slider,
// Dans le cas d'un bloc, tout à 0. // Dans le cas d'un bloc, tout à 0.
red_slider->Position =Color_max; red_slider->Position =Color_max;
Window_draw_slider(red_slider); Window_draw_slider(red_slider);
Print_counter(NUMERIC_R_X,NUMERIC_Y,"± 0",MC_Black,MC_Light); Print_counter(NUMERIC_R_X,NUMERIC_Y,"\xb1 0",MC_Black,MC_Light);
green_slider->Position =Color_max; green_slider->Position =Color_max;
Window_draw_slider(green_slider); Window_draw_slider(green_slider);
Print_counter(NUMERIC_G_X,NUMERIC_Y,"± 0",MC_Black,MC_Light); Print_counter(NUMERIC_G_X,NUMERIC_Y,"\xb1 0",MC_Black,MC_Light);
blue_slider->Position =Color_max; blue_slider->Position =Color_max;
Window_draw_slider(blue_slider); Window_draw_slider(blue_slider);
Print_counter(NUMERIC_B_X,NUMERIC_Y,"± 0",MC_Black,MC_Light); Print_counter(NUMERIC_B_X,NUMERIC_Y,"\xb1 0",MC_Black,MC_Light);
} }
else else
{ {
@ -907,7 +907,7 @@ int Window_Histogram(unsigned char block_start, unsigned char block_end, dword*
int clicked_button; int clicked_button;
/* Draws an histogram of the selected range in a separate window */ /* Draws an histogram of the selected range in a separate window */
if (block_start == block_end) { if (block_start == block_end) {
// only one color selected: auto-detect the range // only one color selected: auto-detect the range
for (block_start=0; block_start!=255; block_start++) for (block_start=0; block_start!=255; block_start++)
@ -930,7 +930,7 @@ int Window_Histogram(unsigned char block_start, unsigned char block_end, dword*
Hide_cursor(); Hide_cursor();
return -1; return -1;
} }
Open_window(263, 150, "Histogram"); Open_window(263, 150, "Histogram");
Window_set_normal_button(120, 130, 42, 14, "Close",-1,1,SDLK_RETURN); Window_set_normal_button(120, 130, 42, 14, "Close",-1,1,SDLK_RETURN);
@ -948,13 +948,13 @@ int Window_Histogram(unsigned char block_start, unsigned char block_end, dword*
// Draw at least one pixel if the color is used // Draw at least one pixel if the color is used
if (height==0) if (height==0)
height=1; height=1;
Window_rectangle( Window_rectangle(
3+j*bar_width, 3+j*bar_width,
127-height, 127-height,
bar_width, bar_width,
height, i); height, i);
//if (i == MC_Light) { //if (i == MC_Light) {
Window_rectangle( Window_rectangle(
3+j*bar_width, 3+j*bar_width,
@ -976,7 +976,7 @@ int Window_Histogram(unsigned char block_start, unsigned char block_end, dword*
126-old_height, 126-old_height,
1, 1,
old_height-height+1,MC_Black); old_height-height+1,MC_Black);
old_height=height; old_height=height;
j++; j++;
} }
@ -1003,12 +1003,12 @@ int Window_Histogram(unsigned char block_start, unsigned char block_end, dword*
} }
else else
new_hovered_color=-1; new_hovered_color=-1;
// When changing hovered color, update the info area // When changing hovered color, update the info area
if (new_hovered_color!=hovered_color) if (new_hovered_color!=hovered_color)
{ {
char str[12]; char str[12];
hovered_color=new_hovered_color; hovered_color=new_hovered_color;
Hide_cursor(); Hide_cursor();
if (hovered_color==-1) if (hovered_color==-1)
@ -1034,10 +1034,10 @@ int Window_Histogram(unsigned char block_start, unsigned char block_end, dword*
clicked_button=Window_clicked_button(); clicked_button=Window_clicked_button();
if (Key == KEY_ESC) if (Key == KEY_ESC)
clicked_button=1; clicked_button=1;
} while( clicked_button < 1); } while( clicked_button < 1);
Close_window(); Close_window();
if (clicked_button==2) if (clicked_button==2)
{ {
// This is a counter-hack. Close_window() sets Mouse_K to zero // This is a counter-hack. Close_window() sets Mouse_K to zero
@ -1046,7 +1046,7 @@ int Window_Histogram(unsigned char block_start, unsigned char block_end, dword*
// Here I force it back to 1, so that the Wait_end_of_click() // Here I force it back to 1, so that the Wait_end_of_click()
// will really wait for a release of mouse button. // will really wait for a release of mouse button.
Mouse_K=1; Mouse_K=1;
return hovered_color; return hovered_color;
} }
return -1; return -1;
} }
@ -1067,7 +1067,7 @@ void Tag_used_colors(byte color, dword color_usage[])
short x_pos=Window_palette_button_list->Pos_X+6+((index>>4)*10); short x_pos=Window_palette_button_list->Pos_X+6+((index>>4)*10);
short y_pos=Window_palette_button_list->Pos_Y+3+((index&15)* 5); short y_pos=Window_palette_button_list->Pos_Y+3+((index&15)* 5);
byte col; byte col;
col=(color&&color_usage[index])?MC_White:MC_Light; col=(color&&color_usage[index])?MC_White:MC_Light;
Window_rectangle(x_pos+5,y_pos+0,1,5,col); Window_rectangle(x_pos+5,y_pos+0,1,5,col);
} }
@ -1093,12 +1093,12 @@ void Button_Palette(int btn)
static const int FGCOLOR_DISPLAY_Y = 69; static const int FGCOLOR_DISPLAY_Y = 69;
static const int FGCOLOR_DISPLAY_W = 32; static const int FGCOLOR_DISPLAY_W = 32;
static const int FGCOLOR_DISPLAY_H = 88; static const int FGCOLOR_DISPLAY_H = 88;
// Coordinates of the Color# // Coordinates of the Color#
static const int COLOR_X = 111; static const int COLOR_X = 111;
static const int COLOR_Y = 79; static const int COLOR_Y = 79;
static short reduce_colors_number = 256; static short reduce_colors_number = 256;
short temp_color; // Variable pouvant reservir pour différents calculs intermédiaires short temp_color; // Variable pouvant reservir pour différents calculs intermédiaires
dword temp; dword temp;
@ -1128,7 +1128,7 @@ void Button_Palette(int btn)
//T_Components * backup_palette; //T_Components * backup_palette;
//T_Components * temp_palette; //T_Components * temp_palette;
//T_Components * working_palette; //T_Components * working_palette;
static byte show_used_colors=0; static byte show_used_colors=0;
static const int C1_X = 5; static const int C1_X = 5;
@ -1224,7 +1224,7 @@ void Button_Palette(int btn)
Window_set_normal_button(C4_X,L2,C4_W,14,"Used",4,1,SDLK_d); // 15 Window_set_normal_button(C4_X,L2,C4_W,14,"Used",4,1,SDLK_d); // 15
Window_set_normal_button(C1_X,L4,83,14,"Zap unused",0,1,SDLK_DELETE);//16 Window_set_normal_button(C1_X,L4,83,14,"Zap unused",0,1,SDLK_DELETE);//16
Window_set_repeatable_button(BUTTON_PLUS_X, BUTTON_PLUS_Y,12,11,"+",0,1,SDLK_KP_PLUS); // 17 Window_set_repeatable_button(BUTTON_PLUS_X, BUTTON_PLUS_Y,12,11,"+",0,1,SDLK_KP_PLUS); // 17
Window_set_repeatable_button(BUTTON_MINUS_X,BUTTON_MINUS_Y,12,11,"-",0,1,SDLK_KP_MINUS); // 18 Window_set_repeatable_button(BUTTON_MINUS_X,BUTTON_MINUS_Y,12,11,"-",0,1,SDLK_KP_MINUS); // 18
@ -1241,7 +1241,7 @@ void Button_Palette(int btn)
Window_dropdown_add_item(sort_dropdown, 0, "Hue/Light"); Window_dropdown_add_item(sort_dropdown, 0, "Hue/Light");
Window_dropdown_add_item(sort_dropdown, 1, "Lightness"); Window_dropdown_add_item(sort_dropdown, 1, "Lightness");
Window_dropdown_add_item(sort_dropdown, 2, "Histogram"); Window_dropdown_add_item(sort_dropdown, 2, "Histogram");
Window_set_normal_button(NUMERIC_BOX_X,NUMERIC_BOX_Y,NUMERIC_BOX_W,NUMERIC_BOX_H,"" ,0,1,KEY_NONE); // 24 Window_set_normal_button(NUMERIC_BOX_X,NUMERIC_BOX_Y,NUMERIC_BOX_W,NUMERIC_BOX_H,"" ,0,1,KEY_NONE); // 24
// Button without outline // Button without outline
Window_display_frame_mono(NUMERIC_BOX_X-1,NUMERIC_BOX_Y-1,NUMERIC_BOX_W+2,NUMERIC_BOX_H+2,MC_Light); Window_display_frame_mono(NUMERIC_BOX_X-1,NUMERIC_BOX_Y-1,NUMERIC_BOX_W+2,NUMERIC_BOX_H+2,MC_Light);
@ -1250,7 +1250,7 @@ void Button_Palette(int btn)
Window_set_normal_button( 44,178,35,14,"Load" ,1,1,SDLK_l); // 26 Window_set_normal_button( 44,178,35,14,"Load" ,1,1,SDLK_l); // 26
Window_set_normal_button( 83,178,35,14,"Save" ,1,1,SDLK_s); // 27 Window_set_normal_button( 83,178,35,14,"Save" ,1,1,SDLK_s); // 27
// Dessin des petits effets spéciaux pour les boutons [+] et [-] // Dessin des petits effets spéciaux pour les boutons [+] et [-]
Draw_thingumajig(BUTTON_PLUS_X-5, BUTTON_PLUS_Y,MC_White,-1); Draw_thingumajig(BUTTON_PLUS_X-5, BUTTON_PLUS_Y,MC_White,-1);
Draw_thingumajig(BUTTON_MINUS_X+16,BUTTON_MINUS_Y,MC_Dark,+1); Draw_thingumajig(BUTTON_MINUS_X+16,BUTTON_MINUS_Y,MC_Dark,+1);
@ -1260,16 +1260,16 @@ void Button_Palette(int btn)
Update_color_count(&used_colors,color_usage); Update_color_count(&used_colors,color_usage);
if (show_used_colors) if (show_used_colors)
Tag_used_colors(1, color_usage); Tag_used_colors(1, color_usage);
Update_window_area(0,0,299,196); Update_window_area(0,0,299,196);
do do
{ {
old_mouse_x=Mouse_X; old_mouse_x=Mouse_X;
old_mouse_y=Mouse_Y; old_mouse_y=Mouse_Y;
old_mouse_k=Mouse_K; old_mouse_k=Mouse_K;
clicked_button=Window_clicked_button(); clicked_button=Window_clicked_button();
switch (clicked_button) switch (clicked_button)
{ {
case 0 : // Nulle part case 0 : // Nulle part
@ -1301,19 +1301,19 @@ void Button_Palette(int btn)
// Contextual menu // Contextual menu
T_Dropdown_button dropdown; T_Dropdown_button dropdown;
T_Dropdown_choice *item; T_Dropdown_choice *item;
dropdown.Pos_X =0; dropdown.Pos_X =0;
dropdown.Pos_Y =0; dropdown.Pos_Y =0;
dropdown.Height =0; dropdown.Height =0;
dropdown.Dropdown_width=48; dropdown.Dropdown_width=48;
dropdown.First_item =NULL; dropdown.First_item =NULL;
dropdown.Bottom_up =1; dropdown.Bottom_up =1;
Window_dropdown_add_item(&dropdown, 1, "Copy"); Window_dropdown_add_item(&dropdown, 1, "Copy");
Window_dropdown_add_item(&dropdown, 2, "Paste"); Window_dropdown_add_item(&dropdown, 2, "Paste");
item=Dropdown_activate(&dropdown,Mouse_X,Mouse_Y); item=Dropdown_activate(&dropdown,Mouse_X,Mouse_Y);
if (item && item->Number == 1) if (item && item->Number == 1)
{ {
// Copy // Copy
@ -1324,10 +1324,10 @@ void Button_Palette(int btn)
{ {
// Paste // Paste
int nb_colors; int nb_colors;
// Backup // Backup
Palette_edit_step(); Palette_edit_step();
nb_colors = Get_clipboard_colors(working_palette, block_start); nb_colors = Get_clipboard_colors(working_palette, block_start);
if (nb_colors>0) if (nb_colors>0)
{ {
@ -1345,7 +1345,7 @@ void Button_Palette(int btn)
else if (Back_color!=temp_color) else if (Back_color!=temp_color)
{ {
// Just select back color // Just select back color
Back_color=temp_color; Back_color=temp_color;
// 4 blocks de back_color entourant la fore_color // 4 blocks de back_color entourant la fore_color
Window_rectangle(BGCOLOR_DISPLAY_X,BGCOLOR_DISPLAY_Y,BGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_Y-BGCOLOR_DISPLAY_Y,Back_color); Window_rectangle(BGCOLOR_DISPLAY_X,BGCOLOR_DISPLAY_Y,BGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_Y-BGCOLOR_DISPLAY_Y,Back_color);
@ -1353,7 +1353,7 @@ void Button_Palette(int btn)
Window_rectangle(BGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_X-BGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_H,Back_color); Window_rectangle(BGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_X-BGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_H,Back_color);
Window_rectangle(FGCOLOR_DISPLAY_X+FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_Y,BGCOLOR_DISPLAY_X+BGCOLOR_DISPLAY_W-FGCOLOR_DISPLAY_X-FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H,Back_color); Window_rectangle(FGCOLOR_DISPLAY_X+FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_Y,BGCOLOR_DISPLAY_X+BGCOLOR_DISPLAY_W-FGCOLOR_DISPLAY_X-FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H,Back_color);
Update_window_area(BGCOLOR_DISPLAY_X,BGCOLOR_DISPLAY_Y,BGCOLOR_DISPLAY_W,BGCOLOR_DISPLAY_H); Update_window_area(BGCOLOR_DISPLAY_X,BGCOLOR_DISPLAY_Y,BGCOLOR_DISPLAY_W,BGCOLOR_DISPLAY_H);
Display_cursor(); Display_cursor();
} }
else else
@ -1409,7 +1409,7 @@ void Button_Palette(int btn)
Num2str(block_end ,str+4,3); Num2str(block_end ,str+4,3);
str[3]=26; // Flèche vers la droite str[3]=26; // Flèche vers la droite
Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light); Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light);
// Affichage des jauges // Affichage des jauges
Display_sliders(red_slider,green_slider,blue_slider,1,NULL); Display_sliders(red_slider,green_slider,blue_slider,1,NULL);
@ -1426,7 +1426,7 @@ void Button_Palette(int btn)
Num2str(block_end ,str+4,3); Num2str(block_end ,str+4,3);
str[3]=26; // Flèche vers la droite str[3]=26; // Flèche vers la droite
Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light); Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light);
// Affichage des jauges // Affichage des jauges
Display_sliders(red_slider,green_slider,blue_slider,1,NULL); Display_sliders(red_slider,green_slider,blue_slider,1,NULL);
@ -1443,7 +1443,7 @@ void Button_Palette(int btn)
Update_window_area(COLOR_X+24,COLOR_Y,32,7); Update_window_area(COLOR_X+24,COLOR_Y,32,7);
Num2str(Fore_color,str,3); Num2str(Fore_color,str,3);
Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light); Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light);
// Affichage des jauges // Affichage des jauges
Display_sliders(red_slider,green_slider,blue_slider,0,working_palette); Display_sliders(red_slider,green_slider,blue_slider,0,working_palette);
@ -1460,7 +1460,7 @@ void Button_Palette(int btn)
} }
Display_cursor(); Display_cursor();
} }
} }
break; break;
case 2 : // Jauge rouge case 2 : // Jauge rouge
@ -1472,7 +1472,7 @@ void Button_Palette(int btn)
{ {
Set_red(Fore_color,Decode_component(Color_max-red_slider->Position),working_palette); Set_red(Fore_color,Decode_component(Color_max-red_slider->Position),working_palette);
Format_component(Color_max-red_slider->Position,str); Format_component(Color_max-red_slider->Position,str);
} }
else else
{ {
HSL_to_RGB( HSL_to_RGB(
@ -1533,7 +1533,7 @@ void Button_Palette(int btn)
else else
{ {
// Jauge nulle: // Jauge nulle:
strcpy(str,"± 0"); strcpy(str,"\xb1 0");
} }
Print_counter(NUMERIC_R_X,NUMERIC_Y,str,MC_Black,MC_Light); Print_counter(NUMERIC_R_X,NUMERIC_Y,str,MC_Black,MC_Light);
@ -1553,7 +1553,7 @@ void Button_Palette(int btn)
{ {
Set_green (Fore_color,Decode_component(Color_max-green_slider->Position),working_palette); Set_green (Fore_color,Decode_component(Color_max-green_slider->Position),working_palette);
Format_component(Color_max-green_slider->Position,str); Format_component(Color_max-green_slider->Position,str);
} }
else else
{ {
HSL_to_RGB( HSL_to_RGB(
@ -1584,7 +1584,7 @@ void Button_Palette(int btn)
non_greys=1; non_greys=1;
else else
greys=1; greys=1;
for (i=block_start; i<=block_end; i++) for (i=block_start; i<=block_end; i++)
{ {
byte is_grey = temp_palette[i].R==temp_palette[i].G && temp_palette[i].R == temp_palette[i].B; byte is_grey = temp_palette[i].R==temp_palette[i].G && temp_palette[i].R == temp_palette[i].B;
@ -1614,7 +1614,7 @@ void Button_Palette(int btn)
else else
{ {
// Jauge nulle: // Jauge nulle:
strcpy(str,"± 0"); strcpy(str,"\xb1 0");
} }
Print_counter(NUMERIC_G_X,NUMERIC_Y,str,MC_Black,MC_Light); Print_counter(NUMERIC_G_X,NUMERIC_Y,str,MC_Black,MC_Light);
} }
@ -1634,7 +1634,7 @@ void Button_Palette(int btn)
{ {
Set_blue (Fore_color,Decode_component(Color_max-blue_slider->Position),working_palette); Set_blue (Fore_color,Decode_component(Color_max-blue_slider->Position),working_palette);
Format_component(Color_max-blue_slider->Position,str); Format_component(Color_max-blue_slider->Position,str);
} }
else else
{ {
HSL_to_RGB( HSL_to_RGB(
@ -1645,7 +1645,7 @@ void Button_Palette(int btn)
&working_palette[Fore_color].G, &working_palette[Fore_color].G,
&working_palette[Fore_color].B); &working_palette[Fore_color].B);
Format_component((int)255-blue_slider->Position,str); Format_component((int)255-blue_slider->Position,str);
} }
Print_counter(NUMERIC_B_X,NUMERIC_Y,str,MC_Black,MC_Light); Print_counter(NUMERIC_B_X,NUMERIC_Y,str,MC_Black,MC_Light);
} }
else else
@ -1665,7 +1665,7 @@ void Button_Palette(int btn)
non_greys=1; non_greys=1;
else else
greys=1; greys=1;
for (i=block_start; i<=block_end; i++) for (i=block_start; i<=block_end; i++)
{ {
byte is_grey = temp_palette[i].R==temp_palette[i].G && temp_palette[i].R == temp_palette[i].B; byte is_grey = temp_palette[i].R==temp_palette[i].G && temp_palette[i].R == temp_palette[i].B;
@ -1695,7 +1695,7 @@ void Button_Palette(int btn)
else else
{ {
// Jauge nulle: // Jauge nulle:
strcpy(str,"± 0"); strcpy(str,"\xb1 0");
} }
Print_counter(NUMERIC_B_X,NUMERIC_Y,str,MC_Black,MC_Light); Print_counter(NUMERIC_B_X,NUMERIC_Y,str,MC_Black,MC_Light);
} }
@ -1746,7 +1746,7 @@ void Button_Palette(int btn)
{ {
dword sum_r=0, sum_g=0, sum_b=0, used; dword sum_r=0, sum_g=0, sum_b=0, used;
Palette_edit_step(); Palette_edit_step();
// Compute weighted average // Compute weighted average
used=color_usage[temp_color]+color_usage[Fore_color]; used=color_usage[temp_color]+color_usage[Fore_color];
if (used) if (used)
@ -1773,7 +1773,7 @@ void Button_Palette(int btn)
Set_red (Fore_color,sum_r,working_palette); Set_red (Fore_color,sum_r,working_palette);
Set_green(Fore_color,sum_g,working_palette); Set_green(Fore_color,sum_g,working_palette);
Set_blue (Fore_color,sum_b,working_palette); Set_blue (Fore_color,sum_b,working_palette);
Wait_end_of_click(); Wait_end_of_click();
} }
} }
@ -1855,14 +1855,14 @@ void Button_Palette(int btn)
Tag_color_range(block_start,block_end); Tag_color_range(block_start,block_end);
if (show_used_colors) if (show_used_colors)
Tag_used_colors(1, color_usage); Tag_used_colors(1, color_usage);
need_to_remap=1; need_to_remap=1;
Set_palette(working_palette); Set_palette(working_palette);
Display_cursor(); Display_cursor();
Draw_all_palette_sliders(red_slider,green_slider,blue_slider,working_palette,block_start,block_end); Draw_all_palette_sliders(red_slider,green_slider,blue_slider,working_palette,block_start,block_end);
// En cas de X-Swap, tout l'ecran a pu changer de couleur. // En cas de X-Swap, tout l'ecran a pu changer de couleur.
if (clicked_button==8) if (clicked_button==8)
{ {
@ -1908,7 +1908,7 @@ void Button_Palette(int btn)
Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light); Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light);
// On tag le bloc (ou la couleur) // On tag le bloc (ou la couleur)
Tag_color_range(block_start,block_end); Tag_color_range(block_start,block_end);
need_to_remap=1; need_to_remap=1;
Display_cursor(); Display_cursor();
@ -1952,13 +1952,13 @@ void Button_Palette(int btn)
if (Window_attribute2==0) // User picked "other" choice if (Window_attribute2==0) // User picked "other" choice
{ {
int choice; int choice;
choice=Requester_window("Enter the max. number of colors", choice=Requester_window("Enter the max. number of colors",
reduce_colors_number); reduce_colors_number);
if (choice < 2 || choice > 256) if (choice < 2 || choice > 256)
break; // Cancel break; // Cancel
reduce_colors_number = choice; reduce_colors_number = choice;
} }
else else
@ -2111,7 +2111,7 @@ void Button_Palette(int btn)
else else
{ {
// Jauge nulle: // Jauge nulle:
strcpy(str,"± 0"); strcpy(str,"\xb1 0");
} }
Print_counter(NUMERIC_R_X,NUMERIC_Y,str,MC_Black,MC_Light); Print_counter(NUMERIC_R_X,NUMERIC_Y,str,MC_Black,MC_Light);
@ -2132,7 +2132,7 @@ void Button_Palette(int btn)
else else
{ {
// Jauge nulle: // Jauge nulle:
strcpy(str,"± 0"); strcpy(str,"\xb1 0");
} }
Print_counter(NUMERIC_G_X,NUMERIC_Y,str,MC_Black,MC_Light); Print_counter(NUMERIC_G_X,NUMERIC_Y,str,MC_Black,MC_Light);
@ -2153,7 +2153,7 @@ void Button_Palette(int btn)
else else
{ {
// Jauge nulle: // Jauge nulle:
strcpy(str,"± 0"); strcpy(str,"\xb1 0");
} }
Print_counter(NUMERIC_B_X,NUMERIC_Y,str,MC_Black,MC_Light); Print_counter(NUMERIC_B_X,NUMERIC_Y,str,MC_Black,MC_Light);
} }
@ -2237,7 +2237,7 @@ void Button_Palette(int btn)
else else
{ {
// Jauge nulle: // Jauge nulle:
strcpy(str,"± 0"); strcpy(str,"\xb1 0");
} }
Print_counter(NUMERIC_R_X,NUMERIC_Y,str,MC_Black,MC_Light); Print_counter(NUMERIC_R_X,NUMERIC_Y,str,MC_Black,MC_Light);
@ -2258,7 +2258,7 @@ void Button_Palette(int btn)
else else
{ {
// Jauge nulle: // Jauge nulle:
strcpy(str,"± 0"); strcpy(str,"\xb1 0");
} }
Print_counter(NUMERIC_G_X,NUMERIC_Y,str,MC_Black,MC_Light); Print_counter(NUMERIC_G_X,NUMERIC_Y,str,MC_Black,MC_Light);
@ -2279,7 +2279,7 @@ void Button_Palette(int btn)
else else
{ {
// Jauge nulle: // Jauge nulle:
strcpy(str,"± 0"); strcpy(str,"\xb1 0");
} }
Print_counter(NUMERIC_B_X,NUMERIC_Y,str,MC_Black,MC_Light); Print_counter(NUMERIC_B_X,NUMERIC_Y,str,MC_Black,MC_Light);
} }
@ -2319,14 +2319,14 @@ void Button_Palette(int btn)
for (i=block_start; i < block_start + (block_end-block_start+1)/2;i++) for (i=block_start; i < block_start + (block_end-block_start+1)/2;i++)
{ {
temp_color=block_end-(i-block_start); temp_color=block_end-(i-block_start);
Set_red (i,backup_palette[temp_color].R,working_palette); Set_red (i,backup_palette[temp_color].R,working_palette);
Set_green (i,backup_palette[temp_color].G,working_palette); Set_green (i,backup_palette[temp_color].G,working_palette);
Set_blue (i,backup_palette[temp_color].B,working_palette); Set_blue (i,backup_palette[temp_color].B,working_palette);
Set_red (temp_color,backup_palette[i].R,working_palette); Set_red (temp_color,backup_palette[i].R,working_palette);
Set_green (temp_color,backup_palette[i].G,working_palette); Set_green (temp_color,backup_palette[i].G,working_palette);
Set_blue (temp_color,backup_palette[i].B,working_palette); Set_blue (temp_color,backup_palette[i].B,working_palette);
if (clicked_button==21) if (clicked_button==21)
{ {
conversion_table[i]=temp_color; conversion_table[i]=temp_color;
@ -2360,12 +2360,12 @@ void Button_Palette(int btn)
break; break;
case 22 : // HSL <> RGB case 22 : // HSL <> RGB
// Acte les changements en cours sur une ou plusieurs couleurs // Acte les changements en cours sur une ou plusieurs couleurs
Palette_edit_select_range(); Palette_edit_select_range();
Hide_cursor(); Hide_cursor();
Palette_view_is_RGB = !Palette_view_is_RGB; Palette_view_is_RGB = !Palette_view_is_RGB;
if(! Palette_view_is_RGB) if(! Palette_view_is_RGB)
{ {
@ -2388,9 +2388,9 @@ void Button_Palette(int btn)
Window_draw_normal_bouton(BUTTON_MINUS_X,BUTTON_MINUS_Y,12,11,"-",0,1); Window_draw_normal_bouton(BUTTON_MINUS_X,BUTTON_MINUS_Y,12,11,"-",0,1);
} }
Display_sliders(red_slider,green_slider,blue_slider,(block_start!=block_end),working_palette); Display_sliders(red_slider,green_slider,blue_slider,(block_start!=block_end),working_palette);
Display_cursor(); Display_cursor();
Update_window_area(BUTTON_PLUS_X-1,BUTTON_PLUS_Y-1,14,14); Update_window_area(BUTTON_PLUS_X-1,BUTTON_PLUS_Y-1,14,14);
Update_window_area(BUTTON_MINUS_X-1,BUTTON_MINUS_Y-1,14,14); Update_window_area(BUTTON_MINUS_X-1,BUTTON_MINUS_Y-1,14,14);
break; break;
@ -2417,7 +2417,7 @@ void Button_Palette(int btn)
begin = block_start; begin = block_start;
end = block_end; end = block_end;
} }
// Init remap table // Init remap table
for (i=0;i<256;i++) for (i=0;i<256;i++)
remap_table[i]=i; remap_table[i]=i;
@ -2454,7 +2454,7 @@ void Button_Palette(int btn)
SWAP_DWORDS(color_usage[temp_color], color_usage[temp_color-1]) SWAP_DWORDS(color_usage[temp_color], color_usage[temp_color-1])
SWAP_BYTES(remap_table[temp_color], remap_table[temp_color-1]) SWAP_BYTES(remap_table[temp_color], remap_table[temp_color-1])
swap=1; swap=1;
} }
} }
@ -2467,7 +2467,7 @@ void Button_Palette(int btn)
lightness=Perceptual_lightness(working_palette+begin); lightness=Perceptual_lightness(working_palette+begin);
for(temp_color=begin+1;temp_color<=end;temp_color++) for(temp_color=begin+1;temp_color<=end;temp_color++)
{ {
old_lightness=lightness; old_lightness=lightness;
lightness=Perceptual_lightness(working_palette+temp_color); lightness=Perceptual_lightness(working_palette+temp_color);
if(lightness>old_lightness) if(lightness>old_lightness)
@ -2476,11 +2476,11 @@ void Button_Palette(int btn)
SWAP_BYTES(working_palette[temp_color].R, working_palette[temp_color-1].R) SWAP_BYTES(working_palette[temp_color].R, working_palette[temp_color-1].R)
SWAP_BYTES(working_palette[temp_color].G, working_palette[temp_color-1].G) SWAP_BYTES(working_palette[temp_color].G, working_palette[temp_color-1].G)
SWAP_BYTES(working_palette[temp_color].B, working_palette[temp_color-1].B) SWAP_BYTES(working_palette[temp_color].B, working_palette[temp_color-1].B)
SWAP_DWORDS(color_usage[temp_color], color_usage[temp_color-1]) SWAP_DWORDS(color_usage[temp_color], color_usage[temp_color-1])
SWAP_BYTES(remap_table[temp_color], remap_table[temp_color-1]) SWAP_BYTES(remap_table[temp_color], remap_table[temp_color-1])
swap=1; swap=1;
} }
} }
@ -2493,7 +2493,7 @@ void Button_Palette(int btn)
lightness=color_usage[begin]; lightness=color_usage[begin];
for(temp_color=begin+1;temp_color<=end;temp_color++) for(temp_color=begin+1;temp_color<=end;temp_color++)
{ {
old_lightness=lightness; old_lightness=lightness;
lightness=color_usage[temp_color]; lightness=color_usage[temp_color];
if(lightness>old_lightness) if(lightness>old_lightness)
@ -2502,11 +2502,11 @@ void Button_Palette(int btn)
SWAP_BYTES(working_palette[temp_color].R, working_palette[temp_color-1].R) SWAP_BYTES(working_palette[temp_color].R, working_palette[temp_color-1].R)
SWAP_BYTES(working_palette[temp_color].G, working_palette[temp_color-1].G) SWAP_BYTES(working_palette[temp_color].G, working_palette[temp_color-1].G)
SWAP_BYTES(working_palette[temp_color].B, working_palette[temp_color-1].B) SWAP_BYTES(working_palette[temp_color].B, working_palette[temp_color-1].B)
SWAP_DWORDS(color_usage[temp_color], color_usage[temp_color-1]) SWAP_DWORDS(color_usage[temp_color], color_usage[temp_color-1])
SWAP_BYTES(remap_table[temp_color], remap_table[temp_color-1]) SWAP_BYTES(remap_table[temp_color], remap_table[temp_color-1])
swap=1; swap=1;
} }
} }
@ -2519,7 +2519,7 @@ void Button_Palette(int btn)
// palette, l'image et à l'écran. // palette, l'image et à l'écran.
Set_palette(working_palette); Set_palette(working_palette);
Palette_edit_step(); // Disable Undo Palette_edit_step(); // Disable Undo
End_of_modification(); End_of_modification();
need_to_remap=1; need_to_remap=1;
} }
@ -2528,20 +2528,20 @@ void Button_Palette(int btn)
{ {
char str[7]; char str[7];
unsigned int new_color; unsigned int new_color;
Hide_cursor(); Hide_cursor();
Print_in_window(NUMERIC_BOX_X+2,NUMERIC_BOX_Y+2,"Hex",MC_Black,MC_Light); Print_in_window(NUMERIC_BOX_X+2,NUMERIC_BOX_Y+2,"Hex",MC_Black,MC_Light);
// Clear out remaining area // Clear out remaining area
Window_rectangle(NUMERIC_BOX_X+1+3*8,NUMERIC_BOX_Y+1,NUMERIC_BOX_W-3-3*8, NUMERIC_BOX_H-3,MC_Light); Window_rectangle(NUMERIC_BOX_X+1+3*8,NUMERIC_BOX_Y+1,NUMERIC_BOX_W-3-3*8, NUMERIC_BOX_H-3,MC_Light);
Update_window_area(NUMERIC_BOX_X+1+3*8,NUMERIC_BOX_Y+1,NUMERIC_BOX_W-3-3*8, NUMERIC_BOX_H-3); Update_window_area(NUMERIC_BOX_X+1+3*8,NUMERIC_BOX_Y+1,NUMERIC_BOX_W-3-3*8, NUMERIC_BOX_H-3);
str[0]='\0'; str[0]='\0';
Display_cursor(); Display_cursor();
if (Readline(NUMERIC_BOX_X+NUMERIC_BOX_W-2-6*8, NUMERIC_BOX_Y+2, str, 6, INPUT_TYPE_HEXA)) if (Readline(NUMERIC_BOX_X+NUMERIC_BOX_W-2-6*8, NUMERIC_BOX_Y+2, str, 6, INPUT_TYPE_HEXA))
{ {
int length = strlen(str); int length = strlen(str);
short new_red, new_blue, new_green; short new_red, new_blue, new_green;
if (length==3 || length==6) if (length==3 || length==6)
{ {
sscanf(str, "%x", &new_color); sscanf(str, "%x", &new_color);
@ -2550,12 +2550,12 @@ void Button_Palette(int btn)
new_color = new_color =
((new_color&0xF00)*0x1100) | ((new_color&0xF00)*0x1100) |
((new_color&0x0F0)*0x110) | ((new_color&0x0F0)*0x110) |
((new_color&0x00F)*0x11); ((new_color&0x00F)*0x11);
} }
new_red=(new_color&0xFF0000) >> 16; new_red=(new_color&0xFF0000) >> 16;
new_green=(new_color&0x00FF00) >> 8; new_green=(new_color&0x00FF00) >> 8;
new_blue=(new_color&0x0000FF); new_blue=(new_color&0x0000FF);
// Backup // Backup
Palette_edit_step(); Palette_edit_step();
// Assign color // Assign color
@ -2578,32 +2578,32 @@ void Button_Palette(int btn)
Draw_all_palette_sliders(red_slider,green_slider,blue_slider,working_palette,block_start,block_end); Draw_all_palette_sliders(red_slider,green_slider,blue_slider,working_palette,block_start,block_end);
} }
break; break;
case 25: // Number of colors used: Open histogram case 25: // Number of colors used: Open histogram
{ {
int selected_col; int selected_col;
selected_col=Window_Histogram(block_start, block_end, color_usage); selected_col=Window_Histogram(block_start, block_end, color_usage);
if (selected_col!=-1) if (selected_col!=-1)
{ {
// Tag selected color // Tag selected color
Fore_color=first_color=last_color=block_start=block_end=selected_col; Fore_color=first_color=last_color=block_start=block_end=selected_col;
Tag_color_range(block_start,block_end); Tag_color_range(block_start,block_end);
// Affichage du n° de la couleur sélectionnée // Affichage du n° de la couleur sélectionnée
Window_rectangle(COLOR_X,COLOR_Y,56,7,MC_Light); Window_rectangle(COLOR_X,COLOR_Y,56,7,MC_Light);
Num2str(Fore_color,str,3); Num2str(Fore_color,str,3);
Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light); Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light);
Update_window_area(COLOR_X,COLOR_Y,56,7); Update_window_area(COLOR_X,COLOR_Y,56,7);
// Affichage des jauges // Affichage des jauges
Window_rectangle(NUMERIC_R_X,NUMERIC_Y,72,7,MC_Light); Window_rectangle(NUMERIC_R_X,NUMERIC_Y,72,7,MC_Light);
Display_sliders(red_slider,green_slider,blue_slider,0,working_palette); Display_sliders(red_slider,green_slider,blue_slider,0,working_palette);
// Affichage dans le block de visu de la couleur en cours // Affichage dans le block de visu de la couleur en cours
Window_rectangle(FGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H,Fore_color); Window_rectangle(FGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H,Fore_color);
Update_window_area(FGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H); Update_window_area(FGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H);
Palette_edit_select_range(); Palette_edit_select_range();
} }
@ -2759,14 +2759,14 @@ void Button_Palette(int btn)
Update_window_area(COLOR_X+24,COLOR_Y,32,7); Update_window_area(COLOR_X+24,COLOR_Y,32,7);
Num2str(Fore_color,str,3); Num2str(Fore_color,str,3);
Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light); Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light);
// Affichage des jauges // Affichage des jauges
Display_sliders(red_slider,green_slider,blue_slider,0,working_palette); Display_sliders(red_slider,green_slider,blue_slider,0,working_palette);
// Affichage dans le block de visu de la couleur en cours // Affichage dans le block de visu de la couleur en cours
Window_rectangle(FGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H,Fore_color); Window_rectangle(FGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H,Fore_color);
Update_window_area(FGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H); Update_window_area(FGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H);
Palette_edit_select_range(); Palette_edit_select_range();
} }
Display_cursor(); Display_cursor();
@ -2795,7 +2795,7 @@ void Button_Palette(int btn)
Hide_cursor(); Hide_cursor();
// Backup // Backup
Palette_edit_step(); Palette_edit_step();
nb_colors = Get_clipboard_colors(working_palette, block_start); nb_colors = Get_clipboard_colors(working_palette, block_start);
if (nb_colors>0) if (nb_colors>0)
{ {
@ -2821,7 +2821,7 @@ void Button_Palette(int btn)
Tag_used_colors(1, color_usage); Tag_used_colors(1, color_usage);
Window_rectangle(BGCOLOR_DISPLAY_X,BGCOLOR_DISPLAY_Y,BGCOLOR_DISPLAY_W,BGCOLOR_DISPLAY_H,Back_color); Window_rectangle(BGCOLOR_DISPLAY_X,BGCOLOR_DISPLAY_Y,BGCOLOR_DISPLAY_W,BGCOLOR_DISPLAY_H,Back_color);
Update_window_area(BGCOLOR_DISPLAY_X,BGCOLOR_DISPLAY_Y,BGCOLOR_DISPLAY_W,BGCOLOR_DISPLAY_H); Update_window_area(BGCOLOR_DISPLAY_X,BGCOLOR_DISPLAY_Y,BGCOLOR_DISPLAY_W,BGCOLOR_DISPLAY_H);
Display_grad_block_in_window(FGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H,block_start,block_end); Display_grad_block_in_window(FGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H,block_start,block_end);
Update_window_area(8,82,16*10,5*16); Update_window_area(8,82,16*10,5*16);
@ -2927,7 +2927,7 @@ void Button_Secondary_palette(int btn)
Print_in_window(51,108,"Vertical",MC_Dark,MC_Light); Print_in_window(51,108,"Vertical",MC_Dark,MC_Light);
Window_set_normal_button(190,82,18,14,"x2" , 1,1,SDLK_x); // 9 Window_set_normal_button(190,82,18,14,"x2" , 1,1,SDLK_x); // 9
Window_set_normal_button(137,82,18,14,"÷2" , 0,1,SDLK_w); // 10 Window_set_normal_button(137,82,18,14,"\xf7""2" , 0,1,SDLK_w); // 10
gamma_slider = Window_set_horizontal_scroller_button(137,110,71,30, 1,Gamma*10);// 11 gamma_slider = Window_set_horizontal_scroller_button(137,110,71,30, 1,Gamma*10);// 11
Num2str(Gamma*10,str,2); Num2str(Gamma*10,str,2);
@ -2958,7 +2958,7 @@ void Button_Secondary_palette(int btn)
// Column slider // Column slider
Num2str(256-Window_attribute2,str,3); Num2str(256-Window_attribute2,str,3);
Print_in_window(38,89,str,MC_Black,MC_Light); Print_in_window(38,89,str,MC_Black,MC_Light);
break; break;
case 6: case 6:
// Line slider // Line slider
Num2str(16-Window_attribute2,str,3); Num2str(16-Window_attribute2,str,3);
@ -3019,7 +3019,7 @@ void Button_Secondary_palette(int btn)
Close_window(); Close_window();
Unselect_button(BUTTON_PALETTE); Unselect_button(BUTTON_PALETTE);
Display_cursor(); Display_cursor();
if (clicked_button==4) // Cancel if (clicked_button==4) // Cancel
return; return;
@ -3053,7 +3053,7 @@ void Button_Secondary_palette(int btn)
// that this will not activate shade mode on exit. // that this will not activate shade mode on exit.
Shade_settings_menu(); Shade_settings_menu();
} }
if (palette_needs_redraw) if (palette_needs_redraw)
{ {
Change_palette_cells(); Change_palette_cells();
@ -3088,7 +3088,7 @@ void Set_clipboard_colors(int nb_colors, T_Components *colors)
int Get_clipboard_colors(T_Palette palette, byte start_color) int Get_clipboard_colors(T_Palette palette, byte start_color)
{ {
int nb_colors = Palette_clipboard_count; int nb_colors = Palette_clipboard_count;
if (nb_colors==0) if (nb_colors==0)
return 0; return 0;
@ -3109,7 +3109,7 @@ const T_Components * Favorite_GUI_color(byte color_index)
{128,128,128}, // Grey {128,128,128}, // Grey
{255,255,255} {255,255,255}
}; };
if (RGB_scale==3) if (RGB_scale==3)
{ {
// Check if ALL GUI colors are compatible with /rgb 3 // Check if ALL GUI colors are compatible with /rgb 3

View File

@ -42,7 +42,7 @@ void Factorize(short *a, short *b)
{ {
// Method: brute-force. // Method: brute-force.
short factor; short factor;
factor=2; factor=2;
while (factor<=*a && factor<=*b) while (factor<=*a && factor<=*b)
{ {
@ -79,7 +79,7 @@ void Button_Transform_menu(int btn)
UNIT_PERCENT = 2, UNIT_PERCENT = 2,
UNIT_RATIO = 3 UNIT_RATIO = 3
}; };
char buffer[5]; char buffer[5];
short clicked_button; short clicked_button;
const char * unit_label[] = { const char * unit_label[] = {
@ -95,11 +95,11 @@ void Button_Transform_menu(int btn)
short new_width=Main.image_width; short new_width=Main.image_width;
short new_height=Main.image_height; short new_height=Main.image_height;
byte need_display_size = 0; byte need_display_size = 0;
// Persistent data // Persistent data
static short unit_index = 1; // 1= Pixels, 2= Percent, 3=Ratio static short unit_index = 1; // 1= Pixels, 2= Percent, 3=Ratio
static short ratio_is_locked = 1; // True if X and Y resize should go together static short ratio_is_locked = 1; // True if X and Y resize should go together
T_Dropdown_button * unit_button; T_Dropdown_button * unit_button;
T_Special_button * input_button[4]; T_Special_button * input_button[4];
short *input_value[4]; short *input_value[4];
@ -109,7 +109,7 @@ void Button_Transform_menu(int btn)
new_ratio_width=old_ratio_width=new_ratio_height=old_ratio_height=100; new_ratio_width=old_ratio_width=new_ratio_height=old_ratio_height=100;
else else
new_ratio_width=old_ratio_width=new_ratio_height=old_ratio_height=1; new_ratio_width=old_ratio_width=new_ratio_height=old_ratio_height=1;
Open_window(215,165,"Picture transform"); Open_window(215,165,"Picture transform");
Window_display_frame( 5, 15,205,91); Window_display_frame( 5, 15,205,91);
@ -123,9 +123,9 @@ void Button_Transform_menu(int btn)
Window_set_normal_button( 17,140, 27,14,"Y\022" ,1,1,SDLK_y); // 3 Window_set_normal_button( 17,140, 27,14,"Y\022" ,1,1,SDLK_y); // 3
Print_in_window( 84,114,"Rotate",MC_Dark,MC_Light); Print_in_window( 84,114,"Rotate",MC_Dark,MC_Light);
Window_set_normal_button( 69,125, 37,14,"-90°" ,0,1,SDLK_LAST); // 4 Window_set_normal_button( 69,125, 37,14,"-90\xb0" ,0,1,SDLK_LAST); // 4
Window_set_normal_button(107,125, 37,14,"+90°" ,0,1,SDLK_LAST); // 5 Window_set_normal_button(107,125, 37,14,"+90\xb0" ,0,1,SDLK_LAST); // 5
Window_set_normal_button( 69,140, 75,14,"180°" ,0,1,SDLK_LAST); // 6 Window_set_normal_button( 69,140, 75,14,"180\xb0" ,0,1,SDLK_LAST); // 6
Print_in_window( 87, 19,"Resize",MC_Dark,MC_Light); Print_in_window( 87, 19,"Resize",MC_Dark,MC_Light);
Window_set_normal_button( 80, 86, 60,14,"RESIZE",1,1,SDLK_r); // 7 Window_set_normal_button( 80, 86, 60,14,"RESIZE",1,1,SDLK_r); // 7
@ -142,14 +142,14 @@ void Button_Transform_menu(int btn)
Window_dropdown_add_item(unit_button,UNIT_PIXELS,unit_label[UNIT_PIXELS]); Window_dropdown_add_item(unit_button,UNIT_PIXELS,unit_label[UNIT_PIXELS]);
Window_dropdown_add_item(unit_button,UNIT_PERCENT,unit_label[UNIT_PERCENT]); Window_dropdown_add_item(unit_button,UNIT_PERCENT,unit_label[UNIT_PERCENT]);
Window_dropdown_add_item(unit_button,UNIT_RATIO,unit_label[UNIT_RATIO]); Window_dropdown_add_item(unit_button,UNIT_RATIO,unit_label[UNIT_RATIO]);
input_button[0] = Window_set_input_button_s(45,43,4,SDLK_w); // 10 input_button[0] = Window_set_input_button_s(45,43,4,SDLK_w); // 10
input_button[1] = Window_set_input_button(89,43,4); // 11 input_button[1] = Window_set_input_button(89,43,4); // 11
input_button[2] = Window_set_input_button_s(45,58,4,SDLK_h); // 12 input_button[2] = Window_set_input_button_s(45,58,4,SDLK_h); // 12
input_button[3] = Window_set_input_button(89,58,4); // 13 input_button[3] = Window_set_input_button(89,58,4); // 13
Update_window_area(0,0,Window_width, Window_height); Update_window_area(0,0,Window_width, Window_height);
Display_cursor(); Display_cursor();
do do
@ -191,9 +191,9 @@ void Button_Transform_menu(int btn)
Display_cursor(); Display_cursor();
need_display_size=0; need_display_size=0;
} }
clicked_button=Window_clicked_button(); clicked_button=Window_clicked_button();
// Contextual help // Contextual help
if (Is_shortcut(Key,0x100+BUTTON_HELP)) if (Is_shortcut(Key,0x100+BUTTON_HELP))
{ {
@ -202,7 +202,7 @@ void Button_Transform_menu(int btn)
} }
else if (Is_shortcut(Key,0x200+BUTTON_ADJUST)) else if (Is_shortcut(Key,0x200+BUTTON_ADJUST))
clicked_button=1; clicked_button=1;
else switch(clicked_button) else switch(clicked_button)
{ {
case 9: // Unit case 9: // Unit
@ -249,12 +249,12 @@ void Button_Transform_menu(int btn)
Factorize(&new_ratio_width, &old_ratio_width); Factorize(&new_ratio_width, &old_ratio_width);
Factorize(&new_ratio_height, &old_ratio_height); Factorize(&new_ratio_height, &old_ratio_height);
} }
break; break;
} }
unit_index = Window_attribute2; unit_index = Window_attribute2;
break; break;
case 8: // Lock proportions case 8: // Lock proportions
ratio_is_locked = ! ratio_is_locked; ratio_is_locked = ! ratio_is_locked;
Hide_cursor(); Hide_cursor();
@ -271,7 +271,7 @@ void Button_Transform_menu(int btn)
case 12: // input new height case 12: // input new height
Num2str(*( input_value[clicked_button-10]),buffer,4); Num2str(*( input_value[clicked_button-10]),buffer,4);
Hide_cursor(); Hide_cursor();
if (Readline(input_button[clicked_button-10]->Pos_X+2, if (Readline(input_button[clicked_button-10]->Pos_X+2,
input_button[clicked_button-10]->Pos_Y+2, input_button[clicked_button-10]->Pos_Y+2,
buffer, buffer,
4, 4,
@ -299,7 +299,7 @@ void Button_Transform_menu(int btn)
// Copy the whole ratio // Copy the whole ratio
new_ratio_height=new_ratio_width; new_ratio_height=new_ratio_width;
old_ratio_height=old_ratio_width; old_ratio_height=old_ratio_width;
} }
} }
else // (clicked_button == 12 || clicked_button == 13) else // (clicked_button == 12 || clicked_button == 13)
{ {
@ -313,10 +313,10 @@ void Button_Transform_menu(int btn)
// Copy the whole ratio // Copy the whole ratio
new_ratio_width=new_ratio_height; new_ratio_width=new_ratio_height;
old_ratio_width=old_ratio_height; old_ratio_width=old_ratio_height;
} }
} }
} }
// Re-compute ratio from size in pixels // Re-compute ratio from size in pixels
if (unit_index == UNIT_PIXELS) if (unit_index == UNIT_PIXELS)
{ {
@ -337,7 +337,7 @@ void Button_Transform_menu(int btn)
while (clicked_button<=0 || clicked_button>=8); while (clicked_button<=0 || clicked_button>=8);
Close_window(); Close_window();
// The Scroll operation uses the same button as transformation menu. // The Scroll operation uses the same button as transformation menu.
if (Current_operation != OPERATION_SCROLL) if (Current_operation != OPERATION_SCROLL)
Unselect_button(btn); Unselect_button(btn);
@ -346,7 +346,7 @@ void Button_Transform_menu(int btn)
{ {
short old_width; short old_width;
short old_height; short old_height;
// Determine new image dimensions // Determine new image dimensions
switch (clicked_button) switch (clicked_button)
{ {
@ -354,15 +354,15 @@ void Button_Transform_menu(int btn)
// Keep new_width and new_height as entered. // Keep new_width and new_height as entered.
break; break;
case 2 : // Flip X case 2 : // Flip X
case 3 : // Flip Y case 3 : // Flip Y
case 6 : // 180° Rotation case 6 : // 180° Rotation
new_width=Main.image_width; new_width=Main.image_width;
new_height=Main.image_height; new_height=Main.image_height;
break; break;
case 4 : // -90° Rotation case 4 : // -90° Rotation
case 5 : // +90° Rotation case 5 : // +90° Rotation
new_width=Main.image_height; new_width=Main.image_height;
new_height=Main.image_width; new_height=Main.image_width;
break; break;
@ -370,20 +370,20 @@ void Button_Transform_menu(int btn)
// Memorize the current dimensions // Memorize the current dimensions
old_width=Main.image_width; old_width=Main.image_width;
old_height=Main.image_height; old_height=Main.image_height;
Upload_infos_page(&Main); Upload_infos_page(&Main);
// Allocate a new page // Allocate a new page
if (Backup_with_new_dimensions(new_width,new_height)) if (Backup_with_new_dimensions(new_width,new_height))
{ {
// The new image is allocated, the new dimensions are already updated. // The new image is allocated, the new dimensions are already updated.
Main.image_is_modified=1; Main.image_is_modified=1;
// Process the transformation: // Process the transformation:
switch(clicked_button) switch(clicked_button)
{ {
int i; int i;
case 2 : // Flip X case 2 : // Flip X
for (i=0; i<Main.backups->Pages->Nb_layers; i++) for (i=0; i<Main.backups->Pages->Nb_layers; i++)
{ {
@ -391,7 +391,7 @@ void Button_Transform_menu(int btn)
Flip_X_lowlevel(Main.backups->Pages->Image[i].Pixels, Main.image_width, Main.image_height); Flip_X_lowlevel(Main.backups->Pages->Image[i].Pixels, Main.image_width, Main.image_height);
} }
break; break;
case 3 : // Flip Y case 3 : // Flip Y
for (i=0; i<Main.backups->Pages->Nb_layers; i++) for (i=0; i<Main.backups->Pages->Nb_layers; i++)
{ {
memcpy(Main.backups->Pages->Image[i].Pixels,Main.backups->Pages->Next->Image[i].Pixels,Main.image_width*Main.image_height); memcpy(Main.backups->Pages->Image[i].Pixels,Main.backups->Pages->Next->Image[i].Pixels,Main.image_width*Main.image_height);
@ -416,7 +416,7 @@ void Button_Transform_menu(int btn)
memcpy(Main.backups->Pages->Image[i].Pixels,Main.backups->Pages->Next->Image[i].Pixels,Main.image_width*Main.image_height); memcpy(Main.backups->Pages->Image[i].Pixels,Main.backups->Pages->Next->Image[i].Pixels,Main.image_width*Main.image_height);
Rotate_180_deg_lowlevel(Main.backups->Pages->Image[i].Pixels, Main.image_width, Main.image_height); Rotate_180_deg_lowlevel(Main.backups->Pages->Image[i].Pixels, Main.image_width, Main.image_height);
} }
break; break;
case 7 : // Resize case 7 : // Resize
for (i=0; i<Main.backups->Pages->Nb_layers; i++) for (i=0; i<Main.backups->Pages->Nb_layers; i++)
{ {

View File

@ -1043,7 +1043,7 @@ void Print_filename(void)
// Determine maximum size, in characters // Determine maximum size, in characters
max_size = 12 + (Screen_width / Menu_factor_X - 320) / 8; max_size = 12 + (Screen_width / Menu_factor_X - 320) / 8;
// Erase whole area // Erase whole area
Block(Screen_width-max_size*8*Menu_factor_X, Block(Screen_width-max_size*8*Menu_factor_X,
Menu_status_Y,Menu_factor_X*max_size*8,Menu_factor_Y<<3,MC_Light); Menu_status_Y,Menu_factor_X*max_size*8,Menu_factor_Y<<3,MC_Light);
@ -1275,7 +1275,7 @@ void Print_counter(short x,short y,const char * str,byte text_color,byte backgro
case '-': case '-':
char_number=12; char_number=12;
break; break;
case '±': case '\xb1':
char_number=13; char_number=13;
break; break;
} }