Several things that break savefile compatibility

- Version change from 3.4.x
- timed_delay feature ignore in makedefs
- several flags from iflags to flags
- use offsets from mons array entries in save file rather than storing
  the ptr and calculating the distance from beginning of array
This commit is contained in:
nethack.allison
2003-03-05 04:39:47 +00:00
parent 14c53eb840
commit 5122409416
13 changed files with 54 additions and 59 deletions

View File

@@ -113,7 +113,7 @@ static struct Bool_Opt
{"large_font", &iflags.obsolete, FALSE, SET_IN_FILE}, /* OBSOLETE */
{"legacy", &flags.legacy, TRUE, DISP_IN_GAME},
{"lit_corridor", &flags.lit_corridor, FALSE, SET_IN_GAME},
{"lootabc", &iflags.lootabc, FALSE, SET_IN_GAME},
{"lootabc", &flags.lootabc, FALSE, SET_IN_GAME},
#ifdef MAC_GRAPHICS_ENV
{"Macgraphics", &iflags.MACgraphics, TRUE, SET_IN_GAME},
#else
@@ -165,7 +165,7 @@ static struct Bool_Opt
#else
{"showexp", (boolean *)0, FALSE, SET_IN_FILE},
#endif
{"showrace", &iflags.showrace, FALSE, SET_IN_GAME},
{"showrace", &flags.showrace, FALSE, SET_IN_GAME},
#ifdef SCORE_ON_BOTL
{"showscore", &flags.showscore, FALSE, SET_IN_GAME},
#else
@@ -186,7 +186,7 @@ static struct Bool_Opt
#endif
{"tombstone",&flags.tombstone, TRUE, SET_IN_GAME},
{"toptenwin",&flags.toptenwin, FALSE, SET_IN_GAME},
{"travel", &iflags.travelcmd, TRUE, SET_IN_GAME},
{"travel", &flags.travelcmd, TRUE, SET_IN_GAME},
{"use_inverse", &iflags.wc_inverse, FALSE, SET_IN_GAME}, /*WC*/
{"verbose", &flags.verbose, TRUE, SET_IN_GAME},
{(char *)0, (boolean *)0, FALSE, 0}
@@ -489,7 +489,7 @@ initoptions()
flags.end_own = FALSE;
flags.end_top = 3;
flags.end_around = 2;
iflags.runmode = RUN_LEAP;
flags.runmode = RUN_LEAP;
iflags.msg_history = 20;
#ifdef TTY_GRAPHICS
iflags.prevmsg_window = 's';
@@ -1069,16 +1069,16 @@ boolean tinitial, tfrom_file;
fullname = "runmode";
if (match_optname(opts, fullname, 4, TRUE)) {
if (negated) {
iflags.runmode = RUN_TPORT;
flags.runmode = RUN_TPORT;
} else if ((op = string_for_opt(opts, FALSE)) != 0) {
if (!strncmpi(op, "teleport", strlen(op)))
iflags.runmode = RUN_TPORT;
flags.runmode = RUN_TPORT;
else if (!strncmpi(op, "run", strlen(op)))
iflags.runmode = RUN_LEAP;
flags.runmode = RUN_LEAP;
else if (!strncmpi(op, "walk", strlen(op)))
iflags.runmode = RUN_STEP;
flags.runmode = RUN_STEP;
else if (!strncmpi(op, "crawl", strlen(op)))
iflags.runmode = RUN_CRAWL;
flags.runmode = RUN_CRAWL;
else
badoption(opts);
}
@@ -2133,7 +2133,7 @@ goodfruit:
vision_full_recalc = 1; /* delayed recalc */
}
else if ((boolopt[i].addr) == &iflags.use_inverse ||
(boolopt[i].addr) == &iflags.showrace ||
(boolopt[i].addr) == &flags.showrace ||
(boolopt[i].addr) == &iflags.hilite_pet) {
need_redraw = TRUE;
}
@@ -2550,7 +2550,7 @@ boolean setinitial,setfromfile;
}
end_menu(tmpwin, "Select run/travel display mode:");
if (select_menu(tmpwin, PICK_ONE, &mode_pick) > 0) {
iflags.runmode = mode_pick->item.a_int - 1;
flags.runmode = mode_pick->item.a_int - 1;
free((genericptr_t)mode_pick);
}
destroy_nhwindow(tmpwin);
@@ -2783,7 +2783,7 @@ char *buf;
else if (!strcmp(optname, "role"))
Sprintf(buf, "%s", rolestring(flags.initrole, roles, name.m));
else if (!strcmp(optname, "runmode"))
Sprintf(buf, "%s", runmodes[iflags.runmode]);
Sprintf(buf, "%s", runmodes[flags.runmode]);
else if (!strcmp(optname, "scores")) {
Sprintf(buf, "%d top/%d around%s", flags.end_top,
flags.end_around, flags.end_own ? "/own" : "");