Boolify some logical variables.

This commit is contained in:
Eric S. Raymond 2017-06-19 12:49:07 -04:00
parent e9aff2568f
commit 0eb85f233a
2 changed files with 7 additions and 17 deletions

View file

@ -32,9 +32,9 @@ struct game_t {
long chloc2; long chloc2;
long clock1; long clock1;
long clock2; long clock2;
long clshnt; bool clshnt; /* has player read the clue in the endgame? */
long closed; bool closed; /* whether we're all the way closed */
long closng; bool closng; /* whether it's closing time yet */
long conds; long conds;
long detail; long detail;
long dflag; long dflag;
@ -45,22 +45,22 @@ struct game_t {
long iwest; long iwest;
long knfloc; long knfloc;
long limit; long limit;
long lmwarn; bool lmwarn; /* has player been warned about lamp going dim? */
long loc; long loc;
long newloc; long newloc;
long novice; bool novice; /* asked for instructions at start-up? */
long numdie; long numdie;
long oldloc; long oldloc;
long oldlc2; long oldlc2;
long oldobj; long oldobj;
long panic; bool panic; /* has player found out he's trapped in the cave? */
long saved; long saved;
long tally; long tally;
long thresh; long thresh;
long trndex; long trndex;
long trnluz; long trnluz;
long turns; long turns;
long wzdark; bool wzdark; /* whether the loc he's leaving was dark */
long zzword; long zzword;
long abbrev[LOCSIZ + 1]; long abbrev[LOCSIZ + 1];
long atloc[LOCSIZ + 1]; long atloc[LOCSIZ + 1];

10
main.c
View file

@ -131,16 +131,6 @@ int main(int argc, char *argv[])
linenoiseHistorySetMaxLen(350); linenoiseHistorySetMaxLen(350);
/* Logical variables:
*
* game.closed says whether we're all the way closed
* game.closng says whether it's closing time yet
* game.clshnt says whether he's read the clue in the endgame
* game.lmwarn says whether he's been warned about lamp going dim
* game.novice says whether he asked for instructions at start-up
* game.panic says whether he's found out he's trapped in the cave
* game.wzdark says whether the loc he's leaving was dark */
/* Initialize our LCG PRNG with parameters tested against /* Initialize our LCG PRNG with parameters tested against
* Knuth vol. 2. by the original authors */ * Knuth vol. 2. by the original authors */
game.lcg_a = 1093; game.lcg_a = 1093;