]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - warp/play.c
Time warp forward 34 years so that it compiles (but not work)
[bsdgames-darwin.git] / warp / play.c
index 7c04049792534040e4f673c9b3fd738e111ef7b3..a26f76c7a47628c259f7156f8294e48aa48a6e53 100644 (file)
 #include "play.h"
 
 void
-play_init()
+play_init(void)
 {
     ;
 }
 
 void
-play()
+play(void)
 {
-    bool done = FALSE;
-    Reg1 OBJECT *curobj;
-    Reg2 OBJECT *to;
-    Reg3 int i;
-    Reg4 int x;
-    Reg5 int y;
+    bool done = false;
+    OBJECT *curobj;
+    OBJECT *to;
+    int i;
+    int x;
+    int y;
 
     display_status();
 #ifdef TIOCOUTQ
@@ -48,7 +48,7 @@ play()
     do {
        timer++;
        nxtbang = 0;
-       banging = FALSE;
+       banging = false;
        display_status();
 #ifdef TIOCOUTQ
        while (output_pending() > charsperhalfsec)
@@ -69,7 +69,7 @@ play()
                ent->energy -= ent->energy/40;
            }
            else
-               cloaking = FALSE;
+               cloaking = false;
            cloaked = cloaking;
        }
        if (base) {
@@ -138,6 +138,8 @@ play()
                        possiblescore += 5000;
                    }
                    if (apolloflag & 2) {
+/*###141 [cc] warning: array subscript has type 'char' [-Wchar-subscripts]%%%*/
+/*###141 [cc] warning: array subscript has type 'char' [-Wchar-subscripts]%%%*/
                        if (blast[realapollo->posy][realapollo->posx] <= 32000)
                            bvely = bvelx = 0;
                        realapollo->energy = 32000;
@@ -152,7 +154,7 @@ play()
        if (aretorps) {
            aretorps = 0;
            for (i=0;i<2;i++) for (y=0;y<3;y++) for (x=0;x<3;x++) {
-               if (curobj = isatorp[i][y][x]) {
+               if ((curobj = isatorp[i][y][x]) != NULL) {
                    to = occupant[(curobj->posy+curobj->vely+YSIZE00)%YSIZE]
                                 [(curobj->posx+curobj->velx+XSIZE00)%XSIZE];
                    if (to && !to->vely && !to->velx) {
@@ -170,7 +172,7 @@ play()
        if (finish) {
            finish--;
            if (!finish && (!(numenemies || numos) || (!ent && !base))) {
-               done = TRUE;
+               done = true;
                timer -= 5;
            }
        }