save/bones compatibility info followup
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ win32gui: you couldn't specify an alignment in defaults.nh and have it stick
|
|||||||
|
|
||||||
General New Features
|
General New Features
|
||||||
--------------------
|
--------------------
|
||||||
bones file compatibility info is now displayed on the options menu
|
bones file compatibility info is now written into the dat/options file
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific New Features
|
Platform- and/or Interface-Specific New Features
|
||||||
|
|||||||
+2
-1
@@ -435,7 +435,8 @@ getbones()
|
|||||||
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||||
if (mtmp->mhpmax == DEFUNCT_MONSTER) {
|
if (mtmp->mhpmax == DEFUNCT_MONSTER) {
|
||||||
#if defined(DEBUG) && defined(WIZARD)
|
#if defined(DEBUG) && defined(WIZARD)
|
||||||
pline("Removing defunct monster %s from bones.",
|
if (wizard)
|
||||||
|
pline("Removing defunct monster %s from bones.",
|
||||||
mtmp->data->mname);
|
mtmp->data->mname);
|
||||||
#endif
|
#endif
|
||||||
mongone(mtmp);
|
mongone(mtmp);
|
||||||
|
|||||||
+1
-19
@@ -14,8 +14,6 @@ NEARDATA struct instance_flags iflags; /* provide linkage */
|
|||||||
#include "tcap.h"
|
#include "tcap.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#endif
|
#endif
|
||||||
#include "patchlevel.h"
|
|
||||||
#include "date.h"
|
|
||||||
|
|
||||||
#define WINTYPELEN 16
|
#define WINTYPELEN 16
|
||||||
|
|
||||||
@@ -2328,7 +2326,7 @@ doset_add_menu(win, option, indexoffset)
|
|||||||
else
|
else
|
||||||
Sprintf(buf, fmtstr_doset_add_menu_tab, option, value);
|
Sprintf(buf, fmtstr_doset_add_menu_tab, option, value);
|
||||||
add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
|
add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Changing options via menu by Per Liboriussen */
|
/* Changing options via menu by Per Liboriussen */
|
||||||
int
|
int
|
||||||
@@ -2336,9 +2334,6 @@ doset()
|
|||||||
{
|
{
|
||||||
char buf[BUFSZ], buf2[BUFSZ];
|
char buf[BUFSZ], buf2[BUFSZ];
|
||||||
int i, pass, boolcount, pick_cnt, pick_idx, opt_indx;
|
int i, pass, boolcount, pick_cnt, pick_idx, opt_indx;
|
||||||
#ifdef VERSION_COMPATIBILITY
|
|
||||||
unsigned long uver;
|
|
||||||
#endif
|
|
||||||
boolean *bool_p;
|
boolean *bool_p;
|
||||||
winid tmpwin;
|
winid tmpwin;
|
||||||
anything any;
|
anything any;
|
||||||
@@ -2434,19 +2429,6 @@ doset()
|
|||||||
for (i = 0; i < PREFIX_COUNT; i++)
|
for (i = 0; i < PREFIX_COUNT; i++)
|
||||||
doset_add_menu(tmpwin, fqn_prefix_names[i], 0);
|
doset_add_menu(tmpwin, fqn_prefix_names[i], 0);
|
||||||
#endif
|
#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?");
|
end_menu(tmpwin, "Set what options?");
|
||||||
need_redraw = FALSE;
|
need_redraw = FALSE;
|
||||||
if ((pick_cnt = select_menu(tmpwin, PICK_ANY, &pick_list)) > 0) {
|
if ((pick_cnt = select_menu(tmpwin, PICK_ANY, &pick_list)) > 0) {
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ static boolean FDECL(d_filter, (char *));
|
|||||||
static boolean FDECL(h_filter, (char *));
|
static boolean FDECL(h_filter, (char *));
|
||||||
static boolean FDECL(ranged_attk,(struct permonst*));
|
static boolean FDECL(ranged_attk,(struct permonst*));
|
||||||
static int FDECL(mstrength,(struct permonst *));
|
static int FDECL(mstrength,(struct permonst *));
|
||||||
|
static void NDECL(build_savebones_compat_string);
|
||||||
|
|
||||||
static boolean FDECL(qt_comment, (char *));
|
static boolean FDECL(qt_comment, (char *));
|
||||||
static boolean FDECL(qt_control, (char *));
|
static boolean FDECL(qt_control, (char *));
|
||||||
@@ -600,6 +601,27 @@ do_date()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char save_bones_compat_buf[BUFSZ];
|
||||||
|
|
||||||
|
void
|
||||||
|
build_savebones_compat_string()
|
||||||
|
{
|
||||||
|
#ifdef VERSION_COMPATIBILITY
|
||||||
|
unsigned long uver = VERSION_COMPATIBILITY;
|
||||||
|
#endif
|
||||||
|
Strcpy(save_bones_compat_buf,
|
||||||
|
"save and bones files accepted from version");
|
||||||
|
#ifdef VERSION_COMPATIBILITY
|
||||||
|
Sprintf(eos(save_bones_compat_buf), "s %lu.%lu.%lu through %d.%d.%d",
|
||||||
|
((uver & 0xFF000000L) >> 24), ((uver & 0x00FF0000L) >> 16),
|
||||||
|
((uver & 0x0000FF00L) >> 8),
|
||||||
|
VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL);
|
||||||
|
#else
|
||||||
|
Sprintf(eos(save_bones_compat_buf), " %d.%d.%d only",
|
||||||
|
VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static const char *build_opts[] = {
|
static const char *build_opts[] = {
|
||||||
#ifdef AMIGA_WBENCH
|
#ifdef AMIGA_WBENCH
|
||||||
"Amiga WorkBench support",
|
"Amiga WorkBench support",
|
||||||
@@ -744,6 +766,7 @@ static const char *build_opts[] = {
|
|||||||
#ifdef ZEROCOMP
|
#ifdef ZEROCOMP
|
||||||
"zero-compressed save files",
|
"zero-compressed save files",
|
||||||
#endif
|
#endif
|
||||||
|
save_bones_compat_buf,
|
||||||
"basic NetHack features"
|
"basic NetHack features"
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -794,6 +817,7 @@ do_options()
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build_savebones_compat_string();
|
||||||
Fprintf(ofp,
|
Fprintf(ofp,
|
||||||
#ifdef BETA
|
#ifdef BETA
|
||||||
"\n NetHack version %d.%d.%d [beta]\n",
|
"\n NetHack version %d.%d.%d [beta]\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user