X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=init.c;h=2fffc279c1ee7f691efa0d35eeac8ef9d34c5499;hp=812e943e6dc69589758c19739a388f7903aa0fd1;hb=c7aecb7249930ba3eafccfcd61e5b1af203a8b53;hpb=8cc5ee54127423c75814a6b5cc61d48d4075331b diff --git a/init.c b/init.c index 812e943..2fffc27 100644 --- a/init.c +++ b/init.c @@ -10,6 +10,12 @@ * Initialisation */ +struct settings_t settings = { + .logfp = NULL, + .oldstyle = false, + .prompt = true +}; + struct game_t game = { .dloc[1] = LOC_KINGHALL, .dloc[2] = LOC_WESTBANK, @@ -27,7 +33,6 @@ struct game_t game = { .abbnum = 5, .clock1 = WARNTIME, .clock2 = FLASHTIME, - .blklin = true, .newloc = LOC_START, .loc = LOC_START, .limit = GAMELIMIT, @@ -41,7 +46,7 @@ struct game_t game = { long initialise(void) { - if (oldstyle) + if (settings.oldstyle) printf("Initialising...\n"); srand(time(NULL)); @@ -86,7 +91,7 @@ long initialise(void) for (int treasure = 1; treasure <= NOBJECTS; treasure++) { if (objects[treasure].is_treasure) { if (objects[treasure].inventory != 0) - game.prop[treasure] = -1; + game.prop[treasure] = STATE_NOTFOUND; game.tally = game.tally - game.prop[treasure]; } }