OSDN Git Service

[Refactor] #40399 Reshaped そびえ立つ汚物ヘッダ、object1.h の整形 (まだobjec2.h の分離には程遠い) / object1...
authorHourier <hourier@users.sourceforge.jp>
Thu, 28 May 2020 13:29:46 +0000 (22:29 +0900)
committerHourier <hourier@users.sourceforge.jp>
Thu, 28 May 2020 13:29:46 +0000 (22:29 +0900)
src/io/special-class-dump.c
src/object/object1.c
src/object/object1.h
src/object/object2.c

index 90bf19b..7eacd9e 100644 (file)
@@ -7,6 +7,7 @@
 #include "system/angband.h"
 #include "special-class-dump.h"
 #include "cmd/cmd-magiceat.h"
+#include "cmd/cmd-smith.h"
 #include "object/object-kind.h"
 #include "mspell/monster-spell.h"
 
index bdf46b1..7d6bef7 100644 (file)
  */
 
 #include "system/angband.h"
+#include "object/object1.h"
 #include "system/system-variables.h"
 #include "io/read-pref-file.h"
 #include "util/util.h"
-
 #include "object/artifact.h"
 #include "floor/floor.h"
 #include "cmd-activate.h"
index 0d26a5e..dbad362 100644 (file)
@@ -32,8 +32,6 @@
 
 #include "object/object-util.h"
 
-extern bool(*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
-
 /* object1.c */
 extern void reset_visuals(player_type *owner_ptr, void(*process_autopick_file_command)(char*));
 extern void object_flags(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE]);
@@ -49,7 +47,6 @@ extern s16b wield_slot(player_type *owner_ptr, object_type *o_ptr);
 
 extern bool check_book_realm(player_type *owner_ptr, const tval_type book_tval, const OBJECT_SUBTYPE_VALUE book_sval);
 extern object_type *ref_item(player_type *owner_ptr, INVENTORY_IDX item);
-extern int bow_tval_ammo(object_type *o_ptr);
 extern TERM_COLOR object_attr(object_type *o_ptr);
 
 /*!
@@ -58,6 +55,14 @@ extern TERM_COLOR object_attr(object_type *o_ptr);
 #include "floor/floor.h"
 
 /* object2.c */
+
+extern OBJECT_SUBTYPE_VALUE coin_type;
+extern s32b flag_cost(object_type *o_ptr, int plusses);
+
+extern bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
+
+extern int bow_tval_ammo(object_type *o_ptr);
+
 extern void excise_object_idx(floor_type *floor_ptr, OBJECT_IDX o_idx);
 extern void delete_object_idx(player_type *owner_ptr, OBJECT_IDX o_idx);
 extern void delete_object(player_type *owner_ptr, POSITION y, POSITION x);
@@ -80,13 +85,11 @@ extern bool object_similar(object_type *o_ptr, object_type *j_ptr);
 extern void object_absorb(object_type *o_ptr, object_type *j_ptr);
 extern IDX lookup_kind(tval_type tval, OBJECT_SUBTYPE_VALUE sval);
 extern void object_wipe(object_type *o_ptr);
-extern void object_prep(object_type *o_ptr, KIND_OBJECT_IDX k_idx);
 extern void object_copy(object_type *o_ptr, object_type *j_ptr);
+extern void object_prep(object_type *o_ptr, KIND_OBJECT_IDX k_idx);
 
 extern void apply_magic(player_type *owner_type, object_type *o_ptr, DEPTH lev, BIT_FLAGS mode);
 
-extern OBJECT_SUBTYPE_VALUE coin_type;
-
 extern bool make_object(player_type *owner_ptr, object_type *j_ptr, BIT_FLAGS mode);
 extern bool make_gold(floor_type *floor_ptr, object_type *j_ptr);
 extern OBJECT_IDX drop_near(player_type *owner_type, object_type *o_ptr, PERCENTAGE chance, POSITION y, POSITION x);
@@ -109,9 +112,6 @@ extern void display_koff(player_type *owner_ptr, KIND_OBJECT_IDX k_idx);
 extern void torch_flags(object_type *o_ptr, BIT_FLAGS *flgs);
 extern void torch_dice(object_type *o_ptr, DICE_NUMBER *dd, DICE_SID *ds);
 extern void torch_lost_fuel(object_type *o_ptr);
-extern concptr essence_name[];
-
-extern s32b flag_cost(object_type *o_ptr, int plusses);
 
 /* The "sval" codes for TV_DIGGING */
 #define SV_SHOVEL                        1
index ed32c57..1dba909 100644 (file)
@@ -1,24 +1,21 @@
 /*!
- * @file object2.c
  * @brief オブジェクトの実装 / Object code, part 2
  * @date 2014/01/11
  * @author
- * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
- *\n
- * This software may be copied and distributed for educational, research,\n
- * and not for profit purposes provided that this copyright and statement\n
- * are included in all such copies.  Other copyrights may also apply.\n
- * 2014 Deskull rearranged comment for Doxygen.\n
+ * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
+ * 
+ * This software may be copied and distributed for educational, research,
+ * and not for profit purposes provided that this copyright and statement
+ * are included in all such copies.  Other copyrights may also apply.
+ * 2014 Deskull rearranged comment for Doxygen.
  */
 
 #include "system/angband.h"
+#include "object/object1.h"
 #include "util/util.h"
 #include "main/sound-definitions-table.h"
 #include "world/world.h"
 #include "term/gameterm.h"
-
-#include "object/object1.h"
-
 #include "io/write-diary.h"
 #include "cmd/cmd-dump.h"
 #include "cmd/cmd-spell.h"
   * Chests, and activatable items, never stack (for various reasons).
   */
 
 /*
-   * A "stack" of items is limited to less than or equal to 99 items (hard-coded).
-   */
+ /*
+  * A "stack" of items is limited to less than or equal to 99 items (hard-coded).
+  */
 #define MAX_STACK_SIZE 99
 
-   /*!
      * todo この関数ポインタは何とかならんのか?
      * Hack -- function hook to restrict "get_obj_num_prep()" function
      */
+/*!
+ * todo この関数ポインタは何とかならんのか?
+ * Hack -- function hook to restrict "get_obj_num_prep()" function
+ */
 bool(*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
 
-/*!
-* todo これを消すとコンパイルは通るがリンカがエラーを吐く、何とか既存の構造に押し込みたい
-*/
 OBJECT_SUBTYPE_VALUE coin_type;        /* Hack -- force coin type */
 
 void floor_item_describe(player_type *player_ptr, INVENTORY_IDX item);