MCPcopy Index your code
hub / github.com/NetHack/NetHack / get_table_mapchr_opt

Function get_table_mapchr_opt

src/nhlua.c:255–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255schar
256get_table_mapchr_opt(lua_State *L, const char *name, schar defval)
257{
258 char *ter;
259 xint8 typ;
260
261 ter = get_table_str_opt(L, name, emptystr);
262 if (ter && *ter) {
263 typ = (xint8) check_mapchr(ter);
264 if (typ == INVALID_TYPE)
265 nhl_error(L, "Erroneous map char");
266 } else
267 typ = (xint8) defval;
268 if (ter)
269 free(ter);
270 return typ;
271}
272
273short
274nhl_get_timertype(lua_State *L, int idx)

Callers 3

lspo_level_initFunction · 0.85
lspo_replace_terrainFunction · 0.85
lspo_mazewalkFunction · 0.85

Calls 3

get_table_str_optFunction · 0.85
check_mapchrFunction · 0.85
nhl_errorFunction · 0.85

Tested by

no test coverage detected