OSDN Git Service

[Refactor] #39970 Separated execute_floor_reset() from execute_recall()
authorHourier <hourier@users.sourceforge.jp>
Sun, 10 May 2020 13:07:25 +0000 (22:07 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 10 May 2020 13:07:25 +0000 (22:07 +0900)
src/world/world-movement-processor.c
src/world/world-movement-processor.h
src/world/world-turn-processor.c

index 8c92d7f..6b338a3 100644 (file)
 #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);
index 093deda..536ec23 100644 (file)
@@ -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);
index 698553a..8040715 100644 (file)
@@ -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);
 }