From 0f7630ad8c734036e0111b11f5e0e41f3c69ed41 Mon Sep 17 00:00:00 2001 From: Slimebreath6078 Date: Tue, 22 Feb 2022 21:12:01 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#2262=20=E7=BD=AE=E3=81=8D=E6=8F=9B?= =?utf8?q?=E3=81=88=E3=81=9F=E3=82=82=E3=81=AE=E4=BB=A5=E5=A4=96=E3=82=92?= =?utf8?q?=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB=E5=8C=96=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/effect/effect-processor.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/effect/effect-processor.cpp b/src/effect/effect-processor.cpp index 752d3da93..cfeedd7d6 100644 --- a/src/effect/effect-processor.cpp +++ b/src/effect/effect-processor.cpp @@ -514,8 +514,8 @@ ProjectResult project(PlayerType *player_ptr, const MONSTER_IDX who, POSITION ra if (!blind && !(flag & (PROJECT_HIDE)) && (delay_factor > 0)) { for (int t = 0; t <= gm_rad; t++) { for (int i = gm[t]; i < gm[t + 1]; i++) { - y = gy[i]; - x = gx[i]; + auto y = gy[i]; + auto x = gx[i]; if (panel_contains(y, x) && player_has_los_bold(player_ptr, y, x)) { uint16_t p; TERM_COLOR a; @@ -537,8 +537,8 @@ ProjectResult project(PlayerType *player_ptr, const MONSTER_IDX who, POSITION ra if (drawn) { for (int i = 0; i < grids; i++) { - y = gy[i]; - x = gx[i]; + auto y = gy[i]; + auto x = gx[i]; if (panel_contains(y, x) && player_has_los_bold(player_ptr, y, x)) { lite_spot(player_ptr, y, x); } @@ -561,8 +561,8 @@ ProjectResult project(PlayerType *player_ptr, const MONSTER_IDX who, POSITION ra for (int i = 0; i < grids; i++) { if (gm[dist + 1] == i) dist++; - y = gy[i]; - x = gx[i]; + auto y = gy[i]; + auto x = gx[i]; if (breath) { int d = dist_to_line(y, x, y1, x1, by, bx); if (affect_feature(player_ptr, who, d, y, x, dam, typ)) @@ -581,8 +581,8 @@ ProjectResult project(PlayerType *player_ptr, const MONSTER_IDX who, POSITION ra if (gm[dist + 1] == i) dist++; - y = gy[i]; - x = gx[i]; + auto y = gy[i]; + auto x = gx[i]; if (breath) { int d = dist_to_line(y, x, y1, x1, by, bx); if (affect_item(player_ptr, who, d, y, x, dam, typ)) @@ -604,8 +604,8 @@ ProjectResult project(PlayerType *player_ptr, const MONSTER_IDX who, POSITION ra if (gm[dist + 1] == i) dist++; - y = gy[i]; - x = gx[i]; + auto y = gy[i]; + auto x = gx[i]; if (grids <= 1) { auto *m_ptr = &player_ptr->current_floor_ptr->m_list[player_ptr->current_floor_ptr->grid_array[y][x].m_idx]; monster_race *ref_ptr = &r_info[m_ptr->r_idx]; @@ -716,8 +716,8 @@ ProjectResult project(PlayerType *player_ptr, const MONSTER_IDX who, POSITION ra /* Player affected one monster (without "jumping") */ if (!who && (project_m_n == 1) && !jump) { - x = project_m_x; - y = project_m_y; + auto x = project_m_x; + auto y = project_m_y; if (player_ptr->current_floor_ptr->grid_array[y][x].m_idx > 0) { auto *m_ptr = &player_ptr->current_floor_ptr->m_list[player_ptr->current_floor_ptr->grid_array[y][x].m_idx]; @@ -737,8 +737,8 @@ ProjectResult project(PlayerType *player_ptr, const MONSTER_IDX who, POSITION ra if (gm[dist + 1] == i) dist++; - y = gy[i]; - x = gx[i]; + auto y = gy[i]; + auto x = gx[i]; if (!player_bold(player_ptr, y, x)) continue; -- 2.11.0