<ClInclude Include="..\..\src\mind\samurai-slaying.h" />\r
<ClInclude Include="..\..\src\mind\surprise-attack.h" />\r
<ClInclude Include="..\..\src\monster\pet-fall-off.h" />\r
+ <ClInclude Include="..\..\src\pet\pet-util.h" />\r
<ClInclude Include="..\..\src\mspell\assign-monster-spell.h" />\r
<ClInclude Include="..\..\src\mspell\mspell-floor.h" />\r
<ClInclude Include="..\..\src\mspell\mspell-particularity.h" />\r
<ClInclude Include="..\..\src\monster\pet-fall-off.h">
<Filter>monster</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\pet\pet-util.h">
+ <Filter>pet</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
<Filter Include="util">
<UniqueIdentifier>{d9907626-9c01-48b8-89da-065f7b8540b5}</UniqueIdentifier>
</Filter>
+ <Filter Include="pet">
+ <UniqueIdentifier>{7c81caa7-dbd8-43f3-8481-9a2ae3967776}</UniqueIdentifier>
+ </Filter>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\angband.rc" />
monster/horror-descriptions.c monster/horror-descriptions.h \
monster/pet-fall-off.c monster/pet-fall-off.h \
\
+ pet/pet-util.h \
+ \
mutation/mutation.c mutation/mutation.h \
mutation/mutation-processor.c mutation/mutation-processor.h \
\
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \
-Iautopick -Ibirth -Icmd -Icombat -Icore -Idungeon -Ieffect -Ifloor \
-Igrid -Iinventory -Iio -Iknowledge -Imarket -Imind -Imonster -Imspell \
- -Imutation -Iobject -Iplayer -Irealm -Iroom -Ispell -Isystem -Iterm -Iutil \
- -Iview -Iwizard -Iworld
+ -Imutation -Iobject -Ipet -Iplayer -Irealm -Iroom -Ispell -Isystem -Iterm \
+ -Iutil -Iview -Iwizard -Iworld
install-exec-hook:
if SET_GID
#include "dungeon/dungeon.h"
#include "dungeon/dungeon-file.h"
#include "object/artifact.h"
-#include "cmd/cmd-pet.h"
+#include "pet/pet-util.h"
#include "system/system-variables.h"
#include "player/player-races-table.h"
#include "market/arena.h"
#include "world/world.h"
#include "effect/spells-effect-util.h"
#include "cmd/cmd-attack.h"
+#include "pet/pet-util.h"
int total_friends = 0;
#include "grid/grid.h"
-extern bool do_cmd_riding(player_type *creature_ptr, bool force);
-extern void do_cmd_pet_dismiss(player_type *creature_pt);
-extern void do_cmd_pet(player_type *creature_ptr);
-extern bool player_can_ride_aux(player_type *creature_ptr, grid_type *g_ptr, bool now_riding);
-
extern int total_friends;
-/*
- * ペットに関するコマンド群 / Pet Commands
- */
-#define PET_DISMISS 1 /*!< ペットに関するコマンド: ペットを離す */
-#define PET_TARGET 2 /*!< ペットに関するコマンド: ペットのターゲットを指定 */
-#define PET_STAY_CLOSE 3 /*!< ペットに関するコマンド: 近くにいろ */
-#define PET_FOLLOW_ME 4 /*!< ペットに関するコマンド: ついて来い */
-#define PET_SEEK_AND_DESTROY 5 /*!< ペットに関するコマンド: 敵を見つけて倒せ */
-#define PET_ALLOW_SPACE 6 /*!< ペットに関するコマンド: 少し離れていろ */
-#define PET_STAY_AWAY 7 /*!< ペットに関するコマンド: 離れていろ */
-#define PET_OPEN_DOORS 8 /*!< ペットに関するコマンド: ドア解放の許可 */
-#define PET_TAKE_ITEMS 9 /*!< ペットに関するコマンド: アイテム取得の許可 */
-#define PET_TELEPORT 10 /*!< ペットに関するコマンド: テレポートの許可 */
-#define PET_ATTACK_SPELL 11 /*!< ペットに関するコマンド: 攻撃魔法の許可 */
-#define PET_SUMMON_SPELL 12 /*!< ペットに関するコマンド: 召喚魔法の許可 */
-#define PET_BALL_SPELL 13 /*!< ペットに関するコマンド: プレイヤーを魔法に巻き込む許可 */
-#define PET_RIDING 14 /*!< ペットに関するコマンド: ペットに乗る */
-#define PET_NAME 15 /*!< ペットに関するコマンド: ペットに名前をつける */
-#define PET_TWO_HANDS 16 /*!< ペットに関するコマンド: 騎乗中に両手で武器を使うかどうか */
-
- /*
- * Follow distances
- */
-#define PET_CLOSE_DIST 1 /*!<ペットの行動範囲…近くにいろ */
-#define PET_FOLLOW_DIST 6 /*!<ペットの行動範囲…ついて来い */
-#define PET_SEEK_DIST 10 /*!<ペットの行動範囲…特になし? */
-#define PET_DESTROY_DIST 255 /*!<ペットの行動範囲…敵を見つけて倒せ */
-#define PET_SPACE_DIST (-10) /*!<ペットの行動範囲…少し離れていろ */
-#define PET_AWAY_DIST (-25) /*!<ペットの行動範囲…離れていろ */
-
-#define PF_OPEN_DOORS 0x0001 /*!< ペットの行動許可…ドアを開けてよい */
-#define PF_PICKUP_ITEMS 0x0002 /*!< ペットの行動許可…アイテムを拾ってよい */
-#define PF_TELEPORT 0x0004 /*!< ペットの行動許可…テレポート魔法を使ってよい */
-#define PF_ATTACK_SPELL 0x0008 /*!< ペットの行動許可…攻撃魔法を使ってよい */
-#define PF_SUMMON_SPELL 0x0010 /*!< ペットの行動許可…召喚魔法を使ってよい */
-#define PF_BALL_SPELL 0x0020 /*!< ペットの行動許可…ボール魔法でプレイヤーを巻き込んでよい */
-#define PF_TWO_HANDS 0x0040 /*!< プレイヤーの騎乗フラグ…武器を片手で持つ */
+bool do_cmd_riding(player_type *creature_ptr, bool force);
+void do_cmd_pet_dismiss(player_type *creature_pt);
+void do_cmd_pet(player_type *creature_ptr);
+bool player_can_ride_aux(player_type *creature_ptr, grid_type *g_ptr, bool now_riding);
#include "monster/monster-status.h"
#include "object/object2.h"
#include "object/object-hook.h"
-#include "cmd-pet.h"
+#include "pet/pet-util.h"
#include "cmd-basic.h"
#include "io/uid-checker.h"
#include "io/files-util.h"
#include "floor/floor-town.h"
#include "dungeon/dungeon.h"
#include "store/store.h"
-#include "cmd/cmd-pet.h"
+#include "pet/pet-util.h"
#include "monster/monster-status.h"
#include "core/sort.h"
#include "dungeon/quest.h"
#include "floor/floor-town.h"
#include "grid/grid.h"
-#include "cmd-pet.h"
+#include "pet/pet-util.h"
#include "dungeon/dungeon-file.h"
#include "io/uid-checker.h"
#include "io/files-util.h"
#include "monster/monster-sweep-grid.h"
#include "monster/monster-util.h"
#include "monster/monster-status.h"
-#include "cmd/cmd-pet.h"
+#include "pet/pet-util.h"
/*!
* @brief ペットが敵に接近するための方向を決定する
#include "monster/monster-attack.h"
#include "monster/monster-object.h"
#include "monster/monster-update.h"
-#include "cmd/cmd-pet.h"
+#include "pet/pet-util.h"
#include "monster/creature.h"
#include "io/files-util.h"
#include "monster/monster-status.h"
#include "monster/pet-fall-off.h"
+#include "cmd/cmd-pet.h" // 暫定、player_can_ride_aux() を移動する
#include "core/stuff-handler.h"
-#include "cmd/cmd-pet.h" // 暫定、定数を見ているだけなのでutilへの分離を検討する.
#include "floor/floor.h"
#include "io/targeting.h"
+#include "pet/pet-util.h"
#include "player/player-damage.h"
#include "player/player-move.h"
#include "player/player-skill.h"
#include "util/util.h"
#include "main/sound-definitions-table.h"
-#include "cmd-pet.h"
+#include "pet/pet-util.h"
#include "effect/effect-characteristics.h"
#include "grid/grid.h"
#include "dungeon/quest.h"
--- /dev/null
+#pragma once
+
+typedef enum pet_command {
+ PET_DISMISS = 1, /*!< ペットに関するコマンド: ペットを離す */
+ PET_TARGET = 2, /*!< ペットに関するコマンド: ペットのターゲットを指定 */
+ PET_STAY_CLOSE = 3, /*!< ペットに関するコマンド: 近くにいろ */
+ PET_FOLLOW_ME = 4, /*!< ペットに関するコマンド: ついて来い */
+ PET_SEEK_AND_DESTROY = 5, /*!< ペットに関するコマンド: 敵を見つけて倒せ */
+ PET_ALLOW_SPACE = 6, /*!< ペットに関するコマンド: 少し離れていろ */
+ PET_STAY_AWAY = 7, /*!< ペットに関するコマンド: 離れていろ */
+ PET_OPEN_DOORS = 8, /*!< ペットに関するコマンド: ドア解放の許可 */
+ PET_TAKE_ITEMS = 9, /*!< ペットに関するコマンド: アイテム取得の許可 */
+ PET_TELEPORT = 10, /*!< ペットに関するコマンド: テレポートの許可 */
+ PET_ATTACK_SPELL = 11, /*!< ペットに関するコマンド: 攻撃魔法の許可 */
+ PET_SUMMON_SPELL = 12, /*!< ペットに関するコマンド: 召喚魔法の許可 */
+ PET_BALL_SPELL = 13, /*!< ペットに関するコマンド: プレイヤーを魔法に巻き込む許可 */
+ PET_RIDING = 14, /*!< ペットに関するコマンド: ペットに乗る */
+ PET_NAME = 15, /*!< ペットに関するコマンド: ペットに名前をつける */
+ PET_TWO_HANDS = 16, /*!< ペットに関するコマンド: 騎乗中に両手で武器を使うかどうか */
+} pet_command;
+
+typedef enum pet_follow_distance {
+ PET_CLOSE_DIST = 1, /*!<ペットの行動範囲…近くにいろ */
+ PET_FOLLOW_DIST = 6, /*!<ペットの行動範囲…ついて来い */
+ PET_SEEK_DIST = 10, /*!<ペットの行動範囲…特になし? */
+ PET_DESTROY_DIST = 255, /*!<ペットの行動範囲…敵を見つけて倒せ */
+ PET_SPACE_DIST = -10, /*!<ペットの行動範囲…少し離れていろ */
+ PET_AWAY_DIST = -25, /*!<ペットの行動範囲…離れていろ */
+} pet_follow_distance;
+
+typedef enum pet_permission {
+ PF_OPEN_DOORS = 0x0001, /*!< ペットの行動許可…ドアを開けてよい */
+ PF_PICKUP_ITEMS = 0x0002, /*!< ペットの行動許可…アイテムを拾ってよい */
+ PF_TELEPORT = 0x0004, /*!< ペットの行動許可…テレポート魔法を使ってよい */
+ PF_ATTACK_SPELL = 0x0008, /*!< ペットの行動許可…攻撃魔法を使ってよい */
+ PF_SUMMON_SPELL = 0x0010, /*!< ペットの行動許可…召喚魔法を使ってよい */
+ PF_BALL_SPELL = 0x0020, /*!< ペットの行動許可…ボール魔法でプレイヤーを巻き込んでよい */
+ PF_TWO_HANDS = 0x0040, /*!< プレイヤーの騎乗フラグ…武器を片手で持つ */
+} pet_permission;
#include "realm/realm-hex.h"
#include "realm/realm-song.h"
#include "cmd/cmd-pet.h"
+#include "pet/pet-util.h"
#include "cmd/cmd-spell.h"
#include "dungeon/dungeon.h"
#include "object/object-kind.h"
#include "object/artifact.h"
#include "io/write-diary.h"
#include "cmd/cmd-pet.h"
+#include "pet/pet-util.h"
#include "monster/pet-fall-off.h"
#include "cmd/cmd-dump.h"
#include "effect/effect-characteristics.h"