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
/
setup.c
diff --git
a/src/setup.c
b/src/setup.c
index aa55bbeac6af18b4ba3fc69497948187602ee18b..5912f1d30fd809b38cf5d826ba6b148815927956 100644
(file)
--- a/
src/setup.c
+++ b/
src/setup.c
@@
-121,7
+121,7
@@
void abandn(void)
struct quadrant *q;
chew();
struct quadrant *q;
chew();
- if (game.condit
==IHDOCKED
) {
+ if (game.condit
ion==docked
) {
if (game.ship!=IHE) {
prout("You cannot abandon Ye Faerie Queene.");
return;
if (game.ship!=IHE) {
prout("You cannot abandon Ye Faerie Queene.");
return;
@@
-213,7
+213,7
@@
void abandn(void)
game.imine = false;
game.iscraft=0; /* Galileo disappears */
/* Resupply ship */
game.imine = false;
game.iscraft=0; /* Galileo disappears */
/* Resupply ship */
- game.condit
=IHDOCKED
;
+ game.condit
ion=docked
;
for (l = 0; l < NDEVICES; l++)
game.damage[l] = 0.0;
game.damage[DSHUTTL] = -1;
for (l = 0; l < NDEVICES; l++)
game.damage[l] = 0.0;
game.damage[DSHUTTL] = -1;
@@
-579,11
+579,11
@@
coord dropin(int iquad)
void newcnd(void)
/* update our alert status */
{
void newcnd(void)
/* update our alert status */
{
- game.condit
= IHGREEN
;
- if (game.energy < 1000.0) game.condit
= IHYELLOW
;
+ game.condit
ion = green
;
+ if (game.energy < 1000.0) game.condit
ion = yellow
;
if (game.state.galaxy[game.quadrant.x][game.quadrant.y].klingons || game.state.galaxy[game.quadrant.x][game.quadrant.y].romulans)
if (game.state.galaxy[game.quadrant.x][game.quadrant.y].klingons || game.state.galaxy[game.quadrant.x][game.quadrant.y].romulans)
- game.condit
= IHRED
;
- if (!game.alive) game.condit
=IHDEAD
;
+ game.condit
ion = red
;
+ if (!game.alive) game.condit
ion=dead
;
}
coord newkling(int i)
}
coord newkling(int i)
@@
-684,7
+684,7
@@
void newqad(bool shutup)
else
game.plnet = dropin(IHW);
}
else
game.plnet = dropin(IHW);
}
- // Check for
game.
condition
+ // Check for condition
newcnd();
// And finally the stars
for (i = 1; i <= q->stars; i++)
newcnd();
// And finally the stars
for (i = 1; i <= q->stars; i++)