the #save command */
| 40 | |
| 41 | /* the #save command */ |
| 42 | int |
| 43 | dosave(void) |
| 44 | { |
| 45 | clear_nhwindow(WIN_MESSAGE); |
| 46 | if (y_n("Really save?") == 'n') { |
| 47 | clear_nhwindow(WIN_MESSAGE); |
| 48 | if (gm.multi > 0) |
| 49 | nomul(0); |
| 50 | } else { |
| 51 | clear_nhwindow(WIN_MESSAGE); |
| 52 | pline("Saving..."); |
| 53 | #if defined(HANGUPHANDLING) |
| 54 | program_state.done_hup = 0; |
| 55 | #endif |
| 56 | if (dosave0()) { |
| 57 | program_state.savefile_completed++; |
| 58 | u.uhp = -1; /* universal game's over indicator */ |
| 59 | if (soundprocs.sound_exit_nhsound) |
| 60 | (*soundprocs.sound_exit_nhsound)("dosave"); |
| 61 | |
| 62 | /* make sure they see the Saving message */ |
| 63 | display_nhwindow(WIN_MESSAGE, TRUE); |
| 64 | exit_nhwindows("Be seeing you..."); |
| 65 | nh_terminate(EXIT_SUCCESS); |
| 66 | } else |
| 67 | docrt(); |
| 68 | } |
| 69 | return ECMD_OK; |
| 70 | } |
| 71 | |
| 72 | /* returns 1 if save successful */ |
| 73 | int |
no test coverage detected