OSDN Git Service

[Refactor] #40467 Separated set_zangband_visited_towns() from extra-loader.c to load...
authorHourier <hourier@users.sourceforge.jp>
Sun, 5 Jul 2020 07:48:18 +0000 (16:48 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 5 Jul 2020 07:48:18 +0000 (16:48 +0900)
src/savedata/extra-loader.c
src/savedata/load-zangband.c
src/savedata/load-zangband.h

index 4ed6482..ad43fd6 100644 (file)
@@ -572,11 +572,9 @@ void rd_extra(player_type *creature_ptr)
 
     if (z_older_than(10, 3, 9))
         creature_ptr->visit = 1L;
-    else if (z_older_than(10, 3, 10)) {
-        s32b tmp32s;
-        rd_s32b(&tmp32s);
-        creature_ptr->visit = 1L;
-    } else {
+    else if (z_older_than(10, 3, 10))
+        set_zangband_visited_towns(creature_ptr);
+    else {
         s32b tmp32s;
         rd_s32b(&tmp32s);
         creature_ptr->visit = (BIT_FLAGS)tmp32s;
index 82c03e9..97b5955 100644 (file)
@@ -210,3 +210,10 @@ void set_zangband_action(player_type *creature_ptr)
     if (tmp8u)
         creature_ptr->action = ACTION_LEARN;
 }
+
+void set_zangband_visited_towns(player_type *creature_ptr)
+{
+    s32b tmp32s;
+    rd_s32b(&tmp32s);
+    creature_ptr->visit = 1L;
+}
index 5bc358d..03b819a 100644 (file)
@@ -18,3 +18,4 @@ void set_zangband_gambling_monsters(int i);
 void set_zangband_special_attack(player_type *creature_ptr);
 void set_zangband_special_defense(player_type *creature_ptr);
 void set_zangband_action(player_type *creature_ptr);
+void set_zangband_visited_towns(player_type *creature_ptr);