X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=init.c;h=87a51616877d9de7468079d260709b50ac0fdb2a;hb=346bcf9458c408b5bd2a6fb5679a2e86bd3952fb;hp=0f81fe15cb52e79fdc2692a9e8d9d005f19c9af9;hpb=f815299a2a97656b0f4ea0793c2207c2437888f6;p=open-adventure.git diff --git a/init.c b/init.c index 0f81fe1..87a5161 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, @@ -41,7 +47,7 @@ struct game_t game = { long initialise(void) { - if (oldstyle) + if (settings.oldstyle) printf("Initialising...\n"); srand(time(NULL)); @@ -86,14 +92,11 @@ 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] = NOT_YET_FOUND; game.tally = game.tally - game.prop[treasure]; } } game.conds = setbit(11); - /* Start-up, dwarf stuff */ - make_zzword(game.zzword); - return seedval; }