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

Function def_char_to_monclass

src/drawing.c:107–116  ·  view source on GitHub ↗

* Convert a character into a monster class. This returns the _first_ * match made. If there are no matches, return MAXMCLASSES. * Used in detect.c, drawing.c, mondata.c, options.c, pickup.c, * sp_lev.c, and windows.c. */

Source from the content-addressed store, hash-verified

105 * sp_lev.c, and windows.c.
106 */
107int
108def_char_to_monclass(char ch)
109{
110 int i;
111
112 for (i = 1; i < MAXMCLASSES; i++)
113 if (ch == def_monsyms[i].sym)
114 break;
115 return i;
116}
117
118/* does 'ch' represent a furniture character? returns index into defsyms[] */
119int

Callers 6

optfn_boulderFunction · 0.85
name_to_monclassFunction · 0.85
use_crystal_ballFunction · 0.85
choose_classes_menuFunction · 0.85
create_monsterFunction · 0.85
lspo_objectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected