X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=init.c;h=f434844e7f190959f35433a6939803fe57353223;hp=66ef59e2a0d0e846d19d4fff12e11ba275c4b312;hb=aa1dd666a9e5a972cb8e29c70cebb9c35a785ddf;hpb=894b3de9493d26d7dec33aac7b820783c108803b diff --git a/init.c b/init.c index 66ef59e..f434844 100644 --- a/init.c +++ b/init.c @@ -4,7 +4,6 @@ #include #include "advent.h" -#include "database.h" /* * Initialisation @@ -25,8 +24,8 @@ void initialise(void) 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 (T_TERMINATE(travel[k])) + conditions[i] |= (1 << COND_FORCED); } game.atloc[i] = 0; } @@ -57,11 +56,11 @@ void initialise(void) * 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