blob: 71c478ea39745e11a1c0047ee17e6c46e355d36a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "std.c"
#include "hid.c"
#include "screen.c"
int main()
{
int color = 0;
while (true)
{
int mouseIndex = hid_getMouseIndex();
int mouseState = hid_getMouseState();
if (mouseState & MS_LEFT)
screen_setPixel(mouseIndex, (color % 3) + 1);
if (hid_getKeyState(SK_C))
screen_clear(COLOR_BLACK);
if (hid_getKeyState(SK_A))
{
color++;
while (hid_getKeyState(SK_A)) { }
}
}
}
|