Typo fix.
[super-star-trek.git] / src / sst.h
index e4eb9d3fa97274efa0111059e7ded26b90f5d497..dce01e0ee02064ae4556e23d7ca6c2551e3c32bd 100644 (file)
--- a/src/sst.h
+++ b/src/sst.h
 #define min(x, y)      ((x)<(y)?(x):(y))
 #define max(x, y)      ((x)>(y)?(x):(y))
 
-#define PHASEFAC (2.0)
-#define GALSIZE        (8)
-#define NINHAB (GALSIZE * GALSIZE / 2)
-#define MAXUNINHAB (10)
-#define PLNETMAX (NINHAB + MAXUNINHAB)
-#define QUADSIZE (10)
-#define BASEMAX        (5)
+#define PHASEFAC       2.0
+#define GALSIZE                8
+#define NINHAB         (GALSIZE * GALSIZE / 2)
+#define MAXUNINHAB     10
+#define PLNETMAX       (NINHAB + MAXUNINHAB)
+#define QUADSIZE       10
+#define BASEMAX                (GALSIZE * GALSIZE / 12)
+#define MAXKLGAME      127
+#define MAXKLQUAD      9
 
 /*
  * These macros hide the difference between 0-origin and 1-origin addressing.
  */
 #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;
 
@@ -50,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',
@@ -118,17 +113,6 @@ typedef struct {
     } chart[GALSIZE+1][GALSIZE+1];     // the starchart (subscript 0 not used)
 } snapshot;                            // Data that is snapshot
 
-#define MAXKLGAME      127
-#define MAXKLQUAD      9
-
-#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 */
@@ -171,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
@@ -286,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
@@ -318,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;
@@ -351,21 +335,21 @@ 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);
-extern void dreprt(void);
+extern void damagereport(void);
 extern void chart(void);
 extern void rechart(void);
-extern void impuls(void);
+extern void impulse(void);
 extern void wait(void);
-extern void setwrp(void);
+extern void setwarp(void);
 extern void events(void);
 extern void report(void);
 extern void eta(void);
 extern void mayday(void);
-extern void abandn(void);
+extern void abandon(void);
 extern void finish(FINTYPE);
 extern void selfdestruct(void);
 extern void kaboom(void);
@@ -397,7 +381,7 @@ extern double Rand(void);
 extern coord randplace(int);
 extern coord dropin(feature);
 extern void newcnd(void);
-extern void sortkl(void);
+extern void sortklings(void);
 extern void imove(bool);
 extern void ram(bool, feature, coord);
 extern void crmena(bool, feature, enum loctype, coord w);
@@ -406,14 +390,13 @@ 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 snova(bool, coord *);
-extern void scom(void);
+extern void supernova(bool, coord *);
+extern void supercommander(void);
 extern void hittem(double *);
 extern bool isit(char *);
-extern void preport(void);
+extern void survey(void);
 extern void orbit(void);
 extern void sensor(void);
 extern void drawmaps(int);
@@ -423,8 +406,8 @@ extern void usecrystals(void);
 extern void shuttle(void);
 extern void deathray(void);
 extern void debugme(void);
-extern void attakreport(bool);
-extern void movetho(void);
+extern void attackreport(bool);
+extern void movetholian(void);
 extern void probe(void);
 extern void iostart(void);
 extern void setwnd(WINDOW *);
@@ -437,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