minor tidy up of some macro placements
A very small number of relatively recent macro definitions got placed in mondata.h, even though they had a 'struct monst *' argument, rather than a 'struct permonst *' argument. Relocate the macros with the 'struct monst *' argument to include/monst.h, leaving the macros with the 'struct permonst *' argument in include/mondata.h.
This commit is contained in:
@@ -264,5 +264,25 @@ struct monst {
|
||||
#ifdef PMNAME_MACROS
|
||||
#define Mgender(mon) ((mon)->female ? FEMALE : MALE)
|
||||
#endif
|
||||
#define mon_resistancebits(mon) \
|
||||
((mon)->data->mresists | (mon)->mextrinsics | (mon)->mintrinsics)
|
||||
#define resists_fire(mon) \
|
||||
((mon_resistancebits(mon) & MR_FIRE) != 0)
|
||||
#define resists_cold(mon) \
|
||||
((mon_resistancebits(mon) & MR_COLD) != 0)
|
||||
#define resists_sleep(mon) \
|
||||
((mon_resistancebits(mon) & MR_SLEEP) != 0)
|
||||
#define resists_disint(mon) \
|
||||
((mon_resistancebits(mon) & MR_DISINT) != 0)
|
||||
#define resists_elec(mon) \
|
||||
((mon_resistancebits(mon) & MR_ELEC) != 0)
|
||||
#define resists_poison(mon) \
|
||||
((mon_resistancebits(mon) & MR_POISON) != 0)
|
||||
#define resists_acid(mon) \
|
||||
((mon_resistancebits(mon) & MR_ACID) != 0)
|
||||
#define resists_ston(mon) \
|
||||
((mon_resistancebits(mon) & MR_STONE) != 0)
|
||||
#define is_lminion(mon) \
|
||||
(is_minion((mon)->data) && mon_aligntyp(mon) == A_LAWFUL)
|
||||
|
||||
#endif /* MONST_H */
|
||||
|
||||
Reference in New Issue
Block a user