save Plane of Water's air bubbles and Plane of Air's clouds */
| 588 | |
| 589 | /* save Plane of Water's air bubbles and Plane of Air's clouds */ |
| 590 | staticfn void |
| 591 | save_bubbles(NHFILE *nhfp, xint8 lev) |
| 592 | { |
| 593 | xint8 bbubbly; |
| 594 | |
| 595 | /* air bubbles and clouds used to be saved as part of game state |
| 596 | because restoring them needs dungeon data that isn't available |
| 597 | during the first pass of their levels; now that they are part of |
| 598 | the current level instead, we write a zero or non-zero marker |
| 599 | so that restore can determine whether they are present even when |
| 600 | u.uz and ledger_no() aren't available to it yet */ |
| 601 | bbubbly = 0; |
| 602 | if (lev == ledger_no(&water_level) || lev == ledger_no(&air_level)) |
| 603 | bbubbly = lev; /* non-zero */ |
| 604 | if (update_file(nhfp)) |
| 605 | Sfo_xint8(nhfp, &bbubbly, "bubbles-bbubbly"); |
| 606 | #if 0 |
| 607 | if (nhfp->structlevel) |
| 608 | xxwrite(nhfp->fd, (genericptr_t) &bbubbly, sizeof bbubbly); |
| 609 | #endif |
| 610 | |
| 611 | if (bbubbly) |
| 612 | save_waterlevel(nhfp); /* save air bubbles or clouds */ |
| 613 | } |
| 614 | |
| 615 | /* used when saving a level and also when saving dungeon overview data */ |
| 616 | void |
no test coverage detected