summaryrefslogtreecommitdiff
path: root/ROMs/paint.c
blob: 7e0427b3d6e1d0923da4c66de503e19ba01514a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "lib.c"

int main()
{
	int color = 0;
    while (true)
    {
      	int mouseIndex = getMouseIndex();
		int mouseState = getMouseState();

        if (mouseState & MS_LEFT)
            setPixel(mouseIndex, (color % 3) + 1);

        if (getKeyState(SK_C))
            clear(COLOR_BLACK);

 		if (getKeyState(SK_A))
		{
            color++;
			while (getKeyState(SK_A)) { }
		}
    }
}