• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

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

Log Message

[Refactor] #37353 get_obj_num_hook を object2.c/object.h へ移動.

Change Summary

Incremental Difference

--- a/src/externs.h
+++ b/src/externs.h
@@ -97,8 +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 bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
101-
102100 extern int highscore_fd;
103101 extern bool can_save;
104102
--- a/src/object.h
+++ b/src/object.h
@@ -88,6 +88,7 @@ struct object_type
8888
8989 extern bool(*item_tester_hook)(object_type *o_ptr);
9090 extern OBJECT_TYPE_VALUE item_tester_tval;
91+extern bool(*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
9192
9293 /* object1.c */
9394 extern ITEM_NUMBER scan_floor(OBJECT_IDX *items, POSITION y, POSITION x, BIT_FLAGS mode);
--- a/src/object2.c
+++ b/src/object2.c
@@ -527,6 +527,10 @@ OBJECT_IDX o_pop(void)
527527 return (0);
528528 }
529529
530+/*
531+ * Hack -- function hook to restrict "get_obj_num_prep()" function
532+ */
533+bool(*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
530534
531535 /*!
532536 * @brief オブジェクト生成テーブルに生成制約を加える /
--- a/src/variable.c
+++ b/src/variable.c
@@ -130,12 +130,6 @@ player_type p_body;
130130 player_type *p_ptr = &p_body;
131131
132132 /*
133- * Hack -- function hook to restrict "get_obj_num_prep()" function
134- */
135-bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
136-
137-
138-/*
139133 * The "highscore" file descriptor, if available.
140134 */
141135 int highscore_fd = -1;
Show on old repository browser