OSDN Git Service

[Refactor] #963 Moved global variable total_friends from cmd-pet.cpp/h to pet-util...
authorHourier <grapefox.whitelucifer.0408@gmail.com>
Wed, 28 Apr 2021 14:57:39 +0000 (23:57 +0900)
committerHourier <grapefox.whitelucifer.0408@gmail.com>
Thu, 29 Apr 2021 09:39:41 +0000 (18:39 +0900)
src/cmd-action/cmd-pet.cpp
src/cmd-action/cmd-pet.h
src/mind/mind-force-trainer.cpp
src/mind/mind-mirror-master.cpp
src/mind/mind-samurai.cpp
src/pet/pet-util.cpp
src/pet/pet-util.h

index c883c07..11abbe7 100644 (file)
@@ -63,8 +63,6 @@
 #include "view/display-messages.h"
 #include "world/world.h"
 
-int total_friends = 0;
-
 /*!
  * @brief ペットを開放するコマンドのメインルーチン
  * @return なし
index 0547fe1..65d92ee 100644 (file)
@@ -1,7 +1,5 @@
 #pragma once
 
-extern int total_friends;
-
 typedef struct player_type player_type;
 bool do_cmd_riding(player_type *creature_ptr, bool force);
 void do_cmd_pet_dismiss(player_type *creature_pt);
index 8064159..1d8117b 100644 (file)
@@ -1,5 +1,4 @@
 #include "mind/mind-force-trainer.h"
-#include "cmd-action/cmd-pet.h"
 #include "core/disturbance.h"
 #include "core/player-redraw-types.h"
 #include "core/player-update-types.h"
@@ -18,6 +17,7 @@
 #include "monster/monster-describer.h"
 #include "monster/monster-status.h"
 #include "monster/monster-update.h"
+#include "pet/pet-util.h"
 #include "player-info/avatar.h"
 #include "player/player-damage.h"
 #include "player/player-status.h"
index f504400..dd68ce9 100644 (file)
@@ -1,5 +1,4 @@
 #include "mind/mind-mirror-master.h"
-#include "cmd-action/cmd-pet.h"
 #include "core/disturbance.h"
 #include "core/player-redraw-types.h"
 #include "core/player-update-types.h"
@@ -21,6 +20,7 @@
 #include "io/screen-util.h"
 #include "mind/mind-magic-resistance.h"
 #include "mind/mind-numbers.h"
+#include "pet/pet-util.h"
 #include "spell-kind/spells-detection.h"
 #include "spell-kind/spells-floor.h"
 #include "spell-kind/spells-launcher.h"
index 37bfe5a..b5b7081 100644 (file)
@@ -7,7 +7,6 @@
 #include "mind/mind-samurai.h"
 #include "action/action-limited.h"
 #include "cmd-action/cmd-attack.h"
-#include "cmd-action/cmd-pet.h"
 #include "core/player-redraw-types.h"
 #include "core/player-update-types.h"
 #include "grid/grid.h"
@@ -24,6 +23,7 @@
 #include "monster/monster-status-setter.h"
 #include "monster/monster-status.h"
 #include "object-enchant/tr-types.h"
+#include "pet/pet-util.h"
 #include "player-attack/player-attack-util.h"
 #include "player-info/avatar.h"
 #include "player/attack-defense-types.h"
index fd2470d..c339b77 100644 (file)
@@ -6,6 +6,8 @@
 #include "system/player-type-definition.h"
 #include "world/world.h"
 
+int total_friends = 0;
+
 /*!
  * @brief プレイヤーの騎乗/下馬処理判定
  * @param g_ptr プレイヤーの移動先マスの構造体参照ポインタ
index db3bcc9..78db99b 100644 (file)
@@ -38,6 +38,8 @@ enum pet_permission {
     PF_TWO_HANDS = 0x0040, /*!< プレイヤーの騎乗フラグ…武器を片手で持つ */
 };
 
+extern int total_friends;
+
 typedef struct grid_type grid_type;
 typedef struct player_type player_type;
 bool can_player_ride_pet(player_type *creature_ptr, grid_type *g_ptr, bool now_riding);