diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 4092c2326..2d9234ed3 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -2873,6 +2873,7 @@ remove a null sobj check from gold_detect that was situated after check for valid indexes of def_monsyms[] and def_oc_syms[] in choose_classes_menu() (pr #1179 by argrath) split damage from acid potion into separate function (pr #1195 by argrath) +add swallow and explosion glyphs to glyph_to_cmap() (pr #1277 by ars3niy) Code Cleanup and Reorganization @@ -3005,4 +3006,5 @@ remove TEXTCOLOR build option relocate general-purpose function choose_classes_menu(), from options.c to windows.c remove register from variable declarations +make glyph_to_cmap() a function instead of a macro diff --git a/include/display.h b/include/display.h index e189d5c64..1ec34f46d 100644 --- a/include/display.h +++ b/include/display.h @@ -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) \ diff --git a/include/extern.h b/include/extern.h index 0323963dd..152dfaee6 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1124,6 +1124,7 @@ extern void purge_all_custom_entries(void); extern void dump_glyphids(void); extern void clear_all_glyphmap_colors(void); extern void reset_customcolors(void); +extern int glyph_to_cmap(int); /* ### hack.c ### */ diff --git a/src/glyphs.c b/src/glyphs.c index c197b1bd8..5f7266701 100644 --- a/src/glyphs.c +++ b/src/glyphs.c @@ -221,7 +221,8 @@ glyph_to_cmap(int glyph) else if (glyph_is_explosion(glyph)) return glyph_to_explosion(glyph) + S_expl_tl; else - return MAXPCHARS; + return MAXPCHARS; /* MAXPCHARS is legal array index because + of trailing fencepost entry */ } staticfn int