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

Function def_char_to_objclass

src/drawing.c:90–99  ·  view source on GitHub ↗

* Convert the given character to an object class. If the character is not * recognized, then MAXOCLASSES is returned. Used in detect.c, drawing.c, * invent.c, o_init.c, objnam.c, options.c, pickup.c, sp_lev.c, and * windows.c. */

Source from the content-addressed store, hash-verified

88 * windows.c.
89 */
90int
91def_char_to_objclass(char ch)
92{
93 int i;
94
95 for (i = 1; i < MAXOCLASSES; i++)
96 if (ch == def_oc_syms[i].sym)
97 break;
98 return i;
99}
100
101/*
102 * Convert a character into a monster class. This returns the _first_

Callers 13

tilenameFunction · 0.85
optfn_pickup_typesFunction · 0.85
change_inv_orderFunction · 0.85
doclassdiscoFunction · 0.85
l_obj_new_readobjnamFunction · 0.85
use_crystal_ballFunction · 0.85
readobjnam_postparse1Function · 0.85
ggetobjFunction · 0.85
dotypeinvFunction · 0.85
choose_classes_menuFunction · 0.85
query_classesFunction · 0.85
create_objectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected