From: cuz Date: Sat, 8 Sep 2001 22:57:58 +0000 (+0000) Subject: Added mousetest.c X-Git-Tag: V2.12.0~2701 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d6b16ff116b5441ad9e920d8136a78e027d8717f;p=cc65 Added mousetest.c git-svn-id: svn://svn.cc65.org/cc65/trunk@878 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/testcode/lib/mousetest.c b/testcode/lib/mousetest.c new file mode 100644 index 000000000..d230b51c7 --- /dev/null +++ b/testcode/lib/mousetest.c @@ -0,0 +1,32 @@ +#include +#include +#include + + + +int main (void) +{ + struct mouse_pos pos; + + clrscr (); + mouse_init (1, 1, MOUSE_C64); +/* mouse_box (0, 29, 344, 250); */ + while (1) { + if (kbhit()) { + switch (cgetc()) { + case 's': mouse_show (); break; + case 'h': mouse_hide (); break; + case 'q': mouse_done (); exit (0); + } + } + mouse_pos (&pos); + gotoxy (0, 0); + cprintf ("%04X", pos.x); + gotoxy (0, 1); + cprintf ("%04X", pos.y); + } + return 0; +} + + +