The Spray tool no longer lags when you use a >0 delay setting.
Delay is now expressed in 1/100s, with range 0-99 git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@470 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
0b801a28c8
commit
b73d8b03dc
@ -4910,9 +4910,9 @@ void Bouton_Spray_Menu(void)
|
|||||||
Readline(196,39,Chaine,2,1);
|
Readline(196,39,Chaine,2,1);
|
||||||
Spray_Delay=atoi(Chaine);
|
Spray_Delay=atoi(Chaine);
|
||||||
// On corrige le delai
|
// On corrige le delai
|
||||||
if (Spray_Delay>10)
|
if (Spray_Delay>99)
|
||||||
{
|
{
|
||||||
Spray_Delay=10;
|
Spray_Delay=99;
|
||||||
Num2str(Spray_Delay,Chaine,2);
|
Num2str(Spray_Delay,Chaine,2);
|
||||||
Fenetre_Contenu_bouton_saisie(Saisie_Delay,Chaine);
|
Fenetre_Contenu_bouton_saisie(Saisie_Delay,Chaine);
|
||||||
}
|
}
|
||||||
|
|||||||
3
graph.c
3
graph.c
@ -1534,9 +1534,6 @@ void Aerographe(short Bouton_clicke)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Afficher_curseur();
|
Afficher_curseur();
|
||||||
|
|
||||||
for (Count=1; Count<=Spray_Delay; Count++)
|
|
||||||
Wait_VBL();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2007,7 +2007,7 @@ void Courbe_3_points_12_11(void)
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////// OPERATION_SPRAY
|
///////////////////////////////////////////////////////////// OPERATION_SPRAY
|
||||||
|
|
||||||
|
Uint32 Spray_next_time;
|
||||||
void Spray_1_0(void)
|
void Spray_1_0(void)
|
||||||
//
|
//
|
||||||
// Opération : OPERATION_SPRAY
|
// Opération : OPERATION_SPRAY
|
||||||
@ -2020,6 +2020,8 @@ void Spray_1_0(void)
|
|||||||
Initialiser_debut_operation();
|
Initialiser_debut_operation();
|
||||||
Backup();
|
Backup();
|
||||||
Shade_Table=Shade_Table_gauche;
|
Shade_Table=Shade_Table_gauche;
|
||||||
|
|
||||||
|
Spray_next_time = SDL_GetTicks()+Spray_Delay*10;
|
||||||
Aerographe(A_GAUCHE);
|
Aerographe(A_GAUCHE);
|
||||||
|
|
||||||
Operation_PUSH(Pinceau_X);
|
Operation_PUSH(Pinceau_X);
|
||||||
@ -2039,6 +2041,7 @@ void Spray_2_0(void)
|
|||||||
Initialiser_debut_operation();
|
Initialiser_debut_operation();
|
||||||
Backup();
|
Backup();
|
||||||
Shade_Table=Shade_Table_droite;
|
Shade_Table=Shade_Table_droite;
|
||||||
|
Spray_next_time = SDL_GetTicks()+Spray_Delay*10;
|
||||||
Aerographe(A_DROITE);
|
Aerographe(A_DROITE);
|
||||||
|
|
||||||
Operation_PUSH(Pinceau_X);
|
Operation_PUSH(Pinceau_X);
|
||||||
@ -2069,7 +2072,11 @@ void Spray_12_3(void)
|
|||||||
Afficher_curseur();
|
Afficher_curseur();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (SDL_GetTicks()>Spray_next_time)
|
||||||
|
{
|
||||||
|
Spray_next_time+=Spray_Delay*10;
|
||||||
Aerographe(Bouton_clicke);
|
Aerographe(Bouton_clicke);
|
||||||
|
}
|
||||||
|
|
||||||
Operation_PUSH(Pinceau_X);
|
Operation_PUSH(Pinceau_X);
|
||||||
Operation_PUSH(Pinceau_Y);
|
Operation_PUSH(Pinceau_Y);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user