OSDN Git Service

[Refactor] #40467 Moved rd_dummy_monsters() from extra-loader.c to dummy-loader.c/h
authorHourier <hourier@users.sourceforge.jp>
Sun, 5 Jul 2020 08:31:27 +0000 (17:31 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 5 Jul 2020 08:31:27 +0000 (17:31 +0900)
src/savedata/dummy-loader.c
src/savedata/dummy-loader.h
src/savedata/extra-loader.c

index 120880d..eb61971 100644 (file)
@@ -1,5 +1,8 @@
 #include "savedata/dummy-loader.h"
+#include "savedata/angband-version-comparer.h"
 #include "savedata/load-util.h"
+#include "savedata/monster-loader.h"
+#include "system/monster-type-definition.h"
 
 /*!
  * @brief ダミーバイトを読み込む
@@ -31,3 +34,22 @@ void rd_dummy2(void)
 
     strip_bytes(12);
 }
+
+/*!
+ * @brief 変愚蛮怒 v1.5.0より大きなバージョンにおいて、ダミーでモンスターを読み込む
+ * @param creature_ptr プレーヤーへの参照ポインタ
+ * @return なし
+ * @details もはや何に使われていたのか不明
+ */
+void rd_dummy_monsters(player_type *creature_ptr)
+{
+    if (h_older_than(1, 5, 0, 2))
+        return;
+
+    s16b tmp16s;
+    rd_s16b(&tmp16s);
+    for (int i = 0; i < tmp16s; i++) {
+        monster_type dummy_mon;
+        rd_monster(creature_ptr, &dummy_mon);
+    }
+}
index e3bcf2b..b833a9e 100644 (file)
@@ -4,3 +4,4 @@
 
 void rd_dummy1(void);
 void rd_dummy2(void);
+void rd_dummy_monsters(player_type *creature_ptr);
index 1fe4c72..bf60653 100644 (file)
 #include "savedata/player-info-loader.h"
 #include "world/world.h"
 
-/*!
- * @brief 変愚蛮怒 v1.5.0より大きなバージョンにおいて、ダミーでモンスターを読み込む
- * @param creature_ptr プレーヤーへの参照ポインタ
- * @return なし
- */
-static void rd_dummy_monsters(player_type *creature_ptr)
-{
-    if (h_older_than(1, 5, 0, 2))
-        return;
-
-    s16b tmp16s;
-    rd_s16b(&tmp16s);
-    for (int i = 0; i < tmp16s; i++) {
-        monster_type dummy_mon;
-        rd_monster(creature_ptr, &dummy_mon);
-    }
-}
-
 static void set_undead_turn_limit(player_type *creature_ptr)
 {
     switch (creature_ptr->start_race) {