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

Function restore_light_sources

src/light.c:478–493  ·  view source on GitHub ↗

* Pull in the structures from disk, but don't recalculate the object * pointers. */

Source from the content-addressed store, hash-verified

476 * pointers.
477 */
478void
479restore_light_sources(NHFILE *nhfp)
480{
481 int count = 0;
482 light_source *ls;
483
484 /* restore elements */
485 Sfi_int(nhfp, &count, "lightsource-count");
486
487 while (count-- > 0) {
488 ls = (light_source *) alloc(sizeof(light_source));
489 Sfi_ls_t(nhfp, ls, "lightsource");
490 ls->next = gl.light_base;
491 gl.light_base = ls;
492 }
493}
494
495#ifndef SFCTOOL
496

Callers 2

restgamestateFunction · 0.85
getlevFunction · 0.85

Calls 1

allocFunction · 0.70

Tested by

no test coverage detected