OSDN Git Service

[Refactor] 分かりやすさのため、select_debugging_dungeon() とselect_debugging_floor() を逆にした
authorHourier <66951241+Hourier@users.noreply.github.com>
Sat, 29 Oct 2022 09:34:20 +0000 (18:34 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Sat, 29 Oct 2022 09:34:20 +0000 (18:34 +0900)
src/wizard/wizard-special-process.cpp

index 3df1d60..8caf38d 100644 (file)
@@ -534,6 +534,36 @@ void wiz_create_feature(PlayerType *player_ptr)
     player_ptr->update |= PU_FLOW;
 }
 
+/*!
+ * @brief デバッグ帰還のダンジョンを選ぶ
+ * @param player_ptr プレイヤーへの参照ポインタ
+ * @details 範囲外の値が選択されたら再入力を促す
+ */
+static bool select_debugging_dungeon(PlayerType *player_ptr, DUNGEON_IDX *dungeon_type)
+{
+    if (command_arg > 0) {
+        return true;
+    }
+
+    while (true) {
+        char ppp[80];
+        char tmp_val[160];
+        sprintf(ppp, "Jump which dungeon : ");
+        sprintf(tmp_val, "%d", player_ptr->dungeon_idx);
+        if (!get_string(ppp, tmp_val, 2)) {
+            return false;
+        }
+
+        *dungeon_type = (DUNGEON_IDX)atoi(tmp_val);
+        if ((*dungeon_type < DUNGEON_ANGBAND) || (*dungeon_type > DUNGEON_MAX)) {
+            msg_print("Invalid dungeon. Please re-input.");
+            continue;
+        }
+
+        return true;
+    }
+}
+
 /*
  * @brief 選択したダンジョンの任意フロアを選択する
  * @param player_ptr プレイヤーへの参照ポインタ
@@ -581,36 +611,6 @@ static bool select_debugging_floor(PlayerType *player_ptr, int dungeon_type)
 }
 
 /*!
- * @brief デバッグ帰還のダンジョンを選ぶ
- * @param player_ptr プレイヤーへの参照ポインタ
- * @details 範囲外の値が選択されたら再入力を促す
- */
-static bool select_debugging_dungeon(PlayerType *player_ptr, DUNGEON_IDX *dungeon_type)
-{
-    if (command_arg > 0) {
-        return true;
-    }
-
-    while (true) {
-        char ppp[80];
-        char tmp_val[160];
-        sprintf(ppp, "Jump which dungeon : ");
-        sprintf(tmp_val, "%d", player_ptr->dungeon_idx);
-        if (!get_string(ppp, tmp_val, 2)) {
-            return false;
-        }
-
-        *dungeon_type = (DUNGEON_IDX)atoi(tmp_val);
-        if ((*dungeon_type < DUNGEON_ANGBAND) || (*dungeon_type > DUNGEON_MAX)) {
-            msg_print("Invalid dungeon. Please re-input.");
-            continue;
-        }
-
-        return true;
-    }
-}
-
-/*!
  * @brief 任意のダンジョン及び階層に飛ぶ
  * Go to any level
  */