(mouse.c) Do not use POKE2 macro
This commit is contained in:
parent
1adb6a8cf0
commit
107a25295b
|
@ -29,17 +29,23 @@ mouse_up(Uxn *u, Uint8 *d, Uint8 mask)
|
||||||
void
|
void
|
||||||
mouse_pos(Uxn *u, Uint8 *d, Uint16 x, Uint16 y)
|
mouse_pos(Uxn *u, Uint8 *d, Uint16 x, Uint16 y)
|
||||||
{
|
{
|
||||||
POKE2(d + 0x2, x);
|
*(d + 2) = x >> 8;
|
||||||
POKE2(d + 0x4, y);
|
*(d + 3) = x;
|
||||||
|
*(d + 4) = y >> 8;
|
||||||
|
*(d + 5) = y;
|
||||||
uxn_eval(u, PEEK2(d));
|
uxn_eval(u, PEEK2(d));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
mouse_scroll(Uxn *u, Uint8 *d, Uint16 x, Uint16 y)
|
mouse_scroll(Uxn *u, Uint8 *d, Uint16 x, Uint16 y)
|
||||||
{
|
{
|
||||||
POKE2(d + 0xa, x);
|
*(d + 0xa) = x >> 8;
|
||||||
POKE2(d + 0xc, -y);
|
*(d + 0xb) = x;
|
||||||
|
*(d + 0xc) = -y >> 8;
|
||||||
|
*(d + 0xd) = -y;
|
||||||
uxn_eval(u, PEEK2(d));
|
uxn_eval(u, PEEK2(d));
|
||||||
POKE2(d + 0xa, 0);
|
*(d + 0xa) = 0;
|
||||||
POKE2(d + 0xc, 0);
|
*(d + 0xb) = 0;
|
||||||
|
*(d + 0xc) = 0;
|
||||||
|
*(d + 0xd) = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue