OSDN Git Service

[Refactor] #37353 a_info と artifact_type 構造体を artifact.h へ移動。
authordeskull <deskull@users.sourceforge.jp>
Thu, 25 Apr 2019 14:40:53 +0000 (23:40 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Thu, 25 Apr 2019 14:40:53 +0000 (23:40 +0900)
16 files changed:
src/artifact.c
src/artifact.h
src/birth.c
src/externs.h
src/floor-save.c
src/floor-streams.c
src/init.c
src/object-flavor.c
src/player-effects.c
src/rumor.c
src/save.c
src/sort.c
src/spells2.c
src/types.h
src/variable.c
src/wizard1.c

index 74c03f6..e80566e 100644 (file)
 #include "spells-object.h"
 #include "files.h"
 
+ /*
+  * The artifact arrays
+  */
+artifact_type *a_info;
+char *a_name;
+char *a_text;
+
 static bool has_extreme_damage_rate(object_type *o_ptr);
 static bool weakening_artifact(object_type *o_ptr);
 
index 3bdcd88..a1a83f2 100644 (file)
@@ -1,4 +1,59 @@
-/* artifact.c */
+#pragma once
+
+
+typedef struct artifact_type artifact_type;
+
+/*!
+ * @struct artifact_type
+ * @brief 固定アーティファクト情報の構造体 / Artifact structure.
+ * @details
+ * @note
+ * the save-file only writes "cur_num" to the savefile.
+ * "max_num" is always "1" (if that artifact "exists")
+ */
+struct artifact_type
+{
+       STR_OFFSET name;                        /*!< アーティファクト名(headerオフセット参照) / Name (offset) */
+       STR_OFFSET text;                        /*!< アーティファクト解説(headerオフセット参照) / Text (offset) */
+
+       OBJECT_TYPE_VALUE tval;         /*!< ベースアイテム大項目ID / Artifact type */
+       OBJECT_SUBTYPE_VALUE sval;      /*!< ベースアイテム小項目ID / Artifact sub type */
+
+       PARAMETER_VALUE pval;   /*!< pval修正値 / Artifact extra info */
+
+       HIT_PROB to_h;                  /*!< 命中ボーナス値 /  Bonus to hit */
+       HIT_POINT to_d;         /*!< ダメージボーナス値 / Bonus to damage */
+       ARMOUR_CLASS to_a;                      /*!< ACボーナス値 / Bonus to armor */
+
+       ARMOUR_CLASS ac;                        /*!< 上書きベースAC値 / Base armor */
+
+       DICE_NUMBER dd;
+       DICE_SID ds;    /*!< ダイス値 / Damage when hits */
+
+       WEIGHT weight;          /*!< 重量 / Weight */
+
+       PRICE cost;                     /*!< 基本価格 / Artifact "cost" */
+
+       BIT_FLAGS flags[TR_FLAG_SIZE];       /*! アイテムフラグ / Artifact Flags */
+
+       BIT_FLAGS gen_flags;            /*! アイテム生成フラグ / flags for generate */
+
+       DEPTH level;            /*! 基本生成階 / Artifact level */
+       RARITY rarity;          /*! レアリティ / Artifact rarity */
+
+       byte cur_num;           /*! 現在の生成数 / Number created (0 or 1) */
+       byte max_num;           /*! (未使用)最大生成数 / Unused (should be "1") */
+
+       FLOOR_IDX floor_id;      /*! アイテムを落としたフロアのID / Leaved on this location last time */
+
+       byte act_idx;           /*! 発動能力ID / Activative ability index */
+};
+
+extern artifact_type *a_info;
+extern char *a_name;
+extern char *a_text;
+
+/* artifact.c */
 extern bool create_artifact(object_type *o_ptr, bool a_scroll);
 extern int activation_index(object_type *o_ptr);
 extern const activation_type* find_activation_info(object_type *o_ptr);
index 688222c..38a4ab3 100644 (file)
@@ -15,6 +15,7 @@
 #include "util.h"
 #include "bldg.h"
 
+#include "artifact.h"
 #include "avatar.h"
 #include "history.h"
 #include "monsterrace-hook.h"
index ce38d18..fedb549 100644 (file)
@@ -256,9 +256,6 @@ extern char *f_tag;
 extern object_kind *k_info;
 extern char *k_name;
 extern char *k_text;
-extern artifact_type *a_info;
-extern char *a_name;
-extern char *a_text;
 extern ego_item_type *e_info;
 extern char *e_name;
 extern char *e_text;
index 02bafa4..b2dde05 100644 (file)
@@ -13,6 +13,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "artifact.h"
 #include "floor.h"
 #include "floor-events.h"
 #include "floor-generate.h"
index 226c64a..56cb268 100644 (file)
@@ -18,6 +18,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "artifact.h"
 #include "floor-generate.h"
 #include "floor.h"
 #include "floor-streams.h"
index 59cf6ea..ee3c214 100644 (file)
@@ -35,6 +35,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "artifact.h"
 #include "init.h"
 #include "quest.h"
 #include "trap.h"
index 59f756a..4361807 100644 (file)
@@ -13,6 +13,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "artifact.h"
 #include "player-status.h"
 #include "shoot.h"
 #include "object-hook.h"
index 12473a5..3352e86 100644 (file)
@@ -15,6 +15,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "artifact.h"
 #include "floor.h"
 #include "bldg.h"
 #include "birth.h"
index e5d2e03..5f6824c 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "files.h"
 #include "object-flavor.h"
+#include "artifact.h"
 
 /*
  * Display a rumor and apply its effects
index 80223ab..ad2717e 100644 (file)
@@ -14,6 +14,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "artifact.h"
 #include "sort.h"
 #include "quest.h"
 #include "store.h"
index 9105ecb..f91cbc4 100644 (file)
@@ -2,6 +2,7 @@
 #include "sort.h"
 #include "floor.h"
 #include "quest.h"
+#include "artifact.h"
 
 /*
  * Angband sorting algorithm -- quick sort in place
index 6174ff9..e7830c3 100644 (file)
@@ -14,6 +14,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "artifact.h"
 #include "cmd-pet.h"
 #include "floor.h"
 #include "grid.h"
index 6bb10bb..6c86b1f 100644 (file)
@@ -112,56 +112,6 @@ struct object_kind
 };
 
 
-
-typedef struct artifact_type artifact_type;
-
-/*!
- * @struct artifact_type
- * @brief 固定アーティファクト情報の構造体 / Artifact structure.
- * @details
- * @note
- * the save-file only writes "cur_num" to the savefile.
- * "max_num" is always "1" (if that artifact "exists")
- */
-struct artifact_type
-{
-       STR_OFFSET name;                        /*!< アーティファクト名(headerオフセット参照) / Name (offset) */
-       STR_OFFSET text;                        /*!< アーティファクト解説(headerオフセット参照) / Text (offset) */
-
-       OBJECT_TYPE_VALUE tval;         /*!< ベースアイテム大項目ID / Artifact type */
-       OBJECT_SUBTYPE_VALUE sval;      /*!< ベースアイテム小項目ID / Artifact sub type */
-
-       PARAMETER_VALUE pval;   /*!< pval修正値 / Artifact extra info */
-
-       HIT_PROB to_h;                  /*!< 命中ボーナス値 /  Bonus to hit */
-       HIT_POINT to_d;         /*!< ダメージボーナス値 / Bonus to damage */
-       ARMOUR_CLASS to_a;                      /*!< ACボーナス値 / Bonus to armor */
-
-       ARMOUR_CLASS ac;                        /*!< 上書きベースAC値 / Base armor */
-
-       DICE_NUMBER dd;
-       DICE_SID ds;    /*!< ダイス値 / Damage when hits */
-
-       WEIGHT weight;          /*!< 重量 / Weight */
-
-       PRICE cost;                     /*!< 基本価格 / Artifact "cost" */
-
-       BIT_FLAGS flags[TR_FLAG_SIZE];       /*! アイテムフラグ / Artifact Flags */
-
-       BIT_FLAGS gen_flags;            /*! アイテム生成フラグ / flags for generate */
-
-       DEPTH level;            /*! 基本生成階 / Artifact level */
-       RARITY rarity;          /*! レアリティ / Artifact rarity */
-
-       byte cur_num;           /*! 現在の生成数 / Number created (0 or 1) */
-       byte max_num;           /*! (未使用)最大生成数 / Unused (should be "1") */
-
-       FLOOR_IDX floor_id;      /*! アイテムを落としたフロアのID / Leaved on this location last time */
-
-       byte act_idx;           /*! 発動能力ID / Activative ability index */
-};
-
-
 /*
  * Information about "ego-items".
  */
index 292acad..dce75b3 100644 (file)
@@ -565,13 +565,6 @@ char *k_name;
 char *k_text;
 
 /*
- * The artifact arrays
- */
-artifact_type *a_info;
-char *a_name;
-char *a_text;
-
-/*
  * The ego-item arrays
  */
 ego_item_type *e_info;
index 400fc33..31ffbfb 100644 (file)
@@ -13,6 +13,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "artifact.h"
 #include "sort.h"
 #include "store.h"
 #include "monster.h"