Minor cleanup

This commit is contained in:
neauoire 2021-08-29 10:36:23 -07:00
parent c84b5015e4
commit ca5ad113ee
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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));