• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisiona787704b4954139a6b7542102dc826eed9dfc23e (tree)
Time2019-01-09 22:16:44
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Refactor] #37353 型の置換。 / Type replacement.

Change Summary

Incremental Difference

--- a/src/cave.c
+++ b/src/cave.c
@@ -68,7 +68,7 @@ POSITION distance (POSITION y1, POSITION x1, POSITION y2, POSITION x2)
6868 * @param feat 地形情報のID
6969 * @return 罠持ちの地形ならばTRUEを返す。
7070 */
71-bool is_trap(IDX feat)
71+bool is_trap(FEAT_IDX feat)
7272 {
7373 return have_flag(f_info[feat].flags, FF_TRAP);
7474 }
@@ -91,7 +91,7 @@ bool is_known_trap(cave_type *c_ptr)
9191 * @param feat 地形情報のID
9292 * @return 閉じたドアのある地形ならばTRUEを返す。
9393 */
94-bool is_closed_door(IDX feat)
94+bool is_closed_door(FEAT_IDX feat)
9595 {
9696 feature_type *f_ptr = &f_info[feat];
9797
@@ -4658,10 +4658,10 @@ FEAT_IDX feat_state(FEAT_IDX feat, int action)
46584658 void cave_alter_feat(POSITION y, POSITION x, int action)
46594659 {
46604660 /* Set old feature */
4661- IDX oldfeat = cave[y][x].feat;
4661+ FEAT_IDX oldfeat = cave[y][x].feat;
46624662
46634663 /* Get the new feat */
4664- IDX newfeat = feat_state(oldfeat, action);
4664+ FEAT_IDX newfeat = feat_state(oldfeat, action);
46654665
46664666 /* No change */
46674667 if (newfeat == oldfeat) return;
--- a/src/cmd1.c
+++ b/src/cmd1.c
@@ -833,8 +833,8 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
833833 POSITION oy = p_ptr->y;
834834 POSITION ox = p_ptr->x;
835835 cave_type *oc_ptr = &cave[oy][ox];
836- IDX om_idx = oc_ptr->m_idx;
837- IDX nm_idx = c_ptr->m_idx;
836+ MONSTER_IDX om_idx = oc_ptr->m_idx;
837+ MONSTER_IDX nm_idx = c_ptr->m_idx;
838838
839839 /* Move the player */
840840 p_ptr->y = ny;
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -4218,7 +4218,7 @@ bool brand_bolts(void)
42184218 * @details
42194219 * Note that this function is one of the more "dangerous" ones...
42204220 */
4221-static IDX poly_r_idx(MONRACE_IDX r_idx)
4221+static MONRACE_IDX poly_r_idx(MONRACE_IDX r_idx)
42224222 {
42234223 monster_race *r_ptr = &r_info[r_idx];
42244224
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -188,7 +188,7 @@ void check_experience(void)
188188 * Used to allocate proper treasure when "Creeping coins" die
189189 * Note the use of actual "monster names"
190190 */
191-static int get_coin_type(MONRACE_IDX r_idx)
191+static OBJECT_SUBTYPE_VALUE get_coin_type(MONRACE_IDX r_idx)
192192 {
193193 /* Analyze monsters */
194194 switch (r_idx)
Show on old repository browser