• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision13c538c3102497eb7c6f5866b48c93cba42efb15 (tree)
Time2019-05-13 22:44:38
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 item_tester_hook を object1.c/object.h へ移動.

Change Summary

Incremental Difference

--- a/src/externs.h
+++ b/src/externs.h
@@ -98,7 +98,6 @@ extern concptr keymap_act[KEYMAP_MODES][256];
9898 extern player_type *p_ptr;
9999
100100 extern OBJECT_TYPE_VALUE item_tester_tval;
101-extern bool (*item_tester_hook)(object_type *o_ptr);
102101 extern bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
103102
104103 extern int highscore_fd;
--- a/src/object.h
+++ b/src/object.h
@@ -86,6 +86,8 @@ struct object_type
8686 ARTIFACT_BIAS_IDX artifact_bias; /*!< ランダムアーティファクト生成時のバイアスID */
8787 };
8888
89+extern bool(*item_tester_hook)(object_type *o_ptr);
90+
8991 /* object1.c */
9092 extern ITEM_NUMBER scan_floor(OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode);
9193 extern COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_LEN *min_width);
--- a/src/object1.c
+++ b/src/object1.c
@@ -1577,6 +1577,12 @@ bool check_book_realm(const OBJECT_TYPE_VALUE book_tval, const OBJECT_SUBTYPE_VA
15771577 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
15781578 }
15791579
1580+/*
1581+ * Here is a "hook" used during calls to "get_item()" and
1582+ * "show_inven()" and "show_equip()", and the choice window routines.
1583+ */
1584+bool(*item_tester_hook)(object_type*);
1585+
15801586 /*!
15811587 * @brief アイテムがitem_tester_hookグローバル関数ポインタの条件を満たしているかを返す汎用関数
15821588 * Check an item against the item tester info
--- a/src/variable.c
+++ b/src/variable.c
@@ -136,14 +136,6 @@ player_type *p_ptr = &p_body;
136136 */
137137 OBJECT_TYPE_VALUE item_tester_tval;
138138
139-
140-/*
141- * Here is a "hook" used during calls to "get_item()" and
142- * "show_inven()" and "show_equip()", and the choice window routines.
143- */
144-bool (*item_tester_hook)(object_type*);
145-
146-
147139 /*
148140 * Hack -- function hook to restrict "get_obj_num_prep()" function
149141 */
Show on old repository browser