/* The hero's glyph when seen as a monster.
*/
#define hero_glyph \
- monnum_to_glyph((Upolyd || !iflags.showrace) ? u.umonnum : \
+ monnum_to_glyph((Upolyd || !flags.showrace) ? u.umonnum : \
(flags.female && urace.femalenum != NON_PM) ? urace.femalenum : \
urace.malenum)
int initalign; /* starting alignment (index into aligns[]) */
int randomall; /* randomly assign everything not specified */
int pantheon; /* deity selection for priest character */
+ /* Items which were in iflags in 3.4.x to preserve savefile compatibility */
+ boolean lootabc; /* use "a/b/c" rather than "o/i/b" when looting */
+ boolean showrace; /* show hero glyph by race rather than by role */
+ boolean travelcmd; /* allow travel command */
+ int runmode; /* update screen display during run moves */
};
/*
boolean cmdassist; /* provide detailed assistance for some commands */
boolean obsolete; /* obsolete options can point at this, it isn't used */
- /* Items which belong in flags, but are here to allow save compatibility */
- boolean lootabc; /* use "a/b/c" rather than "o/i/b" when looting */
- boolean showrace; /* show hero glyph by race rather than by role */
- boolean travelcmd; /* allow travel command */
- int runmode; /* update screen display during run moves */
};
/*
-/* SCCS Id: @(#)patchlevel.h 3.4 2003/02/19 */
+/* SCCS Id: @(#)patchlevel.h 3.4 2003/03/04 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
-/* NetHack 3.4.1 */
+/* NetHack 3.5.0 */
#define VERSION_MAJOR 3
-#define VERSION_MINOR 4
+#define VERSION_MINOR 5
/*
* PATCHLEVEL is updated for each release.
*/
-#define PATCHLEVEL 1
+#define PATCHLEVEL 0
/*
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
#define COPYRIGHT_BANNER_C \
" See license for details."
-#if 1
+#if 0
/*
* If two successive patchlevels have compatible data files (fat chance),
* defining this with the value of the older one will allow its bones and
* PP = patch level, ee = edit level, L = literal suffix "L",
* with all four numbers specified as two hexadecimal digits.
*/
-#define VERSION_COMPATIBILITY 0x03040000L
+#define VERSION_COMPATIBILITY 0x03040100L
#endif
+/*****************************************************************************/
+/* Version 3.5.x */
+
+/*
+ * NetHack 3.5.0, March NN, NNNN
+ *
+ */
+
+/* Version 3.5 */
+
/*****************************************************************************/
/* Version 3.4.x */
+/* Patch 2, March 17, 2003
+ * Fix a few fatal errors
+ */
+
/* Patch 1, February 22, 2003
* Fix a few fatal errors including one for reentering shops, one
* involving land mines and boulders/statues, one for delayed
if (vision_full_recalc) vision_recalc(0); /* vision! */
/* when running in non-tport mode, this gets done through domove() */
- if ((!flags.run || iflags.runmode == RUN_TPORT) &&
+ if ((!flags.run || flags.runmode == RUN_TPORT) &&
(multi && (!flags.travel ? !(multi % 7) : !(moves % 7L)))) {
if (flags.time && flags.run) flags.botl = 1;
display_nhwindow(WIN_MAP, FALSE);
multi = 0;
return;
case CMD_TRAVEL:
- if (iflags.travelcmd) {
+ if (flags.travelcmd) {
flags.travel = 1;
flags.run = 8;
flags.nopick = 1;
x -= u.ux;
y -= u.uy;
- if (iflags.travelcmd) {
+ if (flags.travelcmd) {
if (abs(x) <= 1 && abs(y) <= 1 ) {
x = sgn(x), y = sgn(y);
} else {
static char cmd[2];
coord cc;
- if (!iflags.travelcmd) return 0;
+ if (!flags.travelcmd) return 0;
cmd[1]=0;
cc.x = u.ux;
cc.y = u.uy;
nomovemsg = "";
}
- if (flags.run && iflags.runmode != RUN_TPORT) {
+ if (flags.run && flags.runmode != RUN_TPORT) {
/* display every step or every 7th step depending upon mode */
- if (iflags.runmode != RUN_LEAP || !(moves % 7L)) {
+ if (flags.runmode != RUN_LEAP || !(moves % 7L)) {
if (flags.time) flags.botl = 1;
curs_on_u();
delay_output();
- if (iflags.runmode == RUN_CRAWL) {
+ if (flags.runmode == RUN_CRAWL) {
delay_output();
delay_output();
delay_output();
/* special case the hero for `showrace' option */
#ifdef TEXTCOLOR
if (iflags.use_color && x == u.ux && y == u.uy &&
- iflags.showrace && !Upolyd)
+ flags.showrace && !Upolyd)
color = HI_DOMESTIC;
#endif
}
{"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
#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
#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}
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';
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);
}
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;
}
}
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);
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" : "");
symbol; firstmatch is assumed to already be set for '@' */
if ((from_screen ?
(sym == monsyms[S_HUMAN] && cc.x == u.ux && cc.y == u.uy) :
- (sym == def_monsyms[S_HUMAN] && !iflags.showrace)) &&
+ (sym == def_monsyms[S_HUMAN] && !flags.showrace)) &&
!(Race_if(PM_HUMAN) || Race_if(PM_ELF)) && !Upolyd)
found += append_str(out_str, "you"); /* tack on "or you" */
menu_item *pick_list;
char buf[BUFSZ];
int n;
- const char *menuselector = iflags.lootabc ? "abc" : "oib";
+ const char *menuselector = flags.lootabc ? "abc" : "oib";
any.a_void = 0;
win = create_nhwindow(NHW_MENU);
{
register struct monst *mtmp, *mtmp2 = 0;
register struct monst *first = (struct monst *)0;
- int xl;
- struct permonst *monbegin;
- boolean moved;
-
- /* get the original base address */
- mread(fd, (genericptr_t)&monbegin, sizeof(monbegin));
- moved = (monbegin != mons);
+ int xl, offset;
while(1) {
mread(fd, (genericptr_t) &xl, sizeof(xl));
add_id_mapping(mtmp->m_id, nid);
mtmp->m_id = nid;
}
- if (moved && mtmp->data) {
- int offset = mtmp->data - monbegin; /*(ptrdiff_t)*/
- mtmp->data = mons + offset; /* new permonst location */
- }
+ offset = mtmp->mnum;
+ mtmp->data = &mons[offset];
if(mtmp->minvent) {
struct obj *obj;
mtmp->minvent = restobjchn(fd, ghostly, FALSE);
register int fd, mode;
{
int uid;
-
#ifdef MFLOPPY
count_only = (mode & COUNT_SAVE);
#endif
register struct monst *mtmp2;
unsigned int xl;
int minusone = -1;
- struct permonst *monbegin = &mons[0];
-
- if (perform_bwrite(mode))
- bwrite(fd, (genericptr_t) &monbegin, sizeof(monbegin));
while (mtmp) {
mtmp2 = mtmp->nmon;
if (perform_bwrite(mode)) {
+ mtmp->mnum = monsndx(mtmp->data);
xl = mtmp->mxlth + mtmp->mnamelth;
bwrite(fd, (genericptr_t) &xl, sizeof(int));
bwrite(fd, (genericptr_t) mtmp, xl + sizeof(struct monst));
}
/*
- * 3.4.1: way back in 3.2.1 `flags.nap' became unconditional but
- * TIMED_DELAY was erroneously left in VERSION_FEATURES and has
- * been there up through 3.4.0. Simply removing it now would
- * break save file compatibility with 3.4.0 files, so we will
- * explicitly mask it out during version checks.
- * This should go away in the next version update.
+ * Use this to explicitly mask out features during version checks.
*/
-#define IGNORED_FEATURES ( 0L \
- | (1L << 23) /* TIMED_DELAY */ \
- )
+#define IGNORED_FEATURES ( 0L )
static void
make_version()