OSDN Git Service

[Refactor] #1003 object_wipe() をwipe() に、object_prep() をprep() に、object_copy() をcopy_...
[hengbandforosx/hengbandosx.git] / src / system / object-type-definition.h
index e45ebc8..ef72d86 100644 (file)
@@ -1,10 +1,10 @@
 #pragma once
 
-#include "system/angband.h"
 #include "object/tval-types.h"
+#include "system/angband.h"
+#include "system/system-variables.h"
 
-#define TR_FLAG_SIZE 5
-
+struct player_type;
 typedef struct object_type {
     KIND_OBJECT_IDX k_idx; /* Kind index (zero if "dead") */
     POSITION iy; /* Y-position on map, or zero */
@@ -20,7 +20,7 @@ typedef struct object_type {
     EGO_IDX name2; /* Ego-Item type, if any */
 
     XTRA8 xtra1; /* Extra info type (now unused) */
-    XTRA8 xtra2; /*!< エゴ/アーティファクトの発動ID / Extra info activation index */
+    XTRA16 xtra2; /*!< エゴ/アーティファクトの発動ID / Extra info activation index */
     XTRA8 xtra3; /*!< 複数の使用用途 捕らえたモンスターの速度,付加した特殊なエッセンスID / Extra info for weaponsmith */
     XTRA16 xtra4; /*!< 複数の使用用途 光源の残り寿命、あるいは捕らえたモンスターの現HP / Extra info fuel or captured monster's current HP */
     XTRA16 xtra5; /*!< 複数の使用用途 捕らえたモンスターの最大HP / Extra info captured monster's max HP */
@@ -41,7 +41,10 @@ typedef struct object_type {
 
     BIT_FLAGS art_flags[TR_FLAG_SIZE]; /* Extra Flags for ego and artifacts */
     BIT_FLAGS curse_flags; /* Flags for curse */
-    OBJECT_IDX next_o_idx; /* Next object in stack (if any) */
     MONSTER_IDX held_m_idx; /*!< アイテムを所持しているモンスターID (いないなら 0) / Monster holding us (if any) */
     ARTIFACT_BIAS_IDX artifact_bias; /*!< ランダムアーティファクト生成時のバイアスID */
+
+    void wipe();
+    void copy_from(object_type *j_ptr);
+    void prep(player_type *player_ptr, KIND_OBJECT_IDX ko_idx);
 } object_type;