• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision14dd90569845afae009594ffa0018b75a5055dde (tree)
Time2019-06-05 23:54:07
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 feat_locked_door_random, feat_jammed_door_random を grid.c へ移動.

Change Summary

Incremental Difference

--- a/src/defines.h
+++ b/src/defines.h
@@ -140,16 +140,6 @@
140140 #define ROW_MAP 0
141141 #define COL_MAP 12
142142
143-
144-#define feat_locked_door_random(DOOR_TYPE) \
145- (feat_door[(DOOR_TYPE)].num_locked ? \
146- feat_door[(DOOR_TYPE)].locked[randint0(feat_door[(DOOR_TYPE)].num_locked)] : feat_none)
147-
148-#define feat_jammed_door_random(DOOR_TYPE) \
149- (feat_door[(DOOR_TYPE)].num_jammed ? \
150- feat_door[(DOOR_TYPE)].jammed[randint0(feat_door[(DOOR_TYPE)].num_jammed)] : feat_none)
151-
152-
153143 /*
154144 * Bit flags for the *_can_enter() and monster_can_cross_terrain()
155145 */
--- a/src/grid.c
+++ b/src/grid.c
@@ -48,6 +48,14 @@
4848 #define FAF_NO_DROP 0x02
4949 #define FAF_CRASH_GLASS 0x04
5050
51+#define feat_locked_door_random(DOOR_TYPE) \
52+ (feat_door[(DOOR_TYPE)].num_locked ? \
53+ feat_door[(DOOR_TYPE)].locked[randint0(feat_door[(DOOR_TYPE)].num_locked)] : feat_none)
54+
55+#define feat_jammed_door_random(DOOR_TYPE) \
56+ (feat_door[(DOOR_TYPE)].num_jammed ? \
57+ feat_door[(DOOR_TYPE)].jammed[randint0(feat_door[(DOOR_TYPE)].num_jammed)] : feat_none)
58+
5159 /*!
5260 * @brief 地形状態フラグテーブル /
5361 * The table of features' actions
Show on old repository browser