glyph_to_cmap() becomes function instead of macro

Also adds swallow and explosion glyphs to glyph_to_cmap()

References:
https://github.com/NetHack/NetHack/pull/1022 by argrath
https://github.com/NetHack/NetHack/pull/1277 by ars3niy

Closes #1277
Closes #1022
This commit is contained in:
nhmall
2024-09-14 10:11:28 -04:00
parent 04433aead8
commit cbb32ac64a
4 changed files with 5 additions and 5 deletions

View File

@@ -723,10 +723,6 @@ enum glyph_offsets {
#define glyph_is_cmap(glyph) \
((glyph) >= GLYPH_CMAP_STONE_OFF \
&& (glyph) < (GLYPH_CMAP_C_OFF + ((S_goodpos - S_digbeam) + 1)))
/* final MAXPCHARS is legal array index because of trailing fencepost entry */
int glyph_to_cmap(int glpyh);
#define glyph_to_swallow(glyph) \
(glyph_is_swallow(glyph) ? (((glyph) - GLYPH_SWALLOW_OFF) & 0x7) : 0)
#define glyph_to_explosion(glyph) \