commit ca5ad113eedf238e0534de21a4e2d3fd43d96de2
parent c84b5015e4c8b22173317cfc20e1b5ced202bd09
Author: neauoire <aliceffekt@gmail.com>
Date: Sun, 29 Aug 2021 10:36:23 -0700
Minor cleanup
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/uxn.c b/src/uxn.c
@@ -68,7 +68,7 @@ static void op_and(Uxn *u) { Uint8 a = pop8(u->src), b = pop8(u->src); push8(u->
static void op_ora(Uxn *u) { Uint8 a = pop8(u->src), b = pop8(u->src); push8(u->src, b | a); }
static void op_eor(Uxn *u) { Uint8 a = pop8(u->src), b = pop8(u->src); push8(u->src, b ^ a); }
static void op_sft(Uxn *u) { Uint8 a = pop8(u->src), b = pop8(u->src); push8(u->src, b >> (a & 0x07) << ((a & 0x70) >> 4)); }
-/* Stack */
+/* Stack(16-bits) */
static void op_lit16(Uxn *u) { push16(u->src, mempeek16(u->ram.dat, u->ram.ptr++)); u->ram.ptr++; }
static void op_inc16(Uxn *u) { Uint16 a = pop16(u->src); push16(u->src, a + 1); }
static void op_pop16(Uxn *u) { pop16(u->src); }
@@ -160,7 +160,7 @@ uxn_boot(Uxn *u)
unsigned int i;
char *cptr = (char *)u;
for(i = 0; i < sizeof(*u); i++)
- cptr[i] = 0;
+ cptr[i] = 0x00;
return 1;
}
diff --git a/src/uxnemu.c b/src/uxnemu.c
@@ -268,6 +268,7 @@ doctrl(Uxn *u, SDL_Event *event, int z)
} else
devctrl->dat[2] &= ~flag;
}
+
static void
docolors(Device *d)
{
@@ -482,9 +483,8 @@ run(Uxn *u)
if(event.type == stdin_event) {
devconsole->dat[0x2] = event.cbutton.button;
uxn_eval(u, mempeek16(devconsole->dat, 0));
- } else if(event.type >= audio0_event && event.type < audio0_event + POLYPHONY) {
+ } else if(event.type >= audio0_event && event.type < audio0_event + POLYPHONY)
uxn_eval(u, mempeek16((devaudio0 + (event.type - audio0_event))->dat, 0));
- }
}
}
uxn_eval(u, mempeek16(devscreen->dat, 0));