]> git.sur5r.net Git - cc65/blobdiff - samples/fire.c
Renamed a C header.
[cc65] / samples / fire.c
index cae9225097cf047da79de3dbc8470cb6966deada..40eff0707814acc745cebd1ea0235688163487ee 100644 (file)
@@ -1,12 +1,12 @@
-/*****************************************************************************
- * fire test program for cc65.                                               *
- *                                                                           *
- * (w)2002 by groepaz/hitmen                                                 *
- *                                                                           *
- * Cleanup and porting by Ullrich von Bassewitz.                             *
- * 2004-06-08, Greg King                                                     *
- *                                                                           *
- *****************************************************************************/
+/*****************************************************************************\
+** fire test program for cc65.                                               **
+**                                                                           **
+** (w)2002 by groepaz/hitmen                                                 **
+**                                                                           **
+** Cleanup and porting by Ullrich von Bassewitz.                             **
+** 2004-06-08, Greg King                                                     **
+**                                                                           **
+\*****************************************************************************/
 
 
 
@@ -17,6 +17,7 @@
 #include <string.h> /* for memset */
 #include <time.h>
 #include <conio.h>
+#include <cbm.h>
 
 
 
@@ -60,9 +61,9 @@
 
 
 #ifdef DOVSYNC
-#  define waitvsync() while ((signed char)VIC.ctrl1 >= 0)
+#  define WAITVSYNC() waitvsync()
 #else
-#  define waitvsync()
+#  define WAITVSYNC()
 #endif
 
 
@@ -187,8 +188,8 @@ int main (void)
 #endif
 #if defined(__C128__)
     /* Save and change some flags, so that kernal/basic interrupt handler will
-     * not interfere with our routine.
-     */
+    ** not interfere with our routine.
+    */
     initflag = *(unsigned char*) 0xA04;
     *(unsigned char*) 0xA04 &= 0xFE;
     graphflag = *(unsigned char*) 0xD8;
@@ -203,12 +204,12 @@ int main (void)
     while (!kbhit()) {
         /* Build page 1, then make it visible */
         fire (SCREEN1);
-        waitvsync ();
+        WAITVSYNC ();
         outb (&VIC.addr, PAGE1);
 
         /* Build page 2, then make it visible */
         fire (SCREEN2);
-        waitvsync ();
+        WAITVSYNC ();
         outb (&VIC.addr, PAGE2);
 
         /* Count frames */