#include <stdbool.h>
#include "advent.h"
-#include "database.h"
/*
* Initialisation
for (int i = 1; i <= NLOCATIONS; i++) {
game.abbrev[i] = 0;
- if (!(locations[i].description.big == 0 || TKEY[i] == 0)) {
- int k = TKEY[i];
- if (MOD(labs(TRAVEL[k]), 1000) == 1)
- conditions[i] |= (1 << COND_FORCED);
+ if (!(locations[i].description.big == 0 || tkey[i] == 0)) {
+ int k = tkey[i];
+ if (T_TERMINATE(travel[k]))
+ conditions[i] |= (1 << COND_FORCED);
}
game.atloc[i] = 0;
}
* not yet found, so we know when to close the cave. */
game.tally = 0;
for (int treasure = 1; treasure <= NOBJECTS; treasure++) {
- if (objects[treasure].is_treasure) {
- if (objects[treasure].inventory != 0)
- game.prop[treasure] = -1;
- game.tally = game.tally - game.prop[treasure];
- }
+ if (objects[treasure].is_treasure) {
+ if (objects[treasure].inventory != 0)
+ game.prop[treasure] = -1;
+ game.tally = game.tally - game.prop[treasure];
+ }
}
/* Clear the hint stuff. game.hintlc[i] is how long he's been at LOC
game.hintlc[i] = 0;
}
- /* Define some handy mnemonics. */
-
- /* Some action verbs. */
- FIND = VOCWRD(WORD_FIND, 2);
- INVENT = VOCWRD(WORD_INVENT, 2);
- LOCK = VOCWRD(WORD_LOCK, 2);
- SAY = VOCWRD(WORD_SAY, 2);
- THROW = VOCWRD(WORD_THROW, 2);
-
/* Initialise the dwarves. game.dloc is loc of dwarves,
* hard-wired in. game.odloc is prior loc of each dwarf,
* initially garbage. DALTLC is alternate initial loc for dwarf,