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