| 952 | #endif /* !SFCTOOL */ |
| 953 | |
| 954 | staticfn void |
| 955 | rest_stairs(NHFILE *nhfp) |
| 956 | { |
| 957 | int buflen = 0; |
| 958 | stairway stway = UNDEFINED_VALUES; |
| 959 | #ifndef SFCTOOL |
| 960 | stairway *newst; |
| 961 | #endif |
| 962 | |
| 963 | #ifndef SFCTOOL |
| 964 | stairway_free_all(); |
| 965 | #endif |
| 966 | while (1) { |
| 967 | Sfi_int(nhfp, &buflen, "stairs-staircount"); |
| 968 | if (buflen == -1) |
| 969 | break; |
| 970 | |
| 971 | Sfi_stairway(nhfp, &stway, "stairs-stairway"); |
| 972 | if (program_state.restoring != REST_GSTATE |
| 973 | && stway.tolev.dnum == u.uz.dnum) { |
| 974 | /* stairway dlevel is relative, make it absolute */ |
| 975 | stway.tolev.dlevel += u.uz.dlevel; |
| 976 | } |
| 977 | #ifndef SFCTOOL |
| 978 | stairway_add(stway.sx, stway.sy, stway.up, stway.isladder, |
| 979 | &(stway.tolev)); |
| 980 | newst = stairway_at(stway.sx, stway.sy); |
| 981 | if (newst) |
| 982 | newst->u_traversed = stway.u_traversed; |
| 983 | #endif |
| 984 | } |
| 985 | } |
| 986 | |
| 987 | void |
| 988 | restcemetery(NHFILE *nhfp, struct cemetery **cemeteryaddr) |
no test coverage detected