printfs have been banished. All outputnow goes through prout/proutn/prouts.
[super-star-trek.git] / ai.c
diff --git a/ai.c b/ai.c
index 9dcb1a01261941591e7a99c64721a2b7d7314e7a..37f266c8150d360012fb2232297c0d0f90b29b96 100644 (file)
--- a/ai.c
+++ b/ai.c
@@ -173,9 +173,7 @@ static void movebaddy(int comx, int comy, int loccom, int ienm) {
        if (nsteps < 1) nsteps = 1; /* This shouldn't be necessary */\r
 #ifdef DEBUG\r
        if (idebug) {\r
-               proutn("NSTEPS = ");\r
-               crami(nsteps, 1);\r
-               skip(1);\r
+               prout("NSTEPS = %d", nsteps);\r
        }\r
 #endif\r
        /* Compute preferred values of delta X and Y */\r
@@ -192,8 +190,7 @@ static void movebaddy(int comx, int comy, int loccom, int ienm) {
        for (ll = 1; ll <= nsteps; ll++) {\r
 #ifdef DEBUG\r
                if (idebug) {\r
-                       crami(ll,2);\r
-                       skip(1);\r
+                       prout("%d", ll);\r
                }\r
 #endif\r
                /* Check if preferred position available */\r
@@ -344,11 +341,11 @@ static int checkdest(int iqx, int iqy, int flag, int *ipage) {
                sortkl();\r
        }\r
        /* check for a helpful planet */\r
-       for (i = 1; i <= inplan; i++) {\r
+       for (i = 0; i < inplan; i++) {\r
                if (game.state.plnets[i].x==game.state.isx && game.state.plnets[i].y==game.state.isy &&\r
                        game.state.plnets[i].crystals == 1) {\r
                        /* destroy the planet */\r
-                       game.state.plnets[i] = nulplanet;\r
+                       DESTROY(&game.state.plnets[i]);\r
                        game.state.newstuf[game.state.isx][game.state.isy] -= 1;\r
                        if (game.damage[DRADIO] == 0.0 || condit == IHDOCKED) {\r
                                if (*ipage==0) pause(1);\r