commit ecdbb5e

zzo38  ·  2024-03-09 04:10:28 +0000 UTC
parent 1bcf48b
Add -mz2 flag as a shorter way to set the screen compatibility flag.
2 files changed,  +12, -0
M main.c
+4, -0
 1@@ -379,6 +379,10 @@ Execute (x)
 2   Execute uxn code at the specified address, which must be nonzero, and
 3   cannot be in expanded memory. (The data of this command is not used.)
 4 
 5+Screen compatibility flag (z2)
 6+  The first byte of the data is the screen compatibility mode; see
 7+  extension.doc for a list of the valid flags.
 8+
 9 During the execution of any of these commands, it behaves as though the -x
10 switch is specified, even if it isn't specified.
11 
M main.c
+8, -0
 1@@ -1644,6 +1644,14 @@ static void do_script(Uint8 stage) {
 2       case 'x': // Execute
 3         run(o->addr);
 4         break;
 5+      case 'z': // Others
 6+        if(o->addr==2) {
 7+          if(o->len) screencompat=o->data[0];
 8+          blend[0][0]=(screencompat&0x01?4:0);
 9+        } else {
10+          errx(1,"Unrecognized command -mz%X",o->addr);
11+        }
12+        break;
13       default: errx(1,"Unrecognized command -m%c",o->kind);
14     }
15   }