| 637 | } |
| 638 | |
| 639 | staticfn void |
| 640 | savedamage(NHFILE *nhfp) |
| 641 | { |
| 642 | struct damage *damageptr, *tmp_dam; |
| 643 | unsigned int xl = 0; |
| 644 | |
| 645 | damageptr = svl.level.damagelist; |
| 646 | for (tmp_dam = damageptr; tmp_dam; tmp_dam = tmp_dam->next) |
| 647 | xl++; |
| 648 | if (update_file(nhfp)) { |
| 649 | Sfo_unsigned(nhfp, &xl, "damage-damage_count"); |
| 650 | } |
| 651 | while (damageptr) { |
| 652 | if (update_file(nhfp)) { |
| 653 | Sfo_damage(nhfp, damageptr, "damage"); |
| 654 | } |
| 655 | tmp_dam = damageptr; |
| 656 | damageptr = damageptr->next; |
| 657 | if (release_data(nhfp)) |
| 658 | free((genericptr_t) tmp_dam); |
| 659 | } |
| 660 | if (release_data(nhfp)) |
| 661 | svl.level.damagelist = 0; |
| 662 | } |
| 663 | |
| 664 | staticfn void |
| 665 | save_stairs(NHFILE *nhfp) |
no test coverage detected