Typo fix.
[super-star-trek.git] / src / sst.h
index 5ea29e9a07f96f96062326f7f3ed0b69370b0631..dce01e0ee02064ae4556e23d7ca6c2551e3c32bd 100644 (file)
--- a/src/sst.h
+++ b/src/sst.h
  */
 #define VALID_QUADRANT(x, y)   ((x)>=1 && (x)<=GALSIZE && (y)>=1 && (y)<=GALSIZE)
 #define VALID_SECTOR(x, y)     ((x)>=1 && (x)<=QUADSIZE && (y)>=1 && (y)<=QUADSIZE)
-#define for_quadrants(i)       for (i = 1; i <= GALSIZE; i++)
-#define for_sectors(i)         for (i = 1; i <= QUADSIZE; i++)
-#define for_commanders(i)      for (i = 1; i <= game.state.remcom; i++)
-#define for_local_enemies(i)   for (i = 1; i <= game.nenhere; i++)
-#define for_starbases(i)       for (i = 1; i <= game.state.rembase; i++)
 
 typedef struct {int x; int y;} coord;
 
@@ -52,15 +47,13 @@ typedef struct {int x; int y;} coord;
 
 typedef struct {
     coord w;
-    enum {M=0, N=1, O=2} pclass;
+    enum {destroyed= -1, M=0, N=1, O=2} pclass;
     int inhabited;     /* if NZ, an index into a name array */
 #define UNINHABITED    -1
     enum {mined=-1, present=0, absent=1} crystals; /* has crystals */
     enum {unknown, known, shuttle_down} known;
 } planet;
 
-#define DESTROY(pl)    memset(pl, '\0', sizeof(planet))
-
 typedef enum {
     IHR = 'R',
     IHK = 'K',
@@ -120,14 +113,6 @@ typedef struct {
     } chart[GALSIZE+1][GALSIZE+1];     // the starchart (subscript 0 not used)
 } snapshot;                            // Data that is snapshot
 
-#define NKILLK (game.inkling - game.state.remkl)
-#define NKILLC (game.incom - game.state.remcom)
-#define NKILLSC (game.inscom - game.state.nscrem)
-#define NKILLROM (game.inrom - game.state.nromrem)
-#define KLINGREM (game.state.remkl + game.state.remcom + game.state.nscrem)
-#define INKLINGTOT (game.inkling + game.incom + game.inscom)
-#define KLINGKILLED (INKLINGTOT - KLINGREM)
-
 /* game options */
 #define OPTION_ALL     0xffffffff
 #define OPTION_TTY     0x00000001      /* old interface */
@@ -170,8 +155,8 @@ typedef struct {
 #define FOREVER        1e30
 
 /* Define future events */
-#define FSPY   0       // Spy event happens always (no future[] entry)
-                                       // can cause SC to tractor beam Enterprise
+#define FSPY   0   // Spy event happens always (no future[] entry)
+                   // can cause SC to tractor beam Enterprise
 #define FSNOVA  1   // Supernova
 #define FTBEAM  2   // Commander tractor beams Enterprise
 #define FSNAP   3   // Snapshot for time warp
@@ -285,7 +270,7 @@ struct game {
        inplan,         // initial planets
        nenhere,        // number of enemies in quadrant
        irhere,         // Romulans in quadrant
-       isatb,          // =1 if super commander is attacking base
+       isatb,          // =2 if super commander is attacking base
        tourn,          // tournament number
        proben,         // number of moves for probe
        nprobes;        // number of probes available
@@ -317,11 +302,11 @@ extern struct game game;
 
 /* the following global state doesn't need to be saved */
 extern char *device[NDEVICES];
-extern char *systnames[NINHAB + 1];
+extern char *systnames[NINHAB];
 extern int iscore, iskill; // Common PLAQ
 extern double perdate;
 extern double aaitem;
-extern char citem[10];
+extern char citem[12];
 extern int seed;
 extern bool idebug;
 extern FILE *logfp, *replayfp;
@@ -350,7 +335,7 @@ extern void atover(bool);
 extern void srscan(void);
 extern void lrscan(void);
 extern void phasers(void);
-extern void photon(void);
+extern void torps(void);
 extern void warp(bool);
 extern void doshield(bool);
 extern void dock(bool);
@@ -405,8 +390,7 @@ extern void timwrp(void);
 extern void moveklings(void);
 extern void torpedo(double, double, coord, double *, int, int);
 extern void huh(void);
-extern void pause_reset(void);
-extern void pause_game(bool);
+extern void announce(void);
 extern void nova(coord);
 extern void supernova(bool, coord *);
 extern void supercommander(void);
@@ -436,7 +420,7 @@ extern void setpassword(void);
 extern void commandhook(char *, bool);
 extern void makechart(void);
 extern coord newkling(int);
-#if BSD_BUG_FOR_BUG
+#ifdef BSD_BUG_FOR_BUG
 extern void visual(void);
 #endif