More magic-number chasing, and the "Bases left" report.
[super-star-trek.git] / sst.h
diff --git a/sst.h b/sst.h
index beeee5c6dfc1d1291b68f773c686c3c523e8baa6..e67073b46fe0565764cdcfadd8c6ef3e5a3f2dea 100644 (file)
--- a/sst.h
+++ b/sst.h
@@ -20,6 +20,7 @@
 #define NEVENTS (8)
 #define GALSIZE        (8)
 #define QUADSIZE (10)
+#define BASEMAX        (6)
 
 typedef struct {
     int x;     /* Quadrant location of planet */
@@ -42,8 +43,8 @@ typedef struct {
        killc,                  // commanders killed
        galaxy[GALSIZE+1][GALSIZE+1],   // The Galaxy (subscript 0 not used)
        cx[QUADSIZE+1],cy[QUADSIZE+1],  // Commander quadrant coordinates
-       baseqx[6],              // Base quadrant X
-       baseqy[6],              // Base quadrant Y
+       baseqx[BASEMAX],                // Base quadrant X
+       baseqy[BASEMAX],                // Base quadrant Y
        newstuf[GALSIZE+1][GALSIZE+1],  // Extended galaxy goodies
        isx, isy,               // Coordinate of Super Commander
        nscrem,                 // remaining super commanders
@@ -57,6 +58,21 @@ typedef struct {
            remtime;            // remaining time
 } snapshot;                            // Data that is snapshot
 
+/*
+ * This is how the integers in galaxy are encoded.
+ * Someday these should turn into structure fields.
+ */
+#define SUPERNOVA_PLACE        1000
+#define ENEMY_PLACE    100
+#define BASE_PLACE     10
+#define STAR_PLACE     1
+
+/* for newstuff */
+#define ROMULAN_PLACE  10
+
+/* for starch */
+#define CHART_UNKNOWN  -1
+
 // Scalar variables that are needed for freezing the game
 // are placed in a structure. #defines are used to access by their
 // original names. Gee, I could have done this with the d structure,