Reindend, compile out all save stuff 179/head
authorNHOrus <jy6x2b32pie9@yahoo.com>
Sat, 1 Jul 2017 13:46:51 +0000 (16:46 +0300)
committerNHOrus <jy6x2b32pie9@yahoo.com>
Sat, 1 Jul 2017 13:46:51 +0000 (16:46 +0300)
actions.c
main.c

index 4d6944f6d043125443cc12b59f8b2c60c745dc55..e3768d91af9f4567e3186f188b239e9ca7b6fd92 100644 (file)
--- 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 1e2a1fd68722f850afdb45a80588cc344fc53ac0..84eca5758177d5d262d015186fb02bb5e3aeb80b 100644 (file)
--- 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: