From 26e8c65ba99a2588a6a07763d40be6f38e8501f6 Mon Sep 17 00:00:00 2001 From: Hourier Date: Mon, 1 Jun 2020 22:13:52 +0900 Subject: [PATCH] [Refactor] #40399 Changed object_is_aware(), object_is_tried() and object_is_known() from macro function to normal function --- src/autopick/autopick-destroyer.c | 13 ++- src/autopick/autopick-destroyer.h | 2 + src/autopick/autopick-entry.c | 10 +-- src/autopick/autopick-entry.h | 3 + src/autopick/autopick-matcher.c | 9 +- src/autopick/autopick-matcher.h | 1 + src/autopick/autopick-registry.c | 11 +-- src/autopick/autopick-registry.h | 3 + src/autopick/autopick.c | 13 ++- src/autopick/autopick.h | 1 + src/birth/game-play-initializer.c | 17 ++-- src/birth/game-play-initializer.h | 2 + src/birth/inventory-initializer.c | 11 ++- src/birth/inventory-initializer.h | 2 + src/cmd-item/cmd-activate.c | 55 ++++++------ src/cmd-item/cmd-activate.h | 1 + src/cmd-item/cmd-item.c | 43 +++++----- src/cmd-item/cmd-magiceat.c | 24 +++--- src/cmd-item/cmd-magiceat.h | 2 + src/cmd-item/cmd-quaff.c | 39 +++++---- src/cmd-item/cmd-read.c | 37 ++++---- src/cmd-item/cmd-smith.c | 3 +- src/cmd/cmd-basic.c | 1 - src/cmd/cmd-visuals.c | 13 ++- src/cmd/cmd-visuals.h | 2 + src/combat/shoot.c | 41 +++++---- src/combat/shoot.h | 21 +++-- src/floor/floor-events.c | 26 +++--- src/floor/floor-events.h | 24 +++--- src/inventory/inventory-curse.c | 22 +++-- src/inventory/inventory-curse.h | 4 +- src/inventory/player-inventory.c | 19 ++--- src/inventory/player-inventory.h | 30 ++++--- src/inventory/recharge-processor.c | 28 +++--- src/inventory/recharge-processor.h | 4 +- src/inventory/simple-appraiser.c | 43 ++++------ src/inventory/simple-appraiser.h | 2 + src/io-dump/special-class-dump.c | 6 +- src/io/interpret-pref-file.c | 4 +- src/io/load.c | 77 ++++++++--------- src/io/load.h | 1 + src/io/save.c | 1 - src/io/save.h | 7 +- src/knowledge/knowledge-experiences.c | 9 +- src/knowledge/knowledge-experiences.h | 2 + src/knowledge/knowledge-inventory.c | 12 ++- src/knowledge/knowledge-inventory.h | 2 + src/knowledge/knowledge-items.c | 15 ++-- src/knowledge/knowledge-items.h | 2 + src/main/init.c | 49 +++++------ src/main/init.h | 2 +- src/market/articles-on-sale.c | 4 +- src/market/articles-on-sale.h | 3 + src/market/building-craft-fix.c | 26 +++--- src/market/building-craft-fix.h | 2 + src/market/building-recharger.c | 27 +++--- src/market/building-recharger.h | 2 + src/monster/monster-race.h | 1 + src/monster/monster.h | 1 + src/object/artifact.c | 29 +++---- src/object/artifact.h | 2 + src/object/object-broken.c | 15 ++-- src/object/object-broken.h | 20 +++-- src/object/object-flavor.c | 29 +++---- src/object/object-flavor.h | 2 +- src/object/object-hook.c | 47 +++++++++-- src/object/object-hook.h | 120 ++++++++++++-------------- src/object/object-kind-hook.c | 7 +- src/object/object-kind-hook.h | 8 +- src/object/object-kind.c | 3 +- src/object/object-kind.h | 3 +- src/object/object1.c | 27 +++--- src/object/object1.h | 1 + src/player/player-effects.c | 69 +++++++-------- src/player/player-effects.h | 155 +++++++++++++++++----------------- src/player/player-move.c | 54 ++++++------ src/player/player-move.h | 24 +++--- src/player/player-status.c | 1 - src/spell/spells-execution.c | 4 +- src/spell/spells-execution.h | 3 + src/spell/spells-floor.c | 35 ++++---- src/spell/spells-floor.h | 20 +++-- src/spell/spells-object.c | 8 +- src/spell/spells-status.c | 32 ++++--- src/spell/spells-status.h | 1 + src/spell/spells2.c | 86 +++++++++---------- src/spell/spells2.h | 4 +- src/spell/spells3.c | 92 ++++++++++---------- src/spell/spells3.h | 1 + src/store/store-owners.c | 3 +- src/store/store-owners.h | 2 + src/store/store-util.c | 11 ++- src/store/store-util.h | 2 + src/term/gameterm.c | 7 +- src/term/gameterm.h | 2 + src/view/display-main-window.c | 56 ++++++------ src/view/display-main-window.h | 1 + src/view/display-player-middle.c | 19 ++--- src/view/display-player.c | 24 +++--- src/view/object-describer.c | 1 - src/view/status-first-page.c | 12 ++- src/view/status-first-page.h | 2 + src/wizard/wizard-spoiler.c | 23 +++-- src/wizard/wizard-spoiler.h | 2 + 104 files changed, 953 insertions(+), 953 deletions(-) diff --git a/src/autopick/autopick-destroyer.c b/src/autopick/autopick-destroyer.c index ce31f218a..586f5fed5 100644 --- a/src/autopick/autopick-destroyer.c +++ b/src/autopick/autopick-destroyer.c @@ -3,18 +3,17 @@ * @date 2020/04/25 * @author Hourier */ -#include "system/angband.h" -#include "autopick/autopick-util.h" -#include "autopick-methods-table.h" + #include "autopick/autopick-destroyer.h" -#include "object/sv-other-types.h" -#include "object/object2.h" +#include "autopick-methods-table.h" +#include "autopick/autopick-util.h" #include "object/object-ego.h" -#include "object/object-hook.h" -#include "object/object-kind.h" #include "object/object-flavor.h" +#include "object/object-hook.h" #include "object/object-mark-types.h" +#include "object/object2.h" #include "object/special-object-flags.h" +#include "object/sv-other-types.h" #include "object/sv-wand-types.h" #include "player/player-move.h" #include "player/player-races-table.h" diff --git a/src/autopick/autopick-destroyer.h b/src/autopick/autopick-destroyer.h index 3bcabb21f..38aa0bd11 100644 --- a/src/autopick/autopick-destroyer.h +++ b/src/autopick/autopick-destroyer.h @@ -1,3 +1,5 @@ #pragma once +#include "system/angband.h" + void auto_destroy_item(player_type *player_ptr, object_type *o_ptr, int autopick_idx); diff --git a/src/autopick/autopick-entry.c b/src/autopick/autopick-entry.c index a53b94506..ac9caba54 100644 --- a/src/autopick/autopick-entry.c +++ b/src/autopick/autopick-entry.c @@ -1,18 +1,16 @@ -#include "system/angband.h" -#include "autopick/autopick-util.h" -#include "autopick/autopick-entry.h" +#include "autopick/autopick-entry.h" #include "autopick/autopick-flags-table.h" +#include "autopick/autopick-key-flag-process.h" #include "autopick/autopick-keys-table.h" #include "autopick/autopick-methods-table.h" -#include "autopick/autopick-key-flag-process.h" +#include "inventory/player-inventory.h" #include "object/item-feeling.h" #include "object/item-use-flags.h" #include "object/object-ego.h" -#include "object/object-kind.h" #include "object/object-flavor.h" #include "object/object-hook.h" +#include "object/object-kind.h" #include "object/special-object-flags.h" -#include "inventory/player-inventory.h" #ifdef JP static char kanji_colon[] = ":"; diff --git a/src/autopick/autopick-entry.h b/src/autopick/autopick-entry.h index 6b1e4c97f..4b0bf904b 100644 --- a/src/autopick/autopick-entry.h +++ b/src/autopick/autopick-entry.h @@ -1,5 +1,8 @@ #pragma once +#include "system/angband.h" +#include "autopick/autopick-util.h" + bool autopick_new_entry(autopick_type *entry, concptr str, bool allow_default); void autopick_entry_from_object(player_type *player_ptr, autopick_type *entry, object_type *o_ptr); concptr autopick_line_from_entry(autopick_type *entry); diff --git a/src/autopick/autopick-matcher.c b/src/autopick/autopick-matcher.c index 151fa03d7..3f05e1029 100644 --- a/src/autopick/autopick-matcher.c +++ b/src/autopick/autopick-matcher.c @@ -5,14 +5,13 @@ * @author Hourier */ -#include "system/angband.h" -#include "autopick/autopick-key-flag-process.h" -#include "autopick/autopick-flags-table.h" #include "autopick/autopick-matcher.h" +#include "autopick/autopick-flags-table.h" +#include "autopick/autopick-key-flag-process.h" #include "object/item-feeling.h" -#include "object/object2.h" -#include "object/object-kind.h" #include "object/object-hook.h" +#include "object/object-kind.h" +#include "object/object2.h" #include "object/special-object-flags.h" /* diff --git a/src/autopick/autopick-matcher.h b/src/autopick/autopick-matcher.h index 5d8e45221..ae7eb5777 100644 --- a/src/autopick/autopick-matcher.h +++ b/src/autopick/autopick-matcher.h @@ -1,5 +1,6 @@ #pragma once +#include "system/angband.h" #include "autopick/autopick-util.h" bool is_autopick_match(player_type *player_ptr, object_type *o_ptr, autopick_type *entry, concptr o_name); diff --git a/src/autopick/autopick-registry.c b/src/autopick/autopick-registry.c index e048efc3a..10aac660a 100644 --- a/src/autopick/autopick-registry.c +++ b/src/autopick/autopick-registry.c @@ -4,20 +4,17 @@ * @author Hourier */ -#include "system/angband.h" #include "autopick/autopick-registry.h" -#include "autopick/autopick-util.h" -#include "autopick/autopick-methods-table.h" -#include "autopick/autopick-reader-writer.h" #include "autopick/autopick-entry.h" #include "autopick/autopick-finder.h" +#include "autopick/autopick-methods-table.h" +#include "autopick/autopick-reader-writer.h" +#include "io/files-util.h" #include "object/item-feeling.h" -#include "object/object-hook.h" -#include "object/object-kind.h" #include "object/object-flavor.h" +#include "object/object-hook.h" #include "object/special-object-flags.h" #include "util/util.h" -#include "io/files-util.h" static const char autoregister_header[] = "?:$AUTOREGISTER"; diff --git a/src/autopick/autopick-registry.h b/src/autopick/autopick-registry.h index 4b0375f8f..5510f860c 100644 --- a/src/autopick/autopick-registry.h +++ b/src/autopick/autopick-registry.h @@ -1,3 +1,6 @@ #pragma once +#include "system/angband.h" +#include "autopick/autopick-util.h" + bool autopick_autoregister(player_type *player_ptr, object_type *o_ptr); diff --git a/src/autopick/autopick.c b/src/autopick/autopick.c index d33867395..388c4a4fc 100644 --- a/src/autopick/autopick.c +++ b/src/autopick/autopick.c @@ -11,17 +11,16 @@ * 2014 Deskull rearranged comment for Doxygen.\n */ -#include "system/angband.h" -#include "util/util.h" -#include "autopick/autopick-menu-data-table.h" -#include "autopick/autopick-methods-table.h" +#include "autopick/autopick.h" #include "autopick/autopick-destroyer.h" #include "autopick/autopick-finder.h" -#include "autopick/autopick.h" -#include "player/player-move.h" -#include "object/object2.h" +#include "autopick/autopick-menu-data-table.h" +#include "autopick/autopick-methods-table.h" #include "object/object-flavor.h" #include "object/object-mark-types.h" +#include "object/object2.h" +#include "player/player-move.h" +#include "util/util.h" /* * Auto-destroy marked item diff --git a/src/autopick/autopick.h b/src/autopick/autopick.h index aaf895266..501517edd 100644 --- a/src/autopick/autopick.h +++ b/src/autopick/autopick.h @@ -1,5 +1,6 @@ #pragma once +#include "system/angband.h" #include "autopick/autopick-util.h" #include "grid/grid.h" diff --git a/src/birth/game-play-initializer.c b/src/birth/game-play-initializer.c index 215219652..64527a55c 100644 --- a/src/birth/game-play-initializer.c +++ b/src/birth/game-play-initializer.c @@ -1,16 +1,15 @@ -#include "system/angband.h" -#include "birth/game-play-initializer.h" -#include "object/object2.h" -#include "object/object-kind.h" -#include "world/world.h" -#include "dungeon/quest.h" -#include "dungeon/dungeon.h" +#include "birth/game-play-initializer.h" #include "dungeon/dungeon-file.h" +#include "dungeon/dungeon.h" +#include "dungeon/quest.h" +#include "market/arena.h" #include "object/artifact.h" +#include "object/object-kind.h" +#include "object/object2.h" #include "pet/pet-util.h" -#include "system/system-variables.h" #include "player/player-races-table.h" -#include "market/arena.h" +#include "system/system-variables.h" +#include "world/world.h" /*! * @brief ベースアイテム構造体の鑑定済みフラグをリセットする。 diff --git a/src/birth/game-play-initializer.h b/src/birth/game-play-initializer.h index cbf602d48..3e1d11fee 100644 --- a/src/birth/game-play-initializer.h +++ b/src/birth/game-play-initializer.h @@ -1,5 +1,7 @@ #pragma once +#include "system/angband.h" + void player_wipe_without_name(player_type *creature_ptr); void init_dungeon_quests(player_type *creature_ptr); void init_turn(player_type *creature_ptr); diff --git a/src/birth/inventory-initializer.c b/src/birth/inventory-initializer.c index 7a1c25d48..20bf2a05a 100644 --- a/src/birth/inventory-initializer.c +++ b/src/birth/inventory-initializer.c @@ -1,12 +1,11 @@ -#include "system/angband.h" -#include "birth/inventory-initializer.h" -#include "monster/monster-race-hook.h" -#include "player/player-personalities-table.h" +#include "birth/inventory-initializer.h" +#include "autopick/autopick.h" #include "birth/initial-equipments-table.h" +#include "monster/monster-race-hook.h" #include "object/item-apply-magic.h" -#include "object/object2.h" #include "object/object-ego.h" #include "object/object-kind.h" +#include "object/object2.h" #include "object/sv-bow-types.h" #include "object/sv-food-types.h" #include "object/sv-lite-types.h" @@ -17,7 +16,7 @@ #include "object/sv-staff-types.h" #include "object/sv-wand-types.h" #include "object/sv-weapon-types.h" -#include "autopick/autopick.h" +#include "player/player-personalities-table.h" #include "player/player-races-table.h" /*! diff --git a/src/birth/inventory-initializer.h b/src/birth/inventory-initializer.h index d07e20b05..4c0ba1cce 100644 --- a/src/birth/inventory-initializer.h +++ b/src/birth/inventory-initializer.h @@ -1,5 +1,7 @@ #pragma once +#include "system/angband.h" + void wield_all(player_type *creature_ptr); void add_outfit(player_type *creature_ptr, object_type *o_ptr); void player_outfit(player_type *creature_ptr); diff --git a/src/cmd-item/cmd-activate.c b/src/cmd-item/cmd-activate.c index 1c2f0ec2b..f1afebb23 100644 --- a/src/cmd-item/cmd-activate.c +++ b/src/cmd-item/cmd-activate.c @@ -1,46 +1,43 @@ /*! -* @file cmd-activate.c -* @brief プレイヤーの発動コマンド実装 -* @date 2018/09/07 -* @details -* cmd6.cより分離。 -*/ + * @brief プレイヤーの発動コマンド実装 + * @date 2018/09/07 + * @author deskull + */ -#include "system/angband.h" -#include "main/sound-definitions-table.h" #include "cmd-item/cmd-activate.h" -#include "cmd/cmd-basic.h" #include "cmd-io/cmd-save.h" -#include "object/object-hook.h" +#include "cmd/cmd-basic.h" #include "core/sort.h" +#include "effect/effect-characteristics.h" +#include "effect/spells-effect-util.h" #include "floor/floor.h" -#include "object/artifact.h" -#include "object/item-use-flags.h" -#include "player/avatar.h" -#include "spell/spells-summon.h" -#include "spell/spells-status.h" -#include "spell/spells-object.h" -#include "spell/spells-floor.h" -#include "player/player-effects.h" -#include "realm/realm-hex.h" -#include "player/player-damage.h" #include "inventory/player-inventory.h" -#include "monster/monster-status.h" #include "io/files-util.h" -#include "object/object-kind.h" +#include "io/targeting.h" +#include "main/sound-definitions-table.h" +#include "monster/monster-status.h" +#include "object/artifact.h" +#include "object/item-use-flags.h" #include "object/object-ego.h" +#include "object/object-hook.h" +#include "object/object-kind.h" #include "object/sv-lite-types.h" #include "object/sv-ring-types.h" -#include "io/targeting.h" -#include "world/world.h" -#include "effect/spells-effect-util.h" -#include "spell/spells-type.h" +#include "player/avatar.h" +#include "player/player-damage.h" +#include "player/player-effects.h" +#include "player/player-races-table.h" +#include "realm/realm-hex.h" #include "spell/process-effect.h" -#include "effect/effect-characteristics.h" +#include "spell/spells-detection.h" +#include "spell/spells-floor.h" +#include "spell/spells-object.h" +#include "spell/spells-status.h" +#include "spell/spells-summon.h" +#include "spell/spells-type.h" #include "spell/spells2.h" #include "spell/spells3.h" -#include "spell/spells-detection.h" -#include "player/player-races-table.h" +#include "world/world.h" /*! * @brief 装備耐性に準じたブレス効果の選択テーブル / diff --git a/src/cmd-item/cmd-activate.h b/src/cmd-item/cmd-activate.h index 040fcc212..fa045249e 100644 --- a/src/cmd-item/cmd-activate.h +++ b/src/cmd-item/cmd-activate.h @@ -1,5 +1,6 @@ #pragma once +#include "system/angband.h" #include "object/tr-types.h" extern void do_cmd_activate(player_type *user_ptr); diff --git a/src/cmd-item/cmd-item.c b/src/cmd-item/cmd-item.c index 9a7d5a9a6..28702ee51 100644 --- a/src/cmd-item/cmd-item.c +++ b/src/cmd-item/cmd-item.c @@ -10,12 +10,9 @@ */ #include "cmd-item/cmd-item.h" -#include "core/stuff-handler.h" -#include "util/util.h" -#include "main/sound-definitions-table.h" -#include "term/gameterm.h" - -#include "player/selfinfo.h" +#include "autopick/autopick-registry.h" +#include "autopick/autopick.h" +#include "cmd-action/cmd-pet.h" #include "cmd-item/cmd-activate.h" #include "cmd-item/cmd-eat.h" #include "cmd-item/cmd-quaff.h" @@ -23,37 +20,37 @@ #include "cmd-item/cmd-usestaff.h" #include "cmd-item/cmd-zaprod.h" #include "cmd-item/cmd-zapwand.h" -#include "cmd-action/cmd-pet.h" #include "cmd/cmd-basic.h" -#include "object/object2.h" +#include "combat/snipe.h" +#include "core/sort.h" +#include "core/stuff-handler.h" +#include "dungeon/quest.h" +#include "inventory/player-inventory.h" +#include "io/targeting.h" +#include "main/sound-definitions-table.h" +#include "monster/monster.h" +#include "object/artifact.h" #include "object/item-feeling.h" #include "object/item-use-flags.h" +#include "object/object-ego.h" #include "object/object-flavor.h" #include "object/object-hook.h" -#include "object/object-ego.h" #include "object/object-mark-types.h" -#include "core/sort.h" -#include "dungeon/quest.h" -#include "object/artifact.h" +#include "object/object2.h" #include "object/special-object-flags.h" #include "object/sv-lite-types.h" #include "object/trc-types.h" #include "player/avatar.h" -#include "player/player-status.h" -#include "player/player-effects.h" #include "player/player-class.h" +#include "player/player-effects.h" #include "player/player-personalities-table.h" -#include "monster/monster.h" -#include "view/display-main-window.h" -#include "spell/spells3.h" -#include "object/object-kind.h" -#include "autopick/autopick.h" -#include "autopick/autopick-registry.h" -#include "io/targeting.h" -#include "combat/snipe.h" #include "player/player-races-table.h" +#include "player/player-status.h" +#include "player/selfinfo.h" +#include "spell/spells3.h" +#include "term/gameterm.h" +#include "util/util.h" #include "view/display-main-window.h" -#include "inventory/player-inventory.h" /*! * @brief 持ち物一覧を表示するコマンドのメインルーチン / Display inventory_list diff --git a/src/cmd-item/cmd-magiceat.c b/src/cmd-item/cmd-magiceat.c index 2cb669e42..f042b8154 100644 --- a/src/cmd-item/cmd-magiceat.c +++ b/src/cmd-item/cmd-magiceat.c @@ -51,25 +51,23 @@ * */ -#include "system/angband.h" -#include "util/util.h" -#include "main/sound-definitions-table.h" -#include "term/gameterm.h" - -#include "cmd/cmd-basic.h" +#include "cmd-item/cmd-magiceat.h" #include "cmd-item/cmd-usestaff.h" #include "cmd-item/cmd-zaprod.h" #include "cmd-item/cmd-zapwand.h" -#include "cmd-item/cmd-magiceat.h" -#include "player/avatar.h" -#include "player/player-status.h" -#include "spell/spells3.h" -#include "player/player-class.h" -#include "object/object2.h" +#include "cmd/cmd-basic.h" +#include "io/targeting.h" +#include "main/sound-definitions-table.h" #include "object/object-kind.h" +#include "object/object2.h" #include "object/sv-other-types.h" #include "object/sv-rod-types.h" -#include "io/targeting.h" +#include "player/avatar.h" +#include "player/player-class.h" +#include "player/player-status.h" +#include "spell/spells3.h" +#include "term/gameterm.h" +#include "util/util.h" /*! * @brief 魔道具術師の取り込んだ魔力一覧から選択/閲覧する / diff --git a/src/cmd-item/cmd-magiceat.h b/src/cmd-item/cmd-magiceat.h index dccd9b866..6a9a1693a 100644 --- a/src/cmd-item/cmd-magiceat.h +++ b/src/cmd-item/cmd-magiceat.h @@ -1,5 +1,7 @@ #pragma once +#include "system/angband.h" + #define EATER_EXT 36 #define EATER_CHARGE 0x10000L #define EATER_ROD_CHARGE 0x10L diff --git a/src/cmd-item/cmd-quaff.c b/src/cmd-item/cmd-quaff.c index b08d7fe0a..ad5c4a96c 100644 --- a/src/cmd-item/cmd-quaff.c +++ b/src/cmd-item/cmd-quaff.c @@ -5,34 +5,33 @@ */ #include "cmd-item/cmd-quaff.h" -#include "util/util.h" +#include "birth/birth-stat.h" +#include "cmd/cmd-basic.h" +#include "floor/floor.h" +#include "inventory/player-inventory.h" #include "main/sound-definitions-table.h" - -#include "player/selfinfo.h" -#include "object/object-hook.h" #include "mutation/mutation.h" +#include "object/item-use-flags.h" +#include "object/object-broken.h" +#include "object/object-hook.h" +#include "object/object-kind.h" +#include "object/object2.h" +#include "object/sv-potion-types.h" #include "player/avatar.h" -#include "spell/spells3.h" -#include "spell/spells-status.h" +#include "player/mimic-info-table.h" +#include "player/player-class.h" +#include "player/player-damage.h" #include "player/player-effects.h" +#include "player/player-races-table.h" #include "player/player-status.h" -#include "player/player-damage.h" -#include "player/mimic-info-table.h" -#include "inventory/player-inventory.h" +#include "player/selfinfo.h" #include "realm/realm-hex.h" +#include "spell/spells-detection.h" #include "spell/spells-floor.h" -#include "object/item-use-flags.h" -#include "object/object2.h" -#include "object/object-broken.h" -#include "object/sv-potion-types.h" -#include "cmd/cmd-basic.h" -#include "floor/floor.h" -#include "object/object-kind.h" +#include "spell/spells-status.h" +#include "spell/spells3.h" +#include "util/util.h" #include "view/display-main-window.h" -#include "player/player-class.h" -#include "spell/spells-detection.h" -#include "birth/birth-stat.h" -#include "player/player-races-table.h" /*! * @brief 薬を飲むコマンドのサブルーチン / diff --git a/src/cmd-item/cmd-read.c b/src/cmd-item/cmd-read.c index 684196275..213c36a0e 100644 --- a/src/cmd-item/cmd-read.c +++ b/src/cmd-item/cmd-read.c @@ -5,39 +5,36 @@ */ #include "cmd-item/cmd-read.h" -#include "util/util.h" +#include "cmd/cmd-basic.h" +#include "core/show-file.h" +#include "floor/floor.h" +#include "inventory/player-inventory.h" +#include "io/files-util.h" #include "main/sound-definitions-table.h" - +#include "object/artifact.h" #include "object/item-use-flags.h" #include "object/object-flavor.h" #include "object/object-hook.h" -#include "object/artifact.h" +#include "object/object-kind.h" +#include "object/object2.h" +#include "object/sv-scroll-types.h" #include "player/avatar.h" -#include "player/player-status.h" -#include "player/player-damage.h" #include "player/player-class.h" +#include "player/player-damage.h" #include "player/player-effects.h" -#include "inventory/player-inventory.h" -#include "store/rumor.h" +#include "player/player-status.h" #include "realm/realm-hex.h" - -#include "spell/spells-object.h" +#include "spell/spells-detection.h" #include "spell/spells-floor.h" -#include "spell/spells-summon.h" +#include "spell/spells-object.h" #include "spell/spells-status.h" - -#include "cmd/cmd-basic.h" -#include "core/show-file.h" -#include "io/files-util.h" -#include "floor/floor.h" -#include "object/object2.h" -#include "object/object-kind.h" -#include "object/sv-scroll-types.h" -#include "view/display-main-window.h" +#include "spell/spells-summon.h" #include "spell/spells-type.h" #include "spell/spells2.h" #include "spell/spells3.h" -#include "spell/spells-detection.h" +#include "store/rumor.h" +#include "util/util.h" +#include "view/display-main-window.h" /*! * @brief 巻物を読むコマンドのサブルーチン diff --git a/src/cmd-item/cmd-smith.c b/src/cmd-item/cmd-smith.c index 34801f3d4..7ce8a822e 100644 --- a/src/cmd-item/cmd-smith.c +++ b/src/cmd-item/cmd-smith.c @@ -15,12 +15,11 @@ #include "object/special-object-flags.h" #include "player/player-status.h" #include "cmd/cmd-basic.h" -#include "object/object-kind.h" #include "autopick/autopick.h" -#include "view/display-main-window.h" #include "inventory/player-inventory.h" #include "object/tr-types.h" #include "object/trc-types.h" +#include "view/display-main-window.h" /*! * エッセンス情報の構造体 / A structure for smithing diff --git a/src/cmd/cmd-basic.c b/src/cmd/cmd-basic.c index 1a48e457d..6a44854c7 100644 --- a/src/cmd/cmd-basic.c +++ b/src/cmd/cmd-basic.c @@ -1,5 +1,4 @@ /*! - * @file cmd2.c * @brief プレイヤーのコマンド処理2 / Movement commands (part 2) * @date 2014/01/02 * @author diff --git a/src/cmd/cmd-visuals.c b/src/cmd/cmd-visuals.c index 11f096917..ac0124cc9 100644 --- a/src/cmd/cmd-visuals.c +++ b/src/cmd/cmd-visuals.c @@ -1,16 +1,15 @@ -#include "system/angband.h" -#include "cmd/cmd-visuals.h" +#include "cmd/cmd-visuals.h" #include "cmd/cmd-draw.h" +#include "io/files-util.h" +#include "io/read-pref-file.h" #include "knowledge/knowledge-features.h" #include "knowledge/knowledge-items.h" #include "knowledge/knowledge-monsters.h" -#include "io/files-util.h" -#include "object/object2.h" -#include "object/object-kind.h" +#include "knowledge/lighting-level-table.h" #include "object/object-flavor.h" +#include "object/object-kind.h" +#include "object/object2.h" #include "term/gameterm.h" -#include "knowledge/lighting-level-table.h" -#include "io/read-pref-file.h" #include "view/display-main-window.h" // 暫定。後で消す. /*! diff --git a/src/cmd/cmd-visuals.h b/src/cmd/cmd-visuals.h index 2b6517445..3ab18bac2 100644 --- a/src/cmd/cmd-visuals.h +++ b/src/cmd/cmd-visuals.h @@ -1,3 +1,5 @@ #pragma once +#include "system/angband.h" + void do_cmd_visuals(player_type *creature_ptr, void(*process_autopick_file_command)(char*)); diff --git a/src/combat/shoot.c b/src/combat/shoot.c index a418037e4..afcb20745 100644 --- a/src/combat/shoot.c +++ b/src/combat/shoot.c @@ -1,35 +1,32 @@ -#include "system/angband.h" +#include "combat/shoot.h" +#include "combat/snipe.h" #include "core/stuff-handler.h" -#include "util/util.h" +#include "effect/effect-characteristics.h" +#include "effect/spells-effect-util.h" +#include "grid/grid.h" +#include "io/targeting.h" #include "main/sound-definitions-table.h" -#include "term/gameterm.h" - -#include "monster/monster.h" #include "monster/monster-status.h" +#include "monster/monster.h" #include "mspell/monster-spell.h" #include "object/artifact.h" -#include "player/avatar.h" -#include "player/player-status.h" -#include "player/player-skill.h" -#include "player/player-class.h" -#include "player/player-personalities-table.h" -#include "object/object2.h" -#include "object/object-hook.h" #include "object/object-broken.h" -#include "object/object-mark-types.h" -#include "effect/effect-characteristics.h" -#include "grid/grid.h" #include "object/object-flavor.h" - -#include "shoot.h" -#include "combat/snipe.h" -#include "view/display-main-window.h" +#include "object/object-hook.h" #include "object/object-kind.h" -#include "io/targeting.h" -#include "effect/spells-effect-util.h" -#include "spell/process-effect.h" +#include "object/object-mark-types.h" +#include "object/object2.h" #include "object/sv-bow-types.h" #include "object/tr-types.h" +#include "player/avatar.h" +#include "player/player-class.h" +#include "player/player-personalities-table.h" +#include "player/player-skill.h" +#include "player/player-status.h" +#include "spell/process-effect.h" +#include "term/gameterm.h" +#include "util/util.h" +#include "view/display-main-window.h" /*! * @brief 矢弾を射撃した際のスレイ倍率をかけた結果を返す / diff --git a/src/combat/shoot.h b/src/combat/shoot.h index 36a4a5532..4d2c65054 100644 --- a/src/combat/shoot.h +++ b/src/combat/shoot.h @@ -1,12 +1,11 @@ -/*! - * @file shoot.c - */ -#pragma once +#pragma once -extern bool test_hit_fire(player_type *shooter_ptr, int chance, monster_type *m_ptr, int vis, char* o_name); -extern HIT_POINT critical_shot(player_type *shooter_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam); -extern ENERGY bow_energy(OBJECT_SUBTYPE_VALUE sval); -extern int bow_tmul(OBJECT_SUBTYPE_VALUE sval); -extern HIT_POINT calc_crit_ratio_shot(player_type *shooter_ptr, HIT_POINT plus_ammo, HIT_POINT plus_bow); -extern HIT_POINT calc_expect_crit_shot(player_type *shooter_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam); -extern HIT_POINT calc_expect_crit(player_type *shooter_ptr, WEIGHT weight, int plus, HIT_POINT dam, s16b meichuu, bool dokubari); +#include "system/angband.h" + +bool test_hit_fire(player_type *shooter_ptr, int chance, monster_type *m_ptr, int vis, char* o_name); +HIT_POINT critical_shot(player_type *shooter_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam); +ENERGY bow_energy(OBJECT_SUBTYPE_VALUE sval); +int bow_tmul(OBJECT_SUBTYPE_VALUE sval); +HIT_POINT calc_crit_ratio_shot(player_type *shooter_ptr, HIT_POINT plus_ammo, HIT_POINT plus_bow); +HIT_POINT calc_expect_crit_shot(player_type *shooter_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam); +HIT_POINT calc_expect_crit(player_type *shooter_ptr, WEIGHT weight, int plus, HIT_POINT dam, s16b meichuu, bool dokubari); diff --git a/src/floor/floor-events.c b/src/floor/floor-events.c index fa543b51d..d261eb6e3 100644 --- a/src/floor/floor-events.c +++ b/src/floor/floor-events.c @@ -1,27 +1,25 @@ -#include "system/angband.h" -#include "util/util.h" - +#include "floor/floor-events.h" +#include "cmd-io/cmd-dump.h" #include "dungeon/dungeon.h" +#include "dungeon/quest.h" #include "floor/floor.h" -#include "floor/floor-events.h" #include "grid/grid.h" -#include "monster/monster.h" #include "monster/monster-status.h" -#include "dungeon/quest.h" +#include "monster/monster.h" +#include "object/object-ego.h" #include "object/object-hook.h" +#include "object/object-kind.h" #include "object/object-mark-types.h" -#include "object/special-object-flags.h" -#include "object/sv-ring-types.h" -#include "player/player-move.h" -#include "world/world.h" -#include "player/player-effects.h" #include "object/object2.h" -#include "object/object-kind.h" -#include "object/object-ego.h" +#include "object/special-object-flags.h" #include "object/sv-amulet-types.h" #include "object/sv-protector-types.h" -#include "cmd-io/cmd-dump.h" +#include "object/sv-ring-types.h" +#include "player/player-effects.h" +#include "player/player-move.h" +#include "util/util.h" #include "view/display-main-window.h" +#include "world/world.h" static bool mon_invis; static POSITION mon_fy, mon_fx; diff --git a/src/floor/floor-events.h b/src/floor/floor-events.h index 9f10dba72..903194f52 100644 --- a/src/floor/floor-events.h +++ b/src/floor/floor-events.h @@ -1,13 +1,15 @@ #pragma once -extern void day_break(player_type *subject_ptr); -extern void night_falls(player_type *subject_ptr); -extern MONSTER_NUMBER count_all_hostile_monsters(floor_type *floor_ptr); -extern void update_dungeon_feeling(player_type *subject_ptr); -extern void glow_deep_lava_and_bldg(player_type *subject_ptr); -extern void forget_lite(floor_type *floor_ptr); -extern void update_lite(player_type *subject_ptr); -extern void forget_view(floor_type *floor_ptr); -extern void update_view(player_type *subject_ptr); -extern void update_mon_lite(player_type *subject_ptr); -extern void clear_mon_lite(floor_type *floor_ptr); +#include "system/angband.h" + +void day_break(player_type *subject_ptr); +void night_falls(player_type *subject_ptr); +MONSTER_NUMBER count_all_hostile_monsters(floor_type *floor_ptr); +void update_dungeon_feeling(player_type *subject_ptr); +void glow_deep_lava_and_bldg(player_type *subject_ptr); +void forget_lite(floor_type *floor_ptr); +void update_lite(player_type *subject_ptr); +void forget_view(floor_type *floor_ptr); +void update_view(player_type *subject_ptr); +void update_mon_lite(player_type *subject_ptr); +void clear_mon_lite(floor_type *floor_ptr); diff --git a/src/inventory/inventory-curse.c b/src/inventory/inventory-curse.c index 752af3e4b..710639db0 100644 --- a/src/inventory/inventory-curse.c +++ b/src/inventory/inventory-curse.c @@ -1,22 +1,20 @@ -#include "system/angband.h" -#include "inventory/inventory-curse.h" -#include "object/object-flavor.h" -#include "spell/spells-summon.h" -#include "player/player-damage.h" -#include "player/player-move.h" -#include "spell/spells2.h" -#include "spell/spells3.h" +#include "inventory/inventory-curse.h" #include "io/files-util.h" +#include "object/artifact.h" #include "object/item-feeling.h" #include "object/object-curse.h" -#include "object/artifact.h" +#include "object/object-flavor.h" #include "object/object-hook.h" #include "object/special-object-flags.h" -#include "player/player-effects.h" -#include "object/object-kind.h" -#include "player/player-races-table.h" #include "object/tr-types.h" #include "object/trc-types.h" +#include "player/player-damage.h" +#include "player/player-effects.h" +#include "player/player-move.h" +#include "player/player-races-table.h" +#include "spell/spells-summon.h" +#include "spell/spells2.h" +#include "spell/spells3.h" #define TRC_P_FLAG_MASK \ (TRC_TELEPORT_SELF | TRC_CHAINSWORD | TRC_TY_CURSE | TRC_DRAIN_EXP | TRC_ADD_L_CURSE | TRC_ADD_H_CURSE | TRC_CALL_ANIMAL | TRC_CALL_DEMON \ diff --git a/src/inventory/inventory-curse.h b/src/inventory/inventory-curse.h index 74c530891..7dc6ca605 100644 --- a/src/inventory/inventory-curse.h +++ b/src/inventory/inventory-curse.h @@ -1,4 +1,6 @@ #pragma once -object_type* choose_cursed_obj_name(player_type* player_ptr, BIT_FLAGS flag); +#include "system/angband.h" + +object_type *choose_cursed_obj_name(player_type *player_ptr, BIT_FLAGS flag); void execute_cursed_items_effect(player_type* creature_ptr); diff --git a/src/inventory/player-inventory.c b/src/inventory/player-inventory.c index 5911bac1f..248b099c6 100644 --- a/src/inventory/player-inventory.c +++ b/src/inventory/player-inventory.c @@ -1,20 +1,17 @@ -#include "system/angband.h" +#include "inventory/player-inventory.h" #include "core/stuff-handler.h" -#include "util/util.h" -#include "inventory/player-inventory.h" - -#include "term/gameterm.h" -#include "object/sv-other-types.h" +#include "floor/floor.h" #include "object/item-use-flags.h" -#include "object/object1.h" -#include "object/object2.h" -#include "object/object-kind.h" #include "object/object-flavor.h" #include "object/object-hook.h" +#include "object/object-kind.h" #include "object/object-mark-types.h" -#include "floor/floor.h" +#include "object/object1.h" +#include "object/object2.h" +#include "object/sv-other-types.h" #include "player/player-move.h" - +#include "term/gameterm.h" +#include "util/util.h" #include "view/display-main-window.h" bool select_ring_slot; diff --git a/src/inventory/player-inventory.h b/src/inventory/player-inventory.h index 879ae1e2f..2f6e1ad2d 100644 --- a/src/inventory/player-inventory.h +++ b/src/inventory/player-inventory.h @@ -1,20 +1,22 @@ #pragma once +#include "system/angband.h" + extern bool select_ring_slot; -extern bool is_ring_slot(int i); -extern concptr describe_use(player_type *owner_ptr, int i); +bool is_ring_slot(int i); +concptr describe_use(player_type *owner_ptr, int i); -extern void display_inventory(player_type *creature_ptr, tval_type tval); -extern void display_equipment(player_type *creature_ptr, tval_type tval); -extern COMMAND_CODE show_inventory(player_type *owner_ptr, int target_item, BIT_FLAGS mode, tval_type tval); -extern COMMAND_CODE show_equipment(player_type *owner_ptr, int target_item, BIT_FLAGS mode, tval_type tval); -extern void toggle_inventory_equipment(player_type *owner_ptr); +void display_inventory(player_type *creature_ptr, tval_type tval); +void display_equipment(player_type *creature_ptr, tval_type tval); +COMMAND_CODE show_inventory(player_type *owner_ptr, int target_item, BIT_FLAGS mode, tval_type tval); +COMMAND_CODE show_equipment(player_type *owner_ptr, int target_item, BIT_FLAGS mode, tval_type tval); +void toggle_inventory_equipment(player_type *owner_ptr); -extern object_type *choose_object(player_type *owner_ptr, OBJECT_IDX *idx, concptr q, concptr s, BIT_FLAGS option, tval_type tval); -extern bool can_get_item(player_type *owner_ptr, tval_type tval); -extern bool get_item(player_type *owner_ptr, OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode, tval_type tval); -extern ITEM_NUMBER scan_floor(player_type *owner_ptr, OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode, tval_type item_tester_tval); -extern COMMAND_CODE show_floor(player_type *owner_ptr, int target_item, POSITION y, POSITION x, TERM_LEN *min_width, tval_type item_tester_tval); -extern bool get_item_floor(player_type *creature_ptr, COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode, tval_type tval); -extern void py_pickup_floor(player_type *creature_ptr, bool pickup); +object_type *choose_object(player_type *owner_ptr, OBJECT_IDX *idx, concptr q, concptr s, BIT_FLAGS option, tval_type tval); +bool can_get_item(player_type *owner_ptr, tval_type tval); +bool get_item(player_type *owner_ptr, OBJECT_IDX *cp, concptr pmt, concptr str, BIT_FLAGS mode, tval_type tval); +ITEM_NUMBER scan_floor(player_type *owner_ptr, OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode, tval_type item_tester_tval); +COMMAND_CODE show_floor(player_type *owner_ptr, int target_item, POSITION y, POSITION x, TERM_LEN *min_width, tval_type item_tester_tval); +bool get_item_floor(player_type *creature_ptr, COMMAND_CODE *cp, concptr pmt, concptr str, BIT_FLAGS mode, tval_type tval); +void py_pickup_floor(player_type *creature_ptr, bool pickup); diff --git a/src/inventory/recharge-processor.c b/src/inventory/recharge-processor.c index c5eef3127..03d10941d 100644 --- a/src/inventory/recharge-processor.c +++ b/src/inventory/recharge-processor.c @@ -1,9 +1,9 @@ -#include "system/angband.h" -#include "object/object-flavor.h" -#include "player/player-move.h" +#include "inventory/recharge-processor.h" #include "core/hp-mp-regenerator.h" -#include "object/object-kind.h" +#include "object/object-flavor.h" #include "object/object-hook.h" +#include "object/object-kind.h" +#include "player/player-move.h" /*! * @brief @@ -12,7 +12,7 @@ * @param o_ptr 対象オブジェクトの構造体参照ポインタ * @return なし */ -static void recharged_notice(player_type* owner_ptr, object_type* o_ptr) +static void recharged_notice(player_type *owner_ptr, object_type *o_ptr) { if (!o_ptr->inscription) return; @@ -43,13 +43,13 @@ static void recharged_notice(player_type* owner_ptr, object_type* o_ptr) * / Handle recharging objects once every 10 game turns * @return なし */ -void recharge_magic_items(player_type* creature_ptr) +void recharge_magic_items(player_type *creature_ptr) { int i; bool changed; for (changed = FALSE, i = INVEN_RARM; i < INVEN_TOTAL; i++) { - object_type* o_ptr = &creature_ptr->inventory_list[i]; + object_type *o_ptr = &creature_ptr->inventory_list[i]; if (!o_ptr->k_idx) continue; @@ -68,13 +68,13 @@ void recharge_magic_items(player_type* creature_ptr) } /* - * Recharge rods. Rods now use timeout to control charging status, - * and each charging rod in a stack decreases the stack's timeout by - * one per turn. -LM- - */ + * Recharge rods. Rods now use timeout to control charging status, + * and each charging rod in a stack decreases the stack's timeout by + * one per turn. -LM- + */ for (changed = FALSE, i = 0; i < INVEN_PACK; i++) { - object_type* o_ptr = &creature_ptr->inventory_list[i]; - object_kind* k_ptr = &k_info[o_ptr->k_idx]; + object_type *o_ptr = &creature_ptr->inventory_list[i]; + object_kind *k_ptr = &k_info[o_ptr->k_idx]; if (!o_ptr->k_idx) continue; @@ -102,7 +102,7 @@ void recharge_magic_items(player_type* creature_ptr) } for (i = 1; i < creature_ptr->current_floor_ptr->o_max; i++) { - object_type* o_ptr = &creature_ptr->current_floor_ptr->o_list[i]; + object_type *o_ptr = &creature_ptr->current_floor_ptr->o_list[i]; if (!OBJECT_IS_VALID(o_ptr)) continue; diff --git a/src/inventory/recharge-processor.h b/src/inventory/recharge-processor.h index d8425975e..af8b26a2a 100644 --- a/src/inventory/recharge-processor.h +++ b/src/inventory/recharge-processor.h @@ -1,3 +1,5 @@ #pragma once -void recharge_magic_items(player_type* creature_ptr); +#include "system/angband.h" + +void recharge_magic_items(player_type *creature_ptr); diff --git a/src/inventory/simple-appraiser.c b/src/inventory/simple-appraiser.c index 27cf3a6f8..0e93549bd 100644 --- a/src/inventory/simple-appraiser.c +++ b/src/inventory/simple-appraiser.c @@ -1,15 +1,13 @@ -#include "system/angband.h" -#include "inventory/simple-appraiser.h" -#include "object/object-flavor.h" -#include "player/avatar.h" +#include "inventory/simple-appraiser.h" +#include "autopick/autopick.h" +#include "inventory/player-inventory.h" #include "object/item-feeling.h" -#include "object/object2.h" +#include "object/object-flavor.h" #include "object/object-hook.h" -#include "object/object-kind.h" +#include "object/object2.h" #include "object/special-object-flags.h" +#include "player/avatar.h" #include "player/player-move.h" -#include "inventory/player-inventory.h" -#include "autopick/autopick.h" /*! * @brief 擬似鑑定を実際に行い判定を反映する @@ -18,10 +16,10 @@ * @param heavy 重度の擬似鑑定を行うならばTRUE * @return なし */ -static void sense_inventory_aux(player_type* creature_ptr, INVENTORY_IDX slot, bool heavy) +static void sense_inventory_aux(player_type *creature_ptr, INVENTORY_IDX slot, bool heavy) { byte feel; - object_type* o_ptr = &creature_ptr->inventory_list[slot]; + object_type *o_ptr = &creature_ptr->inventory_list[slot]; GAME_TEXT o_name[MAX_NLEN]; if (o_ptr->ident & (IDENT_SENSE)) return; @@ -77,24 +75,17 @@ static void sense_inventory_aux(player_type* creature_ptr, INVENTORY_IDX slot, b object_desc(creature_ptr, o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY)); if (slot >= INVEN_RARM) { #ifdef JP - msg_format("%s%s(%c)は%sという感じがする...", - describe_use(creature_ptr, slot), o_name, index_to_label(slot), game_inscriptions[feel]); + msg_format("%s%s(%c)は%sという感じがする...", describe_use(creature_ptr, slot), o_name, index_to_label(slot), game_inscriptions[feel]); #else - msg_format("You feel the %s (%c) you are %s %s %s...", - o_name, index_to_label(slot), describe_use(creature_ptr, slot), - ((o_ptr->number == 1) ? "is" : "are"), - game_inscriptions[feel]); + msg_format("You feel the %s (%c) you are %s %s %s...", o_name, index_to_label(slot), describe_use(creature_ptr, slot), + ((o_ptr->number == 1) ? "is" : "are"), game_inscriptions[feel]); #endif } else { #ifdef JP - msg_format("ザックの中の%s(%c)は%sという感じがする...", - o_name, index_to_label(slot), game_inscriptions[feel]); + msg_format("ザックの中の%s(%c)は%sという感じがする...", o_name, index_to_label(slot), game_inscriptions[feel]); #else - msg_format("You feel the %s (%c) in your pack %s %s...", - o_name, index_to_label(slot), - ((o_ptr->number == 1) ? "is" : "are"), - game_inscriptions[feel]); + msg_format("You feel the %s (%c) in your pack %s %s...", o_name, index_to_label(slot), ((o_ptr->number == 1) ? "is" : "are"), game_inscriptions[feel]); #endif } @@ -119,11 +110,11 @@ static void sense_inventory_aux(player_type* creature_ptr, INVENTORY_IDX slot, b * Class 4 = Ranger --> slow but heavy (changed!)\n * Class 5 = Paladin --> slow but heavy\n */ -void sense_inventory1(player_type* creature_ptr) +void sense_inventory1(player_type *creature_ptr) { PLAYER_LEVEL plev = creature_ptr->lev; bool heavy = FALSE; - object_type* o_ptr; + object_type *o_ptr; if (creature_ptr->confused) return; @@ -285,10 +276,10 @@ void sense_inventory1(player_type* creature_ptr) * @brief 1プレイヤーターン毎に武器、防具以外の擬似鑑定が行われるかを判定する。 * @return なし */ -void sense_inventory2(player_type* creature_ptr) +void sense_inventory2(player_type *creature_ptr) { PLAYER_LEVEL plev = creature_ptr->lev; - object_type* o_ptr; + object_type *o_ptr; if (creature_ptr->confused) return; diff --git a/src/inventory/simple-appraiser.h b/src/inventory/simple-appraiser.h index 3d515b0f0..552433a57 100644 --- a/src/inventory/simple-appraiser.h +++ b/src/inventory/simple-appraiser.h @@ -1,4 +1,6 @@ #pragma once +#include "system/angband.h" + void sense_inventory1(player_type* creature_ptr); void sense_inventory2(player_type* creature_ptr); diff --git a/src/io-dump/special-class-dump.c b/src/io-dump/special-class-dump.c index 4678d26fc..1ed22e171 100644 --- a/src/io-dump/special-class-dump.c +++ b/src/io-dump/special-class-dump.c @@ -1,5 +1,5 @@ /*! - * @brief + * @brief 一部職業でのみダンプする能力の出力処理 * @date 2020/03/07 * @author Hourier */ @@ -7,9 +7,9 @@ #include "io-dump/special-class-dump.h" #include "cmd-item/cmd-magiceat.h" #include "cmd-item/cmd-smith.h" -#include "object/object2.h" -#include "object/object-kind.h" #include "mspell/monster-spell.h" +#include "object/object-kind.h" +#include "object/object2.h" typedef struct { BIT_FLAGS f4; diff --git a/src/io/interpret-pref-file.c b/src/io/interpret-pref-file.c index 0aef8dca6..f01b92383 100644 --- a/src/io/interpret-pref-file.c +++ b/src/io/interpret-pref-file.c @@ -5,13 +5,13 @@ */ #include "io/interpret-pref-file.h" +#include "birth/character-builder.h" #include "io/gf-descriptions.h" #include "io/tokenizer.h" #include "object/object-kind.h" -#include "birth/character-builder.h" -#include "world/world.h" #include "term/gameterm.h" #include "view/display-main-window.h" // 暫定。apply_default_feat_lighting()。後で消す. +#include "world/world.h" #define MAX_MACRO_CHARS 16128 // 1つのマクロキー押下で実行可能なコマンド最大数 (エスケープシーケンス含む). diff --git a/src/io/load.c b/src/io/load.c index 793c176d8..2e6214453 100644 --- a/src/io/load.c +++ b/src/io/load.c @@ -40,61 +40,56 @@ * */ -#include "system/angband.h" -#include "util/util.h" -#include "system/system-variables.h" // 暫定、init_flags の扱いを決めた上で消す. -#include "system/angband-version.h" - #include "io/load.h" -#include "market/arena.h" -#include "io/report.h" - +#include "birth/quick-start.h" +#include "cmd-item/cmd-smith.h" +#include "dungeon/dungeon-file.h" #include "dungeon/dungeon.h" -#include "grid/feature.h" -#include "floor/floor-generate.h" -#include "grid/trap.h" -#include "mutation/mutation.h" -#include "monster/monster.h" -#include "store/store-util.h" #include "dungeon/quest.h" -#include "store/store.h" -#include "object/artifact.h" -#include "player/avatar.h" -#include "spell/spells-status.h" -#include "object/object-hook.h" -#include "floor/wild.h" -#include "player/patron.h" - -#include "floor/floor.h" +#include "floor/floor-generate.h" #include "floor/floor-save.h" #include "floor/floor-town.h" +#include "floor/floor.h" +#include "floor/wild.h" +#include "grid/feature.h" #include "grid/grid.h" - -#include "pet/pet-util.h" -#include "dungeon/dungeon-file.h" -#include "io/uid-checker.h" +#include "grid/trap.h" #include "io/files-util.h" -#include "player/player-skill.h" -#include "player/player-class.h" -#include "player/race-info-table.h" -#include "player/player-personality.h" -#include "player/player-sex.h" -#include "world/world.h" -#include "object/object2.h" -#include "object/object-kind.h" -#include "object/object-ego.h" +#include "io/report.h" #include "io/save.h" +#include "io/uid-checker.h" #include "locale/japanese.h" -#include "cmd-item/cmd-smith.h" -#include "birth/quick-start.h" -#include "player/player-races-table.h" +#include "market/arena.h" #include "market/bounty.h" -#include "object/tr-types.h" +#include "monster/monster.h" +#include "mutation/mutation.h" +#include "object/artifact.h" +#include "object/object-ego.h" +#include "object/object-hook.h" +#include "object/object-kind.h" #include "object/object-mark-types.h" +#include "object/object2.h" +#include "object/old-ego-extra-values.h" // TODO v1.5.0以前のセーブファイルをロードする処理を分離する. #include "object/sv-armor-types.h" #include "object/sv-lite-types.h" +#include "object/tr-types.h" #include "object/trc-types.h" -#include "object/old-ego-extra-values.h" // TODO v1.5.0以前のセーブファイルをロードする処理を分離する. +#include "pet/pet-util.h" +#include "player/avatar.h" +#include "player/patron.h" +#include "player/player-class.h" +#include "player/player-personality.h" +#include "player/player-races-table.h" +#include "player/player-sex.h" +#include "player/player-skill.h" +#include "player/race-info-table.h" +#include "spell/spells-status.h" +#include "store/store-util.h" +#include "store/store.h" +#include "system/angband-version.h" +#include "system/system-variables.h" // 暫定、init_flags の扱いを決めた上で消す. +#include "util/util.h" +#include "world/world.h" /* * Maximum number of tries for selection of a proper quest monster diff --git a/src/io/load.h b/src/io/load.h index 67abadc3d..114188ad0 100644 --- a/src/io/load.h +++ b/src/io/load.h @@ -1,5 +1,6 @@ #pragma once +#include "system/angband.h" #include "floor/floor-save.h" /* diff --git a/src/io/save.c b/src/io/save.c index 21d3f0bb6..978414e10 100644 --- a/src/io/save.c +++ b/src/io/save.c @@ -16,7 +16,6 @@ #include "io/save.h" #include "io/load.h" #include "io/report.h" - #include "system/angband-version.h" #include "object/artifact.h" #include "core/sort.h" diff --git a/src/io/save.h b/src/io/save.h index 7fe54152a..4f0d55370 100644 --- a/src/io/save.h +++ b/src/io/save.h @@ -8,7 +8,6 @@ #define SLF_SECOND 0x0001 /* Called from another save/load function */ #define SLF_NO_KILL 0x0002 /* Don't kill temporary files */ -/* save.c */ -extern bool save_player(player_type *player_ptr); -extern bool load_player(player_type *player_ptr); -extern bool save_floor(player_type *player_ptr, saved_floor_type *sf_ptr, BIT_FLAGS mode); +bool save_player(player_type *player_ptr); +bool load_player(player_type *player_ptr); +bool save_floor(player_type *player_ptr, saved_floor_type *sf_ptr, BIT_FLAGS mode); diff --git a/src/knowledge/knowledge-experiences.c b/src/knowledge/knowledge-experiences.c index 01348ae9f..3d550e08f 100644 --- a/src/knowledge/knowledge-experiences.c +++ b/src/knowledge/knowledge-experiences.c @@ -4,17 +4,16 @@ * @author Hourier */ -#include "system/angband.h" -#include "knowledge-experiences.h" -#include "io-dump/dump-util.h" +#include "knowledge/knowledge-experiences.h" #include "core/show-file.h" +#include "io-dump/dump-util.h" #include "object/object-flavor.h" #include "object/object-kind.h" #include "object/sv-bow-types.h" #include "player/player-skill.h" -#include "spell/technic-info-table.h" -#include "spell/spells-util.h" #include "spell/spells-execution.h" +#include "spell/spells-util.h" +#include "spell/technic-info-table.h" /* * Display weapon-exp diff --git a/src/knowledge/knowledge-experiences.h b/src/knowledge/knowledge-experiences.h index cf09ca5e8..cf8c83502 100644 --- a/src/knowledge/knowledge-experiences.h +++ b/src/knowledge/knowledge-experiences.h @@ -1,5 +1,7 @@ #pragma once +#include "system/angband.h" + void do_cmd_knowledge_weapon_exp(player_type *creature_ptr); void do_cmd_knowledge_spell_exp(player_type *creature_ptr); void do_cmd_knowledge_skill_exp(player_type *creature_ptr); diff --git a/src/knowledge/knowledge-inventory.c b/src/knowledge/knowledge-inventory.c index 44a6b1ff9..8d80f6711 100644 --- a/src/knowledge/knowledge-inventory.c +++ b/src/knowledge/knowledge-inventory.c @@ -4,20 +4,18 @@ * @author Hourier */ -#include "system/angband.h" #include "knowledge/knowledge-inventory.h" -#include "io-dump/dump-util.h" #include "core/show-file.h" -#include "object/object-flavor.h" -#include "object/special-object-flags.h" -#include "object/sv-ring-types.h" -#include "store/store-util.h" #include "floor/floor-town.h" +#include "io-dump/dump-util.h" +#include "object/object-flavor.h" #include "object/object-hook.h" -#include "object/object-kind.h" +#include "object/special-object-flags.h" #include "object/sv-amulet-types.h" #include "object/sv-protector-types.h" +#include "object/sv-ring-types.h" #include "object/tr-types.h" +#include "store/store-util.h" static concptr inven_res_label = _( " 酸電火冷毒光闇破轟獄因沌劣 盲怖乱痺透命感消復浮", diff --git a/src/knowledge/knowledge-inventory.h b/src/knowledge/knowledge-inventory.h index 10282eb51..c49a9ab23 100644 --- a/src/knowledge/knowledge-inventory.h +++ b/src/knowledge/knowledge-inventory.h @@ -1,3 +1,5 @@ #pragma once +#include "system/angband.h" + void do_cmd_knowledge_inventory(player_type *creature_ptr); diff --git a/src/knowledge/knowledge-items.c b/src/knowledge/knowledge-items.c index f9c1cb8bf..10dd8af0d 100644 --- a/src/knowledge/knowledge-items.c +++ b/src/knowledge/knowledge-items.c @@ -4,22 +4,21 @@ * @author Hourier */ -#include "system/angband.h" -#include "knowledge-items.h" +#include "knowledge/knowledge-items.h" +#include "core/show-file.h" +#include "core/sort.h" +#include "core/stuff-handler.h" #include "io-dump/dump-util.h" +#include "knowledge/object-group-table.h" #include "object/artifact.h" -#include "core/sort.h" -#include "object/object2.h" #include "object/object-flavor.h" #include "object/object-hook.h" #include "object/object-kind.h" +#include "object/object2.h" #include "object/special-object-flags.h" -#include "core/show-file.h" -#include "knowledge/object-group-table.h" -#include "world/world.h" #include "term/gameterm.h" -#include "core/stuff-handler.h" #include "view/display-main-window.h" // 暫定、後で消す. +#include "world/world.h" /* * todo okay = 既知のアーティファクト? と思われるが確証がない diff --git a/src/knowledge/knowledge-items.h b/src/knowledge/knowledge-items.h index d41613b96..f4df79db3 100644 --- a/src/knowledge/knowledge-items.h +++ b/src/knowledge/knowledge-items.h @@ -1,4 +1,6 @@ #pragma once +#include "system/angband.h" + void do_cmd_knowledge_artifacts(player_type *player_ptr); void do_cmd_knowledge_objects(player_type *creature_ptr, bool *need_redraw, bool visual_only, IDX direct_k_idx); diff --git a/src/main/init.c b/src/main/init.c index 18ce69317..e2e459211 100644 --- a/src/main/init.c +++ b/src/main/init.c @@ -1,5 +1,4 @@ /*! - * @file init2.c * @brief ゲームデータ初期化2 / Initialization (part 2) -BEN- * @date 2014/01/28 * @author @@ -30,41 +29,37 @@ * */ -#include "system/angband.h" -#include "util/util.h" -#include "io/uid-checker.h" -#include "io/files-util.h" -#include "system/system-variables.h" -#include "system/angband-version.h" -#include "io/read-pref-file.h" -#include "term/gameterm.h" - -#include "object/artifact.h" -#include "cmd/cmd-building.h" #include "main/init.h" +#include "cmd/cmd-building.h" +#include "dungeon/dungeon-file.h" +#include "dungeon/dungeon.h" #include "dungeon/quest.h" -#include "grid/trap.h" -#include "room/rooms.h" -#include "store/store.h" +#include "floor/floor-town.h" +#include "floor/floor.h" #include "floor/wild.h" -#include "dungeon/dungeon-file.h" -#include "io/files-util.h" #include "grid/feature.h" -#include "floor/floor.h" -#include "floor/floor-town.h" -#include "dungeon/dungeon.h" -#include "room/rooms-vault.h" -#include "player/player-skill.h" -#include "player/player-class.h" -#include "object/object-kind.h" +#include "grid/trap.h" +#include "io/files-util.h" +#include "io/read-pref-file.h" +#include "io/uid-checker.h" +#include "market/articles-on-sale.h" +#include "object/artifact.h" #include "object/object-ego.h" +#include "object/object-kind.h" +#include "player/player-class.h" +#include "player/player-skill.h" #include "room/rooms-vault.h" -#include "world/world.h" -#include "market/articles-on-sale.h" +#include "room/rooms.h" #include "store/store-util.h" +#include "store/store.h" +#include "system/angband-version.h" +#include "system/system-variables.h" +#include "term/gameterm.h" +#include "util/util.h" +#include "world/world.h" -#include #include +#include static void put_title(void); diff --git a/src/main/init.h b/src/main/init.h index eb74b7e95..28d559825 100644 --- a/src/main/init.h +++ b/src/main/init.h @@ -13,7 +13,7 @@ #ifndef INCLUDED_INIT_H #define INCLUDED_INIT_H -#include "system/h-basic.h" +#include "system/angband.h" typedef struct header header; diff --git a/src/market/articles-on-sale.c b/src/market/articles-on-sale.c index 680d14149..19da87cd6 100644 --- a/src/market/articles-on-sale.c +++ b/src/market/articles-on-sale.c @@ -1,6 +1,4 @@ -#include "system/angband.h" -#include "store/store-owners.h" -#include "articles-on-sale.h" +#include "market/articles-on-sale.h" #include "object/sv-amulet-types.h" #include "object/sv-armor-types.h" #include "object/sv-bow-types.h" diff --git a/src/market/articles-on-sale.h b/src/market/articles-on-sale.h index dfbe41547..36d09b2af 100644 --- a/src/market/articles-on-sale.h +++ b/src/market/articles-on-sale.h @@ -1,5 +1,8 @@ #pragma once +#include "store/store-owners.h" +#include "system/angband.h" + #define STORE_CHOICES 48 /* Number of items to choose stock from */ extern byte store_table[MAX_STORES][STORE_CHOICES][2]; diff --git a/src/market/building-craft-fix.c b/src/market/building-craft-fix.c index 779292d40..58216d0c8 100644 --- a/src/market/building-craft-fix.c +++ b/src/market/building-craft-fix.c @@ -1,20 +1,19 @@ -#include "system/angband.h" -#include "market/building-craft-fix.h" -#include "object/object2.h" -#include "object/object-hook.h" +#include "market/building-craft-fix.h" +#include "core/stuff-handler.h" +#include "inventory/player-inventory.h" +#include "market/building-util.h" +#include "object/artifact.h" +#include "object/item-use-flags.h" +#include "object/object-boost.h" #include "object/object-flavor.h" +#include "object/object-hook.h" #include "object/object-kind.h" -#include "object/artifact.h" +#include "object/object2.h" #include "object/special-object-flags.h" -#include "market/building-util.h" -#include "inventory/player-inventory.h" -#include "object/object-boost.h" -#include "player/player-effects.h" -#include "core/stuff-handler.h" -#include "object/tr-types.h" -#include "object/item-use-flags.h" #include "object/sv-other-types.h" #include "object/sv-weapon-types.h" +#include "object/tr-types.h" +#include "player/player-effects.h" /*! * @brief 修復材料のオブジェクトから修復対象に特性を移植する。 @@ -161,7 +160,8 @@ static PRICE repair_broken_weapon_aux(player_type *player_ptr, PRICE bcost) ck_ptr = &k_info[k_idx]; if (tval == TV_SWORD) { - if ((ck_ptr->sval == SV_BROKEN_DAGGER) || (ck_ptr->sval == SV_BROKEN_SWORD) || (ck_ptr->sval == SV_DIAMOND_EDGE) || (ck_ptr->sval == SV_POISON_NEEDLE)) + if ((ck_ptr->sval == SV_BROKEN_DAGGER) || (ck_ptr->sval == SV_BROKEN_SWORD) || (ck_ptr->sval == SV_DIAMOND_EDGE) + || (ck_ptr->sval == SV_POISON_NEEDLE)) continue; } if (tval == TV_POLEARM) { diff --git a/src/market/building-craft-fix.h b/src/market/building-craft-fix.h index fbe48cda9..a8f61a42d 100644 --- a/src/market/building-craft-fix.h +++ b/src/market/building-craft-fix.h @@ -1,3 +1,5 @@ #pragma once +#include "system/angband.h" + int repair_broken_weapon(player_type *player_ptr, PRICE bcost); diff --git a/src/market/building-recharger.c b/src/market/building-recharger.c index 5db26b101..cca014849 100644 --- a/src/market/building-recharger.c +++ b/src/market/building-recharger.c @@ -1,14 +1,13 @@ -#include "system/angband.h" -#include "market/building-recharger.h" +#include "market/building-recharger.h" +#include "autopick/autopick.h" +#include "inventory/player-inventory.h" +#include "market/building-util.h" #include "object/item-use-flags.h" +#include "object/object-flavor.h" #include "object/object-hook.h" #include "object/object-kind.h" -#include "object/object-flavor.h" #include "object/special-object-flags.h" -#include "market/building-util.h" -#include "inventory/player-inventory.h" #include "spell/spells3.h" -#include "autopick/autopick.h" /*! * @brief 魔道具の使用回数を回復させる施設のメインルーチン / Recharge rods, wands and staffs @@ -42,9 +41,9 @@ void building_recharge(player_type *player_ptr) k_ptr = &k_info[o_ptr->k_idx]; /* - * We don't want to give the player free info about - * the level of the item or the number of charges. - */ + * We don't want to give the player free info about + * the level of the item or the number of charges. + */ /* The item must be "known" */ char tmp_str[MAX_NLEN]; if (!object_is_known(o_ptr)) { @@ -84,8 +83,7 @@ void building_recharge(player_type *player_ptr) price = MAX(10, price); } - if (o_ptr->tval == TV_WAND - && (o_ptr->pval / o_ptr->number >= k_ptr->pval)) { + if (o_ptr->tval == TV_WAND && (o_ptr->pval / o_ptr->number >= k_ptr->pval)) { if (o_ptr->number > 1) { msg_print(_("この魔法棒はもう充分に充填されています。", "These wands are already fully charged.")); } else { @@ -118,8 +116,7 @@ void building_recharge(player_type *player_ptr) #ifdef JP if (get_check(format("そのロッドを$%d で再充填しますか?", price))) #else - if (get_check(format("Recharge the %s for %d gold? ", - ((o_ptr->number > 1) ? "rods" : "rod"), price))) + if (get_check(format("Recharge the %s for %d gold? ", ((o_ptr->number > 1) ? "rods" : "rod"), price))) #endif { @@ -134,8 +131,8 @@ void building_recharge(player_type *player_ptr) else max_charges = o_ptr->number * k_ptr->pval - o_ptr->pval; - charges = (PARAMETER_VALUE)get_quantity(format(_("一回分$%d で何回分充填しますか?", "Add how many charges for %d gold? "), price), - MIN(player_ptr->au / price, max_charges)); + charges = (PARAMETER_VALUE)get_quantity( + format(_("一回分$%d で何回分充填しますか?", "Add how many charges for %d gold? "), price), MIN(player_ptr->au / price, max_charges)); if (charges < 1) return; diff --git a/src/market/building-recharger.h b/src/market/building-recharger.h index a49a0e153..bb09d6a09 100644 --- a/src/market/building-recharger.h +++ b/src/market/building-recharger.h @@ -1,4 +1,6 @@ #pragma once +#include "system/angband.h" + void building_recharge(player_type *player_ptr); void building_recharge_all(player_type *player_ptr); diff --git a/src/monster/monster-race.h b/src/monster/monster-race.h index 4f1bc6e22..cb48510db 100644 --- a/src/monster/monster-race.h +++ b/src/monster/monster-race.h @@ -1,4 +1,5 @@ #pragma once + #include "util/util.h" #include "combat/monster-attack-types.h" #include "combat/monster-attack-effect.h" diff --git a/src/monster/monster.h b/src/monster/monster.h index be9bd4b89..00b4cb151 100644 --- a/src/monster/monster.h +++ b/src/monster/monster.h @@ -1,4 +1,5 @@ #pragma once + #include "monster/monster-race.h" typedef bool(*monsterrace_hook_type)(MONRACE_IDX r_idx); diff --git a/src/object/artifact.c b/src/object/artifact.c index 024c0f907..0e91d6a11 100644 --- a/src/object/artifact.c +++ b/src/object/artifact.c @@ -10,36 +10,33 @@ * 2013 Deskull rearranged comment for Doxygen. */ -#include "system/angband.h" -#include "util/util.h" - #include "object/artifact.h" +#include "cmd-item/cmd-activate.h" #include "cmd-item/cmd-smith.h" - -#include "player/avatar.h" #include "floor/floor.h" -#include "cmd-item/cmd-activate.h" -#include "object/object1.h" -#include "object/object-kind.h" +#include "grid/grid.h" +#include "io/files-util.h" +#include "monster/monster.h" #include "object/object-boost.h" #include "object/object-curse.h" #include "object/object-ego.h" #include "object/object-flavor.h" #include "object/object-hook.h" +#include "object/object-kind.h" +#include "object/object1.h" +#include "object/object2.h" #include "object/special-object-flags.h" #include "object/sv-armor-types.h" #include "object/sv-weapon-types.h" -#include "spell/spells-object.h" -#include "io/files-util.h" -#include "grid/grid.h" -#include "monster/monster.h" -#include "view/display-main-window.h" +#include "object/tr-types.h" +#include "object/trc-types.h" +#include "player/avatar.h" #include "player/player-class.h" #include "player/player-personalities-table.h" +#include "spell/spells-object.h" +#include "util/util.h" +#include "view/display-main-window.h" #include "world/world.h" -#include "object/tr-types.h" -#include "object/trc-types.h" -#include "object/object2.h" /* * The artifact arrays diff --git a/src/object/artifact.h b/src/object/artifact.h index 2d9ee4ff1..07fabc7df 100644 --- a/src/object/artifact.h +++ b/src/object/artifact.h @@ -1,4 +1,6 @@ #pragma once + +#include "system/angband.h" #include "cmd-item/cmd-activate.h" typedef struct artifact_type artifact_type; diff --git a/src/object/object-broken.c b/src/object/object-broken.c index 45f6e393b..63cb0940c 100644 --- a/src/object/object-broken.c +++ b/src/object/object-broken.c @@ -1,12 +1,17 @@ -#include "system/angband.h" -#include "object/object2.h" -#include "object/object-kind.h" +/*! + * @brief アイテム破壊処理 + * @date 2019/03/06 + * @author deskull + */ +#include "object/object-broken.h" #include "combat/snipe.h" -#include "spell/spells-type.h" -#include "spell/process-effect.h" #include "effect/effect-characteristics.h" +#include "object/object-kind.h" +#include "object/object2.h" #include "object/sv-potion-types.h" #include "object/tr-types.h" +#include "spell/process-effect.h" +#include "spell/spells-type.h" /*! * @brief アイテムが酸で破損するかどうかを判定する diff --git a/src/object/object-broken.h b/src/object/object-broken.h index 599acac0e..133b02391 100644 --- a/src/object/object-broken.h +++ b/src/object/object-broken.h @@ -1,13 +1,15 @@ #pragma once -extern bool hates_acid(object_type *o_ptr); -extern bool hates_elec(object_type *o_ptr); -extern bool hates_fire(object_type *o_ptr); -extern bool hates_cold(object_type *o_ptr); -extern int set_acid_destroy(object_type *o_ptr); -extern int set_elec_destroy(object_type *o_ptr); -extern int set_fire_destroy(object_type *o_ptr); -extern int set_cold_destroy(object_type *o_ptr); +#include "system/angband.h" -extern bool potion_smash_effect(player_type *owner_ptr, MONSTER_IDX who, POSITION y, POSITION x, KIND_OBJECT_IDX k_idx); +bool hates_acid(object_type *o_ptr); +bool hates_elec(object_type *o_ptr); +bool hates_fire(object_type *o_ptr); +bool hates_cold(object_type *o_ptr); +int set_acid_destroy(object_type *o_ptr); +int set_elec_destroy(object_type *o_ptr); +int set_fire_destroy(object_type *o_ptr); +int set_cold_destroy(object_type *o_ptr); + +bool potion_smash_effect(player_type *owner_ptr, MONSTER_IDX who, POSITION y, POSITION x, KIND_OBJECT_IDX k_idx); PERCENTAGE breakage_chance(player_type *owner_ptr, object_type *o_ptr, bool has_archer_bonus, SPELL_IDX snipe_type); diff --git a/src/object/object-flavor.c b/src/object/object-flavor.c index e784f1566..37f8d3e60 100644 --- a/src/object/object-flavor.c +++ b/src/object/object-flavor.c @@ -1,5 +1,4 @@ /*! - * @file object-flavor.c * @brief オブジェクトの記述処理 / Mbject flavor code * @date 2014/01/03 * @author @@ -10,28 +9,26 @@ * are included in all such copies. Other copyrights may also apply.\n */ -#include "system/angband.h" -#include "util/util.h" - +#include "object/object-flavor.h" #include "cmd-item/cmd-smith.h" +#include "combat/snipe.h" +#include "grid/trap.h" +#include "io/files-util.h" +#include "locale/japanese.h" +#include "monster/monster-race.h" #include "object/artifact.h" -#include "player/player-status.h" -#include "player/player-class.h" -#include "shoot.h" -#include "object/object-kind.h" +#include "object/object-ego.h" #include "object/object-hook.h" -#include "object/object-flavor.h" +#include "object/object-kind.h" #include "object/special-object-flags.h" #include "object/sv-food-types.h" #include "object/sv-lite-types.h" -#include "grid/trap.h" -#include "combat/snipe.h" -#include "io/files-util.h" -#include "world/world.h" -#include "monster/monster-race.h" -#include "object/object-ego.h" -#include "locale/japanese.h" #include "object/tr-types.h" +#include "player/player-class.h" +#include "player/player-status.h" +#include "shoot.h" +#include "util/util.h" +#include "world/world.h" /*! * @brief アイテムの価値記述テーブル diff --git a/src/object/object-flavor.h b/src/object/object-flavor.h index adf6a0f65..beae6b05f 100644 --- a/src/object/object-flavor.h +++ b/src/object/object-flavor.h @@ -1,6 +1,6 @@ #pragma once -#include "system/h-type.h" +#include "system/angband.h" #include "object/object1.h" /* flavor.c */ diff --git a/src/object/object-hook.c b/src/object/object-hook.c index 4492616ad..dbed7ede8 100644 --- a/src/object/object-hook.c +++ b/src/object/object-hook.c @@ -1,9 +1,15 @@ -#include "system/angband.h" +/*! + * @brief オブジェクトに関する汎用判定処理 + * @date 2018/09/24 + * @author deskull + */ + +#include "object/object-hook.h" +#include "dungeon/quest.h" #include "floor/floor.h" -#include "util/util.h" +#include "monster/monster.h" #include "object/artifact.h" #include "object/item-feeling.h" -#include "object/object-hook.h" #include "object/object-kind.h" #include "object/special-object-flags.h" #include "object/sv-armor-types.h" @@ -12,14 +18,13 @@ #include "object/sv-protector-types.h" #include "object/sv-weapon-types.h" #include "object/tr-types.h" -#include "monster/monster.h" +#include "player/mimic-info-table.h" #include "player/player-class.h" +#include "player/player-races-table.h" #include "player/player-skill.h" -#include "player/mimic-info-table.h" -#include "dungeon/quest.h" -#include "world/world.h" +#include "util/util.h" #include "view/display-main-window.h" -#include "player/player-races-table.h" +#include "world/world.h" /*! * @brief 対象のアイテムが矢やクロスボウの矢の材料になるかを返す。/ @@ -1014,3 +1019,29 @@ bool item_tester_okay(player_type *player_ptr, object_type *o_ptr, tval_type tva /* Assume okay */ return TRUE; } + +/* + * Determine if a given inventory item is "aware" + */ +bool object_is_aware(object_type *o_ptr) +{ + return k_info[(o_ptr)->k_idx].aware; +} + +/* + * Determine if a given inventory item is "tried" + */ +bool object_is_tried(object_type *o_ptr) +{ + return k_info[(o_ptr)->k_idx].tried; +} + +/* + * Determine if a given inventory item is "known" + * Test One -- Check for special "known" tag + * Test Two -- Check for "Easy Know" + "Aware" + */ +bool object_is_known(object_type *o_ptr) +{ + return ((o_ptr->ident & IDENT_KNOWN) != 0) || (k_info[(o_ptr)->k_idx].easy_know && k_info[(o_ptr)->k_idx].aware); +} diff --git a/src/object/object-hook.h b/src/object/object-hook.h index 6369a4fc7..7800dc37d 100644 --- a/src/object/object-hook.h +++ b/src/object/object-hook.h @@ -1,75 +1,63 @@ #pragma once -extern bool (*item_tester_hook)(object_type *o_ptr); - -extern bool item_tester_hook_convertible(object_type *o_ptr); -extern bool item_tester_hook_recharge(object_type *o_ptr); -extern bool item_tester_hook_orthodox_melee_weapons(object_type *o_ptr); -extern bool item_tester_hook_melee_weapon(object_type *o_ptr); -extern bool item_tester_hook_ammo(object_type *o_ptr); -extern bool item_tester_hook_broken_weapon(object_type *o_ptr); -extern bool item_tester_hook_boomerang(object_type *o_ptr); -extern bool item_tester_hook_eatable(object_type *o_ptr); -extern bool item_tester_hook_mochikae(object_type *o_ptr); -extern bool item_tester_hook_activate(object_type *o_ptr); -extern bool item_tester_hook_wear(object_type *o_ptr); -extern bool item_tester_hook_use(object_type *o_ptr); -extern bool item_tester_hook_quaff(object_type *o_ptr); -extern bool item_tester_hook_readable(object_type *o_ptr); -extern bool item_tester_hook_melee_ammo(object_type *o_ptr); -extern bool item_tester_hook_weapon_except_bow(object_type *o_ptr); -extern bool item_tester_hook_cursed(object_type *o_ptr); -extern bool item_tester_hook_nameless_weapon_armour(object_type *o_ptr); -extern bool item_tester_hook_identify(object_type *o_ptr); -extern bool item_tester_hook_identify_weapon_armour(object_type *o_ptr); -extern bool item_tester_hook_identify_fully(object_type *o_ptr); -extern bool item_tester_hook_identify_fully_weapon_armour(object_type *o_ptr); -extern bool item_tester_hook_recharge(object_type *o_ptr); - -extern bool item_tester_learn_spell(object_type *o_ptr); -extern bool item_tester_high_level_book(object_type *o_ptr); -extern bool item_tester_refill_lantern(object_type *o_ptr); +#include "system/angband.h" -extern bool object_is_potion(object_type *o_ptr); -extern bool object_is_bounty(object_type *o_ptr); -extern bool object_is_favorite(object_type *o_ptr); -extern bool object_is_rare(object_type *o_ptr); -extern bool object_is_weapon(object_type *o_ptr); -extern bool object_is_weapon_ammo(object_type *o_ptr); -extern bool object_is_ammo(object_type *o_ptr); -extern bool object_is_armour(object_type *o_ptr); -extern bool object_is_weapon_armour_ammo(object_type *o_ptr); -extern bool object_is_melee_weapon(object_type *o_ptr); -extern bool object_is_wearable(object_type *o_ptr); -extern bool object_is_equipment(object_type *o_ptr); -extern bool object_refuse_enchant_weapon(object_type *o_ptr); -extern bool object_allow_enchant_weapon(object_type *o_ptr); -extern bool object_allow_enchant_melee_weapon(object_type *o_ptr); -extern bool object_is_smith(object_type *o_ptr); -extern bool object_is_artifact(object_type *o_ptr); -extern bool object_is_random_artifact(object_type *o_ptr); -extern bool object_is_nameless(object_type *o_ptr); -extern bool object_allow_two_hands_wielding(object_type *o_ptr); -extern bool object_can_refill_torch(object_type *o_ptr); -extern bool can_player_destroy_object(object_type *o_ptr); -extern bool object_is_quest_target(object_type *o_ptr); +extern bool (*item_tester_hook)(object_type *o_ptr); -/* - * Determine if a given inventory item is "aware" - */ -#define object_is_aware(T) (k_info[(T)->k_idx].aware) +bool item_tester_hook_convertible(object_type *o_ptr); +bool item_tester_hook_recharge(object_type *o_ptr); +bool item_tester_hook_orthodox_melee_weapons(object_type *o_ptr); +bool item_tester_hook_melee_weapon(object_type *o_ptr); +bool item_tester_hook_ammo(object_type *o_ptr); +bool item_tester_hook_broken_weapon(object_type *o_ptr); +bool item_tester_hook_boomerang(object_type *o_ptr); +bool item_tester_hook_eatable(object_type *o_ptr); +bool item_tester_hook_mochikae(object_type *o_ptr); +bool item_tester_hook_activate(object_type *o_ptr); +bool item_tester_hook_wear(object_type *o_ptr); +bool item_tester_hook_use(object_type *o_ptr); +bool item_tester_hook_quaff(object_type *o_ptr); +bool item_tester_hook_readable(object_type *o_ptr); +bool item_tester_hook_melee_ammo(object_type *o_ptr); +bool item_tester_hook_weapon_except_bow(object_type *o_ptr); +bool item_tester_hook_cursed(object_type *o_ptr); +bool item_tester_hook_nameless_weapon_armour(object_type *o_ptr); +bool item_tester_hook_identify(object_type *o_ptr); +bool item_tester_hook_identify_weapon_armour(object_type *o_ptr); +bool item_tester_hook_identify_fully(object_type *o_ptr); +bool item_tester_hook_identify_fully_weapon_armour(object_type *o_ptr); +bool item_tester_hook_recharge(object_type *o_ptr); - /* - * Determine if a given inventory item is "tried" - */ -#define object_is_tried(T) (k_info[(T)->k_idx].tried) +bool item_tester_learn_spell(object_type *o_ptr); +bool item_tester_high_level_book(object_type *o_ptr); +bool item_tester_refill_lantern(object_type *o_ptr); - /* - * Determine if a given inventory item is "known" - * Test One -- Check for special "known" tag - * Test Two -- Check for "Easy Know" + "Aware" - */ -#define object_is_known(T) (((T)->ident & (IDENT_KNOWN)) || (k_info[(T)->k_idx].easy_know && k_info[(T)->k_idx].aware)) +bool object_is_potion(object_type *o_ptr); +bool object_is_bounty(object_type *o_ptr); +bool object_is_favorite(object_type *o_ptr); +bool object_is_rare(object_type *o_ptr); +bool object_is_weapon(object_type *o_ptr); +bool object_is_weapon_ammo(object_type *o_ptr); +bool object_is_ammo(object_type *o_ptr); +bool object_is_armour(object_type *o_ptr); +bool object_is_weapon_armour_ammo(object_type *o_ptr); +bool object_is_melee_weapon(object_type *o_ptr); +bool object_is_wearable(object_type *o_ptr); +bool object_is_equipment(object_type *o_ptr); +bool object_refuse_enchant_weapon(object_type *o_ptr); +bool object_allow_enchant_weapon(object_type *o_ptr); +bool object_allow_enchant_melee_weapon(object_type *o_ptr); +bool object_is_smith(object_type *o_ptr); +bool object_is_artifact(object_type *o_ptr); +bool object_is_random_artifact(object_type *o_ptr); +bool object_is_nameless(object_type *o_ptr); +bool object_allow_two_hands_wielding(object_type *o_ptr); +bool object_can_refill_torch(object_type *o_ptr); +bool can_player_destroy_object(object_type *o_ptr); +bool object_is_quest_target(object_type *o_ptr); +bool object_is_aware(object_type *o_ptr); +bool object_is_tried(object_type *o_ptr); +bool object_is_known(object_type *o_ptr); #define OBJECT_IS_FULL_KNOWN(T) ((T)->ident & IDENT_FULL_KNOWN) diff --git a/src/object/object-kind-hook.c b/src/object/object-kind-hook.c index b077bc420..46ac6e5ea 100644 --- a/src/object/object-kind-hook.c +++ b/src/object/object-kind-hook.c @@ -1,4 +1,9 @@ -#include "system/angband.h" +/*! + * @brief アイテムが特定種別のものであるかどうかの判定関数群 + * @date 2018/12/15 + * @author deskull + */ + #include "object/object-kind-hook.h" #include "object/object-kind.h" #include "object/sv-amulet-types.h" diff --git a/src/object/object-kind-hook.h b/src/object/object-kind-hook.h index e1a5942f5..49061bf41 100644 --- a/src/object/object-kind-hook.h +++ b/src/object/object-kind-hook.h @@ -1,4 +1,7 @@ - +#pragma once + +#include "system/angband.h" + bool kind_is_cloak(KIND_OBJECT_IDX k_idx); bool kind_is_polearm(KIND_OBJECT_IDX k_idx); bool kind_is_sword(KIND_OBJECT_IDX k_idx); @@ -8,6 +11,3 @@ bool kind_is_armor(KIND_OBJECT_IDX k_idx); bool kind_is_hafted(KIND_OBJECT_IDX k_idx); bool kind_is_potion(KIND_OBJECT_IDX k_idx); bool kind_is_good(KIND_OBJECT_IDX k_idx); - - - diff --git a/src/object/object-kind.c b/src/object/object-kind.c index 6d9e8e18b..e89824742 100644 --- a/src/object/object-kind.c +++ b/src/object/object-kind.c @@ -1,6 +1,5 @@ -#include "system/angband.h" +#include "object-kind.h" #include "util/util.h" -#include "object-kind.h" /* * The object kind arrays diff --git a/src/object/object-kind.h b/src/object/object-kind.h index 328ab5b3d..5ec195b3a 100644 --- a/src/object/object-kind.h +++ b/src/object/object-kind.h @@ -1,5 +1,6 @@ #pragma once -#include "util/util.h" + +#include "system/angband.h" /*! * @struct object_kind diff --git a/src/object/object1.c b/src/object/object1.c index 89604b78a..f9a60d662 100644 --- a/src/object/object1.c +++ b/src/object/object1.c @@ -11,36 +11,35 @@ * 2014 Deskull rearranged comment for Doxygen.\n */ -#include "system/angband.h" #include "object/object1.h" -#include "system/system-variables.h" +#include "cmd-item/cmd-activate.h" +#include "cmd-item/cmd-smith.h" +#include "combat/snipe.h" +#include "floor/floor.h" +#include "inventory/player-inventory.h" +#include "io/files-util.h" #include "io/read-pref-file.h" -#include "util/util.h" +#include "monster/monster.h" #include "object/artifact.h" -#include "floor/floor.h" -#include "cmd-item/cmd-activate.h" #include "object/item-apply-magic.h" -#include "object/object-kind.h" #include "object/object-ego.h" #include "object/object-flavor.h" #include "object/object-hook.h" +#include "object/object-kind.h" #include "object/special-object-flags.h" #include "object/sv-amulet-types.h" #include "object/sv-lite-types.h" #include "object/sv-other-types.h" #include "object/sv-ring-types.h" #include "object/sv-weapon-types.h" -#include "player/player-move.h" +#include "object/tr-types.h" +#include "object/trc-types.h" #include "player/player-class.h" -#include "inventory/player-inventory.h" -#include "monster/monster.h" -#include "io/files-util.h" +#include "player/player-move.h" +#include "system/system-variables.h" #include "term/gameterm.h" -#include "cmd-item/cmd-smith.h" -#include "combat/snipe.h" +#include "util/util.h" #include "view/display-main-window.h" -#include "object/tr-types.h" -#include "object/trc-types.h" #if defined(MACH_O_CARBON) #ifdef verify diff --git a/src/object/object1.h b/src/object/object1.h index 992b4feca..f8f4ac72c 100644 --- a/src/object/object1.h +++ b/src/object/object1.h @@ -30,6 +30,7 @@ #define OBJ_GOLD_LIST 480 /* First "gold" entry */ +#include "system/angband.h" #include "object/object-util.h" void reset_visuals(player_type *owner_ptr, void(*process_autopick_file_command)(char*)); diff --git a/src/player/player-effects.c b/src/player/player-effects.c index 19dcdc017..a339984bc 100644 --- a/src/player/player-effects.c +++ b/src/player/player-effects.c @@ -12,59 +12,54 @@ * 2013 Deskull rearranged comment for Doxygen.\n */ -#include "system/angband.h" -#include "term/gameterm.h" -#include "core/stuff-handler.h" -#include "util/util.h" - -#include "monster/creature.h" - -#include "object/artifact.h" +#include "player/player-effects.h" +#include "autopick/autopick-reader-writer.h" +#include "birth/birth-body-spec.h" +#include "birth/birth-stat.h" +#include "birth/character-builder.h" #include "cmd-io/cmd-dump.h" -#include "floor/floor.h" #include "cmd/cmd-building.h" -#include "birth/character-builder.h" +#include "combat/snipe.h" +#include "core/stuff-handler.h" +#include "dungeon/quest.h" +#include "floor/floor.h" +#include "floor/wild.h" #include "grid/grid.h" +#include "io/files-util.h" +#include "io/report.h" +#include "io/save.h" +#include "monster/creature.h" +#include "monster/monster-status.h" +#include "mspell/monster-spell.h" #include "mutation/mutation.h" -#include "dungeon/quest.h" -#include "player/avatar.h" -#include "spell/spells-status.h" -#include "realm/realm-song.h" -#include "realm/realm-hex.h" +#include "object/artifact.h" #include "object/item-feeling.h" -#include "object/object2.h" #include "object/object-ego.h" #include "object/object-hook.h" +#include "object/object-kind.h" +#include "object/object2.h" #include "object/special-object-flags.h" #include "object/sv-armor-types.h" #include "object/sv-protector-types.h" #include "object/sv-weapon-types.h" -#include "floor/wild.h" -#include "spell/spells-floor.h" -#include "player/player-status.h" +#include "player/avatar.h" #include "player/player-class.h" +#include "player/player-damage.h" #include "player/player-move.h" -#include "player/player-effects.h" -#include "player/race-info-table.h" -#include "player/player-class.h" -#include "player/player-personality.h" #include "player/player-personalities-table.h" -#include "player/player-sex.h" -#include "player/player-damage.h" -#include "monster/monster-status.h" -#include "combat/snipe.h" -#include "io/files-util.h" -#include "mspell/monster-spell.h" -#include "world/world.h" -#include "object/object-kind.h" -#include "autopick/autopick-reader-writer.h" -#include "io/save.h" -#include "io/report.h" -#include "birth/birth-stat.h" -#include "birth/birth-body-spec.h" +#include "player/player-personality.h" #include "player/player-races-table.h" - +#include "player/player-sex.h" +#include "player/player-status.h" +#include "player/race-info-table.h" +#include "realm/realm-hex.h" +#include "realm/realm-song.h" +#include "spell/spells-floor.h" +#include "spell/spells-status.h" +#include "term/gameterm.h" +#include "util/util.h" #include "view/display-main-window.h" +#include "world/world.h" /*! * @brief 修行僧の構え能力テーブル diff --git a/src/player/player-effects.h b/src/player/player-effects.h index 930ea7790..6633424f5 100644 --- a/src/player/player-effects.h +++ b/src/player/player-effects.h @@ -1,88 +1,85 @@ #pragma once -typedef struct kamae kamae; +#include "system/angband.h" -struct kamae -{ +typedef struct kamae { concptr desc; /* A verbose kamae description */ PLAYER_LEVEL min_level; /* Minimum level to use */ concptr info; -}; - -/* effects.c */ - -extern void set_action(player_type *creature_ptr, ACTION_IDX typ); -extern void reset_tim_flags(player_type *creature_ptr); -extern void dispel_player(player_type *creature_ptr); -extern bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, MIMIC_RACE_IDX p, bool do_dec); -extern bool set_blind(player_type *creature_ptr, TIME_EFFECT v); -extern bool set_confused(player_type *creature_ptr, TIME_EFFECT v); -extern bool set_poisoned(player_type *creature_ptr, TIME_EFFECT v); -extern bool set_afraid(player_type *creature_ptr, TIME_EFFECT v); -extern bool set_paralyzed(player_type *creature_ptr, TIME_EFFECT v); -extern bool set_image(player_type *creature_ptr, TIME_EFFECT v); -extern bool set_fast(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_slow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_shield(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tsubureru(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_magicdef(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_blessed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_hero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_shero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_protevil(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_invuln(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tim_invis(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tim_infra(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tim_regen(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tim_stealth(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_lightspeed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tim_levitation(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tim_sh_touki(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tim_sh_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tim_sh_holy(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tim_eyeeye(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_resist_magic(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tim_reflect(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_multishadow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_dustrobe(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_kabenuke(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tsuyoshi(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_ele_attack(player_type *creature_ptr, u32b attack_type, TIME_EFFECT v); -extern bool set_ele_immune(player_type *creature_ptr, u32b immune_type, TIME_EFFECT v); -extern bool set_oppose_acid(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_oppose_elec(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_oppose_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_oppose_cold(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_oppose_pois(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_stun(player_type *creature_ptr, TIME_EFFECT v); -extern bool set_cut(player_type *creature_ptr, TIME_EFFECT v); -extern bool set_food(player_type *creature_ptr, TIME_EFFECT v); -extern bool inc_stat(player_type *creature_ptr, int stat); -extern bool dec_stat(player_type *creature_ptr, int stat, int amount, int permanent); -extern bool res_stat(player_type *creature_ptr, int stat); -extern bool hp_player(player_type *creature_ptr, int num); -extern bool do_dec_stat(player_type *creature_ptr, int stat); -extern bool do_res_stat(player_type *creature_ptr, int stat); -extern bool do_inc_stat(player_type *creature_ptr, int stat); -extern bool restore_level(player_type *creature_ptr); -extern bool lose_all_info(player_type *creature_ptr); -extern void gain_exp_64(player_type *creature_ptr, s32b amount, u32b amount_frac); -extern void gain_exp(player_type *creature_ptr, s32b amount); -extern void calc_android_exp(player_type *creature_ptr); -extern void lose_exp(player_type *creature_ptr, s32b amount); -extern bool drain_exp(player_type *creature_ptr, s32b drain, s32b slip, int hold_exp_prob); -extern void do_poly_self(player_type *creature_ptr); -extern bool set_ultimate_res(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tim_res_nether(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tim_res_time(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool choose_ele_attack(player_type *creature_ptr); -extern bool choose_ele_immune(player_type *creature_ptr, TIME_EFFECT turn); -extern bool set_wraith_form(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_tim_esp(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -extern bool set_superstealth(player_type *creature_ptr, bool set); -extern void do_poly_wounds(player_type *creature_ptr); -extern void change_race(player_type *creature_ptr, player_race_type new_race, concptr effect_msg); -extern bool drop_weapons(player_type *creature_ptr); +} kamae; extern const kamae kamae_shurui[MAX_KAMAE]; extern const kamae kata_shurui[MAX_KATA]; + +void set_action(player_type *creature_ptr, ACTION_IDX typ); +void reset_tim_flags(player_type *creature_ptr); +void dispel_player(player_type *creature_ptr); +bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, MIMIC_RACE_IDX p, bool do_dec); +bool set_blind(player_type *creature_ptr, TIME_EFFECT v); +bool set_confused(player_type *creature_ptr, TIME_EFFECT v); +bool set_poisoned(player_type *creature_ptr, TIME_EFFECT v); +bool set_afraid(player_type *creature_ptr, TIME_EFFECT v); +bool set_paralyzed(player_type *creature_ptr, TIME_EFFECT v); +bool set_image(player_type *creature_ptr, TIME_EFFECT v); +bool set_fast(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_slow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_shield(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tsubureru(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_magicdef(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_blessed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_hero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_shero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_protevil(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_invuln(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tim_invis(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tim_infra(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tim_regen(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tim_stealth(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_lightspeed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tim_levitation(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tim_sh_touki(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tim_sh_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tim_sh_holy(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tim_eyeeye(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_resist_magic(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tim_reflect(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_multishadow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_dustrobe(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_kabenuke(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tsuyoshi(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_ele_attack(player_type *creature_ptr, u32b attack_type, TIME_EFFECT v); +bool set_ele_immune(player_type *creature_ptr, u32b immune_type, TIME_EFFECT v); +bool set_oppose_acid(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_oppose_elec(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_oppose_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_oppose_cold(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_oppose_pois(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_stun(player_type *creature_ptr, TIME_EFFECT v); +bool set_cut(player_type *creature_ptr, TIME_EFFECT v); +bool set_food(player_type *creature_ptr, TIME_EFFECT v); +bool inc_stat(player_type *creature_ptr, int stat); +bool dec_stat(player_type *creature_ptr, int stat, int amount, int permanent); +bool res_stat(player_type *creature_ptr, int stat); +bool hp_player(player_type *creature_ptr, int num); +bool do_dec_stat(player_type *creature_ptr, int stat); +bool do_res_stat(player_type *creature_ptr, int stat); +bool do_inc_stat(player_type *creature_ptr, int stat); +bool restore_level(player_type *creature_ptr); +bool lose_all_info(player_type *creature_ptr); +void gain_exp_64(player_type *creature_ptr, s32b amount, u32b amount_frac); +void gain_exp(player_type *creature_ptr, s32b amount); +void calc_android_exp(player_type *creature_ptr); +void lose_exp(player_type *creature_ptr, s32b amount); +bool drain_exp(player_type *creature_ptr, s32b drain, s32b slip, int hold_exp_prob); +void do_poly_self(player_type *creature_ptr); +bool set_ultimate_res(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tim_res_nether(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tim_res_time(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool choose_ele_attack(player_type *creature_ptr); +bool choose_ele_immune(player_type *creature_ptr, TIME_EFFECT turn); +bool set_wraith_form(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_tim_esp(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_superstealth(player_type *creature_ptr, bool set); +void do_poly_wounds(player_type *creature_ptr); +void change_race(player_type *creature_ptr, player_race_type new_race, concptr effect_msg); +bool drop_weapons(player_type *creature_ptr); diff --git a/src/player/player-move.c b/src/player/player-move.c index 041bd65f1..5e996ed3a 100644 --- a/src/player/player-move.c +++ b/src/player/player-move.c @@ -139,48 +139,44 @@ * */ -#include "system/angband.h" -#include "core/stuff-handler.h" -#include "core/special-internal-keys.h" -#include "util/util.h" -#include "main/sound-definitions-table.h" - -#include "realm/realm-song.h" +#include "player/player-move.h" #include "autopick/autopick.h" +#include "cmd-action/cmd-attack.h" +#include "cmd/cmd-basic.h" +#include "core/special-internal-keys.h" +#include "core/stuff-handler.h" #include "dungeon/dungeon.h" +#include "dungeon/quest.h" #include "effect/effect-characteristics.h" +#include "grid/feature.h" #include "grid/grid.h" #include "grid/trap.h" -#include "dungeon/quest.h" -#include "object/artifact.h" -#include "player/player-move.h" -#include "player/player-status.h" -#include "player/player-effects.h" -#include "player/player-races-table.h" -#include "player/player-class.h" #include "inventory/player-inventory.h" -#include "player/player-personalities-table.h" -#include "spell/spells-floor.h" -#include "grid/feature.h" -#include "object/warning.h" -#include "object/special-object-flags.h" +#include "io/targeting.h" +#include "main/sound-definitions-table.h" +#include "monster/monster-status.h" #include "monster/monster.h" #include "mspell/monster-spell.h" -#include "monster/monster-status.h" -#include "object/object2.h" -#include "object/object-hook.h" +#include "object/artifact.h" #include "object/object-flavor.h" +#include "object/object-hook.h" #include "object/object-mark-types.h" +#include "object/object2.h" +#include "object/special-object-flags.h" +#include "object/warning.h" +#include "player/player-class.h" +#include "player/player-effects.h" +#include "player/player-personalities-table.h" +#include "player/player-races-table.h" +#include "player/player-status.h" +#include "realm/realm-song.h" +#include "spell/process-effect.h" +#include "spell/spells-floor.h" #include "spell/spells-type.h" -#include "cmd/cmd-basic.h" +#include "spell/spells3.h" +#include "util/util.h" #include "view/display-main-window.h" #include "world/world.h" -#include "object/object-kind.h" -#include "autopick/autopick.h" -#include "io/targeting.h" -#include "spell/process-effect.h" -#include "spell/spells3.h" -#include "cmd-action/cmd-attack.h" travel_type travel; diff --git a/src/player/player-move.h b/src/player/player-move.h index e333ebbd9..0258bf22c 100644 --- a/src/player/player-move.h +++ b/src/player/player-move.h @@ -1,10 +1,11 @@ #pragma once +#include "system/angband.h" #include "floor/floor.h" -extern void disturb(player_type *creature_ptr, bool stop_search, bool flush_output); -extern void move_player(player_type *creature_ptr, DIRECTION dir, bool do_pickup, bool break_trap); -extern void run_step(player_type *creature_ptr, DIRECTION dir); +void disturb(player_type *creature_ptr, bool stop_search, bool flush_output); +void move_player(player_type *creature_ptr, DIRECTION dir, bool do_pickup, bool break_trap); +void run_step(player_type *creature_ptr, DIRECTION dir); #define MPE_STAYING 0x00000001 #define MPE_FORGET_FLOW 0x00000002 @@ -14,15 +15,14 @@ extern void run_step(player_type *creature_ptr, DIRECTION dir); #define MPE_DO_PICKUP 0x00000020 #define MPE_BREAK_TRAP 0x00000040 #define MPE_DONT_SWAP_MON 0x00000080 -extern bool move_player_effect(player_type *creature_ptr, POSITION ny, POSITION nx, BIT_FLAGS mpe_mode); - -extern void py_pickup_aux(player_type *owner_ptr, OBJECT_IDX o_idx); -extern bool pattern_seq(player_type *creature_ptr, POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x); -extern bool trap_can_be_ignored(player_type *creature_ptr, FEAT_IDX feat); -extern void search(player_type *creature_ptr); -extern void carry(player_type *creature_ptr, bool pickup); -extern void do_cmd_travel(player_type *creature_ptr); -extern void travel_step(player_type *creature_ptr); +bool move_player_effect(player_type *creature_ptr, POSITION ny, POSITION nx, BIT_FLAGS mpe_mode); +void py_pickup_aux(player_type *owner_ptr, OBJECT_IDX o_idx); +bool pattern_seq(player_type *creature_ptr, POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x); +bool trap_can_be_ignored(player_type *creature_ptr, FEAT_IDX feat); +void search(player_type *creature_ptr); +void carry(player_type *creature_ptr, bool pickup); +void do_cmd_travel(player_type *creature_ptr); +void travel_step(player_type *creature_ptr); /* Types of pattern tiles */ #define NOT_PATTERN_TILE -1 diff --git a/src/player/player-status.c b/src/player/player-status.c index 02eda55f8..e64925bdb 100644 --- a/src/player/player-status.c +++ b/src/player/player-status.c @@ -40,7 +40,6 @@ #include "pet/pet-util.h" #include "cmd-action/cmd-spell.h" #include "dungeon/dungeon.h" -#include "object/object-kind.h" #include "monster/monster-race.h" #include "autopick/autopick.h" #include "autopick/autopick-reader-writer.h" diff --git a/src/spell/spells-execution.c b/src/spell/spells-execution.c index 954153284..117e0fa8a 100644 --- a/src/spell/spells-execution.c +++ b/src/spell/spells-execution.c @@ -1,6 +1,4 @@ -#include "system/angband.h" -#include "spell/spells-util.h" -#include "spell/spells-execution.h" +#include "spell/spells-execution.h" #include "realm/realm.h" #include "realm/realm-arcane.h" #include "realm/realm-chaos.h" diff --git a/src/spell/spells-execution.h b/src/spell/spells-execution.h index a491d323d..e16f49cbc 100644 --- a/src/spell/spells-execution.h +++ b/src/spell/spells-execution.h @@ -1,3 +1,6 @@ #pragma once +#include "system/angband.h" +#include "spell/spells-util.h" + concptr exe_spell(player_type *caster_ptr, REALM_IDX realm, SPELL_IDX spell, spell_type mode); diff --git a/src/spell/spells-floor.c b/src/spell/spells-floor.c index 764c0429b..769972940 100644 --- a/src/spell/spells-floor.c +++ b/src/spell/spells-floor.c @@ -1,34 +1,33 @@ -#include "system/angband.h" -#include "util/util.h" +/*! + * @brief フロアに影響のある魔法の処理 + * @date 2019/02/21 + * @author deskull + */ +#include "spell/spells-floor.h" +#include "cmd-io/cmd-dump.h" +#include "cmd/cmd-basic.h" #include "dungeon/dungeon.h" +#include "dungeon/quest.h" +#include "floor/floor-events.h" +#include "floor/floor-save.h" #include "floor/floor.h" +#include "grid/feature.h" #include "grid/grid.h" -#include "dungeon/quest.h" +#include "io/write-diary.h" +#include "monster/monster-status.h" #include "object/artifact.h" -#include "object/object2.h" -#include "object/object-kind.h" #include "object/object-flavor.h" #include "object/object-hook.h" #include "object/object-mark-types.h" +#include "object/object2.h" #include "object/special-object-flags.h" - -#include "io/write-diary.h" -#include "cmd/cmd-basic.h" -#include "cmd-io/cmd-dump.h" - -#include "floor/floor-events.h" -#include "floor/floor-save.h" #include "player/player-damage.h" #include "player/player-effects.h" #include "player/player-move.h" -#include "grid/feature.h" -#include "view/display-main-window.h" - -#include "monster/monster-status.h" - #include "spell/spells3.h" -#include "spell/spells-floor.h" +#include "util/util.h" +#include "view/display-main-window.h" /* * Light up the dungeon using "clairvoyance" diff --git a/src/spell/spells-floor.h b/src/spell/spells-floor.h index 4809ef94f..c5decfbf2 100644 --- a/src/spell/spells-floor.h +++ b/src/spell/spells-floor.h @@ -1,11 +1,13 @@ #pragma once -extern void wiz_lite(player_type *caster_ptr, bool ninja); -extern void wiz_dark(player_type *caster_ptr); -extern bool warding_glyph(player_type *caster_ptr); -extern bool explosive_rune(player_type *caster_ptr, POSITION y, POSITION x); -extern bool place_mirror(player_type *caster_ptr); -extern void stair_creation(player_type *caster_ptr); -extern void map_area(player_type *caster_ptr, POSITION range); -extern bool destroy_area(player_type *caster_ptr, POSITION y1, POSITION x1, POSITION r, bool in_generate); -extern bool earthquake(player_type *caster_ptr, POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx); +#include "system/angband.h" + +void wiz_lite(player_type *caster_ptr, bool ninja); +void wiz_dark(player_type *caster_ptr); +bool warding_glyph(player_type *caster_ptr); +bool explosive_rune(player_type *caster_ptr, POSITION y, POSITION x); +bool place_mirror(player_type *caster_ptr); +void stair_creation(player_type *caster_ptr); +void map_area(player_type *caster_ptr, POSITION range); +bool destroy_area(player_type *caster_ptr, POSITION y1, POSITION x1, POSITION r, bool in_generate); +bool earthquake(player_type *caster_ptr, POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx); diff --git a/src/spell/spells-object.c b/src/spell/spells-object.c index df1b4347e..4e451feea 100644 --- a/src/spell/spells-object.c +++ b/src/spell/spells-object.c @@ -1,4 +1,10 @@ -#include "spell/spells-object.h" +/*! + * @brief アイテムに影響のある魔法の処理 + * @date 2019/01/22 + * @deskull + */ + +#include "spell/spells-object.h" #include "autopick/autopick.h" #include "cmd/cmd-basic.h" #include "floor/floor-object.h" diff --git a/src/spell/spells-status.c b/src/spell/spells-status.c index 5ac083608..b0f451fd4 100644 --- a/src/spell/spells-status.c +++ b/src/spell/spells-status.c @@ -1,26 +1,30 @@ -#include "system/angband.h" -#include "core/stuff-handler.h" -#include "util/util.h" +/*! + * @brief スピード等のステータスに影響のある魔法の処理 + * @date 2019/01/22 + * @author deskull + */ +#include "spell/spells-status.h" +#include "cmd-action/cmd-spell.h" #include "cmd-item/cmd-magiceat.h" -#include "player/avatar.h" +#include "core/stuff-handler.h" #include "effect/effect-characteristics.h" +#include "io/targeting.h" +#include "mind/racial-force-trainer.h" +#include "monster/monster.h" #include "object/object-flavor.h" -#include "player/player-status.h" +#include "object/object-kind.h" +#include "object/object2.h" +#include "player/avatar.h" #include "player/player-class.h" -#include "spell/spells-status.h" -#include "spell/spells-type.h" -#include "monster/monster.h" -#include "cmd-action/cmd-spell.h" #include "player/player-effects.h" -#include "object/object2.h" -#include "object/object-kind.h" -#include "io/targeting.h" +#include "player/player-status.h" #include "realm/realm-song.h" -#include "view/display-main-window.h" +#include "spell/spells-type.h" #include "spell/spells2.h" #include "spell/spells3.h" -#include "mind/racial-force-trainer.h" +#include "util/util.h" +#include "view/display-main-window.h" /*! * @brief モンスター回復処理 diff --git a/src/spell/spells-status.h b/src/spell/spells-status.h index 40e1c7f33..ce1c80867 100644 --- a/src/spell/spells-status.h +++ b/src/spell/spells-status.h @@ -1,5 +1,6 @@ #pragma once +#include "system/angband.h" #include "spell/spells-util.h" bool heal_monster(player_type *caster_ptr, DIRECTION dir, HIT_POINT dam); diff --git a/src/spell/spells2.c b/src/spell/spells2.c index 7b0bdb569..e4e44e115 100644 --- a/src/spell/spells2.c +++ b/src/spell/spells2.c @@ -11,64 +11,58 @@ * */ -#include "system/angband.h" -#include "system/system-variables.h" -#include "core/stuff-handler.h" -#include "util/util.h" -#include "main/sound-definitions-table.h" - -#include "monster/creature.h" - -#include "object/artifact.h" -#include "io/write-diary.h" +#include "spell/spells2.h" +#include "autopick/autopick.h" +#include "cmd-action/cmd-attack.h" #include "cmd-action/cmd-pet.h" -#include "pet/pet-util.h" -#include "pet/pet-fall-off.h" #include "cmd-io/cmd-dump.h" +#include "combat/combat-options-type.h" +#include "core/stuff-handler.h" +#include "dungeon/dungeon.h" +#include "dungeon/quest.h" #include "effect/effect-characteristics.h" +#include "effect/spells-effect-util.h" +#include "floor/floor-events.h" +#include "grid/feature.h" #include "grid/grid.h" -#include "world/world.h" -#include "spell/spells2.h" -#include "spell/spells3.h" -#include "spell/spells-summon.h" +#include "inventory/player-inventory.h" +#include "io/targeting.h" +#include "io/write-diary.h" +#include "locale/english.h" +#include "main/sound-definitions-table.h" +#include "monster/creature.h" +#include "monster/monster-race.h" +#include "monster/monster-status.h" #include "mutation/mutation.h" -#include "dungeon/quest.h" -#include "player/avatar.h" - -#include "spell/spells-status.h" -#include "spell/spells-floor.h" -#include "spell/spells-diceroll.h" -#include "realm/realm-hex.h" -#include "autopick/autopick.h" +#include "object/artifact.h" #include "object/item-use-flags.h" -#include "object/object2.h" #include "object/object-flavor.h" #include "object/object-hook.h" #include "object/object-mark-types.h" -#include "monster/monster-status.h" -#include "player/player-move.h" -#include "player/player-status.h" -#include "player/player-effects.h" -#include "player/player-skill.h" +#include "object/object2.h" +#include "object/special-object-flags.h" +#include "object/sv-food-types.h" +#include "pet/pet-fall-off.h" +#include "pet/pet-util.h" +#include "player/avatar.h" #include "player/player-class.h" #include "player/player-damage.h" -#include "inventory/player-inventory.h" - -#include "dungeon/dungeon.h" -#include "floor/floor-events.h" -#include "grid/feature.h" -#include "view/display-main-window.h" -#include "object/object-kind.h" -#include "monster/monster-race.h" -#include "io/targeting.h" -#include "locale/english.h" -#include "effect/spells-effect-util.h" -#include "spell/spells-type.h" +#include "player/player-effects.h" +#include "player/player-move.h" +#include "player/player-skill.h" +#include "player/player-status.h" +#include "realm/realm-hex.h" #include "spell/process-effect.h" -#include "combat/combat-options-type.h" -#include "cmd-action/cmd-attack.h" -#include "object/special-object-flags.h" -#include "object/sv-food-types.h" +#include "spell/spells-diceroll.h" +#include "spell/spells-floor.h" +#include "spell/spells-status.h" +#include "spell/spells-summon.h" +#include "spell/spells-type.h" +#include "spell/spells3.h" +#include "system/system-variables.h" +#include "util/util.h" +#include "view/display-main-window.h" +#include "world/world.h" #define SV_WOODEN_STATUE 0 diff --git a/src/spell/spells2.h b/src/spell/spells2.h index 3cc98bf2c..4c76bcdd5 100644 --- a/src/spell/spells2.h +++ b/src/spell/spells2.h @@ -1,6 +1,8 @@ #pragma once -bool wall_stone(player_type* caster_ptr); +#include "system/angband.h" + +bool wall_stone(player_type *caster_ptr); bool speed_monsters(player_type* caster_ptr); bool slow_monsters(player_type* caster_ptr, int power); bool sleep_monsters(player_type* caster_ptr, int power); diff --git a/src/spell/spells3.c b/src/spell/spells3.c index ec5616fef..ad8a65004 100644 --- a/src/spell/spells3.c +++ b/src/spell/spells3.c @@ -1,5 +1,4 @@ /*! - * @file spells3.c * @brief 魔法効果の実装/ Spell code (part 3) * @date 2014/07/26 * @author @@ -11,69 +10,66 @@ * */ -#include "system/angband.h" +#include "spell/spells3.h" +#include "autopick/autopick.h" +#include "cmd-action/cmd-attack.h" +#include "cmd-action/cmd-spell.h" +#include "cmd-io/cmd-dump.h" +#include "cmd-io/cmd-save.h" #include "cmd/cmd-building.h" +#include "combat/snipe.h" #include "core/stuff-handler.h" -#include "term/gameterm.h" -#include "util/util.h" -#include "main/sound-definitions-table.h" -#include "object/item-feeling.h" -#include "object/object-ego.h" -#include "object/object-mark-types.h" - -#include "monster/creature.h" - #include "dungeon/dungeon.h" +#include "dungeon/quest.h" #include "effect/effect-characteristics.h" +#include "effect/spells-effect-util.h" +#include "floor/floor-save.h" #include "floor/floor-town.h" +#include "floor/wild.h" +#include "grid/grid.h" +#include "inventory/player-inventory.h" +#include "io/files-util.h" +#include "io/targeting.h" +#include "io/write-diary.h" +#include "main/sound-definitions-table.h" +#include "market/building-util.h" +#include "mind/mind.h" +#include "mind/racial-force-trainer.h" +#include "monster/creature.h" +#include "monster/monster-process.h" +#include "monster/monster-status.h" +#include "mspell/monster-spell.h" +#include "object/artifact.h" +#include "object/item-feeling.h" #include "object/item-use-flags.h" -#include "object/object2.h" #include "object/object-boost.h" +#include "object/object-ego.h" #include "object/object-flavor.h" #include "object/object-hook.h" -#include "player/player-move.h" -#include "player/player-status.h" +#include "object/object-kind.h" +#include "object/object-mark-types.h" +#include "object/object2.h" +#include "object/special-object-flags.h" +#include "object/tr-types.h" +#include "object/trc-types.h" +#include "player/avatar.h" #include "player/player-class.h" #include "player/player-damage.h" -#include "inventory/player-inventory.h" +#include "player/player-effects.h" +#include "player/player-move.h" +#include "player/player-personalities-table.h" +#include "player/player-skill.h" +#include "player/player-status.h" +#include "spell/process-effect.h" +#include "spell/spells-execution.h" +#include "spell/spells-floor.h" #include "spell/spells-summon.h" -#include "dungeon/quest.h" -#include "object/artifact.h" -#include "player/avatar.h" #include "spell/spells2.h" -#include "spell/spells3.h" -#include "spell/spells-floor.h" #include "spell/technic-info-table.h" -#include "grid/grid.h" -#include "market/building-util.h" -#include "monster/monster-process.h" -#include "monster/monster-status.h" -#include "mspell/monster-spell.h" -#include "io/write-diary.h" -#include "cmd-io/cmd-save.h" -#include "cmd-action/cmd-spell.h" -#include "cmd-io/cmd-dump.h" -#include "combat/snipe.h" -#include "floor/floor-save.h" -#include "io/files-util.h" -#include "player/player-effects.h" -#include "player/player-skill.h" -#include "player/player-personalities-table.h" +#include "term/gameterm.h" +#include "util/util.h" #include "view/display-main-window.h" -#include "mind/mind.h" -#include "floor/wild.h" #include "world/world.h" -#include "object/object-kind.h" -#include "autopick/autopick.h" -#include "io/targeting.h" -#include "effect/spells-effect-util.h" -#include "spell/spells-execution.h" -#include "spell/process-effect.h" -#include "mind/racial-force-trainer.h" -#include "cmd-action/cmd-attack.h" -#include "object/tr-types.h" -#include "object/trc-types.h" -#include "object/special-object-flags.h" /*! テレポート先探索の試行数 / Maximum number of tries for teleporting */ #define MAX_TRIES 100 diff --git a/src/spell/spells3.h b/src/spell/spells3.h index 434c27374..4ef44d6f1 100644 --- a/src/spell/spells3.h +++ b/src/spell/spells3.h @@ -1,5 +1,6 @@ #pragma once +#include "system/angband.h" #include "spell/spells-util.h" bool teleport_away(player_type* caster_ptr, MONSTER_IDX m_idx, POSITION dis, teleport_flags mode); diff --git a/src/store/store-owners.c b/src/store/store-owners.c index c766a6f20..a6fdf4066 100644 --- a/src/store/store-owners.c +++ b/src/store/store-owners.c @@ -1,5 +1,4 @@ -#include "system/angband.h" -#include "store/store-owners.h" +#include "store/store-owners.h" #include "player/player-races-table.h" /*! diff --git a/src/store/store-owners.h b/src/store/store-owners.h index 60edcf2a7..b83db4ef6 100644 --- a/src/store/store-owners.h +++ b/src/store/store-owners.h @@ -1,5 +1,7 @@ #pragma once +#include "system/angband.h" + #define MAX_STORES 10 /*!< 店舗の種類最大数 / Total number of stores (see "store.c", etc) */ #define MAX_OWNERS 32 /*!< 各店舗毎の店主定義最大数 / Total number of owners per store (see "store.c", etc) */ diff --git a/src/store/store-util.c b/src/store/store-util.c index fb65f6029..cc5b9971b 100644 --- a/src/store/store-util.c +++ b/src/store/store-util.c @@ -1,16 +1,21 @@ -#include "system/angband.h" +/*! + * @brief 店舗処理関係のユーティリティ + * @date 2020/03/20 + * @author Hourier + */ + #include "store/store-util.h" #include "object/item-apply-magic.h" #include "object/item-feeling.h" -#include "object/object2.h" #include "object/object-hook.h" #include "object/object-kind.h" -#include "object/tr-types.h" +#include "object/object2.h" #include "object/special-object-flags.h" #include "object/sv-lite-types.h" #include "object/sv-potion-types.h" #include "object/sv-scroll-types.h" #include "object/sv-weapon-types.h" +#include "object/tr-types.h" int cur_store_num = 0; store_type *st_ptr = NULL; diff --git a/src/store/store-util.h b/src/store/store-util.h index c435f4692..ff2a1e824 100644 --- a/src/store/store-util.h +++ b/src/store/store-util.h @@ -1,5 +1,7 @@ #pragma once +#include "system/angband.h" + #define STORE_OBJ_LEVEL 5 /* Magic Level for normal stores */ #define STORE_GENERAL 0 /*!< 店舗の種類: 雑貨屋 */ diff --git a/src/term/gameterm.c b/src/term/gameterm.c index f13bfb0b8..5c6c00d47 100644 --- a/src/term/gameterm.c +++ b/src/term/gameterm.c @@ -1,9 +1,6 @@ -#include "system/angband.h" -#include "util/util.h" - -#include "term/gameterm.h" +#include "term/gameterm.h" #include "system/system-variables.h" - +#include "util/util.h" /* * Standard window names diff --git a/src/term/gameterm.h b/src/term/gameterm.h index d6cffbdd4..7ecbc7a57 100644 --- a/src/term/gameterm.h +++ b/src/term/gameterm.h @@ -1,6 +1,8 @@ #pragma once +#include "system/angband.h" #include "spell/spells-type.h" + /* * Angband "attributes" (with symbols, and base (R,G,B) codes) * diff --git a/src/view/display-main-window.c b/src/view/display-main-window.c index 715434119..959b3496d 100644 --- a/src/view/display-main-window.c +++ b/src/view/display-main-window.c @@ -10,51 +10,45 @@ * 2014 Deskull rearranged comment for Doxygen. */ -#include "system/angband.h" -#include "util/util.h" +#include "view/display-main-window.h" #include "autopick/autopick-finder.h" #include "autopick/autopick-methods-table.h" #include "autopick/autopick-util.h" -#include "term/gameterm.h" - #include "cmd/cmd-building.h" -#include "system/system-variables.h" +#include "core/player-processor.h" #include "core/stuff-handler.h" -#include "io/files-util.h" -#include "world/world.h" +#include "dungeon/dungeon.h" #include "dungeon/quest.h" +#include "effect/effect-characteristics.h" +#include "effect/spells-effect-util.h" +#include "floor/floor-town.h" +#include "grid/feature.h" +#include "grid/grid.h" +#include "inventory/player-inventory.h" +#include "io/files-util.h" +#include "io/input-key-processor.h" +#include "io/targeting.h" +#include "market/arena-info-table.h" +#include "monster/monster.h" #include "object/artifact.h" -#include "object/object2.h" +#include "object/object-flavor.h" +#include "object/object-kind.h" #include "object/object-mark-types.h" +#include "object/object2.h" #include "player/avatar.h" -#include "view/display-player.h" -#include "player/player-status.h" -#include "player/player-class.h" -#include "player/player-races-table.h" #include "player/mimic-info-table.h" +#include "player/player-class.h" #include "player/player-effects.h" -#include "inventory/player-inventory.h" -#include "monster/monster.h" -#include "view/display-main-window.h" - +#include "player/player-races-table.h" +#include "player/player-status.h" #include "realm/realm-hex.h" #include "realm/realm-song.h" - -#include "object/object-flavor.h" - -#include "grid/grid.h" -#include "dungeon/dungeon.h" -#include "effect/effect-characteristics.h" -#include "floor/floor-town.h" -#include "grid/feature.h" -#include "object/object-kind.h" -#include "io/targeting.h" - -#include "market/arena-info-table.h" -#include "effect/spells-effect-util.h" #include "spell/spells3.h" -#include "io/input-key-processor.h" -#include "core/player-processor.h" +#include "system/system-variables.h" +#include "term/gameterm.h" +#include "util/util.h" +#include "view/display-player.h" +#include "world/world.h" /* * Not using graphical tiles for this feature? diff --git a/src/view/display-main-window.h b/src/view/display-main-window.h index a584c3e33..14d552234 100644 --- a/src/view/display-main-window.h +++ b/src/view/display-main-window.h @@ -1,5 +1,6 @@ #pragma once +#include "system/angband.h" #include "grid/feature.h" extern void get_screen_size(TERM_LEN *wid_p, TERM_LEN *hgt_p); diff --git a/src/view/display-player-middle.c b/src/view/display-player-middle.c index 71ee76fef..77bda293f 100644 --- a/src/view/display-player-middle.c +++ b/src/view/display-player-middle.c @@ -1,18 +1,17 @@ -#include "floor/floor.h" -#include "view/display-player-middle.h" -#include "view/status-first-page.h" -#include "view/display-util.h" -#include "player/player-effects.h" -#include "player/player-skill.h" -#include "realm/realm-song.h" -#include "world/world.h" -#include "object/object-kind.h" +#include "view/display-player-middle.h" +#include "floor/floor.h" #include "object/object-hook.h" #include "object/special-object-flags.h" #include "object/sv-bow-types.h" +#include "player/player-effects.h" +#include "player/player-races-table.h" +#include "player/player-skill.h" +#include "realm/realm-song.h" #include "shoot.h" #include "term/gameterm.h" -#include "player/player-races-table.h" +#include "view/display-util.h" +#include "view/status-first-page.h" +#include "world/world.h" /*! * @brief プレイヤーの打撃能力修正を表示する diff --git a/src/view/display-player.c b/src/view/display-player.c index 08d32241a..87cdc8680 100644 --- a/src/view/display-player.c +++ b/src/view/display-player.c @@ -6,25 +6,25 @@ * ここにこれ以上関数を引っ越してくるのは禁止 */ -#include "display-player.h" +#include "view/display-player.h" +#include "dungeon/dungeon-file.h" +#include "dungeon/quest.h" #include "floor/floor.h" +#include "knowledge/knowledge-mutations.h" +#include "object/object-kind.h" #include "player/mimic-info-table.h" +#include "player/patron.h" #include "player/player-personality.h" -#include "term/gameterm.h" -#include "status-first-page.h" #include "player/player-sex.h" -#include "player/patron.h" -#include "world/world.h" -#include "dungeon/quest.h" +#include "status-first-page.h" #include "system/system-variables.h" // 暫定。後で消す -#include "knowledge/knowledge-mutations.h" -#include "dungeon/dungeon-file.h" -#include "object/object-kind.h" -#include "view/display-util.h" +#include "term/gameterm.h" #include "view/display-characteristic.h" -#include "view/display-player-stat-info.h" -#include "view/display-player-misc-info.h" #include "view/display-player-middle.h" +#include "view/display-player-misc-info.h" +#include "view/display-player-stat-info.h" +#include "view/display-util.h" +#include "world/world.h" /*! * @brief diff --git a/src/view/object-describer.c b/src/view/object-describer.c index e2a76bf38..faba209ac 100644 --- a/src/view/object-describer.c +++ b/src/view/object-describer.c @@ -1,7 +1,6 @@ #include "view/object-describer.h" #include "object/object-flavor.h" #include "object/object-hook.h" -#include "object/object-kind.h" #include "object/special-object-flags.h" /*! diff --git a/src/view/status-first-page.c b/src/view/status-first-page.c index 001a46fc8..16ec204e5 100644 --- a/src/view/status-first-page.c +++ b/src/view/status-first-page.c @@ -5,19 +5,17 @@ * @author Hourier */ -#include "system/angband.h" -#include "combat/shoot.h" -#include "term/gameterm.h" #include "status-first-page.h" +#include "combat/attack-power-table.h" +#include "combat/shoot.h" #include "display-util.h" #include "object/artifact.h" -#include "object/object1.h" #include "object/object-hook.h" -#include "object/object-kind.h" +#include "object/object1.h" +#include "object/special-object-flags.h" #include "object/sv-weapon-types.h" -#include "combat/attack-power-table.h" #include "object/tr-types.h" -#include "object/special-object-flags.h" +#include "term/gameterm.h" static TERM_COLOR likert_color = TERM_WHITE; diff --git a/src/view/status-first-page.h b/src/view/status-first-page.h index e6b866737..b4a6e26bd 100644 --- a/src/view/status-first-page.h +++ b/src/view/status-first-page.h @@ -1,5 +1,7 @@ #pragma once +#include "system/angband.h" + #define ENTRY_BARE_HAND 0 #define ENTRY_TWO_HANDS 1 #define ENTRY_RIGHT_HAND1 2 diff --git a/src/wizard/wizard-spoiler.c b/src/wizard/wizard-spoiler.c index dfbbfdcfb..625f2c262 100644 --- a/src/wizard/wizard-spoiler.c +++ b/src/wizard/wizard-spoiler.c @@ -10,26 +10,25 @@ * 2013 Deskull rearranged comment for Doxygen. */ -#include "system/angband.h" #include "wizard/wizard-spoiler.h" -#include "util/util.h" -#include "term/gameterm.h" -#include "system/angband-version.h" -#include "object/artifact.h" #include "core/sort.h" -#include "store/store.h" -#include "store/store-util.h" +#include "floor/floor-town.h" +#include "io/files-util.h" #include "monster/monster.h" -#include "object/object2.h" +#include "object/artifact.h" +#include "object/object-ego.h" #include "object/object-flavor.h" #include "object/object-hook.h" -#include "object/object-ego.h" #include "object/object-kind.h" -#include "floor/floor-town.h" -#include "io/files-util.h" +#include "object/object2.h" +#include "object/special-object-flags.h" #include "object/tr-types.h" #include "object/trc-types.h" -#include "object/special-object-flags.h" +#include "store/store-util.h" +#include "store/store.h" +#include "system/angband-version.h" +#include "term/gameterm.h" +#include "util/util.h" /* * The spoiler file being created diff --git a/src/wizard/wizard-spoiler.h b/src/wizard/wizard-spoiler.h index 24fbbaffe..108c82490 100644 --- a/src/wizard/wizard-spoiler.h +++ b/src/wizard/wizard-spoiler.h @@ -1,4 +1,6 @@ #pragma once +#include "system/angband.h" + void do_cmd_spoilers(player_type* player_ptr); void spoil_random_artifact(player_type* creature_ptr, concptr fname); -- 2.11.0