OSDN Git Service

[Refactor] #37353 object-ego.c/h を作成して関連構造体と変数を移動.
authordeskull <deskull@users.sourceforge.jp>
Thu, 2 May 2019 01:50:40 +0000 (10:50 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Thu, 2 May 2019 01:50:40 +0000 (10:50 +0900)
19 files changed:
Hengband_vcs2017/Hengband/Hengband.vcxproj
Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/artifact.c
src/autopick.c
src/cmd-activate.c
src/dungeon-file.c
src/externs.h
src/floor-events.c
src/init.c
src/load.c
src/object-ego.c [new file with mode: 0644]
src/object-ego.h [new file with mode: 0644]
src/object-flavor.c
src/object1.c
src/object2.c
src/player-effects.c
src/types.h
src/variable.c

index 2232e4c..fbf3847 100644 (file)
     <ClCompile Include="..\..\src\monsterrace.c" />\r
     <ClCompile Include="..\..\src\object-boost.c" />\r
     <ClCompile Include="..\..\src\object-curse.c" />\r
+    <ClCompile Include="..\..\src\object-ego.c" />\r
     <ClCompile Include="..\..\src\object-flavor.c" />\r
     <ClCompile Include="..\..\src\object-flavor.h" />\r
     <ClCompile Include="..\..\src\object-hook.c" />\r
     <ClInclude Include="..\..\src\mutation.h" />\r
     <ClInclude Include="..\..\src\object-boost.h" />\r
     <ClInclude Include="..\..\src\object-curse.h" />\r
+    <ClInclude Include="..\..\src\object-ego.h" />\r
     <ClInclude Include="..\..\src\object-hook.h" />\r
     <ClInclude Include="..\..\src\object-broken.h" />\r
     <ClInclude Include="..\..\src\object.h" />\r
index 97bc3a3..bc957f3 100644 (file)
     <ClCompile Include="..\..\src\monsterrace.c">
       <Filter>monster</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\object-ego.c">
+      <Filter>object</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\angband.h" />
     <ClInclude Include="..\..\src\autopick.h">
       <Filter>object</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\object-ego.h">
+      <Filter>object</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="..\..\src\angband.rc" />
index 53598bc..bbb1470 100644 (file)
@@ -48,7 +48,7 @@ hengband_SOURCES = \
        object-curse.c object-curse.h object-broken.c object-broken.h \
        object-hook.c object-hook.h object1.c object2.c object.h \
        objectkind.c objectkind.h objectkind-hook.c objectkind-hook.h \
-       object-flavor.c object-flavor.h \
+       object-flavor.c object-flavor.h object-ego.c object-ego.h \
        \
        patron.h patron.c \
        \
index 78d6c13..6c003aa 100644 (file)
@@ -22,6 +22,7 @@
 #include "objectkind.h"
 #include "object-boost.h"
 #include "object-curse.h"
+#include "object-ego.h"
 #include "object-flavor.h"
 #include "object-hook.h"
 #include "spells-object.h"
index bf7a4f1..c0884d9 100644 (file)
@@ -22,6 +22,7 @@
 #include "player-move.h"
 #include "player-class.h"
 #include "objectkind.h"
+#include "object-ego.h"
 #include "object-flavor.h"
 #include "object-hook.h"
 
index d53831f..9e3850d 100644 (file)
@@ -27,6 +27,7 @@
 #include "monster-status.h"
 #include "files.h"
 #include "objectkind.h"
+#include "object-ego.h"
 #include "grid.h"
 
 /*!
index 317f6a4..1a76998 100644 (file)
@@ -15,6 +15,7 @@
 #include "world.h"
 #include "rooms-vault.h"
 #include "objectkind.h"
+#include "object-ego.h"
 #include "monsterrace.h"
 
 dungeon_grid letter[255];
index a20dabc..c9c4ccb 100644 (file)
@@ -230,10 +230,6 @@ extern birther previous_char;
 extern char *f_name;
 extern char *f_tag;
 
-extern ego_item_type *e_info;
-extern char *e_name;
-extern char *e_text;
-
 extern concptr ANGBAND_SYS;
 extern concptr ANGBAND_KEYBOARD;
 extern concptr ANGBAND_GRAF;
index a09719c..09a27e9 100644 (file)
@@ -13,6 +13,7 @@
 #include "world.h"
 #include "player-effects.h"
 #include "objectkind.h"
+#include "object-ego.h"
 
 static bool mon_invis;
 static POSITION mon_fy, mon_fx;
index 0d79d94..36fcac5 100644 (file)
@@ -52,6 +52,7 @@
 #include "player-skill.h"
 #include "player-class.h"
 #include "objectkind.h"
+#include "object-ego.h"
 
 #ifndef MACINTOSH
 #ifdef CHECK_MODIFICATION_TIME
index a6d8331..0db32b0 100644 (file)
@@ -70,6 +70,7 @@
 #include "player-class.h"
 #include "world.h"
 #include "objectkind.h"
+#include "object-ego.h"
 
 
 /*
diff --git a/src/object-ego.c b/src/object-ego.c
new file mode 100644 (file)
index 0000000..1b057c3
--- /dev/null
@@ -0,0 +1,9 @@
+#include "angband.h"
+#include "object-ego.h"
+
+/*
+ * The ego-item arrays
+ */
+ego_item_type *e_info;
+char *e_name;
+char *e_text;
diff --git a/src/object-ego.h b/src/object-ego.h
new file mode 100644 (file)
index 0000000..9cb7503
--- /dev/null
@@ -0,0 +1,37 @@
+#pragma once
+
+/*
+ * Information about "ego-items".
+ */
+
+typedef struct ego_item_type ego_item_type;
+
+struct ego_item_type
+{
+       STR_OFFSET name;                        /* Name (offset) */
+       STR_OFFSET text;                        /* Text (offset) */
+
+       INVENTORY_IDX slot;             /*!< 装備部位 / Standard slot value */
+       PRICE rating;           /*!< ベースアイテムからの価値加速 / Rating boost */
+
+       DEPTH level;                    /* Minimum level */
+       RARITY rarity;          /* Object rarity */
+
+       HIT_PROB max_to_h;              /* Maximum to-hit bonus */
+       HIT_POINT max_to_d;             /* Maximum to-dam bonus */
+       ARMOUR_CLASS max_to_a;          /* Maximum to-ac bonus */
+
+       PARAMETER_VALUE max_pval;               /* Maximum pval */
+
+       PRICE cost;                     /* Ego-item "cost" */
+
+       BIT_FLAGS flags[TR_FLAG_SIZE];  /* Ego-Item Flags */
+       BIT_FLAGS gen_flags;            /* flags for generate */
+
+       IDX act_idx;            /* Activative ability index */
+};
+
+extern ego_item_type *e_info;
+extern char *e_name;
+extern char *e_text;
+
index 1f1a0ea..bb9c689 100644 (file)
@@ -24,6 +24,7 @@
 #include "files.h"
 #include "world.h"
 #include "monsterrace.h"
+#include "object-ego.h"
 
 /*!
  * @brief 最初から簡易な名称が明らかになるベースアイテムの判定。 /  Certain items, if aware, are known instantly 
index 1e683d6..6201899 100644 (file)
@@ -18,6 +18,7 @@
 #include "floor.h"
 #include "cmd-activate.h"
 #include "objectkind.h"
+#include "object-ego.h"
 #include "object-flavor.h"
 #include "object-hook.h"
 #include "player-move.h"
index 7cefdb5..7c859ae 100644 (file)
@@ -22,6 +22,7 @@
 #include "grid.h"
 #include "objectkind.h"
 #include "object-boost.h"
+#include "object-ego.h"
 #include "object-flavor.h"
 #include "object-hook.h"
 #include "object-curse.h"
@@ -33,6 +34,7 @@
 #include "player-effects.h"
 #include "monster.h"
 #include "monsterrace-hook.h"
+#include "object-ego.h"
 
 /*!
  * @brief 床上、モンスター所持でスタックされたアイテムを削除しスタックを補完する / Excise a dungeon object from any stacks
index 6b33a38..ab8addd 100644 (file)
@@ -25,6 +25,7 @@
 #include "avatar.h"
 #include "spells-status.h"
 #include "realm-hex.h"
+#include "object-ego.h"
 #include "object-hook.h"
 #include "wild.h"
 #include "spells-floor.h"
index 7f193a2..6df442d 100644 (file)
 //#include "player-skill.h"
 
 
-/*
- * Information about "ego-items".
- */
-
-typedef struct ego_item_type ego_item_type;
-
-struct ego_item_type
-{
-       STR_OFFSET name;                        /* Name (offset) */
-       STR_OFFSET text;                        /* Text (offset) */
-
-       INVENTORY_IDX slot;             /*!< 装備部位 / Standard slot value */
-       PRICE rating;           /*!< ベースアイテムからの価値加速 / Rating boost */
-
-       DEPTH level;                    /* Minimum level */
-       RARITY rarity;          /* Object rarity */
-
-       HIT_PROB max_to_h;              /* Maximum to-hit bonus */
-       HIT_POINT max_to_d;             /* Maximum to-dam bonus */
-       ARMOUR_CLASS max_to_a;          /* Maximum to-ac bonus */
-
-       PARAMETER_VALUE max_pval;               /* Maximum pval */
-
-       PRICE cost;                     /* Ego-item "cost" */
-
-       BIT_FLAGS flags[TR_FLAG_SIZE];  /* Ego-Item Flags */
-       BIT_FLAGS gen_flags;            /* flags for generate */
-
-       IDX act_idx;            /* Activative ability index */
-};
-
 
 typedef struct mbe_info_type mbe_info_type;
 
index 06d1ad0..e607768 100644 (file)
@@ -494,13 +494,6 @@ const player_seikaku *ap_ptr;
  */
 birther previous_char;
 
-/*
- * The ego-item arrays
- */
-ego_item_type *e_info;
-char *e_name;
-char *e_text;
-
 concptr ANGBAND_SYS = "xxx"; //!< Hack -- The special Angband "System Suffix" This variable is used to choose an appropriate "pref-xxx" file