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

Function save_exclusions

src/dungeon.c:2595–2614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2593}
2594
2595void
2596save_exclusions(NHFILE *nhfp)
2597{
2598 struct exclusion_zone *ez;
2599 int nez;
2600
2601 for (nez = 0, ez = sve.exclusion_zones; ez; ez = ez->next, ++nez)
2602 ;
2603
2604 if (update_file(nhfp)) {
2605 Sfo_int(nhfp, &nez, "exclusion_count");
2606 for (ez = sve.exclusion_zones; ez; ez = ez->next) {
2607 Sfo_xint16(nhfp, &ez->zonetype, "exclusion-zonetype");
2608 Sfo_coordxy(nhfp, &ez->lx, "exclusion-lx");
2609 Sfo_coordxy(nhfp, &ez->ly, "exclusion-ly");
2610 Sfo_coordxy(nhfp, &ez->hx, "exclusion-hx");
2611 Sfo_coordxy(nhfp, &ez->hy, "exclusion-hy");
2612 }
2613 }
2614}
2615
2616void
2617load_exclusions(NHFILE *nhfp)

Callers 1

savelev_coreFunction · 0.85

Calls 1

update_fileFunction · 0.85

Tested by

no test coverage detected