moves, monstermoves, wailmsg, migrating_objs and billobjs moved to g.

This commit is contained in:
Bart House
2018-12-24 20:22:33 -08:00
parent be5cdcf77a
commit 90547edb83
47 changed files with 224 additions and 228 deletions

View File

@@ -13,7 +13,7 @@ typedef struct align { /* alignment & record */
} align;
/* bounds for "record" -- respect initial alignments of 10 */
#define ALIGNLIM (10L + (moves / 200L))
#define ALIGNLIM (10L + (g.moves / 200L))
#define A_NONE (-128) /* the value range of type */

View File

@@ -154,9 +154,6 @@ struct multishot {
boolean s;
};
E NEARDATA long moves, monstermoves;
E NEARDATA long wailmsg;
E const int shield_static[];
#include "spell.h"
@@ -178,8 +175,6 @@ E NEARDATA struct obj *invent, *uarm, *uarmc, *uarmh, *uarms, *uarmg, *uarmf,
E NEARDATA struct obj *uchain; /* defined only when punished */
E NEARDATA struct obj *uball;
E NEARDATA struct obj *migrating_objs;
E NEARDATA struct obj *billobjs;
E NEARDATA struct obj zeroobj; /* for init; &zeroobj used as special value */
@@ -694,6 +689,11 @@ struct instance_globals {
struct mkroom rooms[(MAXNROFROOMS + 1) * 2];
struct mkroom *subrooms;
dlevel_t level; /* level map */
long moves;
long monstermoves; /* moves and monstermoves diverge when player is Fast */
long wailmsg;
struct obj *migrating_objs; /* objects moving to another dungeon level */
struct obj *billobjs; /* objects not yet paid for */
/* dig.c */

View File

@@ -244,7 +244,7 @@ struct obj {
/* Eggs and other food */
#define MAX_EGG_HATCH_TIME 200 /* longest an egg can remain unhatched */
#define stale_egg(egg) \
((monstermoves - (egg)->age) > (2 * MAX_EGG_HATCH_TIME))
((g.monstermoves - (egg)->age) > (2 * MAX_EGG_HATCH_TIME))
#define ofood(o) ((o)->otyp == CORPSE || (o)->otyp == EGG || (o)->otyp == TIN)
#define polyfodder(obj) (ofood(obj) && pm_to_cham((obj)->corpsenm) != NON_PM)
#define mlevelgain(obj) (ofood(obj) && (obj)->corpsenm == PM_WRAITH)