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

Function free_luathemes

src/mklev.c:344–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344void
345free_luathemes(enum lua_theme_group theme_group)
346{
347 int i;
348
349 /*
350 * Release which group(s)?
351 * tut_themes => leaving tutorial, free tutorial themes only;
352 * most_themes => entering endgame, free non-endgame themes;
353 * all_themes => end of game, free all themes.
354 */
355 for (i = 0; i < svn.n_dgns; ++i) {
356 if ((theme_group == tut_themes && i != tutorial_dnum)
357 || (theme_group == most_themes && i == astral_level.dnum))
358 continue;
359 if (gl.luathemes[i]) {
360 nhl_done((lua_State *) gl.luathemes[i]);
361 gl.luathemes[i] = (lua_State *) 0;
362 }
363 }
364}
365
366staticfn void
367makerooms(void)

Callers 2

goto_levelFunction · 0.85
free_dungeonsFunction · 0.85

Calls 1

nhl_doneFunction · 0.85

Tested by

no test coverage detected