*/
#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;
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',
} 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 */
#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
/* 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 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);
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