OSDN Git Service

[Refactor] #40399 Separated trg-types.h from artifact.h
authorHourier <hourier@users.sourceforge.jp>
Sun, 7 Jun 2020 01:39:33 +0000 (10:39 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 7 Jun 2020 01:39:33 +0000 (10:39 +0900)
21 files changed:
Hengband/Hengband/Hengband.vcxproj
Hengband/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/dungeon/quest.c
src/floor/fixed-map-generator.c
src/info-reader/general-parser.c
src/inventory/inventory-curse.c
src/io/load.c
src/object-enchant/apply-magic.c
src/object-enchant/artifact.c
src/object-enchant/artifact.h
src/object-enchant/trg-types.h [new file with mode: 0644]
src/object/object-flavor.c
src/object/object-generator.c
src/object/object-hook.c
src/object/object1.c
src/perception/object-perception.c
src/player/player-effects.c
src/spell/spells-object.c
src/wizard/wizard-special-process.c
src/wizard/wizard-spoiler.c

index 523b0c3..da3312e 100644 (file)
     <ClInclude Include="..\..\src\info-reader\random-grid-effect-types.h" />\r
     <ClInclude Include="..\..\src\info-reader\skill-reader.h" />\r
     <ClInclude Include="..\..\src\info-reader\vault-reader.h" />\r
+    <ClInclude Include="..\..\src\object-enchant\trg-types.h" />\r
     <ClInclude Include="..\..\src\perception\identification.h" />\r
     <ClInclude Include="..\..\src\player-attack\attack-chaos-effect.h" />\r
     <ClInclude Include="..\..\src\combat\attack-criticality.h" />\r
index 4b1664e..e93ce60 100644 (file)
     <ClInclude Include="..\..\src\core\visuals-reseter.h">
       <Filter>core</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\object-enchant\trg-types.h">
+      <Filter>object-enchant</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index 3a68266..429e5ba 100644 (file)
@@ -343,6 +343,7 @@ hengband_SOURCES = \
        object-enchant/object-curse.c object-enchant/object-curse.h \
        object-enchant/object-ego.c object-enchant/object-ego.h \
        object-enchant/tr-types.h object-enchant/trc-types.h \
+       object-enchant/trg-types.h \
        object-enchant/item-apply-magic.h object-enchant/item-feeling.h \
        object-enchant/old-ego-extra-values.h object-enchant/special-object-flags.h \
        \
index d0169cd..3907e7d 100644 (file)
@@ -14,6 +14,7 @@
 #include "monster/monster.h"
 #include "object-enchant/artifact.h"
 #include "object-enchant/item-apply-magic.h"
+#include "object-enchant/trg-types.h"
 #include "object/object-generator.h"
 #include "player/player-personalities-table.h"
 #include "player/player-status.h"
index e1d7b32..0e3d80c 100644 (file)
@@ -12,6 +12,7 @@
 #include "object-enchant/artifact.h"
 #include "object-enchant/item-apply-magic.h"
 #include "object-enchant/object-ego.h"
+#include "object-enchant/trg-types.h"
 #include "object/object-generator.h"
 #include "object/object-kind-hook.h"
 #include "object/object-kind.h"
index 3610032..35aa63c 100644 (file)
@@ -7,6 +7,7 @@
 #include "info-reader/random-grid-effect-types.h"
 #include "io/tokenizer.h"
 #include "object-enchant/artifact.h"
+#include "object-enchant/trg-types.h"
 #include "object/object-kind-hook.h"
 #include "system/system-variables.h"
 
index e8e1311..d5e9f60 100644 (file)
@@ -2,12 +2,13 @@
 #include "io/files-util.h"
 #include "object-enchant/artifact.h"
 #include "object-enchant/item-feeling.h"
-#include "perception/object-perception.h"
 #include "object-enchant/object-curse.h"
-#include "object/object-flavor.h"
 #include "object-enchant/special-object-flags.h"
 #include "object-enchant/tr-types.h"
 #include "object-enchant/trc-types.h"
+#include "object/object-flavor.h"
+#include "object/object1.h"
+#include "perception/object-perception.h"
 #include "player/player-damage.h"
 #include "player/player-effects.h"
 #include "player/player-move.h"
index 913d97d..ed71381 100644 (file)
@@ -68,6 +68,7 @@
 #include "object-enchant/old-ego-extra-values.h" // TODO v1.5.0以前のセーブファイルをロードする処理を分離する.
 #include "object-enchant/tr-types.h"
 #include "object-enchant/trc-types.h"
+#include "object-enchant/trg-types.h"
 #include "object/object-generator.h"
 #include "object/object-hook.h"
 #include "object/object-kind-hook.h"
index 2cbfbb5..fe9dc63 100644 (file)
@@ -19,6 +19,7 @@
 #include "object-enchant/object-ego.h"
 #include "object-enchant/special-object-flags.h"
 #include "object-enchant/trc-types.h"
+#include "object-enchant/trg-types.h"
 #include "object/object-hook.h"
 #include "object/object-kind.h"
 #include "sv-definition/sv-armor-types.h"
index 0c5a3ed..5d2ea5f 100644 (file)
@@ -23,6 +23,7 @@
 #include "object-enchant/object-boost.h"
 #include "object-enchant/object-curse.h"
 #include "object-enchant/object-ego.h"
+#include "object-enchant/trg-types.h"
 #include "object/object-flavor.h"
 #include "object/object-generator.h"
 #include "object/object-hook.h"
index 07fabc7..5c4b421 100644 (file)
@@ -3,8 +3,6 @@
 #include "system/angband.h"
 #include "cmd-item/cmd-activate.h"
 
-typedef struct artifact_type artifact_type;
-
 /*!
  * @struct artifact_type
  * @brief 固定アーティファクト情報の構造体 / Artifact structure.
@@ -13,8 +11,7 @@ typedef struct artifact_type artifact_type;
  * the save-file only writes "cur_num" to the savefile.
  * "max_num" is always "1" (if that artifact "exists")
  */
-struct artifact_type
-{
+typedef struct artifact_type {
        STR_OFFSET name;                        /*!< アーティファクト名(headerオフセット参照) / Name (offset) */
        STR_OFFSET text;                        /*!< アーティファクト解説(headerオフセット参照) / Text (offset) */
 
@@ -38,24 +35,6 @@ struct artifact_type
 
        BIT_FLAGS flags[TR_FLAG_SIZE];       /*! アイテムフラグ / Artifact Flags */
 
-       #define TRG_INSTA_ART           0x00000001L     /* Item must be an artifact */
-       #define TRG_QUESTITEM           0x00000002L     /* quest level item -KMW- */
-       #define TRG_XTRA_POWER          0x00000004L     /* Extra power */
-       #define TRG_ONE_SUSTAIN         0x00000008L     /* One sustain */
-       #define TRG_XTRA_RES_OR_POWER   0x00000010L     /* Extra resistance or power */
-       #define TRG_XTRA_H_RES          0x00000020L     /* Extra high resistance */
-       #define TRG_XTRA_E_RES          0x00000040L     /* Extra element resistance */
-       #define TRG_XTRA_L_RES          0x00000080L     /* Extra lordly resistance */
-       #define TRG_XTRA_D_RES          0x00000100L     /* Extra dragon resistance */
-       #define TRG_XTRA_RES            0x00000200L     /* Extra resistance */
-       #define TRG_CURSED              0x00000400L     /* Item is Cursed */
-       #define TRG_HEAVY_CURSE         0x00000800L     /* Item is Heavily Cursed */
-       #define TRG_PERMA_CURSE         0x00001000L     /* Item is Perma Cursed */
-       #define TRG_RANDOM_CURSE0       0x00002000L     /* Item is Random Cursed */
-       #define TRG_RANDOM_CURSE1       0x00004000L     /* Item is Random Cursed */
-       #define TRG_RANDOM_CURSE2       0x00008000L     /* Item is Random Cursed */
-       #define TRG_XTRA_DICE           0x00010000L     /* Extra dice */
-       #define TRG_POWERFUL            0x00020000L     /* Item has good value even if Cursed */
        BIT_FLAGS gen_flags;            /*! アイテム生成フラグ / flags for generate */
 
        DEPTH level;            /*! 基本生成階 / Artifact level */
@@ -67,7 +46,7 @@ struct artifact_type
        FLOOR_IDX floor_id;      /*! アイテムを落としたフロアのID / Leaved on this location last time */
 
        byte act_idx;           /*! 発動能力ID / Activative ability index */
-};
+} artifact_type;
 
 extern artifact_type *a_info;
 extern char *a_name;
diff --git a/src/object-enchant/trg-types.h b/src/object-enchant/trg-types.h
new file mode 100644 (file)
index 0000000..2c2987b
--- /dev/null
@@ -0,0 +1,22 @@
+#pragma once
+
+typedef enum trg_type {
+       TRG_INSTA_ART = 0x00000001L, /* Item must be an artifact */
+    TRG_QUESTITEM = 0x00000002L, /* quest level item -KMW- */
+    TRG_XTRA_POWER = 0x00000004L, /* Extra power */
+    TRG_ONE_SUSTAIN = 0x00000008L, /* One sustain */
+    TRG_XTRA_RES_OR_POWER = 0x00000010L, /* Extra resistance or power */
+    TRG_XTRA_H_RES = 0x00000020L, /* Extra high resistance */
+    TRG_XTRA_E_RES = 0x00000040L, /* Extra element resistance */
+    TRG_XTRA_L_RES = 0x00000080L, /* Extra lordly resistance */
+    TRG_XTRA_D_RES = 0x00000100L, /* Extra dragon resistance */
+    TRG_XTRA_RES = 0x00000200L, /* Extra resistance */
+    TRG_CURSED = 0x00000400L, /* Item is Cursed */
+    TRG_HEAVY_CURSE = 0x00000800L, /* Item is Heavily Cursed */
+    TRG_PERMA_CURSE = 0x00001000L, /* Item is Perma Cursed */
+    TRG_RANDOM_CURSE0 = 0x00002000L, /* Item is Random Cursed */
+    TRG_RANDOM_CURSE1 = 0x00004000L, /* Item is Random Cursed */
+    TRG_RANDOM_CURSE2 = 0x00008000L, /* Item is Random Cursed */
+    TRG_XTRA_DICE = 0x00010000L, /* Extra dice */
+    TRG_POWERFUL = 0x00020000L, /* Item has good value even if Cursed */
+} trg_type;
index 3c422a4..523aefa 100644 (file)
@@ -20,6 +20,7 @@
 #include "object-enchant/object-ego.h"
 #include "object-enchant/special-object-flags.h"
 #include "object-enchant/tr-types.h"
+#include "object-enchant/trg-types.h"
 #include "object/object-hook.h"
 #include "object/object-kind.h"
 #include "object/object1.h"
index 9827e63..fcc54ed 100644 (file)
@@ -1,9 +1,9 @@
 #include "object/object-generator.h"
-#include "object-enchant/artifact.h"
 #include "object-enchant/object-curse.h"
-#include "object/object-kind.h"
 #include "object-enchant/special-object-flags.h"
 #include "object-enchant/trc-types.h"
+#include "object-enchant/trg-types.h"
+#include "object/object-kind.h"
 
 /*!
  * @brief オブジェクトを初期化する
index b6bc50d..a9a2d45 100644 (file)
@@ -12,6 +12,7 @@
 #include "object-enchant/item-feeling.h"
 #include "object-enchant/special-object-flags.h"
 #include "object-enchant/tr-types.h"
+#include "object-enchant/trg-types.h"
 #include "object/object-kind.h"
 #include "object/object1.h"
 #include "perception/object-perception.h"
index 7f34554..0ce1047 100644 (file)
@@ -1,5 +1,4 @@
 /*!
- * @file object1.c
  * @brief オブジェクトの実装 / Object code, part 1
  * @date 2014/01/10
  * @author
index 67a0d42..bdfb2e1 100644 (file)
@@ -1,12 +1,12 @@
 #include "perception/object-perception.h"
 #include "io/write-diary.h"
-#include "object-enchant/artifact.h"
 #include "object-enchant/item-feeling.h"
+#include "object-enchant/special-object-flags.h"
+#include "object-enchant/trg-types.h"
 #include "object/object-flavor.h"
 #include "object/object-generator.h"
 #include "object/object-hook.h" // 暫定、このファイルへ引っ越す.
 #include "object/object-kind.h"
-#include "object-enchant/special-object-flags.h"
 
 /*!
  * @brief オブジェクトを鑑定済にする /
index 7e3b7c6..080f16f 100644 (file)
@@ -17,8 +17,8 @@
 #include "birth/birth-body-spec.h"
 #include "birth/birth-stat.h"
 #include "birth/character-builder.h"
-#include "cmd-io/cmd-dump.h"
 #include "cmd-building/cmd-building.h"
+#include "cmd-io/cmd-dump.h"
 #include "combat/snipe.h"
 #include "core/stuff-handler.h"
 #include "dungeon/quest.h"
 #include "mutation/mutation.h"
 #include "object-enchant/artifact.h"
 #include "object-enchant/item-feeling.h"
-#include "perception/object-perception.h"
 #include "object-enchant/object-ego.h"
+#include "object-enchant/special-object-flags.h"
+#include "object-enchant/trg-types.h"
 #include "object/object-generator.h"
 #include "object/object-hook.h"
 #include "object/object-kind.h"
 #include "object/object-value-calc.h"
 #include "object/object-value.h"
-#include "object-enchant/special-object-flags.h"
-#include "sv-definition/sv-armor-types.h"
-#include "sv-definition/sv-protector-types.h"
-#include "sv-definition/sv-weapon-types.h"
+#include "perception/object-perception.h"
 #include "player/avatar.h"
 #include "player/player-class.h"
 #include "player/player-damage.h"
@@ -60,6 +58,9 @@
 #include "spell-kind/spells-floor.h"
 #include "spell-realm/spells-hex.h"
 #include "spell/spells-status.h"
+#include "sv-definition/sv-armor-types.h"
+#include "sv-definition/sv-protector-types.h"
+#include "sv-definition/sv-weapon-types.h"
 #include "term/term-color-types.h"
 #include "util/util.h"
 #include "view/display-main-window.h"
index 0187a3c..16a3e15 100644 (file)
@@ -22,6 +22,7 @@
 #include "object-enchant/special-object-flags.h"
 #include "object-enchant/tr-types.h"
 #include "object-enchant/trc-types.h"
+#include "object-enchant/trg-types.h"
 #include "object/item-use-flags.h"
 #include "object/object-flavor.h"
 #include "object/object-generator.h"
index a527b77..c9f1a48 100644 (file)
 #include "cmd-io/cmd-save.h"
 #include "cmd/cmd-draw.h"
 #include "core/stuff-handler.h"
-#include "info-reader/fixed-map-parser.h"
 #include "dungeon/dungeon.h"
 #include "dungeon/quest.h"
 #include "floor/floor-object.h"
 #include "floor/floor-save.h"
 #include "floor/floor.h"
 #include "grid/grid.h"
+#include "info-reader/fixed-map-parser.h"
 #include "inventory/inventory-object.h"
 #include "inventory/player-inventory.h"
 #include "io/files-util.h"
 #include "object-enchant/apply-magic.h"
 #include "object-enchant/artifact.h"
 #include "object-enchant/item-apply-magic.h"
+#include "object-enchant/trc-types.h"
+#include "object-enchant/trg-types.h"
 #include "object/item-use-flags.h"
-#include "object/object1.h"
-#include "perception/object-perception.h"
 #include "object/object-flavor.h"
 #include "object/object-generator.h"
 #include "object/object-hook.h"
 #include "object/object-kind.h"
 #include "object/object-value.h"
-#include "object-enchant/trc-types.h"
+#include "object/object1.h"
+#include "perception/object-perception.h"
 #include "player/patron.h"
 #include "player/player-class.h"
 #include "player/player-effects.h"
 #include "player/selfinfo.h"
 #include "spell-kind/spells-detection.h"
 #include "spell-kind/spells-floor.h"
-#include "spell/spells-object.h"
 #include "spell-kind/spells-sight.h"
+#include "spell-kind/spells-teleport.h"
+#include "spell-kind/spells-world.h"
+#include "spell/spells-object.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
-#include "spell-kind/spells-teleport.h"
 #include "spell/spells-util.h"
-#include "spell-kind/spells-world.h"
 #include "spell/spells3.h"
 #include "system/angband-version.h"
 #include "term/term-color-types.h"
index 32ad0b6..d65c86f 100644 (file)
@@ -20,6 +20,7 @@
 #include "object-enchant/special-object-flags.h"
 #include "object-enchant/tr-types.h"
 #include "object-enchant/trc-types.h"
+#include "object-enchant/trg-types.h"
 #include "object/object-flavor.h"
 #include "object/object-generator.h"
 #include "object/object-kind-hook.h"