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

Function load_exclusions

src/dungeon.c:2616–2634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2614}
2615
2616void
2617load_exclusions(NHFILE *nhfp)
2618{
2619 struct exclusion_zone *ez;
2620 int nez = 0;
2621
2622 Sfi_int(nhfp, &nez, "exclusion_count");
2623
2624 while (nez-- > 0) {
2625 ez = (struct exclusion_zone *) alloc(sizeof *ez);
2626 Sfi_xint16(nhfp, &ez->zonetype, "exclusion-zonetype");
2627 Sfi_coordxy(nhfp, &ez->lx, "exclusion-lx");
2628 Sfi_coordxy(nhfp, &ez->ly, "exclusion-ly");
2629 Sfi_coordxy(nhfp, &ez->hx, "exclusion-hx");
2630 Sfi_coordxy(nhfp, &ez->hy, "exclusion-hy");
2631 ez->next = sve.exclusion_zones;
2632 sve.exclusion_zones = ez;
2633 }
2634}
2635
2636#ifndef SFCTOOL
2637

Callers 1

getlevFunction · 0.85

Calls 1

allocFunction · 0.70

Tested by

no test coverage detected