]> granicus.if.org Git - nethack/commitdiff
runtime bones compatibility info
authornethack.allison <nethack.allison>
Sun, 7 Sep 2003 11:48:43 +0000 (11:48 +0000)
committernethack.allison <nethack.allison>
Sun, 7 Sep 2003 11:48:43 +0000 (11:48 +0000)
Put the accepted bones file range on the options menu display.
Also adds a missing "if (wizard)" in bones.c

doc/fixes34.3
src/bones.c
src/options.c

index 3f0ecfec5726eda6084af8ab4e7b586271ed7a95..f3cfcb50088d270d28733e0ef0f5d798e4b3dc4d 100644 (file)
@@ -18,6 +18,7 @@ win32gui: you couldn't specify an alignment in defaults.nh and have it stick
 
 General New Features
 --------------------
+bones file compatibility info is now displayed on the options menu
 
 
 Platform- and/or Interface-Specific New Features
index f8f0ac35c7881728ea5784d1d94aed08c650ba91..585200a6ae62b89fa6146efb08e99a091435daa3 100644 (file)
@@ -435,7 +435,8 @@ getbones()
                        for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
                            if (mtmp->mhpmax == DEFUNCT_MONSTER) {
 #if defined(DEBUG) && defined(WIZARD)
-                               pline("Removing defunct monster %s from bones.",
+                               if (wizard)
+                                   pline("Removing defunct monster %s from bones.",
                                        mtmp->data->mname);
 #endif
                                mongone(mtmp);
index b0d492a9425ebb1ea8efc7c8442c3b2fbf081d86..f38ae90300c8a5a919fea9f2e29361a9464f9153 100644 (file)
@@ -14,6 +14,8 @@ NEARDATA struct instance_flags iflags;        /* provide linkage */
 #include "tcap.h"
 #include <ctype.h>
 #endif
+#include "patchlevel.h"
+#include "date.h"
 
 #define WINTYPELEN 16
 
@@ -2326,7 +2328,7 @@ doset_add_menu(win, option, indexoffset)
     else
        Sprintf(buf, fmtstr_doset_add_menu_tab, option, value);
     add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
-}
+ }
 
 /* Changing options via menu by Per Liboriussen */
 int
@@ -2334,6 +2336,9 @@ doset()
 {
        char buf[BUFSZ], buf2[BUFSZ];
        int i, pass, boolcount, pick_cnt, pick_idx, opt_indx;
+#ifdef VERSION_COMPATIBILITY
+       unsigned long uver;
+#endif
        boolean *bool_p;
        winid tmpwin;
        anything any;
@@ -2429,6 +2434,19 @@ doset()
        for (i = 0; i < PREFIX_COUNT; i++)
                doset_add_menu(tmpwin, fqn_prefix_names[i], 0);
 #endif
+#ifdef VERSION_COMPATIBILITY
+       uver = VERSION_COMPATIBILITY;
+       Sprintf(buf, "Accepted bones file range: version %lu.%lu.%lu-%lu to %s.",
+               ((uver & 0xFF000000L) >> 24), ((uver & 0x00FF0000L) >> 16),
+               ((uver & 0x0000FF00L) >> 8), (uver & 0x000000FFL),
+               VERSION_STRING);
+#else
+       Sprintf(buf, "Bones files accepted from version %s only.",
+               VERSION_STRING);
+#endif
+       add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, "", MENU_UNSELECTED);
+       add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
+
        end_menu(tmpwin, "Set what options?");
        need_redraw = FALSE;
        if ((pick_cnt = select_menu(tmpwin, PICK_ANY, &pick_list)) > 0) {