typedef struct {
int snap, // snapshot taken
+ crew, // crew complement
+#define FULLCREW 428 /* BSD Trek was 387, that's wrong */
remkl, // remaining klingons
remcom, // remaining commanders
nscrem, // remaining super commanders
#define DDSP 14 // Added deep space probe
#define NDEVICES (15) // Number of devices
+#define damaged(dev) game.damage[dev] != 0.0
+
#define FOREVER 1e30
/* Define future events */
neutz, // Romulan Neutral Zone
isarmed, // probe is armed
inorbit, // orbiting a planet
+ imine, // mining
thawed; // thawed game
int inkling, // initial number of klingons
inbase, // initial number of bases
condit, // condition (red/yellow/green/docked)
torps, // number of torpedoes
ship, // ship type -- 'E' is Enterprise
+ abandoned, // count of crew abandoned in space
length, // length of game
skill, // skill level
klhere, // klingons here
shldchg, // shield is changing (affects efficiency)
landed, // party on planet (1), on ship (-1)
iplnet, // planet # in quadrant
- imine, // mining
inplan, // initial planets
nenhere, // number of enemies in quadrant
ishere, // super-commander in quandrant
FNEG3, FNOVA, FSNOVAED, FABANDN, FDILITHIUM,
FMATERIALIZE, FPHASER, FLOST, FMINING, FDPLANET,
FPNOVA, FSSC, FSTRACTOR, FDRAY, FTRIBBLE,
- FHOLE} FINTYPE ;
+ FHOLE, FCREW} FINTYPE ;
enum loctype {neither, quadrant, sector};
#define IHR 'R'
/* Function prototypes */
void prelim(void);
-void attack(int);
+void attack(bool);
bool choose(bool);
-void setup(int);
+void setup(bool);
void score(void);
-void atover(int);
+void atover(bool);
int srscan(int);
void lrscan(void);
void phasers(void);
void photon(void);
void warp(bool);
void doshield(int);
-void dock(int);
+void dock(bool);
void dreprt(void);
-void chart(int);
+void chart(bool);
void rechart(void);
void impuls(void);
void wait(void);
void mayday(void);
void abandn(void);
void finish(FINTYPE);
-void dstrct(void);
+void selfdestruct(void);
void kaboom(void);
void freeze(bool);
int thaw(void);
void prout(char *, ...);
void proutn(char *, ...);
void stars(void);
-void newqad(int);
+void newqad(bool);
bool ja(void);
void cramen(int);
void crmshp(void);
void newcnd(void);
void sortkl(void);
void imove(void);
-void ram(int, int, coord);
-void crmena(int, int, int, coord w);
+void ram(bool, int, coord);
+void crmena(bool, int, enum loctype, coord w);
void deadkl(coord, int, int, int);
void timwrp(void);
void movcom(void);
void preport(void);
void orbit(void);
void sensor(void);
-void drawmaps(short);
+void drawmaps(int);
void beam(void);
void mine(void);
void usecrystals(void);
void shuttle(void);
void deathray(void);
void debugme(void);
-void attakreport(int);
+void attakreport(bool);
void movetho(void);
void probe(void);
void iostart(void);
void setwnd(WINDOW *);
void warble(void);
-void boom(int ii, int jj);
-void tracktorpedo(int ix, int iy, int l, int i, int n, int iquad);
+void boom(int, int);
+void tracktorpedo(int, int, int, int, int, int);
void cgetline(char *, int);
void waitfor(void);
void setpassword(void);