• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

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

Log Message

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

Change Summary

Incremental Difference

--- a/src/externs.h
+++ b/src/externs.h
@@ -97,7 +97,6 @@ extern u32b saved_floor_file_sign;
9797 extern concptr keymap_act[KEYMAP_MODES][256];
9898 extern player_type *p_ptr;
9999
100-extern OBJECT_TYPE_VALUE item_tester_tval;
101100 extern bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
102101
103102 extern int highscore_fd;
--- a/src/object.h
+++ b/src/object.h
@@ -87,6 +87,7 @@ struct object_type
8787 };
8888
8989 extern bool(*item_tester_hook)(object_type *o_ptr);
90+extern OBJECT_TYPE_VALUE item_tester_tval;
9091
9192 /* object1.c */
9293 extern ITEM_NUMBER scan_floor(OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode);
--- a/src/object1.c
+++ b/src/object1.c
@@ -1583,6 +1583,12 @@ bool check_book_realm(const OBJECT_TYPE_VALUE book_tval, const OBJECT_SUBTYPE_VA
15831583 */
15841584 bool(*item_tester_hook)(object_type*);
15851585
1586+/*
1587+ * Here is a "pseudo-hook" used during calls to "get_item()" and
1588+ * "show_inven()" and "show_equip()", and the choice window routines.
1589+ */
1590+OBJECT_TYPE_VALUE item_tester_tval;
1591+
15861592 /*!
15871593 * @brief アイテムがitem_tester_hookグローバル関数ポインタの条件を満たしているかを返す汎用関数
15881594 * Check an item against the item tester info
--- a/src/variable.c
+++ b/src/variable.c
@@ -129,13 +129,6 @@ player_type p_body;
129129 */
130130 player_type *p_ptr = &p_body;
131131
132-
133-/*
134- * Here is a "pseudo-hook" used during calls to "get_item()" and
135- * "show_inven()" and "show_equip()", and the choice window routines.
136- */
137-OBJECT_TYPE_VALUE item_tester_tval;
138-
139132 /*
140133 * Hack -- function hook to restrict "get_obj_num_prep()" function
141134 */
Show on old repository browser