Magic number changes, get rid of nulplanet structure.
[super-star-trek.git] / sst.c
diff --git a/sst.c b/sst.c
index e4fe2afe0fcf55a0eab1f3f5d3a4001e47c6bd79..f6db8870c9ae1856cf8eb55d345ac0981475a7c6 100644 (file)
--- a/sst.c
+++ b/sst.c
@@ -323,7 +323,7 @@ static void makemoves(void) {
                                events();\r
                                if (alldone) break;             // Events did us in\r
                        }\r
-                       if (d.galaxy[quadx][quady] == 1000) { // Galaxy went Nova!\r
+                       if (game.state.galaxy[quadx][quady] == 1000) { // Galaxy went Nova!\r
                                atover(0);\r
                                continue;\r
                        }\r
@@ -331,7 +331,7 @@ static void makemoves(void) {
                        if (hitme && justin==0) {\r
                                attack(2);\r
                                if (alldone) break;\r
-                               if (d.galaxy[quadx][quady] == 1000) {   // went NOVA! \r
+                               if (game.state.galaxy[quadx][quady] == 1000) {  // went NOVA! \r
                                        atover(0);\r
                                        hitme = TRUE;\r
                                        continue;\r
@@ -637,7 +637,7 @@ void debugme(void) {
        proutn("Reset damage? ");\r
        if (ja() != 0) {\r
                int i;\r
-               for (i=0; i <= ndevice; i++) if (damage[i] > 0.0) damage[i] = 0.0;\r
+               for (i=0; i <= NDEVICES; i++) if (damage[i] > 0.0) damage[i] = 0.0;\r
                stdamtim = 1e30;\r
        }\r
        proutn("Toggle idebug? ");\r
@@ -649,7 +649,7 @@ void debugme(void) {
        proutn("Cause selective damage? ");\r
        if (ja() != 0) {\r
                int i, key;\r
-               for (i=1; i <= ndevice; i++) {\r
+               for (i=1; i <= NDEVICES; i++) {\r
                        proutn("Kill ");\r
                        proutn(device[i]);\r
                        proutn("? ");\r
@@ -657,7 +657,7 @@ void debugme(void) {
                        key = scan();\r
                        if (key == IHALPHA &&  isit("y")) {\r
                                damage[i] = 10.0;\r
-                               if (i == DRADIO) stdamtim = d.date;\r
+                               if (i == DRADIO) stdamtim = game.state.date;\r
                        }\r
                }\r
        }\r
@@ -676,12 +676,12 @@ void debugme(void) {
                                case FSCMOVE: proutn("SC Move         "); break;\r
                                case FSCDBAS: proutn("SC Base Destroy "); break;\r
                        }\r
-                       cramf(future[i]-d.date, 8, 2);\r
+                       cramf(future[i]-game.state.date, 8, 2);\r
                        chew();\r
                        proutn("  ?");\r
                        key = scan();\r
                        if (key == IHREAL) {\r
-                               future[i] = d.date + aaitem;\r
+                               future[i] = game.state.date + aaitem;\r
                        }\r
                }\r
                chew();\r