*/
#include "display-player.h"
+#include "player/mimic-info-table.h"
#include "player-personality.h"
-#include "term.h"
+#include "gameterm.h"
#include "status-first-page.h"
#include "player-sex.h"
#include "patron.h"
#include "core.h" // 暫定。後で消す
#include "mutation.h"
#include "dungeon-file.h"
-#include "objectkind.h"
+#include "object/object-kind.h"
#include "view/display-util.h"
#include "view/display-characteristic.h"
#include "view/display-player-stat-info.h"
/*!
+ * @brief クエストフロアで生きている場合、クエスト名をバッファに詰める
+ * @param creature_ptr プレーヤーへの参照ポインタ
+ * @param statmsg メッセージバッファ
+ * @return クエスト内であればTRUE、いなければFALSE
+ */
+static bool decide_death_in_quest(player_type *creature_ptr, char *statmsg)
+{
+ floor_type *floor_ptr = creature_ptr->current_floor_ptr;
+ if (!floor_ptr->inside_quest || !is_fixed_quest_idx(floor_ptr->inside_quest))
+ return FALSE;
+
+ for (int i = 0; i < 10; i++)
+ quest_text[i][0] = '\0';
+
+ quest_text_line = 0;
+ init_flags = INIT_NAME_ONLY;
+ process_dungeon_file(creature_ptr, "q_info.txt", 0, 0, 0, 0);
+ sprintf(statmsg, _("…あなたは現在、 クエスト「%s」を遂行中だ。", "...Now, you are in the quest '%s'."), quest[floor_ptr->inside_quest].name);
+ return TRUE;
+}
+
+
+/*!
* @brief 現在いるフロアを、または死んでいたらどこでどう死んだかをバッファに詰める
* @param creature_ptr プレーヤーへの参照ポインタ
* @param statmsg メッセージバッファ
if (!current_world_ptr->character_dungeon) return;
floor_type *floor_ptr = creature_ptr->current_floor_ptr;
- if (!floor_ptr->dun_level)
+ if (floor_ptr->dun_level == 0)
{
sprintf(statmsg, _("…あなたは現在、 %s にいる。", "...Now, you are in %s."), map_name(creature_ptr));
return;
}
- if (floor_ptr->inside_quest && is_fixed_quest_idx(floor_ptr->inside_quest))
- {
- for (int i = 0; i < 10; i++)
- quest_text[i][0] = '\0';
-
- quest_text_line = 0;
- init_flags = INIT_NAME_ONLY;
- process_dungeon_file(creature_ptr, "q_info.txt", 0, 0, 0, 0);
- sprintf(statmsg, _("…あなたは現在、 クエスト「%s」を遂行中だ。", "...Now, you are in the quest '%s'."), quest[floor_ptr->inside_quest].name);
- return;
- }
+ if (decide_death_in_quest(creature_ptr, statmsg)) return;
#ifdef JP
sprintf(statmsg, "…あなたは現在、 %s の %d 階で探索している。", map_name(creature_ptr), (int)floor_ptr->dun_level);
/*!
- * @brief 今いる場所を表示する
+ * @brief 今いる、または死亡した場所を表示する
* @param statmsg メッセージバッファ
* @return なし
*/