More globals moved to instance_globals.

This commit is contained in:
Bart House
2018-11-24 17:59:16 -08:00
parent 3645e415e3
commit ff5fe26e72
11 changed files with 233 additions and 227 deletions

View File

@@ -12,8 +12,6 @@
#include "mfndpos.h"
#include <ctype.h>
STATIC_VAR boolean vamp_rise_msg, disintegested;
STATIC_DCL void FDECL(sanity_check_single_mon, (struct monst *, BOOLEAN_P,
const char *));
STATIC_DCL boolean FDECL(restrap, (struct monst *));
@@ -1898,7 +1896,7 @@ register struct monst *mtmp;
spec_mon = (nonliving(mtmp->data)
|| noncorporeal(mtmp->data)
|| amorphous(mtmp->data)),
spec_death = (disintegested /* disintegrated or digested */
spec_death = (g.disintegested /* disintegrated or digested */
|| noncorporeal(mtmp->data)
|| amorphous(mtmp->data));
@@ -1939,7 +1937,7 @@ register struct monst *mtmp;
if (!type_is_pname(mtmp->data))
whom = an(whom);
pline(upstart(buf), whom);
vamp_rise_msg = TRUE;
g.vamp_rise_msg = TRUE;
}
newsym(x, y);
return;
@@ -2226,8 +2224,8 @@ int how;
be_sad = (mdef->mtame != 0);
/* no corpses if digested or disintegrated */
disintegested = (how == AD_DGST || how == -AD_RBRE);
if (disintegested)
g.disintegested = (how == AD_DGST || how == -AD_RBRE);
if (g.disintegested)
mondead(mdef);
else
mondied(mdef);
@@ -2323,14 +2321,14 @@ int xkill_flags; /* 1: suppress message, 2: suppress corpse, 4: pacifist */
thrownobj = 0;
}
vamp_rise_msg = FALSE; /* might get set in mondead(); only checked below */
disintegested = nocorpse; /* alternate vamp_rise message needed if true */
g.vamp_rise_msg = FALSE; /* might get set in mondead(); only checked below */
g.disintegested = nocorpse; /* alternate vamp_rise message needed if true */
/* dispose of monster and make cadaver */
if (stoned)
monstone(mtmp);
else
mondead(mtmp);
disintegested = FALSE; /* reset */
g.disintegested = FALSE; /* reset */
if (!DEADMONSTER(mtmp)) { /* monster lifesaved */
/* Cannot put the non-visible lifesaving message in
@@ -2338,7 +2336,7 @@ int xkill_flags; /* 1: suppress message, 2: suppress corpse, 4: pacifist */
* kill it (as opposed to visible lifesaving which always appears).
*/
stoned = FALSE;
if (!cansee(x, y) && !vamp_rise_msg)
if (!cansee(x, y) && !g.vamp_rise_msg)
pline("Maybe not...");
return;
}