6 mouse
*getMouseState(void)
8 mouse
*m
=kalloc(sizeof(mouse
));
10 Uint8 buttons
=SDL_GetMouseState(&m
-> x
, &m
->y
);
12 *(&mouse
+(sizeof(int)*k
)) =SDL_BUTTON (k
);
17 void setMousePosition(int x
, int y
)
20 //todo check if propper cast to Uint16 is required
23 int isMouseButtonDown(int b
)
25 if (b
<1 ||b
>5) return 0;
26 return *(&mouse
+(sizeof(int)*b
)) ==1;