changeset 69:3d40683b367a

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 05 Jul 2018 12:16:33 +0300
parents 59731a72ce8b
children 8cee0b34defe
files multipaint.pde
diffstat 1 files changed, 18 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/multipaint.pde	Wed Jul 04 23:41:51 2018 +0300
+++ b/multipaint.pde	Thu Jul 05 12:16:33 2018 +0300
@@ -13,6 +13,7 @@
 final int FAKEX = 32; // Commodore 64 without attribute limitations
 final int UNIA = 33;
 final int PEESEE = 0, MACOSX = 1, PSJS = 2;
+
 //-1 & -1 for normal operation
 int machine = -1; // change this to autoselect
 int platform = PSJS;
@@ -22,10 +23,16 @@
 int g_active, g_tooltrigger, g_prevtool;
 int g_rband, g_rbang, g_boxreconstruct, g_sorsaa, g_charlimit;
 int g_animx, g_animy, g_animframes, g_animno, g_animtime, g_animspeed;
-int g_omag, g_bordh, g_bordv, g_keymacpos, g_framec;
+int g_omag, g_bordh, g_bordv, g_keymacpos;
 
-boolean fileselect = false, saveas = false, refselect = false, g_control = false, g_shift = false, exporttxt = false, importfmt = false, exportemu = false, exportfmt = false;
-String path = "", refpath = "", filename = "", elename = "", sfilename = "", refname = "", g_exportext = "", g_exportname = "", g_keymacro = "";
+boolean fileselect = false, saveas = false, refselect = false,
+    g_control = false, g_shift = false, exporttxt = false,
+    importfmt = false, exportemu = false, exportfmt = false;
+
+String path = "", refpath = "", filename = "", sfilename = "",
+    elename = "", refname = "",
+    g_exportext = "", g_exportname = "", g_keymacro = "";
+
 
 int[] g_r = new int[266];
 int[] g_g = new int[266];
@@ -52,10 +59,12 @@
 int[] g_magpix = new int[64];
 int[] g_magpiy = new int[64];
 
+
 byte g_realfront, g_realback;
 PImage output, outputsans;
 String g_name;
 
+
 //dimensions
 int X, Y, MX, MY;
 //generic mouse
@@ -188,11 +197,9 @@
     output = createImage(X * g_omag + g_bordh * g_omag, Y * g_omag + g_bordv * g_omag, RGB);
     outputsans = createImage(X * g_omag, Y * g_omag, RGB);
 
-    for (y = 0; y < Y; y++) {
-        for (x = 0; x < X; x++) {
-            absolute_clearpoint(x, y);
-        }
-    }
+    for (y = 0; y < Y; y++)
+    for (x = 0; x < X; x++)
+        absolute_clearpoint(x, y);
 
     switcher(2);
     noStroke();
@@ -390,15 +397,15 @@
 }
 
 
-void draw() {
+void draw()
+{
     if (!focused) {
         g_control = false;
         g_shift = false;
     }
 
     if (g_data[int('n')] == 1) {
-        g_animtime++;
-        if (g_animtime > 8 - g_animspeed * 2) {
+        if (++g_animtime > 8 - g_animspeed * 2) {
             animbrush_do();
             g_animtime = 0;
         }
@@ -540,9 +547,6 @@
         g_control = false;
     }
 
-    //if(g_framec==1){saveFrame("frames/out-######.png");}
-    //g_framec++;if(g_framec>1)g_framec=0;
-
     if (g_keymacro.length() > g_keymacpos) {
         macro_command(g_keymacro.charAt(g_keymacpos));
         g_keymacpos++;