From: Hourier Date: Sun, 14 Jun 2020 13:13:39 +0000 (+0900) Subject: [Refactor] #40413 Adjusted inclusion for alloc-entry-definition.h X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=7fa9faaf298d33dd6177ca947d621051deef212f;p=hengband%2Fhengband.git [Refactor] #40413 Adjusted inclusion for alloc-entry-definition.h --- diff --git a/src/monster-race/monster-race.c b/src/monster-race/monster-race.c index 9e98cf4d6..735ceaa76 100644 --- a/src/monster-race/monster-race.c +++ b/src/monster-race/monster-race.c @@ -1,6 +1,5 @@ #include "system/angband.h" #include "monster-race/monster-race.h" -#include "system/alloc-entry-definition.h" monster_race *r_info; char *r_name; diff --git a/src/monster/monster-processor.c b/src/monster/monster-processor.c index 0f96e1e3b..a88c07edf 100644 --- a/src/monster/monster-processor.c +++ b/src/monster/monster-processor.c @@ -51,7 +51,6 @@ #include "player/player-move.h" #include "spell-realm/spells-hex.h" #include "spell/spells-summon.h" -#include "system/alloc-entry-definition.h" #include "view/display-messages.h" void decide_drop_from_monster(player_type *target_ptr, MONSTER_IDX m_idx, bool is_riding_mon); diff --git a/src/object-enchant/object-curse.c b/src/object-enchant/object-curse.c index 44bf587ba..70df42d89 100644 --- a/src/object-enchant/object-curse.c +++ b/src/object-enchant/object-curse.c @@ -1,12 +1,10 @@ -#include "system/angband.h" -#include "system/alloc-entry-definition.h" +#include "object-enchant/object-curse.h" #include "object-enchant/item-feeling.h" -#include "object-enchant/object-curse.h" +#include "object-enchant/tr-types.h" +#include "object-enchant/trc-types.h" #include "object/object-flags.h" #include "object/object-flavor.h" #include "object/object-hook.h" -#include "object-enchant/tr-types.h" -#include "object-enchant/trc-types.h" #include "util/bit-flags-calculator.h" #include "view/display-messages.h" diff --git a/src/object-enchant/object-curse.h b/src/object-enchant/object-curse.h index 7fcd47b12..d050b32d7 100644 --- a/src/object-enchant/object-curse.h +++ b/src/object-enchant/object-curse.h @@ -1,2 +1,6 @@ -extern BIT_FLAGS get_curse(int power, object_type *o_ptr); -extern void curse_equipment(player_type *owner_ptr, PERCENTAGE chance, PERCENTAGE heavy_chance); +#pragma once + +#include "system/angband.h" + +BIT_FLAGS get_curse(int power, object_type *o_ptr); +void curse_equipment(player_type *owner_ptr, PERCENTAGE chance, PERCENTAGE heavy_chance); diff --git a/src/object/object-kind.c b/src/object/object-kind.c index a92c47529..01de9d4a7 100644 --- a/src/object/object-kind.c +++ b/src/object/object-kind.c @@ -1,5 +1,4 @@ #include "object-kind.h" -#include "system/alloc-entry-definition.h" /* * The object kind arrays diff --git a/src/object/object-kind.h b/src/object/object-kind.h index 5ec195b3a..9a12a48ca 100644 --- a/src/object/object-kind.h +++ b/src/object/object-kind.h @@ -1,6 +1,7 @@ #pragma once #include "system/angband.h" +#include "system/alloc-entry-definition.h" /*! * @struct object_kind diff --git a/src/player/patron.c b/src/player/patron.c index d3e34b435..a2b78bf57 100644 --- a/src/player/patron.c +++ b/src/player/patron.c @@ -24,7 +24,6 @@ #include "spell/spells-status.h" #include "spell/spells-summon.h" #include "spell/spell-types.h" -#include "system/alloc-entry-definition.h" #include "view/display-messages.h" #ifdef JP diff --git a/src/room/rooms-trap.c b/src/room/rooms-trap.c index b5322460b..ae7dd4223 100644 --- a/src/room/rooms-trap.c +++ b/src/room/rooms-trap.c @@ -5,7 +5,6 @@ #include "grid/feature.h" #include "grid/grid.h" #include "room/rooms.h" -#include "system/alloc-entry-definition.h" #include "view/display-messages.h" /*! diff --git a/src/system/alloc-entry-definition.h b/src/system/alloc-entry-definition.h index 8b9d1d010..5fc7082aa 100644 --- a/src/system/alloc-entry-definition.h +++ b/src/system/alloc-entry-definition.h @@ -19,10 +19,7 @@ * Pass 2 is determined from allocation restriction * Pass 3 is determined from allocation calculation */ - -typedef struct alloc_entry alloc_entry; - -struct alloc_entry { +typedef struct alloc_entry { KIND_OBJECT_IDX index; /* The actual index */ DEPTH level; /* Base dungeon level */ @@ -31,4 +28,4 @@ struct alloc_entry { PROB prob3; /* Probability, pass 3 */ u16b total; /* Unused for now */ -}; +} alloc_entry;