-/* NetHack 3.7 display.h $NHDT-Date: 1641940939 2022/01/11 22:42:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.64 $ */
+/* NetHack 3.7 display.h $NHDT-Date: 1651099381 2022/04/27 22:43:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.67 $ */
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
/* and Dave Cohrs, 1990. */
/* NetHack may be freely redistributed. See license for details. */
: ((cmap_idx) <= S_trwall) ? cmap_walls_to_glyph(cmap_idx) \
: ((cmap_idx) < S_altar) ? cmap_a_to_glyph(cmap_idx) \
: ((cmap_idx) == S_altar) ? altar_to_glyph(AM_NEUTRAL) \
- : ((cmap_idx) <= S_vibrating_square) ? cmap_b_to_glyph(cmap_idx) \
+ : ((cmap_idx) < S_arrow_trap + MAXTCHARS) \
+ ? cmap_b_to_glyph(cmap_idx) \
: ((cmap_idx) <= S_goodpos) ? cmap_c_to_glyph(cmap_idx) \
: NO_GLYPH)
(glyph) < (5 + GLYPH_ALTAR_OFF))
#define glyph_is_cmap_b(glyph) \
((glyph) >= GLYPH_CMAP_B_OFF && \
- ((glyph) < (((S_vibrating_square - S_grave) + 1) + GLYPH_CMAP_B_OFF)))
+ ((glyph) < ((S_arrow_trap + MAXTCHARS - S_grave) + GLYPH_CMAP_B_OFF)))
#define glyph_is_cmap_zap(glyph) \
((glyph) >= GLYPH_ZAP_OFF && (glyph) < ((NUM_ZAP << 2) + GLYPH_ZAP_OFF))
#define glyph_is_cmap_c(glyph) \
-/* NetHack 3.7 rm.h $NHDT-Date: 1599434249 2020/09/06 23:17:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.84 $ */
+/* NetHack 3.7 rm.h $NHDT-Date: 1651099392 2022/04/27 22:43:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.94 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2017. */
/* NetHack may be freely redistributed. See license for details. */
* Convert a defsym number into a trap number.
* Assumes that arrow trap will always be the first trap.
*/
-#define trap_to_defsym(t) (S_arrow_trap + (t) -1)
-#define defsym_to_trap(d) ((d) -S_arrow_trap + 1)
+#define trap_to_defsym(t) (S_arrow_trap + (t) - 1)
+#define defsym_to_trap(d) ((d) - S_arrow_trap + 1)
#define OBJ_AT(x, y) (g.level.objects[x][y] != (struct obj *) 0)
/*