| 197 | } |
| 198 | |
| 199 | int |
| 200 | glyph_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 | |
| 233 | staticfn int |
| 234 | glyph_find_core( |
no outgoing calls