commit 8260d94

Devine Lu Linvega  ·  2023-04-10 17:53:30 +0000 UTC
parent 7e1ac70
Removed POKDEV/PEKDEV macros
3 files changed,  +2, -8
+0, -1
1@@ -186,4 +186,3 @@ screen_deo(Uint8 *ram, Uint8 *d, Uint8 port)
2 	}
3 	}
4 }
5-
+2, -4
 1@@ -71,14 +71,12 @@ system_load(Uxn *u, char *filename)
 2 void
 3 system_deo(Uxn *u, Uint8 *d, Uint8 port)
 4 {
 5-	Uint16 a;
 6 	switch(port) {
 7 	case 0x3:
 8-		PEKDEV(a, 0x2);
 9-		system_cmd(u->ram, a);
10+		system_cmd(u->ram, PEEK2(d + 2));
11 		break;
12 	case 0xe:
13-		if(u->wst->ptr || u->rst->ptr) system_inspect(u);
14+		system_inspect(u);
15 		break;
16 	}
17 }
+0, -3
 1@@ -22,9 +22,6 @@ typedef unsigned int Uint32;
 2 #define POKE2(d, v) { (d)[0] = (v) >> 8; (d)[1] = (v); }
 3 #define PEEK2(d) ((d)[0] << 8 | (d)[1])
 4 
 5-#define POKDEV(x, y) { d[(x)] = (y) >> 8; d[(x) + 1] = (y); }
 6-#define PEKDEV(o, x) { (o) = (d[(x)] << 8) + d[(x) + 1]; }
 7-
 8 /* clang-format on */
 9 
10 typedef struct {