move 'g.restoring' to 'g.program_state.restoring'
Move the core's global restoring flag (not the same as main()'s local resuming flag) to a more logical place. Add a saving flag in the process, but it isn't being set or cleared anywhere yet. (Once in use it will probably fix the exception during save that was just reported, but before that it would be useful to figure out what specifically caused the event.) The program_state struct really ought to be standalone rather than part of struct g but I haven't made that change. Removing an unused variable for wishing and some reformatting that whent along with it got mixed in. Removes some trailing whitespace in sfstruct.c too. Only lightly tested...
This commit is contained in:
+6
-1
@@ -1,4 +1,4 @@
|
|||||||
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.367 $ $NHDT-Date: 1606697932 2020/11/30 00:58:52 $
|
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.368 $ $NHDT-Date: 1606765210 2020/11/30 19:40:10 $
|
||||||
|
|
||||||
General Fixes and Modified Features
|
General Fixes and Modified Features
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
@@ -736,3 +736,8 @@ add an additional note to mextra.h and obj.h comments that reminds people to
|
|||||||
appropriately init new fields if they need to initialize to something
|
appropriately init new fields if they need to initialize to something
|
||||||
other than zero
|
other than zero
|
||||||
rework stairs structure into a linked list
|
rework stairs structure into a linked list
|
||||||
|
move 'restoring' to the program_state struct; add corresponding 'saving';
|
||||||
|
both used to enforce no updating of status lines or of persistent
|
||||||
|
inventory when the relevant activity is in progress
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 decl.h $NHDT-Date: 1600468452 2020/09/18 22:34:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.242 $ */
|
/* NetHack 3.7 decl.h $NHDT-Date: 1606765210 2020/11/30 19:40:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.246 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Michael Allison, 2007. */
|
/*-Copyright (c) Michael Allison, 2007. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -94,6 +94,8 @@ struct sinfo {
|
|||||||
int something_worth_saving; /* in case of panic */
|
int something_worth_saving; /* in case of panic */
|
||||||
int panicking; /* `panic' is in progress */
|
int panicking; /* `panic' is in progress */
|
||||||
int exiting; /* an exit handler is executing */
|
int exiting; /* an exit handler is executing */
|
||||||
|
int saving;
|
||||||
|
int restoring;
|
||||||
int in_moveloop;
|
int in_moveloop;
|
||||||
int in_impossible;
|
int in_impossible;
|
||||||
int in_self_recover;
|
int in_self_recover;
|
||||||
|
|||||||
+3
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 artifact.c $NHDT-Date: 1596498149 2020/08/03 23:42:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.159 $ */
|
/* NetHack 3.7 artifact.c $NHDT-Date: 1606765210 2020/11/30 19:40:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.161 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -534,7 +534,8 @@ long wp_mask;
|
|||||||
* that can print a message--need to guard against being printed
|
* that can print a message--need to guard against being printed
|
||||||
* when restoring a game
|
* when restoring a game
|
||||||
*/
|
*/
|
||||||
(void) make_hallucinated((long) !on, g.restoring ? FALSE : TRUE,
|
(void) make_hallucinated((long) !on,
|
||||||
|
g.program_state.restoring ? FALSE : TRUE,
|
||||||
wp_mask);
|
wp_mask);
|
||||||
}
|
}
|
||||||
if (spfx & SPFX_ESP) {
|
if (spfx & SPFX_ESP) {
|
||||||
|
|||||||
+5
-3
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 botl.c $NHDT-Date: 1606008998 2020/11/22 01:36:38 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.192 $ */
|
/* NetHack 3.7 botl.c $NHDT-Date: 1606765211 2020/11/30 19:40:11 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.193 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Michael Allison, 2006. */
|
/*-Copyright (c) Michael Allison, 2006. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -238,7 +238,8 @@ void
|
|||||||
bot()
|
bot()
|
||||||
{
|
{
|
||||||
/* dosave() flags completion by setting u.uhp to -1 */
|
/* dosave() flags completion by setting u.uhp to -1 */
|
||||||
if ((u.uhp != -1) && g.youmonst.data && iflags.status_updates) {
|
if (u.uhp != -1 && g.youmonst.data && iflags.status_updates
|
||||||
|
&& !g.program_state.saving && !g.program_state.restoring) {
|
||||||
if (VIA_WINDOWPORT()) {
|
if (VIA_WINDOWPORT()) {
|
||||||
bot_via_windowport();
|
bot_via_windowport();
|
||||||
} else {
|
} else {
|
||||||
@@ -254,7 +255,8 @@ bot()
|
|||||||
void
|
void
|
||||||
timebot()
|
timebot()
|
||||||
{
|
{
|
||||||
if (flags.time && iflags.status_updates) {
|
if (flags.time && iflags.status_updates
|
||||||
|
&& !g.program_state.saving && !g.program_state.restoring) {
|
||||||
if (VIA_WINDOWPORT()) {
|
if (VIA_WINDOWPORT()) {
|
||||||
stat_update_time();
|
stat_update_time();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 invent.c $NHDT-Date: 1606528765 2020/11/28 01:59:25 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.307 $ */
|
/* NetHack 3.7 invent.c $NHDT-Date: 1606765212 2020/11/30 19:40:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.308 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -2496,7 +2496,7 @@ learn_unseen_invent()
|
|||||||
void
|
void
|
||||||
update_inventory()
|
update_inventory()
|
||||||
{
|
{
|
||||||
if (g.restoring)
|
if (g.program_state.saving || g.program_state.restoring)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+21
-17
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 objnam.c $NHDT-Date: 1604745123 2020/11/07 10:32:03 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.305 $ */
|
/* NetHack 3.7 objnam.c $NHDT-Date: 1606765213 2020/11/30 19:40:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.307 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1293,8 +1293,8 @@ unsigned doname_flags;
|
|||||||
/* treat 'restoring' like suppress_price because shopkeeper and
|
/* treat 'restoring' like suppress_price because shopkeeper and
|
||||||
bill might not be available yet while restore is in progress
|
bill might not be available yet while restore is in progress
|
||||||
(objects won't normally be formatted during that time, but if
|
(objects won't normally be formatted during that time, but if
|
||||||
'perm_invent' is enabled then they might be) */
|
'perm_invent' is enabled then they might be [not any more...]) */
|
||||||
if (iflags.suppress_price || g.restoring) {
|
if (iflags.suppress_price || g.program_state.restoring) {
|
||||||
; /* don't attempt to obtain any shop pricing, even if 'with_price' */
|
; /* don't attempt to obtain any shop pricing, even if 'with_price' */
|
||||||
} else if (is_unpaid(obj)) { /* in inventory or in container in invent */
|
} else if (is_unpaid(obj)) { /* in inventory or in container in invent */
|
||||||
long quotedprice = unpaid_cost(obj, TRUE);
|
long quotedprice = unpaid_cost(obj, TRUE);
|
||||||
@@ -3261,10 +3261,11 @@ char *bp;
|
|||||||
struct _readobjnam_data *d;
|
struct _readobjnam_data *d;
|
||||||
{
|
{
|
||||||
d->cnt = d->spe = d->spesgn = d->typ = 0;
|
d->cnt = d->spe = d->spesgn = d->typ = 0;
|
||||||
d->very = d->rechrg = d->blessed = d->uncursed = d->iscursed = d->ispoisoned =
|
d->very = d->rechrg = d->blessed = d->uncursed = d->iscursed
|
||||||
d->isgreased = d->eroded = d->eroded2 = d->erodeproof = d->halfeaten =
|
= d->ispoisoned = d->isgreased = d->eroded = d->eroded2
|
||||||
d->islit = d->unlabeled = d->ishistoric = d->isdiluted = d->trapped =
|
= d->erodeproof = d->halfeaten = d->islit = d->unlabeled
|
||||||
d->locked = d->unlocked = d->broken = d->real = d->fake = 0;
|
= d->ishistoric = d->isdiluted = d->trapped = d->locked
|
||||||
|
= d->unlocked = d->broken = d->real = d->fake = 0;
|
||||||
d->tvariety = RANDOM_TIN;
|
d->tvariety = RANDOM_TIN;
|
||||||
d->mntmp = NON_PM;
|
d->mntmp = NON_PM;
|
||||||
d->contents = UNDEFINED;
|
d->contents = UNDEFINED;
|
||||||
@@ -4078,13 +4079,12 @@ readobjnam(bp, no_wish)
|
|||||||
register char *bp;
|
register char *bp;
|
||||||
struct obj *no_wish;
|
struct obj *no_wish;
|
||||||
{
|
{
|
||||||
register char *p;
|
|
||||||
struct _readobjnam_data d;
|
struct _readobjnam_data d;
|
||||||
|
|
||||||
readobjnam_init(bp, &d);
|
readobjnam_init(bp, &d);
|
||||||
|
|
||||||
if (!bp)
|
if (!bp)
|
||||||
goto any;
|
goto any;
|
||||||
|
|
||||||
/* first, remove extra whitespace they may have typed */
|
/* first, remove extra whitespace they may have typed */
|
||||||
(void) mungspaces(bp);
|
(void) mungspaces(bp);
|
||||||
/* allow wishing for "nothing" to preserve wishless conduct...
|
/* allow wishing for "nothing" to preserve wishless conduct...
|
||||||
@@ -4145,7 +4145,7 @@ struct obj *no_wish;
|
|||||||
wiztrap:
|
wiztrap:
|
||||||
if (wizard && !g.program_state.wizkit_wishing) {
|
if (wizard && !g.program_state.wizkit_wishing) {
|
||||||
/* [inline code moved to separate routine to unclutter readobjnam] */
|
/* [inline code moved to separate routine to unclutter readobjnam] */
|
||||||
if ((d.otmp = wizterrainwish(d.bp, p, d.locked, d.trapped)) != 0)
|
if ((d.otmp = wizterrainwish(d.bp, d.p, d.locked, d.trapped)) != 0)
|
||||||
return d.otmp;
|
return d.otmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4196,7 +4196,8 @@ struct obj *no_wish;
|
|||||||
|
|
||||||
/* if asking for corpse of a monster which leaves behind a glob, give
|
/* if asking for corpse of a monster which leaves behind a glob, give
|
||||||
glob instead of rejecting the monster type to create random corpse */
|
glob instead of rejecting the monster type to create random corpse */
|
||||||
if (d.typ == CORPSE && d.mntmp >= LOW_PM && mons[d.mntmp].mlet == S_PUDDING) {
|
if (d.typ == CORPSE && d.mntmp >= LOW_PM
|
||||||
|
&& mons[d.mntmp].mlet == S_PUDDING) {
|
||||||
d.typ = GLOB_OF_GRAY_OOZE + (d.mntmp - PM_GRAY_OOZE);
|
d.typ = GLOB_OF_GRAY_OOZE + (d.mntmp - PM_GRAY_OOZE);
|
||||||
d.mntmp = NON_PM; /* not used for globs */
|
d.mntmp = NON_PM; /* not used for globs */
|
||||||
}
|
}
|
||||||
@@ -4206,8 +4207,9 @@ struct obj *no_wish;
|
|||||||
d.otmp = d.typ ? mksobj(d.typ, TRUE, FALSE) : mkobj(d.oclass, FALSE);
|
d.otmp = d.typ ? mksobj(d.typ, TRUE, FALSE) : mkobj(d.oclass, FALSE);
|
||||||
d.typ = d.otmp->otyp, d.oclass = d.otmp->oclass; /* what we actually got */
|
d.typ = d.otmp->otyp, d.oclass = d.otmp->oclass; /* what we actually got */
|
||||||
|
|
||||||
if (d.islit && (d.typ == OIL_LAMP || d.typ == MAGIC_LAMP || d.typ == BRASS_LANTERN
|
if (d.islit && (d.typ == OIL_LAMP || d.typ == MAGIC_LAMP
|
||||||
|| Is_candle(d.otmp) || d.typ == POT_OIL)) {
|
|| d.typ == BRASS_LANTERN
|
||||||
|
|| Is_candle(d.otmp) || d.typ == POT_OIL)) {
|
||||||
place_object(d.otmp, u.ux, u.uy); /* make it viable light source */
|
place_object(d.otmp, u.ux, u.uy); /* make it viable light source */
|
||||||
begin_burn(d.otmp, FALSE);
|
begin_burn(d.otmp, FALSE);
|
||||||
obj_extract_self(d.otmp); /* now release it for caller's use */
|
obj_extract_self(d.otmp); /* now release it for caller's use */
|
||||||
@@ -4348,7 +4350,8 @@ struct obj *no_wish;
|
|||||||
case SCALE_MAIL:
|
case SCALE_MAIL:
|
||||||
/* Dragon mail - depends on the order of objects & dragons. */
|
/* Dragon mail - depends on the order of objects & dragons. */
|
||||||
if (d.mntmp >= PM_GRAY_DRAGON && d.mntmp <= PM_YELLOW_DRAGON)
|
if (d.mntmp >= PM_GRAY_DRAGON && d.mntmp <= PM_YELLOW_DRAGON)
|
||||||
d.otmp->otyp = GRAY_DRAGON_SCALE_MAIL + d.mntmp - PM_GRAY_DRAGON;
|
d.otmp->otyp = GRAY_DRAGON_SCALE_MAIL
|
||||||
|
+ d.mntmp - PM_GRAY_DRAGON;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4380,7 +4383,8 @@ struct obj *no_wish;
|
|||||||
* armor modified by confused reading of cursed destroy armor)
|
* armor modified by confused reading of cursed destroy armor)
|
||||||
* so don't prevent player from wishing for such a combination.
|
* so don't prevent player from wishing for such a combination.
|
||||||
*/
|
*/
|
||||||
if (d.erodeproof && (is_damageable(d.otmp) || d.otmp->otyp == CRYSKNIFE))
|
if (d.erodeproof
|
||||||
|
&& (is_damageable(d.otmp) || d.otmp->otyp == CRYSKNIFE))
|
||||||
d.otmp->oerodeproof = (Luck >= 0 || wizard);
|
d.otmp->oerodeproof = (Luck >= 0 || wizard);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4431,8 +4435,8 @@ struct obj *no_wish;
|
|||||||
if (d.isgreased)
|
if (d.isgreased)
|
||||||
d.otmp->greased = 1;
|
d.otmp->greased = 1;
|
||||||
|
|
||||||
if (d.isdiluted && d.otmp->oclass == POTION_CLASS && d.otmp->otyp != POT_WATER)
|
if (d.isdiluted && d.otmp->oclass == POTION_CLASS)
|
||||||
d.otmp->odiluted = 1;
|
d.otmp->odiluted = (d.otmp->otyp != POT_WATER);
|
||||||
|
|
||||||
/* set tin variety */
|
/* set tin variety */
|
||||||
if (d.otmp->otyp == TIN && d.tvariety >= 0 && (rn2(4) || wizard))
|
if (d.otmp->otyp == TIN && d.tvariety >= 0 && (rn2(4) || wizard))
|
||||||
|
|||||||
+5
-5
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 restore.c $NHDT-Date: 1605305492 2020/11/13 22:11:32 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.171 $ */
|
/* NetHack 3.7 restore.c $NHDT-Date: 1606765214 2020/11/30 19:40:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.173 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Michael Allison, 2009. */
|
/*-Copyright (c) Michael Allison, 2009. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -643,9 +643,9 @@ unsigned int *stuckid, *steedid;
|
|||||||
while (bc_obj) {
|
while (bc_obj) {
|
||||||
struct obj *nobj = bc_obj->nobj;
|
struct obj *nobj = bc_obj->nobj;
|
||||||
|
|
||||||
|
bc_obj->nobj = (struct obj *) 0;
|
||||||
if (bc_obj->owornmask)
|
if (bc_obj->owornmask)
|
||||||
setworn(bc_obj, bc_obj->owornmask);
|
setworn(bc_obj, bc_obj->owornmask);
|
||||||
bc_obj->nobj = (struct obj *) 0;
|
|
||||||
bc_obj = nobj;
|
bc_obj = nobj;
|
||||||
}
|
}
|
||||||
g.migrating_objs = restobjchn(nhfp, FALSE);
|
g.migrating_objs = restobjchn(nhfp, FALSE);
|
||||||
@@ -771,7 +771,7 @@ NHFILE *nhfp;
|
|||||||
int rtmp;
|
int rtmp;
|
||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
|
|
||||||
g.restoring = TRUE;
|
g.program_state.restoring = 1;
|
||||||
get_plname_from_file(nhfp, g.plname);
|
get_plname_from_file(nhfp, g.plname);
|
||||||
getlev(nhfp, 0, (xchar) 0);
|
getlev(nhfp, 0, (xchar) 0);
|
||||||
if (!restgamestate(nhfp, &stuckid, &steedid)) {
|
if (!restgamestate(nhfp, &stuckid, &steedid)) {
|
||||||
@@ -786,7 +786,7 @@ NHFILE *nhfp;
|
|||||||
is not really affiliated with an open file */
|
is not really affiliated with an open file */
|
||||||
close_nhfile(nhfp);
|
close_nhfile(nhfp);
|
||||||
(void) delete_savefile();
|
(void) delete_savefile();
|
||||||
g.restoring = FALSE;
|
g.program_state.restoring = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
restlevelstate(stuckid, steedid);
|
restlevelstate(stuckid, steedid);
|
||||||
@@ -895,8 +895,8 @@ NHFILE *nhfp;
|
|||||||
g.vision_full_recalc = 1; /* recompute vision (not saved) */
|
g.vision_full_recalc = 1; /* recompute vision (not saved) */
|
||||||
|
|
||||||
run_timers(); /* expire all timers that have gone off while away */
|
run_timers(); /* expire all timers that have gone off while away */
|
||||||
|
g.program_state.restoring = 0; /* affects bot() so clear before docrt() */
|
||||||
docrt();
|
docrt();
|
||||||
g.restoring = FALSE;
|
|
||||||
clear_nhwindow(WIN_MESSAGE);
|
clear_nhwindow(WIN_MESSAGE);
|
||||||
|
|
||||||
/* Success! */
|
/* Success! */
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 sfstruct.c $NHDT-Date: 1593953360 2020/07/05 12:49:20 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $ */
|
/* NetHack 3.7 sfstruct.c $NHDT-Date: 1606765215 2020/11/30 19:40:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Michael Allison, 2009. */
|
/*-Copyright (c) Michael Allison, 2009. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -265,7 +265,7 @@ register unsigned int len;
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
pline("Read %d instead of %u bytes.", rlen, len);
|
pline("Read %d instead of %u bytes.", rlen, len);
|
||||||
if (g.restoring) {
|
if (g.program_state.restoring) {
|
||||||
(void) nhclose(fd);
|
(void) nhclose(fd);
|
||||||
(void) delete_savefile();
|
(void) delete_savefile();
|
||||||
error("Error restoring old game.");
|
error("Error restoring old game.");
|
||||||
|
|||||||
+1
-2
@@ -76,7 +76,6 @@ extern int attrib_text_normal; /* text mode normal attribute */
|
|||||||
extern int attrib_gr_normal; /* graphics mode normal attribute */
|
extern int attrib_gr_normal; /* graphics mode normal attribute */
|
||||||
extern int attrib_gr_intense; /* graphics mode intense attribute */
|
extern int attrib_gr_intense; /* graphics mode intense attribute */
|
||||||
extern boolean inmap; /* in the map window */
|
extern boolean inmap; /* in the map window */
|
||||||
/* extern boolean g.restoring; */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Global Variables
|
* Global Variables
|
||||||
@@ -786,7 +785,7 @@ int x, y;
|
|||||||
clipymax = ROWNO - 1;
|
clipymax = ROWNO - 1;
|
||||||
}
|
}
|
||||||
if (clipx != oldx || clipy != oldy) {
|
if (clipx != oldx || clipy != oldy) {
|
||||||
if (on_level(&u.uz0, &u.uz) && !g.restoring)
|
if (on_level(&u.uz0, &u.uz) && !g.program_state.restoring)
|
||||||
/* (void) doredraw(); */
|
/* (void) doredraw(); */
|
||||||
vesa_redrawmap();
|
vesa_redrawmap();
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-3
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 vidvga.c $NHDT-Date: 1596498278 2020/08/03 23:44:38 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.25 $ */
|
/* NetHack 3.7 vidvga.c $NHDT-Date: 1606765216 2020/11/30 19:40:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.26 $ */
|
||||||
/* Copyright (c) NetHack PC Development Team 1995 */
|
/* Copyright (c) NetHack PC Development Team 1995 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
/*
|
/*
|
||||||
@@ -430,7 +430,6 @@ static void
|
|||||||
vga_cliparound(x, y)
|
vga_cliparound(x, y)
|
||||||
int x, y;
|
int x, y;
|
||||||
{
|
{
|
||||||
/* extern boolean g.restoring; */
|
|
||||||
int oldx = clipx;
|
int oldx = clipx;
|
||||||
|
|
||||||
if (!iflags.tile_view || iflags.over_view || iflags.traditional_view)
|
if (!iflags.tile_view || iflags.over_view || iflags.traditional_view)
|
||||||
@@ -444,7 +443,7 @@ int x, y;
|
|||||||
clipx = clipxmax - (viewport_size - 1);
|
clipx = clipxmax - (viewport_size - 1);
|
||||||
}
|
}
|
||||||
if (clipx != oldx) {
|
if (clipx != oldx) {
|
||||||
if (on_level(&u.uz0, &u.uz) && !g.restoring)
|
if (on_level(&u.uz0, &u.uz) && !g.program_state.restoring)
|
||||||
/* (void) doredraw(); */
|
/* (void) doredraw(); */
|
||||||
vga_redrawmap(1);
|
vga_redrawmap(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user