Use mouse_stddrv instead of a platform dependent #define.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4150 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -17,21 +17,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(__C64__) || defined(__C128__) || defined(__CBM510__)
|
#if defined(__C64__) || defined(__C128__)
|
||||||
|
|
||||||
/* Address of data for sprite 0 */
|
/* Address of data for sprite 0 */
|
||||||
#if defined(__C64__)
|
#if defined(__C64__)
|
||||||
# define SPRITE0_DATA 0x0340
|
# define SPRITE0_DATA 0x0340
|
||||||
# define SPRITE0_PTR 0x07F8
|
# define SPRITE0_PTR 0x07F8
|
||||||
# define DRIVER "c64-1351.mou"
|
|
||||||
#elif defined(__C128__)
|
#elif defined(__C128__)
|
||||||
# define SPRITE0_DATA 0x0E00
|
# define SPRITE0_DATA 0x0E00
|
||||||
# define SPRITE0_PTR 0x07F8
|
# define SPRITE0_PTR 0x07F8
|
||||||
# define DRIVER "c128-1351.mou"
|
|
||||||
#elif defined(__CBM510__)
|
|
||||||
# define SPRITE0_DATA 0xF400
|
|
||||||
# define SPRITE0_PTR 0xF3F8
|
|
||||||
# define DRIVER "" /* Currently unavailable */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The mouse sprite (an arrow) */
|
/* The mouse sprite (an arrow) */
|
||||||
@@ -62,14 +56,6 @@ static const unsigned char MouseSprite[64] = {
|
|||||||
|
|
||||||
#endif /* __C64__ or __C128__ */
|
#endif /* __C64__ or __C128__ */
|
||||||
|
|
||||||
#ifdef __APPLE2__
|
|
||||||
# define DRIVER "a2.stdmou.mou"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __APPLE2ENH__
|
|
||||||
# define DRIVER "a2e.stdmou.mou"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void CheckError (const char* S, unsigned char Error)
|
static void CheckError (const char* S, unsigned char Error)
|
||||||
@@ -89,7 +75,7 @@ static void DoWarning (void)
|
|||||||
"driver with the name\n"
|
"driver with the name\n"
|
||||||
" %s\n"
|
" %s\n"
|
||||||
"on disk! Press 'y' if you have it or\n"
|
"on disk! Press 'y' if you have it or\n"
|
||||||
"any other key to exit.\n", DRIVER);
|
"any other key to exit.\n", mouse_stddrv);
|
||||||
if (tolower (cgetc ()) != 'y') {
|
if (tolower (cgetc ()) != 'y') {
|
||||||
exit (EXIT_SUCCESS);
|
exit (EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
@@ -145,7 +131,8 @@ int main (void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Load and install the mouse driver */
|
/* Load and install the mouse driver */
|
||||||
CheckError ("mouse_load_driver", mouse_load_driver (&mouse_def_callbacks, DRIVER));
|
CheckError ("mouse_load_driver",
|
||||||
|
mouse_load_driver (&mouse_def_callbacks, mouse_stddrv));
|
||||||
|
|
||||||
/* Print a help line */
|
/* Print a help line */
|
||||||
revers (1);
|
revers (1);
|
||||||
@@ -156,7 +143,7 @@ int main (void)
|
|||||||
Done = 0;
|
Done = 0;
|
||||||
ShowState (Invisible = 1);
|
ShowState (Invisible = 1);
|
||||||
while (!Done) {
|
while (!Done) {
|
||||||
if (kbhit ()) {
|
if (kbhit ()) {
|
||||||
switch (tolower (cgetc ())) {
|
switch (tolower (cgetc ())) {
|
||||||
case 'd':
|
case 'd':
|
||||||
BREAK();
|
BREAK();
|
||||||
|
|||||||
Reference in New Issue
Block a user