separated from done() in order to specify the __noreturn__ attribute */
| 1127 | |
| 1128 | /* separated from done() in order to specify the __noreturn__ attribute */ |
| 1129 | staticfn void |
| 1130 | really_done(int how) |
| 1131 | { |
| 1132 | boolean taken; |
| 1133 | char pbuf[BUFSZ]; |
| 1134 | winid endwin = WIN_ERR; |
| 1135 | boolean bones_ok, have_windows = iflags.window_inited; |
| 1136 | struct obj *corpse = (struct obj *) 0; |
| 1137 | time_t endtime; |
| 1138 | long umoney; |
| 1139 | long tmp; |
| 1140 | |
| 1141 | /* |
| 1142 | * The game is now over... |
| 1143 | */ |
| 1144 | program_state.gameover = 1; |
| 1145 | /* in case of a subsequent panic(), there's no point trying to save */ |
| 1146 | program_state.something_worth_saving = 0; |
| 1147 | #ifdef HANGUPHANDLING |
| 1148 | if (program_state.done_hup) |
| 1149 | done_stopprint++; |
| 1150 | #endif |
| 1151 | /* render vision subsystem inoperative */ |
| 1152 | iflags.vision_inited = FALSE; |
| 1153 | |
| 1154 | /* maybe use up active invent item(s), place thrown/kicked missile, |
| 1155 | deal with ball and chain possibly being temporarily off the map */ |
| 1156 | if (!program_state.panicking) |
| 1157 | done_object_cleanup(); |
| 1158 | /* in case we're panicking; normally cleared by done_object_cleanup() */ |
| 1159 | iflags.perm_invent = FALSE; |
| 1160 | |
| 1161 | /* remember time of death here instead of having bones, rip, and |
| 1162 | topten figure it out separately and possibly getting different |
| 1163 | time or even day if player is slow responding to --More-- */ |
| 1164 | urealtime.finish_time = endtime = getnow(); |
| 1165 | urealtime.realtime += timet_delta(endtime, urealtime.start_timing); |
| 1166 | /* collect these for end of game disclosure (not used during play) */ |
| 1167 | iflags.at_night = night(); |
| 1168 | iflags.at_midnight = midnight(); |
| 1169 | |
| 1170 | /* final achievement tracking; only show blind and nudist if some |
| 1171 | tangible progress has been made; always show ascension last */ |
| 1172 | if (u.uachieved[0] || !flags.beginner) { |
| 1173 | if (u.uroleplay.blind) |
| 1174 | record_achievement(ACH_BLND); /* blind the whole game */ |
| 1175 | if (u.uroleplay.nudist) |
| 1176 | record_achievement(ACH_NUDE); /* never wore armor */ |
| 1177 | } |
| 1178 | if (how == ASCENDED) |
| 1179 | record_achievement(ACH_UWIN); |
| 1180 | |
| 1181 | dump_open_log(endtime); |
| 1182 | /* Sometimes you die on the first move. Life's not fair. |
| 1183 | * On those rare occasions you get hosed immediately, go out |
| 1184 | * smiling... :-) -3. |
| 1185 | */ |
| 1186 | if (svm.moves <= 1 && how < PANICKED && !done_stopprint) |
no test coverage detected