projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change the condition field from an uint with #defines to an enum.
[super-star-trek.git]
/
src
/
sst.h
diff --git
a/src/sst.h
b/src/sst.h
index 211f63c2b1a8740600f69643fc0e18e5a54b6766..18baff686650abd39c386e7d3627084be2c940ff 100644
(file)
--- a/
src/sst.h
+++ b/
src/sst.h
@@
-226,6
+226,13
@@
struct game {
icrystl, // dilithium crystals aboard
iseenit, // seen base attack report
thawed; // thawed game
icrystl, // dilithium crystals aboard
iseenit, // seen base attack report
thawed; // thawed game
+ enum {
+ green = 'G',
+ yellow = 'Y',
+ red = 'R',
+ docked = 'D',
+ dead = 'Z',
+ } condition; // condition (red/yellow/green/docked)
int inkling, // initial number of klingons
inbase, // initial number of bases
incom, // initial number of commanders
int inkling, // initial number of klingons
inbase, // initial number of bases
incom, // initial number of commanders
@@
-233,7
+240,6
@@
struct game {
inrom, // initial number of commanders
instar, // initial stars
intorps, // initial/Max torpedoes
inrom, // initial number of commanders
instar, // initial stars
intorps, // initial/Max torpedoes
- condit, // condition (red/yellow/green/docked)
torps, // number of torpedoes
ship, // ship type -- 'E' is Enterprise
abandoned, // count of crew abandoned in space
torps, // number of torpedoes
ship, // ship type -- 'E' is Enterprise
abandoned, // count of crew abandoned in space
@@
-318,16
+324,10
@@
enum loctype {neither, quadrant, sector};
#define IHF 'F'
#define IHT 'T'
#define IHWEB '#'
#define IHF 'F'
#define IHT 'T'
#define IHWEB '#'
-#define IHGREEN 'G'
-#define IHYELLOW 'Y'
-#define IHRED 'R'
-#define IHDOCKED 'D'
-#define IHDEAD 'Z'
#define IHMATER0 '-'
#define IHMATER1 'o'
#define IHMATER2 '0'
#define IHMATER0 '-'
#define IHMATER1 'o'
#define IHMATER2 '0'
-
/* Function prototypes */
void prelim(void);
void attack(bool);
/* Function prototypes */
void prelim(void);
void attack(bool);