Skip to content
Extraits de code Groupes Projets
Valider 675056eb rédigé par Etienne BRATEAU's avatar Etienne BRATEAU
Parcourir les fichiers

Remove two globals variables from logglobals and add getters

parent cfdb6388
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
extern log_action_t gg; /* External global variables */ extern log_action_t gg; /* External global variables */
extern short cursx, cursy; /* Current position of cursor */
extern short cursx1, cursy1; /* Wire starting point */ extern short cursx1, cursy1; /* Wire starting point */
extern short cursx2, cursy2; /* Wire ending point */ extern short cursx2, cursy2; /* Wire ending point */
extern short chairx, chairy; /* Current position of crosshair */ extern short chairx, chairy; /* Current position of crosshair */
......
...@@ -133,4 +133,7 @@ int hvline(short x1, short y1, short *x2, short *y2); ...@@ -133,4 +133,7 @@ int hvline(short x1, short y1, short *x2, short *y2);
void init_X_window(); void init_X_window();
short getcursorxposition();
short getcursoryposition();
#endif #endif
...@@ -192,6 +192,8 @@ void pen() ...@@ -192,6 +192,8 @@ void pen()
if (gg.probemode) if (gg.probemode)
{ {
short cursx = getcursorxposition();
short cursy = getcursoryposition();
if (cursx != gg.t.x || cursy != gg.t.y) if (cursx != gg.t.x || cursy != gg.t.y)
{ {
if (gg.probesimtype != NULL) if (gg.probesimtype != NULL)
......
...@@ -2185,3 +2185,13 @@ void init_X_window() ...@@ -2185,3 +2185,13 @@ void init_X_window()
choose_log_cursor(0); choose_log_cursor(0);
} }
short getcursorxposition()
{
return cursx;
}
short getcursoryposition()
{
return cursy;
}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter