From d6b16ff116b5441ad9e920d8136a78e027d8717f Mon Sep 17 00:00:00 2001 From: cuz Date: Sat, 8 Sep 2001 22:57:58 +0000 Subject: [PATCH] Added mousetest.c git-svn-id: svn://svn.cc65.org/cc65/trunk@878 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- testcode/lib/mousetest.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 testcode/lib/mousetest.c 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; +} + + + -- 2.39.5