Simplify the signature of savefile().
[open-adventure.git] / main.c
diff --git a/main.c b/main.c
index d4539b19f1dc4f87ad035e5c4ac5ebb4774e8c4c..a162463edc251ea9f6cc1af224c706b21753d9e6 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1977, 2005 by Will Crowther and Don Woods
- * Copyright (c) 2017 by Eric S. Raymond
- * SPDX-License-Identifier: BSD-2-clause
+ * SPDX-FileCopyrightText: 1977, 2005 by Will Crowther and Don Woods
+ * SPDX-FileCopyrightText: 2017 by Eric S. Raymond
+ * SPDX-License-Identifier: BSD-2-Clause
  */
 
 #include <stdlib.h>
@@ -24,7 +24,7 @@ void autosave(void)
 {
     if (autosave_fp != NULL) {
         rewind(autosave_fp);
-        savefile(autosave_fp, /* version (auto): */0);
+        savefile(autosave_fp);
         fflush(autosave_fp);
     }
 }
@@ -463,8 +463,7 @@ static void describe_location(void)
 {
     const char* msg = locations[game.loc].description.small;
 
-    if (MOD(game.abbrev[game.loc], game.abbnum) == 0 ||
-        msg == NO_MESSAGE)
+    if (MOD(game.abbrev[game.loc], game.abbnum) == 0 || msg == NO_MESSAGE)
         msg = locations[game.loc].description.big;
 
     if (!FORCED(game.loc) && DARK(game.loc)) {
@@ -935,6 +934,8 @@ static void listobjects(void)
                     game.prop[RUG] = RUG_DRAGON;
                 if (obj == CHAIN)
                     game.prop[CHAIN] = CHAINING_BEAR;
+               if (obj == EGGS)
+                   game.seenbigwords = true;
                 --game.tally;
                 /*  Note: There used to be a test here to see whether the
                  *  player had blown it so badly that he could never ever see
@@ -1069,7 +1070,7 @@ static bool do_move(void)
 
     /* The easiest way to get killed is to fall into a pit in
      * pitch darkness. */
-    if (!FORCED(game.loc) && DARK(game.loc) && game.wzdark && PCT(35)) { // FIXME: magic number
+    if (!FORCED(game.loc) && DARK(game.loc) && game.wzdark && PCT(PIT_KILL_PROB)) {
         rspeak(PIT_FALL);
         game.oldlc2 = game.loc;
         croak();