context to g.context
This commit is contained in:
@@ -142,6 +142,4 @@ struct context_info {
|
||||
struct novel_tracking novel;
|
||||
};
|
||||
|
||||
extern NEARDATA struct context_info context;
|
||||
|
||||
#endif /* CONTEXT_H */
|
||||
|
||||
@@ -698,6 +698,7 @@ struct instance_globals {
|
||||
#endif /* MICRO || WIN32 */
|
||||
struct monst youmonst;
|
||||
struct obj *invent;
|
||||
struct context_info context;
|
||||
|
||||
|
||||
/* dig.c */
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
#define mon_warning(mon) \
|
||||
(Warning && !(mon)->mpeaceful && (distu((mon)->mx, (mon)->my) < 100) \
|
||||
&& (((int) ((mon)->m_lev / 4)) >= context.warnlevel))
|
||||
&& (((int) ((mon)->m_lev / 4)) >= g.context.warnlevel))
|
||||
|
||||
/*
|
||||
* mon_visible()
|
||||
|
||||
@@ -246,12 +246,12 @@ struct sortloot_item {
|
||||
typedef struct sortloot_item Loot;
|
||||
|
||||
#define MATCH_WARN_OF_MON(mon) \
|
||||
(Warn_of_mon && ((context.warntype.obj \
|
||||
&& (context.warntype.obj & (mon)->data->mflags2)) \
|
||||
|| (context.warntype.polyd \
|
||||
&& (context.warntype.polyd & (mon)->data->mflags2)) \
|
||||
|| (context.warntype.species \
|
||||
&& (context.warntype.species == (mon)->data))))
|
||||
(Warn_of_mon && ((g.context.warntype.obj \
|
||||
&& (g.context.warntype.obj & (mon)->data->mflags2)) \
|
||||
|| (g.context.warntype.polyd \
|
||||
&& (g.context.warntype.polyd & (mon)->data->mflags2)) \
|
||||
|| (g.context.warntype.species \
|
||||
&& (g.context.warntype.species == (mon)->data))))
|
||||
|
||||
#include "trap.h"
|
||||
#include "flag.h"
|
||||
|
||||
@@ -161,7 +161,7 @@ struct monst {
|
||||
#define MON_NOWEP(mon) ((mon)->mw = (struct obj *) 0)
|
||||
|
||||
#define DEADMONSTER(mon) ((mon)->mhp < 1)
|
||||
#define is_starting_pet(mon) ((mon)->m_id == context.startingpet_mid)
|
||||
#define is_starting_pet(mon) ((mon)->m_id == g.context.startingpet_mid)
|
||||
#define is_vampshifter(mon) \
|
||||
((mon)->cham == PM_VAMPIRE || (mon)->cham == PM_VAMPIRE_LORD \
|
||||
|| (mon)->cham == PM_VLAD_THE_IMPALER)
|
||||
|
||||
Reference in New Issue
Block a user