E NhRegion *FDECL(visible_region_at, (XCHAR_P, XCHAR_P));
E void FDECL(show_region, (NhRegion *, XCHAR_P, XCHAR_P));
E void FDECL(save_regions, (NHFILE *));
-E void FDECL(rest_regions, (NHFILE *, BOOLEAN_P));
+E void FDECL(rest_regions, (NHFILE *));
E void FDECL(region_stats, (const char *, char *, long *, long *));
E NhRegion *FDECL(create_gas_cloud, (XCHAR_P, XCHAR_P, int, int));
E boolean NDECL(region_danger);
E int FDECL(dorecover, (NHFILE *));
E void FDECL(restcemetery, (NHFILE *, struct cemetery **));
E void FDECL(trickery, (char *));
-E void FDECL(getlev, (NHFILE *, int, XCHAR_P, BOOLEAN_P));
+E void FDECL(getlev, (NHFILE *, int, XCHAR_P));
E void FDECL(get_plname_from_file, (NHFILE *, char *));
#ifdef SELECTSAVED
E int FDECL(restore_menu, (winid));
E long FDECL(spot_time_left, (XCHAR_P, XCHAR_P, SHORT_P));
E boolean FDECL(obj_is_local, (struct obj *));
E void FDECL(save_timers, (NHFILE *, int));
-E void FDECL(restore_timers, (NHFILE *, int, BOOLEAN_P, long));
+E void FDECL(restore_timers, (NHFILE *, int, long));
E void FDECL(timer_stats, (const char *, char *, long *, long *));
E void FDECL(relink_timers, (BOOLEAN_P));
E int NDECL(wiz_timeout_queue);
static void NDECL(find_lev_obj);
static void FDECL(restlevchn, (NHFILE *));
-static void FDECL(restdamage, (NHFILE *, BOOLEAN_P));
+static void FDECL(restdamage, (NHFILE *));
static void FDECL(restobj, (NHFILE *, struct obj *));
-static struct obj *FDECL(restobjchn, (NHFILE *, BOOLEAN_P, BOOLEAN_P));
+static struct obj *FDECL(restobjchn, (NHFILE *, BOOLEAN_P));
static void FDECL(restmon, (NHFILE *, struct monst *));
-static struct monst *FDECL(restmonchn, (NHFILE *, BOOLEAN_P));
+static struct monst *FDECL(restmonchn, (NHFILE *));
static struct fruit *FDECL(loadfruitchn, (NHFILE *));
static void FDECL(freefruitchn, (struct fruit *));
static void FDECL(ghostfruit, (struct obj *));
}
static void
-restdamage(nhfp, ghostly)
+restdamage(nhfp)
NHFILE *nhfp;
-boolean ghostly;
{
unsigned int dmgcount = 0;
int counter;
struct damage *tmp_dam;
+ boolean ghostly = (nhfp->ftype == NHF_BONESFILE);
if (nhfp->structlevel)
mread(nhfp->fd, (genericptr_t) &dmgcount, sizeof(dmgcount));
}
static struct obj *
-restobjchn(nhfp, ghostly, frozen)
+restobjchn(nhfp, frozen)
NHFILE *nhfp;
-boolean ghostly, frozen;
+boolean frozen;
{
register struct obj *otmp, *otmp2 = 0;
register struct obj *first = (struct obj *) 0;
int buflen = 0;
+ boolean ghostly = (nhfp->ftype == NHF_BONESFILE);
while (1) {
if (nhfp->structlevel)
if (Has_contents(otmp)) {
struct obj *otmp3;
- otmp->cobj = restobjchn(nhfp, ghostly, Is_IceBox(otmp));
+ otmp->cobj = restobjchn(nhfp, Is_IceBox(otmp));
/* restore container back pointers */
for (otmp3 = otmp->cobj; otmp3; otmp3 = otmp3->nobj)
otmp3->ocontainer = otmp;
}
static struct monst *
-restmonchn(nhfp, ghostly)
+restmonchn(nhfp)
NHFILE *nhfp;
-boolean ghostly;
{
register struct monst *mtmp, *mtmp2 = 0;
register struct monst *first = (struct monst *) 0;
int offset, buflen = 0;
+ boolean ghostly = (nhfp->ftype == NHF_BONESFILE);
while (1) {
if (nhfp->structlevel)
}
if (mtmp->minvent) {
struct obj *obj;
- mtmp->minvent = restobjchn(nhfp, ghostly, FALSE);
+ mtmp->minvent = restobjchn(nhfp, FALSE);
/* restore monster back pointer */
for (obj = mtmp->minvent; obj; obj = obj->nobj)
obj->ocarry = mtmp;
/* this stuff comes after potential aborted restore attempts */
restore_killers(nhfp);
- restore_timers(nhfp, RANGE_GLOBAL, FALSE, 0L);
+ restore_timers(nhfp, RANGE_GLOBAL, 0L);
restore_light_sources(nhfp);
- g.invent = restobjchn(nhfp, FALSE, FALSE);
+ g.invent = restobjchn(nhfp, FALSE);
/* restore dangling (not on floor or in inventory) ball and/or chain */
- bc_obj = restobjchn(nhfp, FALSE, FALSE);
+ bc_obj = restobjchn(nhfp, FALSE);
while (bc_obj) {
struct obj *nobj = bc_obj->nobj;
bc_obj->nobj = (struct obj *) 0;
bc_obj = nobj;
}
- g.migrating_objs = restobjchn(nhfp, FALSE, FALSE);
- g.migrating_mons = restmonchn(nhfp, FALSE);
+ g.migrating_objs = restobjchn(nhfp, FALSE);
+ g.migrating_mons = restmonchn(nhfp);
if (nhfp->structlevel) {
mread(nhfp->fd, (genericptr_t) g.mvitals, sizeof g.mvitals);
g.restoring = TRUE;
get_plname_from_file(nhfp, g.plname);
- getlev(nhfp, 0, (xchar) 0, FALSE);
+ getlev(nhfp, 0, (xchar) 0);
if (!restgamestate(nhfp, &stuckid, &steedid)) {
NHFILE tnhfp;
if (restoreinfo.mread_flags == -1)
break;
}
- getlev(nhfp, 0, ltmp, FALSE);
+ getlev(nhfp, 0, ltmp);
#ifdef MICRO
curs(WIN_MAP, 1 + dotcnt++, dotrow);
if (dotcnt >= (COLNO - 1)) {
(void) validate(nhfp, (char *) 0);
get_plname_from_file(nhfp, g.plname);
- getlev(nhfp, 0, (xchar) 0, FALSE);
+ getlev(nhfp, 0, (xchar) 0);
close_nhfile(nhfp);
restlevelstate(stuckid, steedid);
g.program_state.something_worth_saving = 1; /* useful data now exists */
}
void
-getlev(nhfp, pid, lev, ghostly)
+getlev(nhfp, pid, lev)
NHFILE *nhfp;
int pid;
xchar lev;
-boolean ghostly;
{
register struct trap *trap;
register struct monst *mtmp;
int hpid = 0;
xchar dlvl = 0;
int x, y;
+ boolean ghostly = (nhfp->ftype == NHF_BONESFILE);
#ifdef TOS
short tlev;
#endif
else
g.doorindex = 0;
- restore_timers(nhfp, RANGE_LEVEL, ghostly, elapsed);
+ restore_timers(nhfp, RANGE_LEVEL, elapsed);
restore_light_sources(nhfp);
- fmon = restmonchn(nhfp, ghostly);
+ fmon = restmonchn(nhfp);
/* rest_worm(fd); */ /* restore worm information */
rest_worm(nhfp); /* restore worm information */
}
dealloc_trap(trap);
- fobj = restobjchn(nhfp, ghostly, FALSE);
+ fobj = restobjchn(nhfp, FALSE);
find_lev_obj();
/* restobjchn()'s `frozen' argument probably ought to be a callback
routine so that we can check for objects being buried under ice */
- g.level.buriedobjlist = restobjchn(nhfp, ghostly, FALSE);
- g.billobjs = restobjchn(nhfp, ghostly, FALSE);
+ g.level.buriedobjlist = restobjchn(nhfp, FALSE);
+ g.billobjs = restobjchn(nhfp, FALSE);
rest_engravings(nhfp);
/* reset level.monsters for new level */
if (ghostly || (elapsed > 00 && elapsed > (long) rnd(10)))
hide_monst(mtmp);
}
- restdamage(nhfp, ghostly);
- rest_regions(nhfp, ghostly);
+ restdamage(nhfp);
+ rest_regions(nhfp);
if (ghostly) {
/* Now get rid of all the temp fruits... */