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

Function dname_to_dnum

src/dungeon.c:283–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281DISABLE_WARNING_UNREACHABLE_CODE
282
283staticfn xint16
284dname_to_dnum(const char *s)
285{
286 xint16 i;
287
288 for (i = 0; i < svn.n_dgns; i++)
289 if (!strcmp(svd.dungeons[i].dname, s))
290 return i;
291
292 panic("Couldn't resolve dungeon number for name \"%s\".", s);
293 /*NOT REACHED*/
294 return (xint16) 0;
295}
296
297RESTORE_WARNING_UNREACHABLE_CODE
298

Callers 2

fixup_level_locationsFunction · 0.85
dungeon_branchFunction · 0.85

Calls 1

panicFunction · 0.50

Tested by

no test coverage detected