From c350195814dda3eb8ed16e565918766ecaa298e0 Mon Sep 17 00:00:00 2001 From: Hourier Date: Sun, 10 May 2020 22:07:25 +0900 Subject: [PATCH] [Refactor] #39970 Separated execute_floor_reset() from execute_recall() --- src/world/world-movement-processor.c | 15 ++++++++++++--- src/world/world-movement-processor.h | 3 ++- src/world/world-turn-processor.c | 3 ++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/world/world-movement-processor.c b/src/world/world-movement-processor.c index 8c92d7f3b..6b338a359 100644 --- a/src/world/world-movement-processor.c +++ b/src/world/world-movement-processor.c @@ -10,13 +10,12 @@ #include "view/display-main-window.h" /*! - * todo 帰還と現実変容の関数を分けること - * @brief 10ゲームターンが進行するごとに帰還や現実変容などの残り時間カウントダウンと発動を処理する。 + * @brief 10ゲームターンが進行するごとに帰還の残り時間カウントダウンと発動を処理する。 * / Handle involuntary movement once every 10 game turns * @param creature_ptr プレーヤーへの参照ポインタ * @return なし */ -void process_world_aux_movement(player_type* creature_ptr) +void execute_recall(player_type* creature_ptr) { floor_type* floor_ptr = creature_ptr->current_floor_ptr; if (creature_ptr->word_recall) { @@ -98,7 +97,17 @@ void process_world_aux_movement(player_type* creature_ptr) sound(SOUND_TPLEVEL); } } +} +/*! + * @brief 10ゲームターンが進行するごとにフロア・リセット/現実変容の残り時間カウントダウンと発動を処理する。 + * / Handle involuntary movement once every 10 game turns + * @param creature_ptr プレーヤーへの参照ポインタ + * @return なし + */ +void execute_floor_reset(player_type* creature_ptr) +{ + floor_type* floor_ptr = creature_ptr->current_floor_ptr; if (creature_ptr->alter_reality) { if (autosave_l && (creature_ptr->alter_reality == 1) && !creature_ptr->phase_out) do_cmd_save_game(creature_ptr, TRUE); diff --git a/src/world/world-movement-processor.h b/src/world/world-movement-processor.h index 093deda8b..536ec2383 100644 --- a/src/world/world-movement-processor.h +++ b/src/world/world-movement-processor.h @@ -1,3 +1,4 @@ #pragma once -void process_world_aux_movement(player_type* creature_ptr); +void execute_recall(player_type* creature_ptr); +void execute_floor_reset(player_type* creature_ptr); diff --git a/src/world/world-turn-processor.c b/src/world/world-turn-processor.c index 698553a3e..804071586 100644 --- a/src/world/world-turn-processor.c +++ b/src/world/world-turn-processor.c @@ -213,5 +213,6 @@ void process_world(player_type* player_ptr) recharge_magic_items(player_ptr); sense_inventory1(player_ptr); sense_inventory2(player_ptr); - process_world_aux_movement(player_ptr); + execute_recall(player_ptr); + execute_floor_reset(player_ptr); } -- 2.11.0