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

Function restlevchn

src/restore.c:129–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127#endif /* SFCTOOL */
128
129staticfn void
130restlevchn(NHFILE *nhfp)
131{
132 int cnt = 0;
133 s_level *tmplev, *x;
134
135 svs.sp_levchn = (s_level *) 0;
136 Sfi_int(nhfp, &cnt, "levchn-lev_count");
137 for (; cnt > 0; cnt--) {
138 tmplev = (s_level *) alloc(sizeof(s_level));
139 Sfi_s_level(nhfp, tmplev, "levchn-s_level");
140
141 if (!svs.sp_levchn)
142 svs.sp_levchn = tmplev;
143 else {
144 for (x = svs.sp_levchn; x->next; x = x->next)
145 ;
146 x->next = tmplev;
147 }
148 tmplev->next = (s_level *) 0;
149 }
150}
151
152staticfn void
153restdamage(NHFILE *nhfp)

Callers 1

restgamestateFunction · 0.85

Calls 1

allocFunction · 0.70

Tested by

no test coverage detected