From 87d887e24006dd204d73f62b094cc6dca45c9107 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 15 Dec 2008 15:17:47 +0000 Subject: [PATCH] One more small speedup. The coordinates were always printed twice in the menubar. Also added a missing refresh when using the pipette and the color replace tools. Now you get a preview of the color under the cursor in the menubar. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@381 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- boutons.c | 1 + divers.c | 1 - gfx2.cfg | Bin 10062 -> 10062 bytes graph.c | 2 ++ moteur.c | 15 ++++----------- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/boutons.c b/boutons.c index c8986563..e7ec7e44 100644 --- a/boutons.c +++ b/boutons.c @@ -4801,6 +4801,7 @@ void Bouton_Spray_Menu(void) Print_dans_fenetre(50,151," Mono",CM_Noir,CM_Clair); else Print_dans_fenetre(50,151,"Multi",CM_Noir,CM_Clair); + UpdateRect(Fenetre_Pos_X+50*Menu_Facteur_X,Fenetre_Pos_Y+151*Menu_Facteur_Y,5*8*Menu_Facteur_X,8*Menu_Facteur_Y); Afficher_curseur(); break; diff --git a/divers.c b/divers.c index afde30d4..1634614e 100644 --- a/divers.c +++ b/divers.c @@ -388,7 +388,6 @@ void Wait_VBL(void) // (Remarque, Windows arrondit généralement aux 10ms supérieures) while (SDL_GetTicks() / Delai <= debut / Delai) { - puts("Waiting..."); SDL_Delay(1); } } diff --git a/gfx2.cfg b/gfx2.cfg index 024c273a22f0789070cad591f34b6d336429fddb..5bfdb239c990863b3c42fcd017f706ec23b07636 100644 GIT binary patch delta 28 kcmX@-cg}BvpDH8MWPep9R!;^72Byh@$~!mftI0D00D-6nzyJUM delta 22 ecmX@-cg}BvpDH8cWPeqq$)U>oHtVa&GXel&O9yxW diff --git a/graph.c b/graph.c index 00843adf..5ea001da 100644 --- a/graph.c +++ b/graph.c @@ -1662,6 +1662,7 @@ void Print_dans_menu(char * Chaine, short Position) // -- Afficher les coordonnées du pinceau dans le menu -- +// Note : cette fonction n'affiche que les chiffres, pas les X: Y: qui sont dans la gestion principale, car elle est apellée très souvent. void Print_coordonnees(void) { char Tempo[5]; @@ -1683,6 +1684,7 @@ void Print_coordonnees(void) Num2str(Pipette_Couleur,Tempo,3); Print_dans_menu(Tempo,20); Print_general(170*Menu_Facteur_X,Menu_Ordonnee_Texte," ",0,Pipette_Couleur); + UpdateRect(170*Menu_Facteur_X,Menu_Ordonnee_Texte,8*Menu_Facteur_X,8*Menu_Facteur_Y); } Num2str((dword)Pinceau_X,Tempo,4); diff --git a/moteur.c b/moteur.c index fedefc3c..c316f6d5 100644 --- a/moteur.c +++ b/moteur.c @@ -905,14 +905,7 @@ void Gestion_principale(void) ((((Mouse_Y-Menu_Ordonnee)/Menu_Facteur_Y)-2)>>2); strcpy(Chaine,TITRE_BOUTON[Indice_bouton]); - sprintf(Chaine+strlen(Chaine),"%d",Temp); - strcat(Chaine," ("); - sprintf(Chaine+strlen(Chaine),"%d",Principal_Palette[Temp].R); - strcat(Chaine,","); - sprintf(Chaine+strlen(Chaine),"%d",Principal_Palette[Temp].V); - strcat(Chaine,","); - sprintf(Chaine+strlen(Chaine),"%d",Principal_Palette[Temp].B); - strcat(Chaine,")"); + sprintf(Chaine+strlen(Chaine),"%d (%d,%d,%d)",Temp,Principal_Palette[Temp].R,Principal_Palette[Temp].V,Principal_Palette[Temp].B); for (Temp=strlen(Chaine); Temp<24; Temp++) Chaine[Temp]=' '; Chaine[24]=0; @@ -964,9 +957,9 @@ void Gestion_principale(void) else { Print_dans_menu("X: Y: ( )",0); - Num2str(Pipette_Couleur,Chaine,3); - Print_dans_menu(Chaine,20); - Print_general(170*Menu_Facteur_X,Menu_Ordonnee_Texte," ",0,Pipette_Couleur); + //Num2str(Pipette_Couleur,Chaine,3); + //Print_dans_menu(Chaine,20); + Print_general(170*Menu_Facteur_X,Menu_Ordonnee_Texte,"@",0,Pipette_Couleur); } Print_coordonnees(); }