From: NHOrus Date: Sat, 1 Jul 2017 13:46:51 +0000 (+0300) Subject: Reindend, compile out all save stuff X-Git-Tag: takebird~154 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=45820bc8cd6e01279d94703fd18b73f6848f09aa;p=open-adventure.git Reindend, compile out all save stuff --- diff --git a/actions.c b/actions.c index 4d6944f..e3768d9 100644 --- a/actions.c +++ b/actions.c @@ -93,12 +93,20 @@ static int attack(struct command_t *command) } spk = (dwarves > 1) ? OGRE_PANIC1 : OGRE_PANIC2; } else if (obj == BEAR) { - switch (game.prop[BEAR]) { - case UNTAMED_BEAR: spk = BEAR_HANDS; break; - case SITTING_BEAR: spk = BEAR_CONFUSED; break; - case CONTENTED_BEAR: spk = BEAR_CONFUSED; break; - case BEAR_DEAD: spk = ALREADY_DEAD; break; - } + switch (game.prop[BEAR]) { + case UNTAMED_BEAR: + spk = BEAR_HANDS; + break; + case SITTING_BEAR: + spk = BEAR_CONFUSED; + break; + case CONTENTED_BEAR: + spk = BEAR_CONFUSED; + break; + case BEAR_DEAD: + spk = ALREADY_DEAD; + break; + } } else if (obj == DRAGON && game.prop[DRAGON] == 0) { /* Fun stuff for dragon. If he insists on attacking it, win! * Set game.prop to dead, move dragon to central loc (still diff --git a/main.c b/main.c index 1e2a1fd..84eca57 100644 --- a/main.c +++ b/main.c @@ -122,6 +122,8 @@ int main(int argc, char *argv[]) /* Start-up, dwarf stuff */ make_zzword(game.zzword); + +#ifndef ADVENT_NOSAVE if (!rfp) { game.novice = yes(arbitrary_messages[WELCOME_YOU], arbitrary_messages[CAVE_NEARBY], arbitrary_messages[NO_MESSAGE]); if (game.novice) @@ -129,6 +131,7 @@ int main(int argc, char *argv[]) } else { restore(rfp); } +#endif if (logfp) fprintf(logfp, "seed %ld\n", seedval); @@ -1090,12 +1093,12 @@ L2607: wordclear(&command.wd2); } else { /* FIXME: Magic numbers related to vocabulary */ - if (!((V1 != PROMOTE_WORD(WATER) && V1 != PROMOTE_WORD(OIL)) || - (V2 != PROMOTE_WORD(PLANT) && V2 != PROMOTE_WORD(DOOR)))) { - if (AT(DEMOTE_WORD(V2))) + if (!((V1 != PROMOTE_WORD(WATER) && V1 != PROMOTE_WORD(OIL)) || + (V2 != PROMOTE_WORD(PLANT) && V2 != PROMOTE_WORD(DOOR)))) { + if (AT(DEMOTE_WORD(V2))) command.wd2 = token_to_packed("POUR"); } - if (V1 == PROMOTE_WORD(CAGE) && V2 == PROMOTE_WORD(BIRD) && HERE(CAGE) && HERE(BIRD)) + if (V1 == PROMOTE_WORD(CAGE) && V2 == PROMOTE_WORD(BIRD) && HERE(CAGE) && HERE(BIRD)) command.wd1 = token_to_packed("CATCH"); } L2620: