uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 107a25295bf9bdd05a7856fe978cb5667ac6793d
parent 1adb6a8cf0e4b29ae2ac1eb32d211368661ee004
Author: neauoire <aliceffekt@gmail.com>
Date:   Wed, 30 Aug 2023 11:25:15 -0700

(mouse.c) Do not use POKE2 macro

Diffstat:
Msrc/devices/mouse.c | 18++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/devices/mouse.c b/src/devices/mouse.c @@ -29,17 +29,23 @@ mouse_up(Uxn *u, Uint8 *d, Uint8 mask) void mouse_pos(Uxn *u, Uint8 *d, Uint16 x, Uint16 y) { - POKE2(d + 0x2, x); - POKE2(d + 0x4, y); + *(d + 2) = x >> 8; + *(d + 3) = x; + *(d + 4) = y >> 8; + *(d + 5) = y; uxn_eval(u, PEEK2(d)); } void mouse_scroll(Uxn *u, Uint8 *d, Uint16 x, Uint16 y) { - POKE2(d + 0xa, x); - POKE2(d + 0xc, -y); + *(d + 0xa) = x >> 8; + *(d + 0xb) = x; + *(d + 0xc) = -y >> 8; + *(d + 0xd) = -y; uxn_eval(u, PEEK2(d)); - POKE2(d + 0xa, 0); - POKE2(d + 0xc, 0); + *(d + 0xa) = 0; + *(d + 0xb) = 0; + *(d + 0xc) = 0; + *(d + 0xd) = 0; }