From 5d012f16b2a0200087afe9dffc906046d258b3b8 Mon Sep 17 00:00:00 2001 From: Melodi <62381002+Melodi17@users.noreply.github.com> Date: Thu, 28 Aug 2025 22:30:02 +1000 Subject: seperated modules out --- ROMs/paint.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'ROMs/paint.c') diff --git a/ROMs/paint.c b/ROMs/paint.c index 7e0427b..71c478e 100644 --- a/ROMs/paint.c +++ b/ROMs/paint.c @@ -1,23 +1,25 @@ -#include "lib.c" +#include "std.c" +#include "hid.c" +#include "screen.c" int main() { int color = 0; while (true) { - int mouseIndex = getMouseIndex(); - int mouseState = getMouseState(); + int mouseIndex = hid_getMouseIndex(); + int mouseState = hid_getMouseState(); if (mouseState & MS_LEFT) - setPixel(mouseIndex, (color % 3) + 1); + screen_setPixel(mouseIndex, (color % 3) + 1); - if (getKeyState(SK_C)) - clear(COLOR_BLACK); + if (hid_getKeyState(SK_C)) + screen_clear(COLOR_BLACK); - if (getKeyState(SK_A)) + if (hid_getKeyState(SK_A)) { color++; - while (getKeyState(SK_A)) { } + while (hid_getKeyState(SK_A)) { } } } } \ No newline at end of file -- cgit v1.3.1