2 * @brief 異常発生時のゲーム緊急終了処理
6 * Windowsのコードからは呼ばれない。よってVSからは見えない
9 #include "exit-panic.h"
11 #include "player-move.h"
12 #include "signal-handlers.h"
16 * @brief Handle abrupt death of the visual system
17 * @param creature_ptr プレーヤーへの参照ポインタ
20 * This routine is called only in very rare situations, and only
21 * by certain visual systems, when they experience fatal errors.
23 void exit_game_panic(player_type *creature_ptr)
25 if (!current_world_ptr->character_generated || current_world_ptr->character_saved)
26 quit(_("緊急事態", "panic"));
30 disturb(creature_ptr, TRUE, TRUE);
31 if (creature_ptr->chp < 0) creature_ptr->is_dead = FALSE;
33 creature_ptr->panic_save = 1;
34 signals_ignore_tstp();
35 (void)strcpy(creature_ptr->died_from, _("(緊急セーブ)", "(panic save)"));
36 if (!save_player(creature_ptr)) quit(_("緊急セーブ失敗!", "panic save failed!"));
37 quit(_("緊急セーブ成功!", "panic save succeeded!"));