MCPcopy Create free account
hub / github.com/NetHack/NetHack / glyph_to_cmap

Function glyph_to_cmap

src/glyphs.c:199–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199int
200glyph_to_cmap(int glyph)
201{
202 if (glyph == GLYPH_CMAP_STONE_OFF)
203 return S_stone;
204 else if (glyph_is_cmap_main(glyph))
205 return (glyph - GLYPH_CMAP_MAIN_OFF) + S_vwall;
206 else if (glyph_is_cmap_mines(glyph))
207 return (glyph - GLYPH_CMAP_MINES_OFF) + S_vwall;
208 else if (glyph_is_cmap_gehennom(glyph))
209 return (glyph - GLYPH_CMAP_GEH_OFF) + S_vwall;
210 else if (glyph_is_cmap_knox(glyph))
211 return (glyph - GLYPH_CMAP_KNOX_OFF) + S_vwall;
212 else if (glyph_is_cmap_sokoban(glyph))
213 return (glyph - GLYPH_CMAP_SOKO_OFF) + S_vwall;
214 else if (glyph_is_cmap_a(glyph))
215 return (glyph - GLYPH_CMAP_A_OFF) + S_ndoor;
216 else if (glyph_is_cmap_altar(glyph))
217 return S_altar;
218 else if (glyph_is_cmap_b(glyph))
219 return (glyph - GLYPH_CMAP_B_OFF) + S_grave;
220 else if (glyph_is_cmap_c(glyph))
221 return (glyph - GLYPH_CMAP_C_OFF) + S_digbeam;
222 else if (glyph_is_cmap_zap(glyph))
223 return ((glyph - GLYPH_ZAP_OFF) % 4) + S_vbeam;
224 else if (glyph_is_swallow(glyph))
225 return glyph_to_swallow(glyph) + S_sw_tl;
226 else if (glyph_is_explosion(glyph))
227 return glyph_to_explosion(glyph) + S_expl_tl;
228 else
229 return MAXPCHARS; /* MAXPCHARS is legal array index because
230 * of trailing fencepost entry */
231}
232
233staticfn int
234glyph_find_core(

Callers 15

curses_convert_glyphFunction · 0.85
do_positionbarFunction · 0.85
furniture_detectFunction · 0.85
that_is_a_mimicFunction · 0.85
dodownFunction · 0.85
test_moveFunction · 0.85
is_valid_travelptFunction · 0.85
domove_fight_emptyFunction · 0.85
glyph_find_coreFunction · 0.85
wiz_display_macrosFunction · 0.85
show_glyphFunction · 0.85
mkstairsFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_moveFunction · 0.68