From a60a2a05d9275e02470711675c3d85705d6c5e9e Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 10 Apr 2023 10:41:04 -0700 Subject: [PATCH] (mouse) Ported to POKE2 macro --- src/devices/mouse.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/devices/mouse.c b/src/devices/mouse.c index 63689e2..bf94d72 100644 --- a/src/devices/mouse.c +++ b/src/devices/mouse.c @@ -2,7 +2,7 @@ #include "mouse.h" /* -Copyright (c) 2021 Devine Lu Linvega, Andrew Alderwick +Copyright (c) 2021-2023 Devine Lu Linvega, Andrew Alderwick Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -29,17 +29,17 @@ mouse_up(Uxn *u, Uint8 *d, Uint8 mask) void mouse_pos(Uxn *u, Uint8 *d, Uint16 x, Uint16 y) { - POKDEV(0x2, x); - POKDEV(0x4, y); + POKE2(d + 0x2, x); + POKE2(d + 0x4, y); uxn_eval(u, PEEK2(d)); } void mouse_scroll(Uxn *u, Uint8 *d, Uint16 x, Uint16 y) { - POKDEV(0xa, x); - POKDEV(0xc, -y); + POKE2(d + 0xa, x); + POKE2(d + 0xc, -y); uxn_eval(u, PEEK2(d)); - POKDEV(0xa, 0); - POKDEV(0xc, 0); + POKE2(d + 0xa, 0); + POKE2(d + 0xc, 0); }