From 6731a57999117c1f4f6757b58e9412fa5182a502 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Tue, 26 Jun 2018 10:49:33 +0200 Subject: [PATCH] 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) --- src/brush_ops.c | 60 ++--- src/buttons.c | 444 ++++++++++++++++----------------- src/helpfile.h | 44 ++-- src/hotkeys.c | 10 +- src/keyboard.c | 640 ++++++++++++++++++++++++------------------------ src/operatio.c | 130 +++++----- src/palette.c | 204 +++++++-------- src/transform.c | 66 ++--- src/windows.c | 4 +- 9 files changed, 801 insertions(+), 801 deletions(-) diff --git a/src/brush_ops.c b/src/brush_ops.c index 81b1cd76..d1db4272 100644 --- a/src/brush_ops.c +++ b/src/brush_ops.c @@ -259,7 +259,7 @@ byte Rightclick_colorpick(byte cursor_visible) if (!Config.Right_click_colorpick) return 0; if (Mouse_K!=RIGHT_SIDE) - return 0; + return 0; // In these modes, the Foreground color is ignored, // so the RMB should act as normal. if (Shade_mode||Quick_shade_mode||Tiling_mode) @@ -268,20 +268,20 @@ byte Rightclick_colorpick(byte cursor_visible) Colorpicker_color=-1; Colorpicker_X=-1; Colorpicker_Y=-1; - + if (cursor_visible) Hide_cursor(); Start_operation_stack(OPERATION_RMB_COLORPICK); - + Init_start_operation(); - + // Just an indicator to go to next step Operation_push(1); Rightclick_colorpick_2_1(); - + if (cursor_visible) Display_cursor(); - + return 1; } @@ -333,13 +333,13 @@ void Rightclick_colorpick_0_1(void) short dummy; Hide_cursor(); - + Operation_pop(&dummy); Set_fore_color(Colorpicker_color); - + // Restore previous operation Start_operation_stack(Operation_before_interrupt); - + // Erase the color block which shows the picked color if (Operation_before_interrupt!=OPERATION_REPLACE) if ( (Mouse_Y-1) { Operation_push(best_spot); @@ -1301,11 +1301,11 @@ void Distort_brush_1_9(void) Operation_pop(&y[i]); Operation_pop(&x[i]); } - + if (Paintbrush_X!=x[selected_corner] || Paintbrush_Y!=y[selected_corner]) - { + { Hide_cursor(); - + // Easiest refresh mode: make no assumptions on how the brush was // displayed before. 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]); Display_cursor(); - + if ( (Config.Coords_rel) && (Menu_is_visible) ) { Print_in_menu("X: Y: ",0); @@ -1327,7 +1327,7 @@ void Distort_brush_1_9(void) } Update_rect(0,0,Screen_width,Menu_Y); } - + // Push back all arguments for (i=0;i<4;i++) { @@ -1348,7 +1348,7 @@ void Distort_brush_0_9(void) { short selected_corner; Operation_pop(&selected_corner); - + } void Distort_brush_2_0(void) @@ -1390,10 +1390,10 @@ void Distort_brush_2_8(void) Operation_pop(&x[i]); } Distort_brush(x[0],y[0],x[1],y[1],x[2],y[2],x[3],y[3]); - + Paintbrush_hidden=0; Display_all_screen(); - + Return_to_draw_mode(); } diff --git a/src/buttons.c b/src/buttons.c index 0e2ab033..7fe61cea 100644 --- a/src/buttons.c +++ b/src/buttons.c @@ -177,7 +177,7 @@ void Button_Message_initial(void) Window_set_normal_button(56, 151, 71, 14, "Anim", 0, (Main.backups->Pages->Image_mode != IMAGE_MODE_ANIMATION), KEY_NONE); Window_set_normal_button(133, 151, 71, 14, "Layers", 0, (Main.backups->Pages->Image_mode != IMAGE_MODE_LAYERED), KEY_NONE); - + Update_window_area(0,0,Window_width, Window_height); Display_cursor(); @@ -190,14 +190,14 @@ void Button_Message_initial(void) Wait_end_of_click(); } Close_window(); - + if (clicked_button > 0) { if (Main.backups->Pages->Image_mode == IMAGE_MODE_LAYERED) { Switch_layer_mode(IMAGE_MODE_ANIMATION); Config.Default_mode_layers = 0; - } + } else { Switch_layer_mode(IMAGE_MODE_LAYERED); @@ -320,7 +320,7 @@ void Button_Pal_right(int btn) First_color_in_palette+=cells; Display_menu_palette(); } - + Unselect_button(btn); Display_cursor(); } @@ -354,15 +354,15 @@ void Button_Select_forecolor(int btn) static long time_click = 0; long time_previous; int color; - + time_previous = time_click; time_click = SDL_GetTicks(); - + color=Pick_color_in_palette(); - + if (color == Fore_color) { - // Check if it's a double-click + // Check if it's a double-click if (time_click - time_previous < Config.Double_click_speed) { // Open palette window @@ -370,7 +370,7 @@ void Button_Select_forecolor(int btn) return; } } - + do { if (color != Fore_color && color!=-1) @@ -403,11 +403,11 @@ void Button_Select_forecolor(int btn) void Button_Select_backcolor(int btn) { int color; - + do { color=Pick_color_in_palette(); - + if (color!=-1 && color != Back_color) { Hide_cursor(); @@ -419,10 +419,10 @@ void Button_Select_backcolor(int btn) do { Get_input(20); - + if (Button_under_mouse()==btn) break; // This will repeat this button's action - + } while(Mouse_K); } while(Mouse_K); } @@ -488,20 +488,20 @@ void Button_Hide_menu(int btn) } void Button_Toggle_toolbar(int btn) -{ +{ T_Dropdown_button dropdown; T_Dropdown_choice *item; static char menu_name_tools[9] = " Tools"; static char menu_name_layers[9]= " Layers"; static char menu_name_anim[9] = " Anim"; - - + + menu_name_tools[0] = Menu_bars[MENUBAR_TOOLS ].Visible ? 22 : ' '; menu_name_layers[0] = Menu_bars[MENUBAR_LAYERS].Visible ? 22 : ' '; menu_name_anim[0] = Menu_bars[MENUBAR_ANIMATION].Visible ? 22 : ' '; Hide_cursor(); - + dropdown.Pos_X =Buttons_Pool[BUTTON_HIDE].X_offset; dropdown.Pos_Y =Buttons_Pool[BUTTON_HIDE].Y_offset; dropdown.Height =Buttons_Pool[BUTTON_HIDE].Height; @@ -510,17 +510,17 @@ void Button_Toggle_toolbar(int btn) dropdown.Bottom_up =1; Window_dropdown_add_item(&dropdown, 0, menu_name_tools); - + if (Main.backups->Pages->Image_mode != IMAGE_MODE_ANIMATION || Main.backups->Pages->Nb_layers==1) Window_dropdown_add_item(&dropdown, 1, menu_name_layers); - + if (Main.backups->Pages->Image_mode == IMAGE_MODE_ANIMATION || (Main.backups->Pages->Image_mode == IMAGE_MODE_LAYERED && Main.backups->Pages->Nb_layers==1)) Window_dropdown_add_item(&dropdown, 2, menu_name_anim); item=Dropdown_activate(&dropdown,0,Menu_Y+Menu_bars[MENUBAR_STATUS].Top*Menu_factor_Y); - + if (item) { switch (item->Number) @@ -538,7 +538,7 @@ void Button_Toggle_toolbar(int btn) if (Main.backups->Pages->Image_mode == IMAGE_MODE_ANIMATION) Switch_layer_mode(IMAGE_MODE_LAYERED); - + break; case 2: // anim if (Menu_bars[MENUBAR_LAYERS].Visible) @@ -550,17 +550,17 @@ void Button_Toggle_toolbar(int btn) if (Main.backups->Pages->Image_mode != IMAGE_MODE_ANIMATION) Switch_layer_mode(IMAGE_MODE_ANIMATION); - + break; } // redraw image and menu Display_menu(); Display_all_screen(); } - + // Closing Window_dropdown_clear_items(&dropdown); - + Unselect_button(btn); Display_cursor(); } @@ -573,13 +573,13 @@ void Button_Toggle_all_toolbars(int btn) word current_visibility; Hide_cursor(); - + // Check which bars are visible current_visibility=0; for (i=MENUBAR_STATUS+1;iPages->Filename, Main.backups->Pages->File_directory); save_context.File_name_unicode = Main.backups->Pages->Filename_unicode; Save_image(&save_context); Destroy_context(&save_context); - + Hide_cursor(); Cursor_shape=old_cursor_shape; Display_cursor(); - + if (!File_error) // L'ayant sauvée avec succès, return 1; // On peut quitter @@ -728,11 +728,11 @@ void Button_Clear_with_backcolor(int btn) Unselect_button(btn); Display_cursor(); } - + //------------------------------- Paramètres --------------------------------- -#define SETTING_PER_PAGE 11 +#define SETTING_PER_PAGE 11 #define SETTING_PAGES 5 #define SETTING_HEIGHT 12 @@ -801,7 +801,7 @@ const T_Lookup Lookup_VirtualKeyboard[] = { typedef struct { const char* Label; - byte Type; // 0: label, 1+: setting (size in bytes) + byte Type; // 0: label, 1+: setting (size in bytes) void * Value; int Min_value; int Max_value; @@ -847,7 +847,7 @@ void Set_setting_value(T_Setting *item, long int value) const char *Lookup_code(int code, const T_Lookup *lookup) { int i; - + for(i=0; lookup[i].Label!=NULL; i++) { if (lookup[i].Code == code) @@ -860,7 +860,7 @@ const char *Lookup_code(int code, const T_Lookup *lookup) int Lookup_next(int code, const T_Lookup *lookup) { int i; - + for(i=0; lookup[i].Label!=NULL; i++) { if (lookup[i].Code == code) @@ -878,14 +878,14 @@ int Lookup_previous(int code, const T_Lookup *lookup) { int count; int current=-1; - + for(count=0; lookup[count].Label!=NULL; count++) { if (lookup[count].Code == code) current=count; } - - return lookup[(current + count - 1) % count].Code; + + return lookup[(current + count - 1) % count].Code; } void Settings_display_config(T_Setting *setting, T_Config * conf, T_Special_button *panel) @@ -894,7 +894,7 @@ void Settings_display_config(T_Setting *setting, T_Config * conf, T_Special_butt // A single button Print_in_window(155,166,(conf->Auto_save)?"YES":" NO",MC_Black,MC_Light); - + // Clear all Window_rectangle(panel->Pos_X, panel->Pos_Y, panel->Width, panel->Height+1, MC_Light); for (i=0; iPos_X+3, panel->Pos_Y+i*SETTING_HEIGHT+(SETTING_HEIGHT-6)/2, setting[i].Label, i==0?MC_White:MC_Dark, MC_Light); if(setting[i].Value) { - + int value = Get_setting_value(&setting[i]); if (setting[i].Lookup) @@ -952,11 +952,11 @@ void Button_Settings(int btn) static byte current_page=0; // Definition of settings pages - // Label,Type (0 = label, 1+ = setting size in bytes), + // Label,Type (0 = label, 1+ = setting size in bytes), // Value, min, max, digits, Lookup) T_Setting setting[SETTING_PER_PAGE*SETTING_PAGES] = { - + {" --- GUI ---",0,NULL,0,0,0,NULL}, {"Opening message:",1,&(selected_config.Opening_message),0,1,0,Lookup_YesNo}, {"Menu ratio adapt:",1,&(selected_config.Ratio),0,1,0,Lookup_MenuRatio}, @@ -968,7 +968,7 @@ void Button_Settings(int btn) {"",0,NULL,0,0,0,NULL}, {"",0,NULL,0,0,0,NULL}, {"",0,NULL,0,0,0,NULL}, - + {" --- Input ---",0,NULL,0,0,0,NULL}, {"Scrollbar speed",0,NULL,0,0,0,NULL}, {" on left click:",1,&(selected_config.Delay_left_click_on_slider),1,255,4,NULL}, @@ -983,7 +983,7 @@ void Button_Settings(int btn) {"Virtual keyboard",1,&(selected_config.Use_virtual_keyboard),0,2,0,Lookup_VirtualKeyboard}, {"",0,NULL,0,0,0,NULL}, {"",0,NULL,0,0,0,NULL}, - + {" --- Editing ---",0,NULL,0,0,0,NULL}, {"Adjust brush pick:",1,&(selected_config.Adjust_brush_pick),0,1,0,Lookup_YesNo}, {"Undo pages:",1,&(selected_config.Max_undo_pages),1,99,5,NULL}, @@ -995,7 +995,7 @@ void Button_Settings(int btn) {"Right click colorpick:",1,&(selected_config.Right_click_colorpick),0,1,0,Lookup_YesNo}, {"Multi shortcuts:",1,&(selected_config.Allow_multi_shortcuts),0,1,0,Lookup_YesNo}, {"",0,NULL,0,0,0,NULL}, - + {" --- File selector ---",0,NULL,0,0,0,NULL}, {"Show in fileselector",0,NULL,0,0,0,NULL}, {" Hidden files:",4,&(selected_config.Show_hidden_files),0,1,0,Lookup_YesNo}, @@ -1007,7 +1007,7 @@ void Button_Settings(int btn) {" According to:",1,&(selected_config.Set_resolution_according_to), 1,2,0,Lookup_AutoRes}, {"Backup:",1,&(selected_config.Backup), 0,1,0,Lookup_YesNo}, {"",0,NULL,0,0,0,NULL}, - + {" --- Format options ---",0,NULL,0,0,0,NULL}, {"Screen size in GIF:",1,&(selected_config.Screen_size_in_GIF),0,1,0,Lookup_YesNo}, {"Clear palette:",1,&(selected_config.Clear_palette),0,1,0,Lookup_YesNo}, @@ -1019,7 +1019,7 @@ void Button_Settings(int btn) {"",0,NULL,0,0,0,NULL}, {"",0,NULL,0,0,0,NULL}, {"",0,NULL,0,0,0,NULL}, - + }; @@ -1046,7 +1046,7 @@ void Button_Settings(int btn) panel=Window_set_special_button(10, 21, 272,SETTING_PER_PAGE*SETTING_HEIGHT,0); // 5 Window_set_scroller_button(285,21,SETTING_PER_PAGE*SETTING_HEIGHT,SETTING_PAGES,1,current_page); // 6 - + Update_window_area(0,0,Window_width, Window_height); Display_cursor(); @@ -1064,10 +1064,10 @@ void Button_Settings(int btn) } Display_cursor(); - + need_redraw=0; } - + clicked_button=Window_clicked_button(); switch(clicked_button) @@ -1086,11 +1086,11 @@ void Button_Settings(int btn) Settings_save_config(&selected_config); break; // case 4: // Close - + case 5: // Panel area { T_Setting item; - + int num=(((short)Mouse_Y-Window_pos_Y)/Menu_factor_Y - panel->Pos_Y)/SETTING_HEIGHT; if (num >= 0 && num < SETTING_PER_PAGE) { @@ -1099,11 +1099,11 @@ void Button_Settings(int btn) { // Remember which button is clicked byte old_mouse_k = Mouse_K; - + if (Window_normal_button_onclick(panel->Pos_X, panel->Pos_Y+num*SETTING_HEIGHT, panel->Width, SETTING_HEIGHT+1, 5)) { int value = Get_setting_value(&item); - + if (item.Lookup) { // Enum: toggle it @@ -1127,7 +1127,7 @@ void Button_Settings(int btn) value = item.Min_value; else if (value>item.Max_value) value = item.Max_value; - + Set_setting_value(&item, value); } Key=0; // Need to discard keys used during editing @@ -1142,9 +1142,9 @@ void Button_Settings(int btn) current_page = Window_attribute2; need_redraw=1; break; - + } - + if (Key == KEY_MOUSEWHEELDOWN) { if (current_page < (SETTING_PAGES-1)) @@ -1160,7 +1160,7 @@ void Button_Settings(int btn) current_page--; need_redraw=2; } - } + } else if (Is_shortcut(Key,0x100+BUTTON_HELP)) Window_help(NB_BUTTONS+0, help_section[current_page]); else if (Is_shortcut(Key,0x100+BUTTON_SETTINGS)) @@ -1218,10 +1218,10 @@ char * Format_font_filename(const char * fname) static char result[12]; int c; int length; - + fname+=strlen(FONT_PREFIX); // Omit file prefix length=strlen(fname) - 4; // assume .png extension - + for (c=0;c<11 && cCursor_position = Find_file_in_fileselector(&Skin_files_list, Config.Skin_file); // Buttons to choose a font @@ -1364,7 +1364,7 @@ void Button_Skins(int btn) (Config.Separate_colors)?"X":" ", -1, 1, SDLK_LAST); // 9 Print_in_window( 190, 109,"Separate", MC_Dark, MC_Light); Print_in_window( 190, 118,"colors", MC_Dark, MC_Light); - + Window_redraw_list(skin_list); for (y = 14, offs_y = 0; offs_y < 16; offs_y++, y++) @@ -1380,7 +1380,7 @@ void Button_Skins(int btn) if (need_load) { need_load=0; - + Hide_cursor(); // (Re-)load GUI graphics from selected skins strcpy(skinsdir, Get_item_by_index(&Skin_files_list, @@ -1398,7 +1398,7 @@ void Button_Skins(int btn) else { // Update preview - + // Display the bitmap according to its own color indices for (y = 14, offs_y = 0; offs_y < 16; offs_y++, y++) for (x = 6, x_pos = 0; x_pos<173; x_pos++, x++) @@ -1415,22 +1415,22 @@ void Button_Skins(int btn) // Actualize current screen according to preferred GUI colors // Note this only updates onscreen colors Set_color( - MC_Black, + MC_Black, gfx->Default_palette[gfx->Color[0]].R, gfx->Default_palette[gfx->Color[0]].G, gfx->Default_palette[gfx->Color[0]].B); Set_color( - MC_Dark, + MC_Dark, gfx->Default_palette[gfx->Color[1]].R, gfx->Default_palette[gfx->Color[1]].G, gfx->Default_palette[gfx->Color[1]].B); Set_color( - MC_Light, + MC_Light, gfx->Default_palette[gfx->Color[2]].R, gfx->Default_palette[gfx->Color[2]].G, gfx->Default_palette[gfx->Color[2]].B); Set_color( - MC_White, + MC_White, gfx->Default_palette[gfx->Color[3]].R, gfx->Default_palette[gfx->Color[3]].G, gfx->Default_palette[gfx->Color[3]].B); @@ -1438,7 +1438,7 @@ void Button_Skins(int btn) Update_window_area(6, 14, 173, 16); Display_cursor(); } - + clicked_button=Window_clicked_button(); if (Is_shortcut(Key,0x100+BUTTON_HELP)) Window_help(BUTTON_SETTINGS, "SKINS"); @@ -1502,7 +1502,7 @@ void Button_Skins(int btn) if (new_font) { const char * fname; - + free(Menu_font); Menu_font = new_font; fname = Get_item_by_index(&Font_files_list,selected_font)->Full_name; @@ -1519,20 +1519,20 @@ void Button_Skins(int btn) Compute_optimal_menu_colors(Main.palette); } - + // We don't want to keep the skin's palette, as this would corrupt the current picture's one. Set_palette(Main.palette); Close_window(); Unselect_button(btn); - + // Raffichage du menu pour que les inscriptions qui y figurent soient retracées avec la nouvelle fonte Display_menu(); // Redraw all buttons, to ensure all specific sprites are in place. // This is necessary for multi-state buttons, for example Freehand. for (button=0; buttonPages->Nb_layers; i++) { if (i == Spare.current_layer) @@ -1640,9 +1640,9 @@ void Copy_image_only(void) Spare.image_width=Main.image_width; Spare.image_height=Main.image_height; */ - + Copy_view_to_spare(); - + // Update the visible buffer of the spare. // It's a bit complex because at the moment, to save memory, // the spare doesn't have a full visible_buffer + depth_buffer, @@ -1726,7 +1726,7 @@ void Button_Copy_page(int btn) if (Spare.tilemap_mode) Disable_tilemap(&Spare); break; - + case 2: // Pixels only // backup is done by the following function Copy_image_only(); @@ -1737,7 +1737,7 @@ void Button_Copy_page(int btn) if (Spare.tilemap_mode) Disable_tilemap(&Spare); break; - + case 3: // Palette only Backup_the_spare(LAYER_NONE); // Copy palette @@ -1747,12 +1747,12 @@ void Button_Copy_page(int btn) Redraw_spare_image(); Spare.image_is_modified=1; break; - + case 4: // Some colors // Will backup if needed Copy_some_colors(); break; - + case 5: // Palette and remap Backup_the_spare(LAYER_ALL); Remap_spare(); @@ -1762,7 +1762,7 @@ void Button_Copy_page(int btn) Update_spare_buffers(Spare.image_width,Spare.image_height); Redraw_spare_image(); Spare.image_is_modified=1; - break; + break; } Hide_cursor(); @@ -1877,7 +1877,7 @@ void Display_modes_list(short list_start, short cursor_position) ratio=" 25:16"; else ratio=" "; - + strcpy(str+21,ratio); } @@ -1939,7 +1939,7 @@ void Button_Resolution(int btn) Window_display_frame ( 8,72,283,110); Window_display_frame_in (37,84,228,84); - Window_rectangle (38,85,226,82,MC_Black); + Window_rectangle (38,85,226,82,MC_Black); Print_in_window( 16, 76,"OK" ,MC_Dark,MC_Light); Print_in_window( 55, 76,"X Y" ,MC_Dark,MC_Light); Print_in_window(120, 76,"Win / Full" ,MC_Dark,MC_Light); @@ -1990,7 +1990,7 @@ void Button_Resolution(int btn) Check_mode_button( 90,172,2); Window_draw_normal_bouton(182,170,13,7,"",0,0); Check_mode_button(184,172,3); - + chosen_width=Main.image_width; Num2str(chosen_width,str,4); @@ -2079,7 +2079,7 @@ void Button_Resolution(int btn) case 7: // Pixel size chosen_pixel=Window_attribute2; break; - + default: // Boutons de tag des états des modes temp=list_start+clicked_button-8; if (Video_mode[temp].Fullscreen==1 && // On n'a pas le droit de cocher le mode fenêtré @@ -2089,7 +2089,7 @@ void Button_Resolution(int btn) Video_mode[temp].State=((Video_mode[temp].State&0x7F)+1)&3; else Video_mode[temp].State=((Video_mode[temp].State&0x7F)+3)&3; - + Hide_cursor(); //Check_mode_button(19,16+(clicked_button<<3),Video_mode[temp].State); Display_modes_list(list_start,cursor_position); @@ -2156,7 +2156,7 @@ void Button_Resolution(int btn) if (Nb_video_modesNumber; @@ -2299,7 +2299,7 @@ void Button_Draw_switch_mode(int btn) if (Selected_freehand_mode>OPERATION_FILLED_CONTOUR) Selected_freehand_mode=OPERATION_CONTINUOUS_DRAW; } - + switch(Selected_freehand_mode) { default: @@ -2467,8 +2467,8 @@ void Draw_button_gradient_style(short x_pos,short y_pos,int technique) Pixel_in_window(x_pos+ 6,y_pos+line,MC_White); } } - - Update_window_area(x_pos+2,y_pos+2,10,10); + + Update_window_area(x_pos+2,y_pos+2,10,10); } void Load_gradient_data(int index) @@ -2544,7 +2544,7 @@ void Button_Gradients(int btn) (void)btn; // Enable cycling while this window is open Cycling_mode=1; - + Gradient_pixel=Pixel; old_current_gradient=Current_gradient; changed_gradient_index=0; @@ -2571,13 +2571,13 @@ void Button_Gradients(int btn) speed_scroller = Window_set_horizontal_scroller_button(99,111,130,106,1,Main.backups->Pages->Gradients->Range[Current_gradient].Speed); // 8 Num2str(Main.backups->Pages->Gradients->Range[Current_gradient].Speed,str,3); Print_in_window(73,113,str,MC_Black,MC_Light); - + Print_in_window(5,58,"MIX",MC_Dark,MC_Light); // Cycling mode on/off Window_set_normal_button(8,109,62,14,"",0,1,KEY_NONE); // 9 Print_in_window(11,112,"Cycling",cycling_mode?MC_Black:MC_Dark,MC_Light); - + // On tagge les couleurs qui vont avec Tag_color_range(Main.backups->Pages->Gradients->Range[Current_gradient].Start,Main.backups->Pages->Gradients->Range[Current_gradient].End); @@ -2603,7 +2603,7 @@ void Button_Gradients(int btn) { // User has changed which gradient (0-15) he's watching changed_gradient_index=0; - + Hide_cursor(); // On affiche la valeur sous la jauge @@ -2629,7 +2629,7 @@ void Button_Gradients(int btn) // Gradient # gradient_scroller->Position=Current_gradient; Window_draw_slider(gradient_scroller); - + // Technique (flat, dithered, very dithered) Draw_button_gradient_style(8,90,Main.backups->Pages->Gradients->Range[Current_gradient].Technique); @@ -2777,7 +2777,7 @@ void Button_Gradients(int btn) changed_gradient_index=1; } break; - + default: if (Is_shortcut(Key,0x100+BUTTON_HELP)) { @@ -2803,7 +2803,7 @@ void Button_Gradients(int btn) // The Grad rect operation uses the same button as Grad menu. if (Current_operation != OPERATION_GRAD_RECTANGLE) Unselect_button(BUTTON_GRADRECT); - + Display_cursor(); Gradient_pixel=Display_pixel; @@ -2892,7 +2892,7 @@ byte Same_paintbrush(byte index) Paintbrush_width!=Paintbrush[index].Width || Paintbrush_height!=Paintbrush[index].Height) return 0; - + if (Paintbrush_shape==PAINTBRUSH_SHAPE_MISC) { // Check all pixels @@ -2917,7 +2917,7 @@ void Button_Paintbrush_menu(int btn) Window_set_normal_button(10,158,67,14,"Cancel",0,1,KEY_ESC); // 1 - Window_set_dropdown_button(216, 158, 84,14,84,"Preset...", 0,0,1,RIGHT_SIDE|LEFT_SIDE,1); + Window_set_dropdown_button(216, 158, 84,14,84,"Preset...", 0,0,1,RIGHT_SIDE|LEFT_SIDE,1); Window_dropdown_add_item(Window_dropdown_button_list,PAINTBRUSH_SHAPE_ROUND, "Round"); Window_dropdown_add_item(Window_dropdown_button_list,PAINTBRUSH_SHAPE_SQUARE, "Square"); Window_dropdown_add_item(Window_dropdown_button_list,PAINTBRUSH_SHAPE_HORIZONTAL_BAR,"Horizontal"); @@ -2941,7 +2941,7 @@ void Button_Paintbrush_menu(int btn) // Highlight selected brush if (Same_paintbrush(index)) Window_rectangle(x_pos,y_pos,20,20,MC_White); - + Display_paintbrush_in_window(x_pos+2,y_pos+2,index); } for (index=0; index=(NB_PAINTBRUSH_SPRITES+3)) { index = clicked_button-NB_PAINTBRUSH_SPRITES-3; - + if (Window_attribute2==1) // Set { // Store - + x_pos=13+((index+NB_PAINTBRUSH_SPRITES)%12)*24; y_pos=27+((index+NB_PAINTBRUSH_SPRITES)/12)*25; - + Store_brush(index); Hide_cursor(); Display_stored_brush_in_window(x_pos+2, y_pos+2, index); @@ -3006,7 +3006,7 @@ void Button_Paintbrush_menu(int btn) // Store current index=clicked_button-3; if (!Store_paintbrush(index)) - { + { // Redraw Hide_cursor(); x_pos=13+(index%12)*24; @@ -3031,7 +3031,7 @@ void Button_Paintbrush_menu(int btn) size=Max(Paintbrush_width,Paintbrush_height); if (size==1) size=3; - + switch (Paintbrush_shape) { case PAINTBRUSH_SHAPE_HORIZONTAL_BAR: @@ -3048,7 +3048,7 @@ void Button_Paintbrush_menu(int btn) default: Set_paintbrush_size(size,size); break; - + } Close_window(); Change_paintbrush_shape(Paintbrush_shape); @@ -3086,7 +3086,7 @@ int Best_video_mode(void) // Si mode fenêtre, on reste dans ce mode. if (Current_resolution == 0) return 0; - + // On commence par borner les dimensions, ou du moins les rendre cohérentes if ((Original_screen_X<=0) || (Config.Set_resolution_according_to==2)) Original_screen_X=Main.image_width; @@ -3150,7 +3150,7 @@ void Load_picture(enum CONTEXT_TYPE type) static word filename_unicode[MAX_PATH_CHARACTERS]; static char directory[MAX_PATH_CHARACTERS]; T_Selector_settings * selector; - + switch (type) { case CONTEXT_MAIN_IMAGE: @@ -3236,8 +3236,8 @@ void Load_picture(enum CONTEXT_TYPE type) Hide_cursor(); Cursor_shape=old_cursor_shape; } - - + + if ( (File_error==1) || (Get_fileformat(Main.fileformat)->Palette_only) ) { if (File_error!=1) @@ -3334,7 +3334,7 @@ void Button_Reload(int btn) if ( (!Main.image_is_modified) || Confirmation_box("Discard unsaved changes ?") ) { T_IO_Context context; - + Hide_cursor(); old_cursor_shape=Cursor_shape; Cursor_shape=CURSOR_SHAPE_HOURGLASS; @@ -3342,7 +3342,7 @@ void Button_Reload(int btn) Original_screen_X=0; Original_screen_Y=0; - + Init_context_layered_image(&context, Main.backups->Pages->Filename, Main.backups->Pages->File_directory); Load_image(&context); @@ -3358,7 +3358,7 @@ void Button_Reload(int btn) Draw_menu_button(BUTTON_MAGNIFIER,Main.magnifier_mode); } - new_mode=Best_video_mode(); + new_mode=Best_video_mode(); if ( ((Config.Auto_set_res) && (new_mode!=Current_resolution)) && (!Resolution_in_command_line) ) { @@ -3525,7 +3525,7 @@ void Save_picture(enum CONTEXT_TYPE type) if (confirm) { const T_Format * format; - + old_cursor_shape=Cursor_shape; Hide_cursor(); Cursor_shape=CURSOR_SHAPE_HOURGLASS; @@ -3588,7 +3588,7 @@ void Button_Autosave(int btn) if (!File_error) { T_IO_Context save_context; - + old_cursor_shape=Cursor_shape; Cursor_shape=CURSOR_SHAPE_HOURGLASS; Display_cursor(); @@ -3630,7 +3630,7 @@ void Button_Lines(int btn) void Button_Lines_switch_mode(int btn) { char icon; - + if (Selected_line_mode==OPERATION_LINE) { Selected_line_mode=OPERATION_K_LINE; @@ -3775,7 +3775,7 @@ void Button_Invert_foreback(int btn) Reposition_palette(); Display_foreback(); Unselect_button(btn); - Display_cursor(); + Display_cursor(); } @@ -3843,20 +3843,20 @@ void Button_Magnify_menu(int btn) (void)btn; Hide_cursor(); - + dropdown.Pos_X =Buttons_Pool[BUTTON_MAGNIFIER].X_offset; dropdown.Pos_Y =Buttons_Pool[BUTTON_MAGNIFIER].Y_offset; dropdown.Height =Buttons_Pool[BUTTON_MAGNIFIER].Height; dropdown.Dropdown_width=28; dropdown.First_item =NULL; dropdown.Bottom_up =1; - + for(i = 0; i < NB_ZOOM_FACTORS; i++) { Window_dropdown_add_item(&dropdown, i, text[i]); } item=Dropdown_activate(&dropdown,0,Menu_Y); - + if (item) { Change_magnifier_factor(item->Number,0); @@ -3874,7 +3874,7 @@ void Button_Magnify_menu(int btn) Coming_from_zoom_factor_menu=1; Select_button(BUTTON_MAGNIFIER,LEFT_SIDE); } - + Window_dropdown_clear_items(&dropdown); } @@ -3886,12 +3886,12 @@ void Button_Unselect_magnifier(int btn) // On sort du mode loupe Main.magnifier_mode=0; - + // --> Recalculer le décalage de l'écran lorsqu'on sort de la loupe <-- // Centrage "brut" de lécran par rapport à la loupe Main.offset_X=Main.magnifier_offset_X-((Screen_width-Main.magnifier_width)>>1); Main.offset_Y=Main.magnifier_offset_Y-((Menu_Y-Main.magnifier_height)>>1); - + // Correction en cas de débordement de l'image if (Main.offset_X+Screen_width>Main.image_width) Main.offset_X=Main.image_width-Screen_width; @@ -3911,7 +3911,7 @@ void Button_Unselect_magnifier(int btn) Display_all_screen(); // <=> Display_screen(); // Repositionner le curseur en fonction des coordonnées visibles Compute_paintbrush_coordinates(); - + Old_MX = -1; Old_MY = -1; } @@ -3936,8 +3936,8 @@ void Button_Brush_FX(int btn) Window_set_normal_button(236,141, 67,14,"Cancel" ,0,1,KEY_ESC); // 1 Window_set_normal_button( 19, 46, 27,14,"X\035" ,0,1,Config_Key[SPECIAL_FLIP_X][0]); // 2 Window_set_normal_button( 19, 61, 27,14,"Y\022" ,0,1,Config_Key[SPECIAL_FLIP_Y][0]); // 3 - Window_set_normal_button( 58, 46, 37,14,"90°" ,0,1,Config_Key[SPECIAL_ROTATE_90][0]); // 4 - Window_set_normal_button( 96, 46, 37,14,"180°" ,0,1,Config_Key[SPECIAL_ROTATE_180][0]); // 5 + Window_set_normal_button( 58, 46, 37,14,"90\xb0" ,0,1,Config_Key[SPECIAL_ROTATE_90][0]); // 4 + Window_set_normal_button( 96, 46, 37,14,"180\xb0" ,0,1,Config_Key[SPECIAL_ROTATE_180][0]); // 5 Window_set_normal_button( 58, 61, 75,14,"any angle" ,0,1,Config_Key[SPECIAL_ROTATE_ANY_ANGLE][0]); // 6 Window_set_normal_button(145, 46, 67,14,"Stretch" ,0,1,Config_Key[SPECIAL_STRETCH][0]); // 7 Window_set_normal_button(145, 61, 67,14,"Distort" ,0,1,Config_Key[SPECIAL_DISTORT][0]); // 8 @@ -3990,9 +3990,9 @@ void Button_Brush_FX(int btn) // Coin BD Window_rectangle(105, 126, 7, 1, MC_Black); Window_rectangle(111, 120, 1, 7, MC_Black); - + Update_window_area(0,0,Window_width, Window_height); - + Display_cursor(); do @@ -4142,7 +4142,7 @@ void Refresh_airbrush_settings(byte selected_color, byte update_slider) } Num2str(Airbrush_multi_flow[selected_color],str,2); Print_in_window(196,130,str,MC_Black,MC_Light); - + Update_window_area(Window_palette_button_list->Pos_X+4+(selected_color >> 4)*10, Window_palette_button_list->Pos_Y+3+(selected_color & 15)* 5, 2,5); @@ -4193,7 +4193,7 @@ void Button_Airbrush_menu(int btn) Window_set_normal_button(194, 62,19,14,"+1" ,0,1,SDLK_KP_PLUS); // 6 Window_set_normal_button(194, 79,19,14,"-1" ,0,1,SDLK_KP_MINUS); // 7 Window_set_normal_button(194, 96,19,14,"x2" ,0,1,SDLK_KP_MULTIPLY); // 8 - Window_set_normal_button(194,113,19,14,"÷2" ,0,1,SDLK_KP_ENTER); // 9 + Window_set_normal_button(194,113,19,14,"\xf7""2" ,0,1,SDLK_KP_ENTER); // 9 Window_set_normal_button( 8, 37,43,14,"Clear" ,1,1,SDLK_c); // 10 @@ -4705,7 +4705,7 @@ void Button_Effects(int btn) break; case 15: Window_help(BUTTON_EFFECTS, "TILEMAP"); - break; + break; default: Window_help(BUTTON_EFFECTS, NULL); } @@ -4957,7 +4957,7 @@ void Button_Text(int btn) T_Palette text_palette; int new_width; int new_height; - int clicked_button; + int clicked_button; const int NB_FONTS=8; char size_buffer[4]; T_Special_button * input_size_button; @@ -4966,7 +4966,7 @@ void Button_Text(int btn) T_Special_button * font_list_button; T_Scroller_button * font_scroller; T_List_button * font_list; - + byte redraw_is_needed=1; byte preview_is_needed=1; @@ -4976,7 +4976,7 @@ void Button_Text(int btn) // Texte saisi Print_in_window_underscore(6,20,"Text:",MC_Dark,MC_Light,1); input_text_button = Window_set_input_button_s(48,18,29,SDLK_t); // 1 - + // TrueType options Window_display_frame_in(182,34,100,68); Print_in_window(199,31,"TrueType", MC_Dark, MC_Light); @@ -4989,35 +4989,35 @@ void Button_Text(int btn) // Italic Window_set_normal_button(188,86,13,11,is_italic?"X":" ",0,1,SDLK_i); // 4 Print_in_window_underscore(206,89,"Italic", MC_Dark, MC_Light,1); - + // Scroller des fontes font_scroller = Window_set_scroller_button(165,35,NB_FONTS*8,Nb_fonts,NB_FONTS,list_start); // 5 // Liste des fontes disponibles font_list_button = Window_set_special_button(8,35,152,NB_FONTS*8,0); // 6 Window_display_frame_in(7, 33, 154, NB_FONTS*8+4); - + // Taille texte input_size_button = Window_set_input_button_s(220,43,3,SDLK_s); // 7 Window_set_repeatable_button(202,43,13,11,"-",0,1,SDLK_LAST); // 8 Window_set_repeatable_button(251,43,13,11,"+",0,1,SDLK_LAST); // 9 - + // Preview preview_button = Window_set_special_button(8,106,273,50,0); // 10 Window_display_frame_in(7, 105, 275, 52); - + Window_set_normal_button(8,160,40,14,"OK",0,1,SDLK_RETURN); // 11 Window_set_normal_button(54,160,60,14,"Cancel",0,1,KEY_ESC); // 12 - + // List of fonts font_list = Window_set_list_button(font_list_button, font_scroller, Draw_one_font_name, 2); // 13 // Restore its settings from last passage in screen font_list->List_start = list_start; font_list->Cursor_position = cursor_position; - + Window_redraw_list(font_list); - + Update_window_area(0,0,Window_width, Window_height); - + // str texte Window_input_content(input_text_button,str); // Taille police @@ -5036,7 +5036,7 @@ void Button_Text(int btn) { const char * preview_string = "AaBbCcDdEeFf012345"; byte is_truetype; - + if (str[0]) preview_string=str; is_truetype=TrueType_font(selected_font_index); @@ -5062,7 +5062,7 @@ void Button_Text(int btn) { // Display brush in remapped form. byte *remapped_brush; - + remapped_brush=(byte *)malloc(new_width*new_height); if (remapped_brush) { @@ -5071,16 +5071,16 @@ void Button_Text(int btn) short y_pos; int color; byte colmap[256]; - + for (color=0;color<=255;color++) colmap[color]=0; - + for (y_pos=0;y_posPos_X*Menu_factor_X, @@ -5108,10 +5108,10 @@ void Button_Text(int btn) Min(preview_button->Height*Menu_factor_Y, new_height), Back_color, new_width); - + free(remapped_brush); } - + } else { @@ -5127,7 +5127,7 @@ void Button_Text(int btn) Back_color, new_width); } - + } Update_window_area( preview_button->Pos_X, @@ -5136,12 +5136,12 @@ void Button_Text(int btn) preview_button->Height); } if (redraw_is_needed || preview_is_needed) - { + { redraw_is_needed=0; preview_is_needed=0; Display_cursor(); } - + clicked_button=Window_clicked_button(); if (clicked_button==0) { @@ -5177,17 +5177,17 @@ void Button_Text(int btn) Print_in_window(191,88,is_italic?"X":" ", MC_Black, MC_Light); preview_is_needed=1; break; - + case 5: // Scroller des fontes /* Cannot happen, event is catched by the list control */ break; - + case 13: // Font selection selected_font_index = Window_attribute2; Hide_cursor(); preview_is_needed=1; break; - + case 7: // Taille du texte (nombre) Readline(222,45,size_buffer,3,INPUT_TYPE_INTEGER); font_size=atoi(size_buffer); @@ -5203,7 +5203,7 @@ void Button_Text(int btn) redraw_is_needed=1; preview_is_needed=1; break; - + case 8: // Taille - if (font_size > 1) { @@ -5213,7 +5213,7 @@ void Button_Text(int btn) preview_is_needed=1; } break; - + case 9: // Taille + if (font_size < 255) { @@ -5223,14 +5223,14 @@ void Button_Text(int btn) preview_is_needed=1; } break; - - + + case 6: // Double-click font selector case 11: // OK // Save the selector settings list_start = font_list->List_start; cursor_position = font_list->Cursor_position; - + if (!new_brush) { // Si echec de rendu @@ -5252,14 +5252,14 @@ void Button_Text(int btn) memcpy(Brush_original_palette, text_palette,sizeof(T_Palette)); // Remap to image's palette Remap_brush(); - + Brush_offset_X=Brush_width>>1; Brush_offset_Y=Brush_height>>1; - + // Fermeture Close_window(); Unselect_button(BUTTON_TEXT); - + // On passe en brosse: Display_cursor(); if (antialias || !TrueType_font(selected_font_index)) @@ -5277,7 +5277,7 @@ void Button_Text(int btn) Colorize_mode=1; Colorize_current_mode=3; Effect_function=Effect_alpha_colorize; - + Draw_menu_button(BUTTON_EFFECTS,BUTTON_PRESSED); } @@ -5290,12 +5290,12 @@ void Button_Text(int btn) } //Display_cursor(); return; - + case 12: // Cancel // Save the selector settings list_start = font_list->List_start; cursor_position = font_list->Cursor_position; - + free(new_brush); new_brush = NULL; Close_window(); @@ -5313,13 +5313,13 @@ void Display_stored_brush_in_window(word x_pos,word y_pos,int index) int x,y; int offset_x=0, offset_y=0; //int brush_offset_x=0, brush_offset_y=0; - + // Determine draw offset (small brushes are stacked on corner of their preview) if (Brush_container[index].WidthBRUSH_CONTAINER_PREVIEW_WIDTH || Brush_height>BRUSH_CONTAINER_PREVIEW_HEIGHT) @@ -5434,9 +5434,9 @@ void Store_brush(int index) void Select_paintbrush(int index) { int x_pos,y_pos; - + Paintbrush_shape=Paintbrush[index].Shape; - + if (Paintbrush[index].Width<=PAINTBRUSH_WIDTH && Paintbrush[index].Height<=PAINTBRUSH_HEIGHT) { @@ -5444,7 +5444,7 @@ void Select_paintbrush(int index) Paintbrush_height=Paintbrush[index].Height; Paintbrush_offset_X=Paintbrush[index].Offset_X; Paintbrush_offset_Y=Paintbrush[index].Offset_Y; - + for (y_pos=0; y_posPAINTBRUSH_WIDTH) x_off=(Paintbrush_width-PAINTBRUSH_WIDTH)/2; if (Paintbrush_height>PAINTBRUSH_HEIGHT) y_off=(Paintbrush_height-PAINTBRUSH_HEIGHT)/2; - + for (y_pos=0; y_pos>1; Paintbrush_offset_Y=Paintbrush_height>>1; } @@ -5546,7 +5546,7 @@ byte Restore_brush(int index) // Color brushes if (shape == PAINTBRUSH_SHAPE_COLOR_BRUSH || shape == PAINTBRUSH_SHAPE_MONO_BRUSH) - { + { Paintbrush_shape=shape; if (!Realloc_brush(Brush_container[index].Width,Brush_container[index].Height,NULL,NULL)) { @@ -5558,7 +5558,7 @@ byte Restore_brush(int index) memcpy(Brush_colormap, Brush_container[index].Colormap, 256); // Remap using current colormap Remap_general_lowlevel(Brush_colormap,Brush_original_pixels,Brush,Brush_width,Brush_height,Brush_width); - + Brush_offset_X=Brush_width>>1; Brush_offset_Y=Brush_height>>1; } @@ -5606,21 +5606,21 @@ void Button_Brush_container(void) clicked_button=Window_clicked_button(); //if (Is_shortcut(Key,0x100+BUTTON_HELP)) // Window_help(BUTTON_PAINTBRUSHES, NULL); - + if (clicked_button == 1) break; - + if (clicked_button>1) { index = clicked_button-2; - + if (Window_attribute1==RIGHT_SIDE) { // Store - + x_pos = (index % BRUSH_CONTAINER_COLUMNS)*(BRUSH_CONTAINER_PREVIEW_WIDTH+8)+7; y_pos = (index / BRUSH_CONTAINER_COLUMNS)*(BRUSH_CONTAINER_PREVIEW_HEIGHT+8)+18; - + Store_brush(index); Hide_cursor(); Display_stored_brush_in_window(x_pos+1, y_pos+1, index); @@ -5629,7 +5629,7 @@ void Button_Brush_container(void) else { // Restore and exit - + if (Restore_brush(index)) break; } diff --git a/src/helpfile.h b/src/helpfile.h index ffe286d1..1e6165d9 100644 --- a/src/helpfile.h +++ b/src/helpfile.h @@ -203,8 +203,8 @@ static const T_Help_table helptable_help[] = HELP_LINK ("Restore brush: %s", 0x200+BUTTON_BRUSH) HELP_LINK ("Flip brush X: %s", SPECIAL_FLIP_X) HELP_LINK ("Flip brush Y: %s", SPECIAL_FLIP_Y) - HELP_LINK ("90° brush rotation: %s", SPECIAL_ROTATE_90) - HELP_LINK ("180° brush rotation: %s", SPECIAL_ROTATE_180) + HELP_LINK ("90\xb0 brush rotation: %s", SPECIAL_ROTATE_90) + HELP_LINK ("180\xb0 brush rotation: %s", SPECIAL_ROTATE_180) HELP_LINK ("Stretch brush: %s", SPECIAL_STRETCH) HELP_LINK ("Distort brush: %s", SPECIAL_DISTORT) HELP_LINK ("Outline brush: %s", SPECIAL_OUTLINE) @@ -456,7 +456,7 @@ static const T_Help_table helptable_credits[] = HELP_TEXT ("") HELP_BOLD (" FREEBSD PORT") HELP_TEXT ("") - HELP_TEXT (" Jean-Baptiste Berlioz (Tobé)") + HELP_TEXT (" Jean-Baptiste Berlioz (Tob\xe9)") HELP_TEXT ("") HELP_BOLD (" OPENBSD PORT") HELP_TEXT ("") @@ -470,7 +470,7 @@ static const T_Help_table helptable_credits[] = HELP_BOLD (" LINUX BINARIES") HELP_TEXT ("") 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 ("") HELP_BOLD (" WIZ & CAANOO PORT") @@ -495,7 +495,7 @@ static const T_Help_table helptable_credits[] = HELP_TEXT (" DarkDefende DawnBringer El Topo ") HELP_TEXT (" falenblood fanickbux fano ") 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 (" Iw2evk jackfrost128 Jamon ") HELP_TEXT (" keito kusma lmemsm ") @@ -506,7 +506,7 @@ static const T_Help_table helptable_credits[] = HELP_TEXT (" Ravey1138 richienyhus rixard ") HELP_TEXT (" sm4tik spratek Surt ") 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 (" ... posted the annoying bug reports.") HELP_TEXT ("") @@ -564,7 +564,7 @@ static const T_Help_table helptable_credits[] = HELP_TEXT (" Acryl Fred Prowler") HELP_TEXT (" Alexel FreddyV Puznik") 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 (" Avocado Gandalf Ravian") HELP_TEXT (" Baloo Goblin RedBug") @@ -575,10 +575,10 @@ static const T_Help_table helptable_credits[] = HELP_TEXT (" BlackAxe Haplo Sam") HELP_TEXT (" Bonnie Hof SandMan") 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 (" 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 (" Cougar KalMinDo Sprocket") HELP_TEXT (" Cremax KaneWood Stef") @@ -793,7 +793,7 @@ static const T_Help_table helptable_adjust[] = HELP_TEXT ("") HELP_TEXT ("In 'Ratio' mode, you can set 2 numbers for") 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 ("double it, and any fraction like 15:16.") HELP_TEXT ("") @@ -810,12 +810,12 @@ static const T_Help_table helptable_adjust[] = HELP_TEXT ("") HELP_BOLD ("ROTATE") 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 ("") - HELP_TEXT ("+90°: Rotates the image by 90°") + HELP_TEXT ("+90\xb0: Rotates the image by 90\xb0") 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 ("") }; @@ -1301,10 +1301,10 @@ static const T_Help_table helptable_brush_fx[] = HELP_LINK ("- Y: (Key:%s)",SPECIAL_FLIP_Y) HELP_TEXT ("Flip vertically.") 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 ("") - 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 ("degrees.") 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 ("computer or if you edit huge pictures)") HELP_TEXT ("") - HELP_BOLD (" Right click colorpick") + HELP_BOLD (" Right click colorpick") HELP_TEXT ("This enables a mode where the right mouse") HELP_TEXT ("buttons acts as a color picker until") - HELP_TEXT ("it's released, and selects Foreground color.") - HELP_TEXT ("This mode prevents you from painting with") + HELP_TEXT ("it's released, and selects Foreground color.") + HELP_TEXT ("This mode prevents you from painting with") HELP_TEXT ("Background color.") 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 (" Multi shortcuts") HELP_TEXT ("When this setting is disabled, and you") @@ -2909,7 +2909,7 @@ static const T_Help_table helptable_layertrans[] = HELP_TEXT ("") HELP_TEXT ("The current Background color becomes the") HELP_TEXT ("color considered transparent for the layers.") - + }; 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_color_select) // End of buttons list - + // NB_BUTTONS+0 HELP_TABLE_DECLARATION(helptable_settings_details) // NB_BUTTONS+1 @@ -3146,5 +3146,5 @@ T_Help_section Help_section[] = // NB_BUTTONS+2 // HELP_TABLE_DECLARATION() // ... - + }; diff --git a/src/hotkeys.c b/src/hotkeys.c index c86ebacb..3e3e888b 100644 --- a/src/hotkeys.c +++ b/src/hotkeys.c @@ -689,17 +689,17 @@ T_Key_config ConfigKey[NB_SHORTCUTS] = { SDLK_y, // Y 0}, {72, - "90° brush rotation", - "Rotate the user-defined brush by 90°", + "90\xb0 brush rotation", + "Rotate the user-defined brush by 90\xb0", "(counter-clockwise).", "", true, SDLK_z, // Z (W en AZERTY) 0}, {73, - "180° brush rotation", + "180\xb0 brush rotation", "Rotate the user-defined brush by", - "180°.", + "180\xb0.", "", true, SDLK_z|MOD_SHIFT, // Shift + Z @@ -1981,7 +1981,7 @@ word Ordering[NB_SHORTCUTS]= SPECIAL_BIGGER_PAINTBRUSH, // Sets paintbrush size: bigger SPECIAL_EFFECTS_OFF, // Turns off all effects 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_4, // Sets transparency level 40% SPECIAL_TRANSPARENCY_5, // Sets transparency level 50% diff --git a/src/keyboard.c b/src/keyboard.c index b7dccc92..bfde56d5 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -45,262 +45,262 @@ // Dans l'ordre des colonnes: Normal, +Shift, +Control, +Alt const word Scancode_to_sym[256][4] = { -/* 00 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 01 Esc */ { SDLK_ESCAPE ,SDLK_ESCAPE ,SDLK_ESCAPE ,SDLK_ESCAPE }, -/* 02 1 ! */ { SDLK_1 ,SDLK_1 ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 03 2 @ */ { SDLK_2 ,SDLK_2 ,SDLK_2 ,SDLK_UNKNOWN }, -/* 04 3 # */ { SDLK_3 ,SDLK_3 ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 05 4 $ */ { SDLK_4 ,SDLK_4 ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 06 5 % */ { SDLK_5 ,SDLK_5 ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 07 6 ^ */ { SDLK_6 ,SDLK_6 ,SDLK_6 ,SDLK_UNKNOWN }, -/* 08 7 & */ { SDLK_7 ,SDLK_7 ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 09 8 * */ { SDLK_8 ,SDLK_8 ,SDLK_8 ,SDLK_UNKNOWN }, -/* 0A 9 ( */ { SDLK_9 ,SDLK_9 ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 0B 0 ) */ { SDLK_0 ,SDLK_0 ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 0C - _ */ { SDLK_MINUS ,SDLK_MINUS ,SDLK_MINUS ,SDLK_UNKNOWN }, -/* 0D = + */ { SDLK_EQUALS ,SDLK_EQUALS ,SDLK_EQUALS ,SDLK_UNKNOWN }, -/* 0E BkSpc */ { SDLK_BACKSPACE ,SDLK_BACKSPACE ,SDLK_BACKSPACE ,SDLK_BACKSPACE }, -/* 0F Tab */ { SDLK_TAB ,SDLK_TAB ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 10 Q */ { SDLK_q ,SDLK_q ,SDLK_q ,SDLK_q }, -/* 11 W */ { SDLK_w ,SDLK_w ,SDLK_w ,SDLK_w }, -/* 12 E */ { SDLK_e ,SDLK_e ,SDLK_e ,SDLK_e }, -/* 13 R */ { SDLK_r ,SDLK_r ,SDLK_r ,SDLK_r }, -/* 14 T */ { SDLK_t ,SDLK_t ,SDLK_t ,SDLK_t }, -/* 15 Y */ { SDLK_y ,SDLK_y ,SDLK_y ,SDLK_y }, -/* 16 U */ { SDLK_u ,SDLK_u ,SDLK_u ,SDLK_u }, -/* 17 I */ { SDLK_i ,SDLK_i ,SDLK_i ,SDLK_i }, -/* 18 O */ { SDLK_o ,SDLK_o ,SDLK_o ,SDLK_o }, -/* 19 P */ { SDLK_p ,SDLK_p ,SDLK_p ,SDLK_p }, -/* 1A [ */ { SDLK_LEFTBRACKET ,SDLK_LEFTBRACKET ,SDLK_LEFTBRACKET ,SDLK_LEFTBRACKET }, -/* 1B ] */ { SDLK_RIGHTBRACKET,SDLK_RIGHTBRACKET,SDLK_RIGHTBRACKET,SDLK_RIGHTBRACKET}, -/* 1C Retrn */ { SDLK_RETURN ,SDLK_RETURN ,SDLK_RETURN ,SDLK_RETURN }, -/* 1D ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 1E A */ { SDLK_a ,SDLK_a ,SDLK_a ,SDLK_a }, -/* 1F S */ { SDLK_s ,SDLK_s ,SDLK_s ,SDLK_s }, -/* 20 D */ { SDLK_d ,SDLK_d ,SDLK_d ,SDLK_d }, -/* 21 F */ { SDLK_f ,SDLK_f ,SDLK_f ,SDLK_f }, -/* 22 G */ { SDLK_g ,SDLK_g ,SDLK_g ,SDLK_g }, -/* 23 H */ { SDLK_h ,SDLK_h ,SDLK_h ,SDLK_h }, -/* 24 J */ { SDLK_j ,SDLK_j ,SDLK_j ,SDLK_j }, -/* 25 K */ { SDLK_k ,SDLK_k ,SDLK_k ,SDLK_k }, -/* 26 L */ { SDLK_l ,SDLK_l ,SDLK_l ,SDLK_l }, -/* 27 ; : */ { SDLK_SEMICOLON ,SDLK_SEMICOLON ,SDLK_SEMICOLON ,SDLK_SEMICOLON }, -/* 28 ' */ { SDLK_QUOTE ,SDLK_QUOTE ,SDLK_UNKNOWN ,SDLK_QUOTE }, -/* 29 ` ~ */ { SDLK_BACKQUOTE ,SDLK_BACKQUOTE ,SDLK_UNKNOWN ,SDLK_BACKQUOTE }, -/* 2A ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 2B \\ */ { SDLK_BACKSLASH ,SDLK_BACKSLASH ,SDLK_BACKSLASH ,SDLK_BACKSLASH }, -/* 2C Z */ { SDLK_z ,SDLK_z ,SDLK_z ,SDLK_z }, -/* 2D X */ { SDLK_x ,SDLK_x ,SDLK_x ,SDLK_x }, -/* 2E C */ { SDLK_c ,SDLK_c ,SDLK_c ,SDLK_c }, -/* 2F V */ { SDLK_v ,SDLK_v ,SDLK_v ,SDLK_v }, -/* 30 B */ { SDLK_b ,SDLK_b ,SDLK_b ,SDLK_b }, -/* 31 N */ { SDLK_n ,SDLK_n ,SDLK_n ,SDLK_n }, -/* 32 M */ { SDLK_m ,SDLK_m ,SDLK_m ,SDLK_m }, -/* 33 , < */ { SDLK_COMMA ,SDLK_COMMA ,SDLK_UNKNOWN ,SDLK_COMMA }, -/* 34 . > */ { SDLK_PERIOD ,SDLK_PERIOD ,SDLK_UNKNOWN ,SDLK_PERIOD }, -/* 35 / ? */ { SDLK_SLASH ,SDLK_SLASH ,SDLK_UNKNOWN ,SDLK_SLASH }, -/* 36 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 37 Grey* */ { SDLK_KP_MULTIPLY ,SDLK_KP_MULTIPLY ,SDLK_UNKNOWN ,SDLK_KP_MULTIPLY }, -/* 38 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 39 Space */ { SDLK_SPACE ,SDLK_SPACE ,SDLK_SPACE ,SDLK_SPACE }, -/* 3A ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 3B F1 */ { SDLK_F1 ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 3C F2 */ { SDLK_F2 ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 3D F3 */ { SDLK_F3 ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 3E F4 */ { SDLK_F4 ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 3F F5 */ { SDLK_F5 ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 40 F6 */ { SDLK_F6 ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 41 F7 */ { SDLK_F7 ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* 42 F8 */ { SDLK_F8 ,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 }, -/* 45 ??? */ { 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 }, -/* 48 Up */ { SDLK_UP ,SDLK_UP ,SDLK_UNKNOWN ,SDLK_UP }, -/* 49 PgUp */ { SDLK_PAGEUP ,SDLK_PAGEUP ,SDLK_UNKNOWN ,SDLK_PAGEUP }, -/* 4A Grey- */ { SDLK_KP_MINUS ,SDLK_KP_MINUS ,SDLK_UNKNOWN ,SDLK_KP_MINUS }, -/* 4B Left */ { SDLK_LEFT ,SDLK_LEFT ,SDLK_UNKNOWN ,SDLK_LEFT }, -/* 4C Kpad5 */ { SDLK_KP5 ,SDLK_KP5 ,SDLK_UNKNOWN ,SDLK_KP5 }, -/* 4D Right */ { SDLK_RIGHT ,SDLK_RIGHT ,SDLK_UNKNOWN ,SDLK_RIGHT }, -/* 4E Grey+ */ { SDLK_KP_PLUS ,SDLK_KP_PLUS ,SDLK_UNKNOWN ,SDLK_KP_PLUS }, -/* 4F End */ { SDLK_END ,SDLK_END ,SDLK_UNKNOWN ,SDLK_END }, -/* 50 Down */ { SDLK_DOWN ,SDLK_DOWN ,SDLK_UNKNOWN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? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_DOWN }, -/* A1 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_PAGEUP }, -/* A2 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_INSERT }, -/* A3 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_DELETE }, -/* A4 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_KP_DIVIDE }, -/* A5 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_TAB }, -/* A6 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_KP_ENTER }, -/* A7 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* A8 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* A9 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* AA ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* AB ??? */ { 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 }, -/* AE ??? */ { 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 }, -/* B1 ??? */ { 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 }, -/* B4 ??? */ { 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 }, -/* B7 Win R */ { SDLK_RSUPER ,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 }, -/* BA ??? */ { 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 }, -/* BD ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* BE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UN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NKNOWN }, -/* CE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_LSUPER ,SDLK_UNKNOWN }, -/* CF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_RSUPER ,SDLK_UNKNOWN }, -/* D0 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_MENU ,SDLK_UNKNOWN }, -/* D1 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* D2 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* D3 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* D4 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* D5 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* D6 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* D7 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* D8 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* D9 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, -/* DA ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_LSUPER }, -/* DB ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_RSUPER }, -/* DC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_MENU }, -/* DD ??? */ { SDLK_U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INUS ,SDLK_MINUS ,SDLK_MINUS ,SDLK_UNKNOWN }, +/* 0D = + */ { SDLK_EQUALS ,SDLK_EQUALS ,SDLK_EQUALS ,SDLK_UNKNOWN }, +/* 0E BkSpc */ { SDLK_BACKSPACE ,SDLK_BACKSPACE ,SDLK_BACKSPACE ,SDLK_BACKSPACE }, +/* 0F Tab */ { SDLK_TAB ,SDLK_TAB ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* 10 Q */ { SDLK_q ,SDLK_q ,SDLK_q ,SDLK_q }, +/* 11 W */ { SDLK_w ,SDLK_w ,SDLK_w ,SDLK_w }, +/* 12 E */ { SDLK_e ,SDLK_e ,SDLK_e ,SDLK_e }, +/* 13 R */ { SDLK_r ,SDLK_r ,SDLK_r ,SDLK_r }, +/* 14 T */ { SDLK_t ,SDLK_t ,SDLK_t ,SDLK_t }, +/* 15 Y */ { SDLK_y ,SDLK_y ,SDLK_y ,SDLK_y }, +/* 16 U */ { SDLK_u ,SDLK_u ,SDLK_u ,SDLK_u }, +/* 17 I */ { SDLK_i ,SDLK_i ,SDLK_i ,SDLK_i }, +/* 18 O */ { SDLK_o ,SDLK_o ,SDLK_o ,SDLK_o }, +/* 19 P */ { SDLK_p ,SDLK_p ,SDLK_p ,SDLK_p }, +/* 1A [ */ { SDLK_LEFTBRACKET ,SDLK_LEFTBRACKET ,SDLK_LEFTBRACKET ,SDLK_LEFTBRACKET }, +/* 1B ] */ { SDLK_RIGHTBRACKET,SDLK_RIGHTBRACKET,SDLK_RIGHTBRACKET,SDLK_RIGHTBRACKET}, +/* 1C Retrn */ { SDLK_RETURN ,SDLK_RETURN ,SDLK_RETURN ,SDLK_RETURN }, +/* 1D ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* 1E A */ { SDLK_a ,SDLK_a ,SDLK_a ,SDLK_a }, +/* 1F S */ { SDLK_s ,SDLK_s ,SDLK_s ,SDLK_s }, +/* 20 D */ { SDLK_d ,SDLK_d ,SDLK_d ,SDLK_d }, +/* 21 F */ { SDLK_f ,SDLK_f ,SDLK_f ,SDLK_f }, +/* 22 G */ { SDLK_g ,SDLK_g ,SDLK_g ,SDLK_g }, +/* 23 H */ { SDLK_h ,SDLK_h ,SDLK_h ,SDLK_h }, +/* 24 J */ { SDLK_j ,SDLK_j ,SDLK_j ,SDLK_j }, +/* 25 K */ { SDLK_k ,SDLK_k ,SDLK_k ,SDLK_k }, +/* 26 L */ { SDLK_l ,SDLK_l ,SDLK_l ,SDLK_l }, +/* 27 ; : */ { SDLK_SEMICOLON ,SDLK_SEMICOLON ,SDLK_SEMICOLON ,SDLK_SEMICOLON }, +/* 28 ' */ { SDLK_QUOTE ,SDLK_QUOTE ,SDLK_UNKNOWN ,SDLK_QUOTE }, +/* 29 ` ~ */ { SDLK_BACKQUOTE ,SDLK_BACKQUOTE ,SDLK_UNKNOWN ,SDLK_BACKQUOTE }, +/* 2A ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* 2B \\ */ { SDLK_BACKSLASH ,SDLK_BACKSLASH ,SDLK_BACKSLASH ,SDLK_BACKSLASH }, +/* 2C Z */ { SDLK_z ,SDLK_z ,SDLK_z ,SDLK_z }, +/* 2D X */ { SDLK_x ,SDLK_x ,SDLK_x ,SDLK_x }, +/* 2E C */ { SDLK_c ,SDLK_c ,SDLK_c ,SDLK_c }, +/* 2F V */ { SDLK_v ,SDLK_v ,SDLK_v ,SDLK_v }, +/* 30 B */ { SDLK_b ,SDLK_b ,SDLK_b ,SDLK_b }, +/* 31 N */ { SDLK_n ,SDLK_n ,SDLK_n ,SDLK_n }, +/* 32 M */ { SDLK_m ,SDLK_m ,SDLK_m ,SDLK_m }, +/* 33 , < */ { SDLK_COMMA ,SDLK_COMMA ,SDLK_UNKNOWN ,SDLK_COMMA }, +/* 34 . > */ { SDLK_PERIOD ,SDLK_PERIOD ,SDLK_UNKNOWN ,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_UNKNOWN ,SDLK_UNKNOWN }, +/* 45 ??? */ { 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 }, +/* 48 Up */ { SDLK_UP ,SDLK_UP ,SDLK_UNKNOWN ,SDLK_UP }, +/* 49 PgUp */ { SDLK_PAGEUP ,SDLK_PAGEUP ,SDLK_UNKNOWN ,SDLK_PAGEUP }, +/* 4A Grey- */ { SDLK_KP_MINUS ,SDLK_KP_MINUS ,SDLK_UNKNOWN ,SDLK_KP_MINUS }, +/* 4B Left */ { SDLK_LEFT ,SDLK_LEFT ,SDLK_UNKNOWN ,SDLK_LEFT }, +/* 4C Kpad5 */ { SDLK_KP5 ,SDLK_KP5 ,SDLK_UNKNOWN ,SDLK_KP5 }, +/* 4D Right */ { SDLK_RIGHT ,SDLK_RIGHT ,SDLK_UNKNOWN ,SDLK_RIGHT }, +/* 4E Grey+ */ { SDLK_KP_PLUS ,SDLK_KP_PLUS ,SDLK_UNKNOWN ,SDLK_KP_PLUS }, +/* 4F End */ { SDLK_END ,SDLK_END ,SDLK_UNKNOWN ,SDLK_END }, +/* 50 Down */ { SDLK_DOWN ,SDLK_DOWN ,SDLK_UNKNOWN ,SDLK_DOWN }, +/* 51 PgDn */ { SDLK_PAGEDOWN ,SDLK_PAGEDOWN ,SDLK_UNKNOWN ,SDLK_PAGEDOWN }, +/* 52 Ins */ { SDLK_INSERT ,SDLK_INSERT ,SDLK_UNKNOWN ,SDLK_INSERT }, +/* 53 Del */ { SDLK_DELETE ,SDLK_DELETE ,SDLK_UNKNOWN ,SDLK_DELETE }, +/* 54 ??? */ { SDLK_UNKNOWN ,SDLK_F1 ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* 55 ??? */ {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NOWN }, +/* 95 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_KP_DIVIDE ,SDLK_UNKNOWN }, +/* 96 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_KP_MULTIPLY ,SDLK_UNKNOWN }, +/* 97 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_HOME }, +/* 98 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UP }, +/* 99 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_PAGEUP }, +/* 9A ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* 9B ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_LEFT }, +/* 9C ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* 9D ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_RIGHT }, +/* 9E ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* 9F ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_END }, +/* A0 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_DOWN }, +/* A1 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_PAGEUP }, +/* A2 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_INSERT }, +/* A3 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_DELETE }, +/* A4 ??? */ { SDLK_UNKNOWN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WN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* B4 ??? */ { 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 }, +/* B7 Win R */ { SDLK_RSUPER ,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 }, +/* BA ??? */ { 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 }, +/* BD ??? */ { 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 }, +/* C0 ??? */ { 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 }, +/* C3 ??? */ { SDLK_UNKNOWN ,SDLK_RSUPER ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* C4 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* C5 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* C6 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* C7 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* C8 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* C9 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* CA ??? */ { 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 }, +/* CD ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* CE ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_LSUPER ,SDLK_UNKNOWN }, +/* CF ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_RSUPER ,SDLK_UNKNOWN }, +/* D0 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_MENU ,SDLK_UNKNOWN }, +/* D1 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* D2 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* D3 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* D4 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* D5 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* D6 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* D7 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* D8 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* D9 ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN }, +/* DA ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_LSUPER }, +/* DB ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_RSUPER }, +/* DC ??? */ { SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_UNKNOWN ,SDLK_MENU }, +/* DD ??? */ { 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 }, +/* E0 Enter */ { SDLK_KP_ENTER ,SDLK_KP_ENTER ,SDLK_KP_ENTER ,SDLK_UNKNOWN }, +/* E1 ??? */ { SDLK_UNKNOWN ,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NKNOWN ,SDLK_UNKNOWN }, }; // Conversion de l'ancien codage des touches: @@ -327,7 +327,7 @@ word Key_for_scancode(word scancode) word Key_modifiers(SDLMod mod) { word modifiers=0; - + if (mod & KMOD_CTRL ) modifiers|=MOD_CTRL; 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_MODE) // AltGr return 0; - + // 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) if (keysym.sym != 0) @@ -361,7 +361,7 @@ word Keysym_to_keycode(SDL_keysym keysym) { key_code = (keysym.scancode & 0x07FF) | 0x0800; } - + // 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) // still name the original modifiers. @@ -481,7 +481,7 @@ const char * Key_name(word key) if (key == SDLK_UNKNOWN) return "None"; -#ifdef GCWZERO +#ifdef GCWZERO if (key & MOD_CTRL) strcat(buffer, "A+"); if (key & MOD_ALT) @@ -495,16 +495,16 @@ const char * Key_name(word key) strcat(buffer, "Alt+"); if (key & MOD_SHIFT) strcat(buffer, "Shift+"); -#endif +#endif if (key & MOD_META) strcat(buffer, META_KEY_PREFIX); - + key=key & ~(MOD_CTRL|MOD_ALT|MOD_SHIFT); - + // 99 is only a sanity check if (key>=KEY_JOYBUTTON && key<=KEY_JOYBUTTON+99) { - + char *button_name; switch(key-KEY_JOYBUTTON) { @@ -583,14 +583,14 @@ const char * Key_name(word key) #ifdef JOY_BUTTON_JOY case JOY_BUTTON_JOY: button_name="[THUMB JOY]"; break; #endif - + default: sprintf(buffer+strlen(buffer), "[B%d]", key-KEY_JOYBUTTON);return buffer; } strcat(buffer,button_name); return buffer; } - + if (key & 0x800) { 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); return buffer; } - + // Touches au libellé connu 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 keysym.sym; default: - return 0; + return 0; } } #endif @@ -662,70 +662,70 @@ word Keysym_to_ANSI(SDL_keysym keysym) { return keysym.unicode; // Pas de souci, on est en ASCII standard } - + // Quelques conversions Unicode-ANSI switch(keysym.unicode) { case 0x8100: - return 'ü'; // ü + return '\xfc'; // ü case 0x1A20: - return 'é'; // é + return '\xe9'; // é case 0x201A: - return 'è'; // è + return '\xe8'; // è case 0x9201: - return 'â'; // â + return '\xe2'; // â case 0x1E20: - return 'ä'; // ä + return '\xe4'; // ä case 0x2620: - return 'à'; // à - case 0x2020: - return 'å'; // å - case 0x2120: - return 'ç'; // ç - case 0xC602: - return 'ê'; // ê - case 0x3020: - return 'ë'; // ë - case 0x6001: - return 'è'; // è - case 0x3920: - return 'ï'; // ï - case 0x5201: - return 'î'; // î - case 0x8D00: - return 'ì'; // ì - case 0x1C20: - return 'ô'; // ô - case 0x1D20: - return 'ö'; // ö - case 0x2220: - return 'ò'; // ò - case 0x1320: - return 'û'; // û - case 0x1420: - return 'ù'; // ù - case 0xDC02: - return 'ÿ'; // ÿ - case 0x5301: - return '£'; // £ - case 0xA000: - return 'á'; // á - case 0xA100: - return 'í'; // í - case 0xA200: - return 'ó'; // ó - case 0xA300: - return 'ú'; // ú - case 0xA400: - return 'ñ'; // ñ - case 0xA700: - return 'º'; // º - case 0xC600: - return 'ã'; // ã + return '\xe0'; // à + case 0x2020: + return '\xe5'; // å + case 0x2120: + return '\xe7'; // ç + case 0xC602: + return '\xea'; // ê + case 0x3020: + return '\xeb'; // ë + case 0x6001: + return '\xe8'; // è + case 0x3920: + return '\xef'; // ï + case 0x5201: + return '\xee'; // î + case 0x8D00: + return '\xec'; // ì + case 0x1C20: + return '\xf4'; // ô + case 0x1D20: + return '\xf6'; // ö + case 0x2220: + return '\xf2'; // ò + case 0x1320: + return '\xfb'; // û + case 0x1420: + return '\xf9'; // ù + case 0xDC02: + return '\xff'; // ÿ + case 0x5301: + return '\xa3'; // £ + case 0xA000: + return '\xe1'; // á + case 0xA100: + return '\xed'; // í + case 0xA200: + return '\xf3'; // ó + case 0xA300: + return '\xfa'; // ú + case 0xA400: + return '\xf1'; // ñ + case 0xA700: + return '\xba'; // º + case 0xC600: + return '\xe3'; // ã case 0x20AC: return '\x80'; // Euro sign is 20AC in unicode, 80 in CP1252 } - + // Key entre 127 et 255 if (keysym.unicode<256) { diff --git a/src/operatio.c b/src/operatio.c index 2a5e6643..f2348a3a 100644 --- a/src/operatio.c +++ b/src/operatio.c @@ -42,7 +42,7 @@ // PI is NOT part of math.h according to C standards... #if defined(__GP2X__) || defined(__VBCC__) - #define M_PI 3.14159265358979323846 + #define M_PI 3.14159265358979323846 #endif /// 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) { - // 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; switch(Current_operation) { @@ -64,7 +64,7 @@ void Start_operation_stack(word new_operation) break; default: - break; + break; } // 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]='-'; } else - strcpy(str,"± 0"); + strcpy(str,"\xb1 0"); Print_in_menu(str,2); if (Paintbrush_Y>start_y) @@ -183,7 +183,7 @@ void Display_coords_rel_or_abs(short start_x, short start_y) str[0]='-'; } else - strcpy(str,"± 0"); + strcpy(str,"\xb1 0"); Print_in_menu(str,12); } } @@ -257,7 +257,7 @@ void Freehand_mode1_2_0(void) { if (Rightclick_colorpick(0)) return; - + Init_start_operation(); Backup(); Shade_table=Shade_table_right; @@ -356,7 +356,7 @@ void Freehand_mode2_2_0(void) { if (Rightclick_colorpick(0)) return; - + Init_start_operation(); Backup(); Shade_table=Shade_table_right; @@ -427,7 +427,7 @@ void Freehand_Mode3_2_0(void) { if (Rightclick_colorpick(0)) return; - + Init_start_operation(); Backup(); Shade_table=Shade_table_right; @@ -462,7 +462,7 @@ void Line_12_0(void) { if (Rightclick_colorpick(0)) return; - + Init_start_operation(); Backup(); Paintbrush_shape_before_operation=Paintbrush_shape; @@ -484,7 +484,7 @@ void Line_12_0(void) } 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_Y); @@ -500,14 +500,14 @@ void Line_12_5(void) // // 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é) { short start_x; short start_y; short end_x; short end_y; - + short cursor_x; short cursor_y; @@ -610,7 +610,7 @@ void K_line_12_0(void) if (Rightclick_colorpick(0)) return; - + Init_start_operation(); Backup(); 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); 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(color); @@ -697,7 +697,7 @@ void K_line_0_6(void) Operation_pop(&direction); 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); Hide_line_preview (start_x,start_y,end_x,end_y); @@ -789,7 +789,7 @@ void Rectangle_12_0(void) { if (Rightclick_colorpick(0)) return; - + Init_start_operation(); if ((Config.Coords_rel) && (Menu_is_visible)) @@ -963,7 +963,7 @@ void Circle_12_0(void) { if (Rightclick_colorpick(0)) return; - + Init_start_operation(); Backup(); @@ -1076,7 +1076,7 @@ void Empty_circle_0_5(void) Draw_empty_circle_permanent(center_x,center_y,limit,color); End_of_modification(); - + if ( (Config.Coords_rel) && (Menu_is_visible) ) { Print_in_menu("X: Y:",0); @@ -1139,7 +1139,7 @@ void Ellipse_12_0(void) { if (Rightclick_colorpick(0)) return; - + Init_start_operation(); Backup(); @@ -1158,7 +1158,7 @@ void Ellipse_12_0(void) } 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_Y); @@ -1189,7 +1189,7 @@ void Ellipse_12_5(void) Operation_pop(¢er_y); Operation_pop(¢er_x); Operation_pop(&color); - + if ( (tangent_x!=Paintbrush_X) || (tangent_y!=Paintbrush_Y) ) { @@ -1269,7 +1269,7 @@ void Empty_ellipse_0_5(void) } End_of_modification(); - + if ( (Config.Coords_rel) && (Menu_is_visible) ) { Print_in_menu("X: Y: ",0); @@ -1365,7 +1365,7 @@ void Fill_2_0(void) { if (Rightclick_colorpick(1)) return; - + Hide_cursor(); // 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 @@ -1414,7 +1414,7 @@ void Replace_2_0(void) { if (Rightclick_colorpick(1)) return; - + Hide_cursor(); Init_start_operation(); Backup(); @@ -1458,7 +1458,7 @@ void Draw_curve_cross(short x_pos, short y_pos) end_y=3+(Limit_visible_bottom-y_pos); if (start_x<=end_x && start_y<=end_y) - { + { for (i=start_x; i<=end_x; i++) { 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); 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(Paintbrush_X); @@ -1515,7 +1515,7 @@ void Curve_34_points_2_0(void) { if (Rightclick_colorpick(0)) return; - + Init_start_operation(); Backup(); 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); 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(Paintbrush_X); @@ -1769,7 +1769,7 @@ void Curve_4_points_2_9(void) Operation_pop(&color); Hide_cursor(); - + Draw_curve_cross(x2,y2); Draw_curve_cross(x3,y3); @@ -1851,14 +1851,14 @@ void Curve_3_points_0_5(void) Operation_push(y4); Operation_push(Paintbrush_X); Operation_push(Paintbrush_Y); - + if (Config.Stylus_mode) { Display_cursor(); while(!Mouse_K) Get_input(20); Hide_cursor(); - + Hide_line_preview(x1,y1,x4,y4); } } @@ -1924,7 +1924,7 @@ void Curve_finalize(void) Operation_pop(&color); Paintbrush_hidden=0; - + Hide_cursor(); 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; // Time is now reset, because the += was death spiral // 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); } @@ -2082,7 +2082,7 @@ void Polygon_12_0(void) if (Rightclick_colorpick(0)) return; - + Init_start_operation(); Backup(); 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); 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_Y); @@ -2186,7 +2186,7 @@ void Polyfill_12_0(void) if (Rightclick_colorpick(0)) return; - + Init_start_operation(); Backup(); 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 Pixel_figure_preview_xor(Paintbrush_X,Paintbrush_Y,0); Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1); - + 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_Y); @@ -2240,7 +2240,7 @@ void Polyfill_0_8(void) Operation_pop(&direction); 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); @@ -2387,7 +2387,7 @@ void Polyform_12_0(void) if (Rightclick_colorpick(0)) return; - + Init_start_operation(); Backup(); 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)) return; - + Init_start_operation(); // 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 Pixel_figure_preview_xor(Paintbrush_X,Paintbrush_Y,0); Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1); - + Operation_push(Paintbrush_X); // X Initial Operation_push(Paintbrush_Y); // X Initial Operation_push(color); // color de remplissage @@ -2822,11 +2822,11 @@ void Scroll_12_0(void) } } Update_screen_targets(); - + Cursor_hidden_before_scroll=Cursor_hidden; Cursor_hidden=1; 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(¢er_y); Operation_pop(¢er_x); - + if ( (Paintbrush_X!=x_pos) || (Paintbrush_Y!=y_pos) ) { // L'utilisateur a bougé, il faut scroller l'image @@ -2946,7 +2946,7 @@ void Scroll_0_5(void) } if (Main.tilemap_mode) Tilemap_update(); - + Cursor_hidden=Cursor_hidden_before_scroll; End_of_modification(); @@ -2983,7 +2983,7 @@ void Grad_circle_12_0(void) Pixel_figure_preview(Paintbrush_X,Paintbrush_Y,color); Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1); - + if ((Config.Coords_rel) && (Menu_is_visible)) Print_in_menu("Radius: 0 ",0); @@ -3149,7 +3149,7 @@ void Grad_circle_12_8(void) Operation_pop(¢er_x); Operation_pop(&color); Operation_pop(&old_mouse_k); - + Hide_cursor(); // On efface la croix XOR au centre du cercle 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); Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1); - + 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(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 width = end_x-start_x; short height = end_y-start_y; - + // Handle clipping if (end_x-Main.offset_X > Min(Main.image_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 - Main.offset_Y, width - offset_width + 1); } - + if (height > offset_height + 2) { Vertical_XOR_line(start_x-Main.offset_X, start_y - Main.offset_Y + 1, height - offset_height - 1); - + if (offset_width == 0) { 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, 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 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 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_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. Paintbrush_X = start_x; Paintbrush_Y = start_y; if (start_x>end_x) SWAP_SHORTS(start_x, end_x) - + if (start_y>end_y) SWAP_SHORTS(start_y, end_y) - + Hide_cursor(); // 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... if(SDL_GetModState() & KMOD_SHIFT) Clamp_coordinates_regular_angle(start_x,start_y,&cursor_x,&cursor_y); - + if ((cursor_x!=end_x) || (cursor_y!=end_y)) { Display_coords_rel_or_abs(start_x,start_y); @@ -3890,13 +3890,13 @@ void Centered_lines_12_0(void) { if (Rightclick_colorpick(0)) return; - + Init_start_operation(); Backup(); Shade_table=(Mouse_K==LEFT_SIDE)?Shade_table_left:Shade_table_right; 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(Paintbrush_X); @@ -4113,7 +4113,7 @@ void Pan_view_12_0(void) // First time the user clicks { Init_start_operation(); - + Operation_push(Paintbrush_X); Operation_push(Paintbrush_Y); } @@ -4129,10 +4129,10 @@ void Pan_view_12_2(void) { short start_x; short start_y; - + Operation_pop(&start_y); Operation_pop(&start_x); - + if (Paintbrush_X!=start_x || Paintbrush_Y!=start_y) { // User moved @@ -4164,7 +4164,7 @@ void Pan_view_0_2(void) Operation_pop(&start_y); Operation_pop(&start_x); - + if (!Pan_shortcut_pressed) { // End of operation, return to previous diff --git a/src/palette.c b/src/palette.c index eefa7e1b..c45b11f2 100644 --- a/src/palette.c +++ b/src/palette.c @@ -245,7 +245,7 @@ void Spread_colors(short start,short end,T_Palette palette) T_Components * backup_palette; T_Components * temp_palette; T_Components * working_palette; - + byte Palette_undo_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 // and the number of colors has reached the target. 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) { - Set_palette_slider(red_slider,Color_max*2+1,Color_max,"± 0",NUMERIC_R_X); - Set_palette_slider(green_slider,Color_max*2+1,Color_max,"± 0",NUMERIC_G_X); - Set_palette_slider(blue_slider,Color_max*2+1,Color_max,"± 0",NUMERIC_B_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,"\xb1 0",NUMERIC_G_X); + Set_palette_slider(blue_slider,Color_max*2+1,Color_max,"\xb1 0",NUMERIC_B_X); } else { @@ -855,15 +855,15 @@ void Draw_all_palette_sliders(T_Scroller_button * red_slider, // Dans le cas d'un bloc, tout à 0. red_slider->Position =Color_max; 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; 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; 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 { @@ -907,7 +907,7 @@ int Window_Histogram(unsigned char block_start, unsigned char block_end, dword* int clicked_button; /* Draws an histogram of the selected range in a separate window */ - + if (block_start == block_end) { // only one color selected: auto-detect the range 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(); return -1; } - + Open_window(263, 150, "Histogram"); 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 if (height==0) height=1; - + Window_rectangle( 3+j*bar_width, 127-height, bar_width, height, i); - + //if (i == MC_Light) { Window_rectangle( 3+j*bar_width, @@ -976,7 +976,7 @@ int Window_Histogram(unsigned char block_start, unsigned char block_end, dword* 126-old_height, 1, old_height-height+1,MC_Black); - + old_height=height; j++; } @@ -1003,12 +1003,12 @@ int Window_Histogram(unsigned char block_start, unsigned char block_end, dword* } else new_hovered_color=-1; - + // When changing hovered color, update the info area if (new_hovered_color!=hovered_color) { char str[12]; - + hovered_color=new_hovered_color; Hide_cursor(); 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(); if (Key == KEY_ESC) clicked_button=1; - + } while( clicked_button < 1); Close_window(); - + if (clicked_button==2) { // 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() // will really wait for a release of mouse button. Mouse_K=1; - return hovered_color; + return hovered_color; } 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 y_pos=Window_palette_button_list->Pos_Y+3+((index&15)* 5); byte col; - + col=(color&&color_usage[index])?MC_White:MC_Light; 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_W = 32; static const int FGCOLOR_DISPLAY_H = 88; - + // Coordinates of the Color# static const int COLOR_X = 111; static const int COLOR_Y = 79; - - + + static short reduce_colors_number = 256; short temp_color; // Variable pouvant reservir pour différents calculs intermédiaires dword temp; @@ -1128,7 +1128,7 @@ void Button_Palette(int btn) //T_Components * backup_palette; //T_Components * temp_palette; //T_Components * working_palette; - + static byte show_used_colors=0; 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(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_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, 1, "Lightness"); 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 // 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); @@ -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( 83,178,35,14,"Save" ,1,1,SDLK_s); // 27 - + // 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_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); if (show_used_colors) Tag_used_colors(1, color_usage); - + Update_window_area(0,0,299,196); - + do { old_mouse_x=Mouse_X; old_mouse_y=Mouse_Y; old_mouse_k=Mouse_K; clicked_button=Window_clicked_button(); - + switch (clicked_button) { case 0 : // Nulle part @@ -1301,19 +1301,19 @@ void Button_Palette(int btn) // Contextual menu T_Dropdown_button dropdown; T_Dropdown_choice *item; - + dropdown.Pos_X =0; dropdown.Pos_Y =0; dropdown.Height =0; dropdown.Dropdown_width=48; dropdown.First_item =NULL; dropdown.Bottom_up =1; - + Window_dropdown_add_item(&dropdown, 1, "Copy"); Window_dropdown_add_item(&dropdown, 2, "Paste"); - + item=Dropdown_activate(&dropdown,Mouse_X,Mouse_Y); - + if (item && item->Number == 1) { // Copy @@ -1324,10 +1324,10 @@ void Button_Palette(int btn) { // Paste int nb_colors; - + // Backup Palette_edit_step(); - + nb_colors = Get_clipboard_colors(working_palette, block_start); if (nb_colors>0) { @@ -1345,7 +1345,7 @@ void Button_Palette(int btn) else if (Back_color!=temp_color) { // Just select back color - + Back_color=temp_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); @@ -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(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); - + Display_cursor(); } else @@ -1409,7 +1409,7 @@ void Button_Palette(int btn) Num2str(block_end ,str+4,3); str[3]=26; // Flèche vers la droite Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light); - + // Affichage des jauges 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); str[3]=26; // Flèche vers la droite Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light); - + // Affichage des jauges 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); Num2str(Fore_color,str,3); Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light); - + // Affichage des jauges Display_sliders(red_slider,green_slider,blue_slider,0,working_palette); @@ -1460,7 +1460,7 @@ void Button_Palette(int btn) } Display_cursor(); } - + } break; 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); Format_component(Color_max-red_slider->Position,str); - } + } else { HSL_to_RGB( @@ -1533,7 +1533,7 @@ void Button_Palette(int btn) else { // Jauge nulle: - strcpy(str,"± 0"); + strcpy(str,"\xb1 0"); } 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); Format_component(Color_max-green_slider->Position,str); - } + } else { HSL_to_RGB( @@ -1584,7 +1584,7 @@ void Button_Palette(int btn) non_greys=1; else greys=1; - + 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; @@ -1614,7 +1614,7 @@ void Button_Palette(int btn) else { // Jauge nulle: - strcpy(str,"± 0"); + strcpy(str,"\xb1 0"); } 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); Format_component(Color_max-blue_slider->Position,str); - } + } else { HSL_to_RGB( @@ -1645,7 +1645,7 @@ void Button_Palette(int btn) &working_palette[Fore_color].G, &working_palette[Fore_color].B); Format_component((int)255-blue_slider->Position,str); - } + } Print_counter(NUMERIC_B_X,NUMERIC_Y,str,MC_Black,MC_Light); } else @@ -1665,7 +1665,7 @@ void Button_Palette(int btn) non_greys=1; else greys=1; - + 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; @@ -1695,7 +1695,7 @@ void Button_Palette(int btn) else { // Jauge nulle: - strcpy(str,"± 0"); + strcpy(str,"\xb1 0"); } 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; Palette_edit_step(); - + // Compute weighted average used=color_usage[temp_color]+color_usage[Fore_color]; if (used) @@ -1773,7 +1773,7 @@ void Button_Palette(int btn) Set_red (Fore_color,sum_r,working_palette); Set_green(Fore_color,sum_g,working_palette); Set_blue (Fore_color,sum_b,working_palette); - + Wait_end_of_click(); } } @@ -1855,14 +1855,14 @@ void Button_Palette(int btn) Tag_color_range(block_start,block_end); if (show_used_colors) Tag_used_colors(1, color_usage); - + need_to_remap=1; Set_palette(working_palette); Display_cursor(); 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. 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); // On tag le bloc (ou la couleur) Tag_color_range(block_start,block_end); - + need_to_remap=1; Display_cursor(); @@ -1952,13 +1952,13 @@ void Button_Palette(int btn) if (Window_attribute2==0) // User picked "other" choice { int choice; - + choice=Requester_window("Enter the max. number of colors", reduce_colors_number); - + if (choice < 2 || choice > 256) break; // Cancel - + reduce_colors_number = choice; } else @@ -2111,7 +2111,7 @@ void Button_Palette(int btn) else { // Jauge nulle: - strcpy(str,"± 0"); + strcpy(str,"\xb1 0"); } Print_counter(NUMERIC_R_X,NUMERIC_Y,str,MC_Black,MC_Light); @@ -2132,7 +2132,7 @@ void Button_Palette(int btn) else { // Jauge nulle: - strcpy(str,"± 0"); + strcpy(str,"\xb1 0"); } Print_counter(NUMERIC_G_X,NUMERIC_Y,str,MC_Black,MC_Light); @@ -2153,7 +2153,7 @@ void Button_Palette(int btn) else { // Jauge nulle: - strcpy(str,"± 0"); + strcpy(str,"\xb1 0"); } Print_counter(NUMERIC_B_X,NUMERIC_Y,str,MC_Black,MC_Light); } @@ -2237,7 +2237,7 @@ void Button_Palette(int btn) else { // Jauge nulle: - strcpy(str,"± 0"); + strcpy(str,"\xb1 0"); } Print_counter(NUMERIC_R_X,NUMERIC_Y,str,MC_Black,MC_Light); @@ -2258,7 +2258,7 @@ void Button_Palette(int btn) else { // Jauge nulle: - strcpy(str,"± 0"); + strcpy(str,"\xb1 0"); } Print_counter(NUMERIC_G_X,NUMERIC_Y,str,MC_Black,MC_Light); @@ -2279,7 +2279,7 @@ void Button_Palette(int btn) else { // Jauge nulle: - strcpy(str,"± 0"); + strcpy(str,"\xb1 0"); } 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++) { temp_color=block_end-(i-block_start); - + Set_red (i,backup_palette[temp_color].R,working_palette); Set_green (i,backup_palette[temp_color].G,working_palette); Set_blue (i,backup_palette[temp_color].B,working_palette); Set_red (temp_color,backup_palette[i].R,working_palette); Set_green (temp_color,backup_palette[i].G,working_palette); Set_blue (temp_color,backup_palette[i].B,working_palette); - + if (clicked_button==21) { conversion_table[i]=temp_color; @@ -2360,12 +2360,12 @@ void Button_Palette(int btn) break; case 22 : // HSL <> RGB - + // Acte les changements en cours sur une ou plusieurs couleurs Palette_edit_select_range(); Hide_cursor(); - + Palette_view_is_RGB = !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); } Display_sliders(red_slider,green_slider,blue_slider,(block_start!=block_end),working_palette); - + Display_cursor(); - + 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); break; @@ -2417,7 +2417,7 @@ void Button_Palette(int btn) begin = block_start; end = block_end; } - + // Init remap table for (i=0;i<256;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_BYTES(remap_table[temp_color], remap_table[temp_color-1]) - + swap=1; } } @@ -2467,7 +2467,7 @@ void Button_Palette(int btn) lightness=Perceptual_lightness(working_palette+begin); for(temp_color=begin+1;temp_color<=end;temp_color++) { - old_lightness=lightness; + old_lightness=lightness; lightness=Perceptual_lightness(working_palette+temp_color); 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].G, working_palette[temp_color-1].G) 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_BYTES(remap_table[temp_color], remap_table[temp_color-1]) - + swap=1; } } @@ -2493,7 +2493,7 @@ void Button_Palette(int btn) lightness=color_usage[begin]; for(temp_color=begin+1;temp_color<=end;temp_color++) { - old_lightness=lightness; + old_lightness=lightness; lightness=color_usage[temp_color]; 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].G, working_palette[temp_color-1].G) 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_BYTES(remap_table[temp_color], remap_table[temp_color-1]) - + swap=1; } } @@ -2519,7 +2519,7 @@ void Button_Palette(int btn) // palette, l'image et à l'écran. Set_palette(working_palette); Palette_edit_step(); // Disable Undo - + End_of_modification(); need_to_remap=1; } @@ -2528,20 +2528,20 @@ void Button_Palette(int btn) { char str[7]; unsigned int new_color; - + Hide_cursor(); Print_in_window(NUMERIC_BOX_X+2,NUMERIC_BOX_Y+2,"Hex",MC_Black,MC_Light); // 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); 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'; Display_cursor(); if (Readline(NUMERIC_BOX_X+NUMERIC_BOX_W-2-6*8, NUMERIC_BOX_Y+2, str, 6, INPUT_TYPE_HEXA)) { int length = strlen(str); short new_red, new_blue, new_green; - + if (length==3 || length==6) { sscanf(str, "%x", &new_color); @@ -2550,12 +2550,12 @@ void Button_Palette(int btn) new_color = ((new_color&0xF00)*0x1100) | ((new_color&0x0F0)*0x110) | - ((new_color&0x00F)*0x11); + ((new_color&0x00F)*0x11); } new_red=(new_color&0xFF0000) >> 16; new_green=(new_color&0x00FF00) >> 8; new_blue=(new_color&0x0000FF); - + // Backup Palette_edit_step(); // 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); } break; - + case 25: // Number of colors used: Open histogram { int selected_col; - + selected_col=Window_Histogram(block_start, block_end, color_usage); if (selected_col!=-1) { // Tag selected color Fore_color=first_color=last_color=block_start=block_end=selected_col; Tag_color_range(block_start,block_end); - + // Affichage du n° de la couleur sélectionnée Window_rectangle(COLOR_X,COLOR_Y,56,7,MC_Light); Num2str(Fore_color,str,3); Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light); Update_window_area(COLOR_X,COLOR_Y,56,7); - + // Affichage des jauges Window_rectangle(NUMERIC_R_X,NUMERIC_Y,72,7,MC_Light); Display_sliders(red_slider,green_slider,blue_slider,0,working_palette); - + // 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); Update_window_area(FGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H); - + Palette_edit_select_range(); } @@ -2759,14 +2759,14 @@ void Button_Palette(int btn) Update_window_area(COLOR_X+24,COLOR_Y,32,7); Num2str(Fore_color,str,3); Print_in_window(COLOR_X,COLOR_Y,str,MC_Black,MC_Light); - + // Affichage des jauges Display_sliders(red_slider,green_slider,blue_slider,0,working_palette); // 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); Update_window_area(FGCOLOR_DISPLAY_X,FGCOLOR_DISPLAY_Y,FGCOLOR_DISPLAY_W,FGCOLOR_DISPLAY_H); - + Palette_edit_select_range(); } Display_cursor(); @@ -2795,7 +2795,7 @@ void Button_Palette(int btn) Hide_cursor(); // Backup Palette_edit_step(); - + nb_colors = Get_clipboard_colors(working_palette, block_start); if (nb_colors>0) { @@ -2821,7 +2821,7 @@ void Button_Palette(int btn) Tag_used_colors(1, color_usage); 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); - + 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); @@ -2927,7 +2927,7 @@ void Button_Secondary_palette(int btn) 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(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 Num2str(Gamma*10,str,2); @@ -2958,7 +2958,7 @@ void Button_Secondary_palette(int btn) // Column slider Num2str(256-Window_attribute2,str,3); Print_in_window(38,89,str,MC_Black,MC_Light); - break; + break; case 6: // Line slider Num2str(16-Window_attribute2,str,3); @@ -3019,7 +3019,7 @@ void Button_Secondary_palette(int btn) Close_window(); Unselect_button(BUTTON_PALETTE); Display_cursor(); - + if (clicked_button==4) // Cancel return; @@ -3053,7 +3053,7 @@ void Button_Secondary_palette(int btn) // that this will not activate shade mode on exit. Shade_settings_menu(); } - + if (palette_needs_redraw) { 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 nb_colors = Palette_clipboard_count; - + if (nb_colors==0) return 0; @@ -3109,7 +3109,7 @@ const T_Components * Favorite_GUI_color(byte color_index) {128,128,128}, // Grey {255,255,255} }; - + if (RGB_scale==3) { // Check if ALL GUI colors are compatible with /rgb 3 diff --git a/src/transform.c b/src/transform.c index 48ad2fba..09cd5f2c 100644 --- a/src/transform.c +++ b/src/transform.c @@ -42,7 +42,7 @@ void Factorize(short *a, short *b) { // Method: brute-force. short factor; - + factor=2; while (factor<=*a && factor<=*b) { @@ -79,7 +79,7 @@ void Button_Transform_menu(int btn) UNIT_PERCENT = 2, UNIT_RATIO = 3 }; - + char buffer[5]; short clicked_button; const char * unit_label[] = { @@ -95,11 +95,11 @@ void Button_Transform_menu(int btn) short new_width=Main.image_width; short new_height=Main.image_height; byte need_display_size = 0; - + // Persistent data 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 - + T_Dropdown_button * unit_button; T_Special_button * input_button[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; else new_ratio_width=old_ratio_width=new_ratio_height=old_ratio_height=1; - + Open_window(215,165,"Picture transform"); 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 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(107,125, 37,14,"+90°" ,0,1,SDLK_LAST); // 5 - Window_set_normal_button( 69,140, 75,14,"180°" ,0,1,SDLK_LAST); // 6 + Window_set_normal_button( 69,125, 37,14,"-90\xb0" ,0,1,SDLK_LAST); // 4 + Window_set_normal_button(107,125, 37,14,"+90\xb0" ,0,1,SDLK_LAST); // 5 + 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); 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_PERCENT,unit_label[UNIT_PERCENT]); 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[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[3] = Window_set_input_button(89,58,4); // 13 - + Update_window_area(0,0,Window_width, Window_height); - + Display_cursor(); do @@ -191,9 +191,9 @@ void Button_Transform_menu(int btn) Display_cursor(); need_display_size=0; } - + clicked_button=Window_clicked_button(); - + // Contextual 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)) clicked_button=1; - + else switch(clicked_button) { case 9: // Unit @@ -249,12 +249,12 @@ void Button_Transform_menu(int btn) Factorize(&new_ratio_width, &old_ratio_width); Factorize(&new_ratio_height, &old_ratio_height); } - break; + break; } - + unit_index = Window_attribute2; break; - + case 8: // Lock proportions ratio_is_locked = ! ratio_is_locked; Hide_cursor(); @@ -271,7 +271,7 @@ void Button_Transform_menu(int btn) case 12: // input new height Num2str(*( input_value[clicked_button-10]),buffer,4); 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, buffer, 4, @@ -299,7 +299,7 @@ void Button_Transform_menu(int btn) // Copy the whole ratio new_ratio_height=new_ratio_width; old_ratio_height=old_ratio_width; - } + } } else // (clicked_button == 12 || clicked_button == 13) { @@ -313,10 +313,10 @@ void Button_Transform_menu(int btn) // Copy the whole ratio new_ratio_width=new_ratio_height; old_ratio_width=old_ratio_height; - } + } } - } - + } + // Re-compute ratio from size in pixels if (unit_index == UNIT_PIXELS) { @@ -337,7 +337,7 @@ void Button_Transform_menu(int btn) while (clicked_button<=0 || clicked_button>=8); Close_window(); - + // The Scroll operation uses the same button as transformation menu. if (Current_operation != OPERATION_SCROLL) Unselect_button(btn); @@ -346,7 +346,7 @@ void Button_Transform_menu(int btn) { short old_width; short old_height; - + // Determine new image dimensions switch (clicked_button) { @@ -354,15 +354,15 @@ void Button_Transform_menu(int btn) // Keep new_width and new_height as entered. break; case 2 : // Flip X - case 3 : // Flip Y + case 3 : // Flip Y case 6 : // 180° Rotation new_width=Main.image_width; new_height=Main.image_height; break; - + case 4 : // -90° Rotation case 5 : // +90° Rotation - + new_width=Main.image_height; new_height=Main.image_width; break; @@ -370,20 +370,20 @@ void Button_Transform_menu(int btn) // Memorize the current dimensions old_width=Main.image_width; old_height=Main.image_height; - + Upload_infos_page(&Main); // Allocate a new page if (Backup_with_new_dimensions(new_width,new_height)) { // The new image is allocated, the new dimensions are already updated. - + Main.image_is_modified=1; - + // Process the transformation: switch(clicked_button) { int i; - + case 2 : // Flip X for (i=0; iPages->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); } break; - case 3 : // Flip Y + case 3 : // Flip Y for (i=0; iPages->Nb_layers; i++) { 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); Rotate_180_deg_lowlevel(Main.backups->Pages->Image[i].Pixels, Main.image_width, Main.image_height); } - break; + break; case 7 : // Resize for (i=0; iPages->Nb_layers; i++) { diff --git a/src/windows.c b/src/windows.c index 78b391bc..1b13adf9 100644 --- a/src/windows.c +++ b/src/windows.c @@ -1043,7 +1043,7 @@ void Print_filename(void) // Determine maximum size, in characters max_size = 12 + (Screen_width / Menu_factor_X - 320) / 8; - + // Erase whole area Block(Screen_width-max_size*8*Menu_factor_X, 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 '-': char_number=12; break; - case '±': + case '\xb1': char_number=13; break; }