changeset 143:5e18cb16bc4b

Booleanize.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 14 Aug 2018 13:02:30 +0300
parents 1ec3488bfd1e
children f91dda5dc8da
files draw_outputs.pde events.pde multipaint.pde
diffstat 3 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/draw_outputs.pde	Tue Aug 14 13:00:47 2018 +0300
+++ b/draw_outputs.pde	Tue Aug 14 13:02:30 2018 +0300
@@ -1093,8 +1093,10 @@
     }
     else
     if (tt == 5) { //floodfill
-        if (g_klikkeri == 0) {
-            g_klikkeri = 1;
+        if (g_klikkeri)
+        {
+            g_klikkeri = true;
+
             storeparameters();
             g_data[int('X')] = 0;
             g_data[int('Y')] = 0;
--- a/events.pde	Tue Aug 14 13:00:47 2018 +0300
+++ b/events.pde	Tue Aug 14 13:02:30 2018 +0300
@@ -190,9 +190,9 @@
 void mouseReleased()
 {
     g_dirty = true;
+    g_tooltrigger = 0;
+    g_klikkeri = false;
 
-    g_tooltrigger = 0;
-    g_klikkeri = 0;
     if (tool() == 8) {
         if (g_phase == 1) {
             g_phase = 0;
--- a/multipaint.pde	Tue Aug 14 13:00:47 2018 +0300
+++ b/multipaint.pde	Tue Aug 14 13:02:30 2018 +0300
@@ -62,7 +62,8 @@
 //dimensions
 int X, Y, MX, MY;
 //generic mouse
-int g_ofx, g_ofy, g_button, g_realbutton, g_klikkeri, g_mx, g_my, g_orx, g_ory, g_msx, g_msy;
+boolean g_klikkeri;
+int g_ofx, g_ofy, g_button, g_realbutton, g_mx, g_my, g_orx, g_ory, g_msx, g_msy;
 //rubberband,mouse
 int g_phase, g_rx, g_ry, g_rx2, g_ry2, g_rubbermode;
 int g_prex, g_prey, g_storedcoordx, g_storedcoordy;