From 5f7ca4b2f45a6c0dbbd167cd3977d5401cc74817 Mon Sep 17 00:00:00 2001 From: cpg Date: Mon, 10 Dec 2001 23:49:42 +0000 Subject: [PATCH] Atari updates git-svn-id: svn://svn.cc65.org/cc65/trunk@1140 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- samples/mousedemo.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/samples/mousedemo.c b/samples/mousedemo.c index cea23c24e..2ac1dc38d 100644 --- a/samples/mousedemo.c +++ b/samples/mousedemo.c @@ -75,6 +75,9 @@ int main (void) struct mouse_info info; unsigned char Invisible; unsigned char Done; +#if defined(__ATARI__) + unsigned char type; +#endif /* Initialize the debugger */ DbgInit (0); @@ -86,11 +89,6 @@ int main (void) cursor (0); clrscr (); - /* Print a help line */ - revers (1); - cputsxy (0, 0, "d: debug h: hide q: quit s: show "); - revers (0); - #if defined(__C64__) || defined(__C128__) || defined(__CBM510__) /* Copy the sprite data */ memcpy ((void*) SPRITE0_DATA, MouseSprite, sizeof (MouseSprite)); @@ -110,11 +108,29 @@ int main (void) #elif defined(__ATARI__) + do { + cputs("\r\n"); + cputs("0 = trak-ball\r\n"); + cputs("1 = ST mouse\r\n"); + cputs("2 = Amiga mouse\r\n"); + cputs("Enter type (0-2): "); + type = cgetc(); + cputc(type); + } while (type < '0' || type > '2'); + type -= '0'; + /* Initialize the mouse */ - mouse_init (MOUSE_TRAKBALL); + mouse_init (type); + *(unsigned char *)0x2c0 = 15; /* set mouse cursor color (PM0) */ + clrscr (); #endif + /* Print a help line */ + revers (1); + cputsxy (0, 0, "d: debug h: hide q: quit s: show "); + revers (0); + /* Test loop */ Done = 0; ShowState (Invisible = 1); -- 2.39.5