shithub: orca

Download patch

ref: 428edd25676d0142b85aa30fe46014409fb73e65
parent: 1dcdce362cb78251885a3c5257c3b368d94a52d5
author: cancel <cancel@cancel.fm>
date: Wed Nov 28 09:16:48 EST 2018

Cleanup

--- a/sim.c
+++ b/sim.c
@@ -202,6 +202,8 @@
   {                                                                            \
     bool const Oper_ports_enabled = Dual_is_active;
 
+#define DUAL_IS_ACTIVE Dual_is_active
+
 #define STOP_IF_DUAL_INACTIVE                                                  \
   if (!Dual_is_active)                                                         \
   return
@@ -373,7 +375,7 @@
   REALIZE_DUAL;
   Usz read_y = 0;
   Usz read_x = 1;
-  BEGIN_IF_DUAL_ACTIVE
+  if (DUAL_IS_ACTIVE) {
     Glyph coords[2];
     coords[0] = PEEK(0, -1);
     coords[1] = PEEK(0, -2);
@@ -380,7 +382,7 @@
     STORE(coords);
     read_y = UCLAMP(INDEX(coords[0]), 0, 16);
     read_x = UCLAMP(INDEX(coords[0]) + 1, 1, 16);
-  END_IF
+  }
   BEGIN_DUAL_PORTS
     I_PORT(0, -1, LOCKING | HASTE);
     I_PORT(0, -2, LOCKING | HASTE);