Lines Matching refs:glyph

40  * vicinity, and a glyph representing the warning level is displayed.
178 #define DISP_FLASH (-2) /* Clean up each glyph before displaying new one. */
180 #define DISP_CHANGE (-4) /* Change glyph. */
214 * A glyph is an abstraction that represents a _unique_ monster, object,
219 * [print_glyph()] can produce something different for each type of glyph.
259 * The following are offsets used to convert to and from a glyph.
312 /* The hero's glyph when seen as a monster.
321 * Change the given glyph into it's given type. Note:
325 * 3) If handed a glyph out of range for the type, these functions
332 #define glyph_to_mon(glyph) \
333 (glyph_is_normal_monster(glyph) ? ((glyph)-GLYPH_MON_OFF) : \
334 glyph_is_pet(glyph) ? ((glyph)-GLYPH_PET_OFF) : \
335 glyph_is_detected_monster(glyph) ? ((glyph)-GLYPH_DETECT_OFF) : \
336 glyph_is_ridden_monster(glyph) ? ((glyph)-GLYPH_RIDDEN_OFF) : \
338 #define glyph_to_obj(glyph) \
339 (glyph_is_body(glyph) ? CORPSE : \
340 glyph_is_normal_object(glyph) ? ((glyph)-GLYPH_OBJ_OFF) : \
342 #define glyph_to_trap(glyph) \
343 (glyph_is_trap(glyph) ? \
344 ((int) defsym_to_trap((glyph) - GLYPH_CMAP_OFF)) : \
346 #define glyph_to_cmap(glyph) \
347 (glyph_is_cmap(glyph) ? ((glyph) - GLYPH_CMAP_OFF) : \
349 #define glyph_to_swallow(glyph) \
350 (glyph_is_swallow(glyph) ? (((glyph) - GLYPH_SWALLOW_OFF) & 0x7) : \
352 #define glyph_to_warning(glyph) \
353 (glyph_is_warning(glyph) ? ((glyph) - GLYPH_WARNING_OFF) : \
357 * Return true if the given glyph is what we want. Note that bodies are
360 #define glyph_is_monster(glyph) \
361 (glyph_is_normal_monster(glyph) \
362 || glyph_is_pet(glyph) \
363 || glyph_is_ridden_monster(glyph) \
364 || glyph_is_detected_monster(glyph))
365 #define glyph_is_normal_monster(glyph) \
366 ((glyph) >= GLYPH_MON_OFF && (glyph) < (GLYPH_MON_OFF+NUMMONS))
367 #define glyph_is_pet(glyph) \
368 ((glyph) >= GLYPH_PET_OFF && (glyph) < (GLYPH_PET_OFF+NUMMONS))
369 #define glyph_is_body(glyph) \
370 ((glyph) >= GLYPH_BODY_OFF && (glyph) < (GLYPH_BODY_OFF+NUMMONS))
371 #define glyph_is_ridden_monster(glyph) \
372 ((glyph) >= GLYPH_RIDDEN_OFF && (glyph) < (GLYPH_RIDDEN_OFF+NUMMONS))
373 #define glyph_is_detected_monster(glyph) \
374 ((glyph) >= GLYPH_DETECT_OFF && (glyph) < (GLYPH_DETECT_OFF+NUMMONS))
375 #define glyph_is_invisible(glyph) ((glyph) == GLYPH_INVISIBLE)
376 #define glyph_is_normal_object(glyph) \
377 ((glyph) >= GLYPH_OBJ_OFF && (glyph) < (GLYPH_OBJ_OFF+NUM_OBJECTS))
378 #define glyph_is_object(glyph) \
379 (glyph_is_normal_object(glyph) \
380 || glyph_is_body(glyph))
381 #define glyph_is_trap(glyph) \
382 ((glyph) >= (GLYPH_CMAP_OFF+trap_to_defsym(1)) && \
383 (glyph) < (GLYPH_CMAP_OFF+trap_to_defsym(1)+TRAPNUM))
384 #define glyph_is_cmap(glyph) \
385 ((glyph) >= GLYPH_CMAP_OFF && (glyph) < (GLYPH_CMAP_OFF+MAXPCHARS))
386 #define glyph_is_swallow(glyph) \
387 ((glyph) >= GLYPH_SWALLOW_OFF && (glyph) < (GLYPH_SWALLOW_OFF+(NUMMONS << 3)))
388 #define glyph_is_warning(glyph) \
389 ((glyph) >= GLYPH_WARNING_OFF && (glyph) < (GLYPH_WARNING_OFF + WARNCOUNT))