Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2019-04-22 14:36:58 -04:00
30 changed files with 126 additions and 114 deletions

View File

@@ -215,13 +215,13 @@
#define display_self() \
show_glyph(u.ux, u.uy, \
maybe_display_usteed((g.youmonst.m_ap_type == M_AP_NOTHING) \
maybe_display_usteed((U_AP_TYPE == M_AP_NOTHING) \
? hero_glyph \
: (g.youmonst.m_ap_type == M_AP_FURNITURE) \
: (U_AP_TYPE == M_AP_FURNITURE) \
? cmap_to_glyph(g.youmonst.mappearance) \
: (g.youmonst.m_ap_type == M_AP_OBJECT) \
: (U_AP_TYPE == M_AP_OBJECT) \
? objnum_to_glyph(g.youmonst.mappearance) \
/* else M_AP_MONSTER */ \
/* else U_AP_TYPE == M_AP_MONSTER */ \
: monnum_to_glyph(g.youmonst.mappearance)))
/*

View File

@@ -50,6 +50,13 @@ enum m_ap_types {
M_AP_MONSTER = 3 /* a monster; mostly used for cloned Wizard */
};
#define M_AP_TYPMASK 0x7
#define M_AP_F_DKNOWN 0x8
#define U_AP_TYPE (g.youmonst.m_ap_type & M_AP_TYPMASK)
#define U_AP_FLAG (g.youmonst.m_ap_type & ~M_AP_TYPMASK)
#define M_AP_TYPE(m) ((m)->m_ap_type & M_AP_TYPMASK)
#define M_AP_FLAG(m) ((m)->m_ap_type & ~M_AP_TYPMASK)
struct monst {
struct monst *nmon;
struct permonst *data;
@@ -170,15 +177,15 @@ struct monst {
/* mimic appearances that block vision/light */
#define is_lightblocker_mappear(mon) \
(is_obj_mappear(mon, BOULDER) \
|| ((mon)->m_ap_type == M_AP_FURNITURE \
|| (M_AP_TYPE(mon) == M_AP_FURNITURE \
&& ((mon)->mappearance == S_hcdoor \
|| (mon)->mappearance == S_vcdoor \
|| (mon)->mappearance < S_ndoor /* = walls */ \
|| (mon)->mappearance == S_tree)))
#define is_door_mappear(mon) ((mon)->m_ap_type == M_AP_FURNITURE \
#define is_door_mappear(mon) (M_AP_TYPE(mon) == M_AP_FURNITURE \
&& ((mon)->mappearance == S_hcdoor \
|| (mon)->mappearance == S_vcdoor))
#define is_obj_mappear(mon,otyp) ((mon)->m_ap_type == M_AP_OBJECT \
#define is_obj_mappear(mon,otyp) (M_AP_TYPE(mon) == M_AP_OBJECT \
&& (mon)->mappearance == (otyp))
#endif /* MONST_H */