From: Deskull Date: Thu, 29 Nov 2018 10:52:57 +0000 (+0900) Subject: [Refactor] #37353 コメント整理 / Refactor comments. X-Git-Url: http://git.osdn.net/view?p=hengband%2Fhengband.git;a=commitdiff_plain;h=06755ee0e4bd561506eae751bcda51d65d858138 [Refactor] #37353 コメント整理 / Refactor comments. --- diff --git a/src/cave.c b/src/cave.c index 668e861b6..815f960aa 100644 --- a/src/cave.c +++ b/src/cave.c @@ -3330,8 +3330,6 @@ void forget_view(void) { POSITION y = view_y[i]; POSITION x = view_x[i]; - - /* Access the grid */ c_ptr = &cave[y][x]; /* Forget that the grid is viewable */ @@ -3412,8 +3410,6 @@ static bool update_view_aux(POSITION y, POSITION x, POSITION y1, POSITION x1, PO /* Totally blocked by "unviewable neighbors" */ if (!v1 && !v2) return (TRUE); - - /* Access the grid */ c_ptr = &cave[y][x]; @@ -3613,8 +3609,6 @@ void update_view(void) { y = view_y[n]; x = view_x[n]; - - /* Access the grid */ c_ptr = &cave[y][x]; /* Mark the grid as not in "view" */ @@ -3637,8 +3631,6 @@ void update_view(void) /* Now start on the player */ y = p_ptr->y; x = p_ptr->x; - - /* Access the grid */ c_ptr = &cave[y][x]; /* Assume the player grid is easily viewable */ @@ -3986,8 +3978,6 @@ void update_view(void) { y = view_y[n]; x = view_x[n]; - - /* Access the grid */ c_ptr = &cave[y][x]; /* Clear the "CAVE_XTRA" flag */ @@ -4005,8 +3995,6 @@ void update_view(void) { y = temp_y[n]; x = temp_x[n]; - - /* Access the grid */ c_ptr = &cave[y][x]; /* No longer in the array */ @@ -4041,8 +4029,6 @@ void delayed_visual_update(void) { y = redraw_y[i]; x = redraw_x[i]; - - /* Access the grid */ c_ptr = &cave[y][x]; /* Update only needed grids (prevent multiple updating) */ diff --git a/src/cmd1.c b/src/cmd1.c index f420d210a..5ab57b930 100644 --- a/src/cmd1.c +++ b/src/cmd1.c @@ -358,8 +358,6 @@ static void discover_hidden_things(POSITION y, POSITION x) { OBJECT_IDX this_o_idx, next_o_idx = 0; cave_type *c_ptr; - - /* Access the grid */ c_ptr = &cave[y][x]; /* Invisible trap */ diff --git a/src/floor-generate.c b/src/floor-generate.c index c502d2f5b..b1e53d45f 100644 --- a/src/floor-generate.c +++ b/src/floor-generate.c @@ -145,7 +145,6 @@ static int next_to_walls(POSITION y, POSITION x) */ static bool alloc_stairs_aux(POSITION y, POSITION x, int walls) { - /* Access the grid */ cave_type *c_ptr = &cave[y][x]; /* Require "naked" floor grid */ @@ -259,8 +258,6 @@ static bool alloc_stairs(IDX feat, int num, int walls) if (!pick) break; } - - /* Access the grid */ c_ptr = &cave[y][x]; /* Clear possible garbage of hidden trap */ @@ -792,12 +789,8 @@ static bool cave_gen(void) { cave_type *c_ptr; feature_type *f_ptr; - - /* Access the grid */ y = dun->tunn[j].y; x = dun->tunn[j].x; - - /* Access the grid */ c_ptr = &cave[y][x]; f_ptr = &f_info[c_ptr->feat]; @@ -815,12 +808,8 @@ static bool cave_gen(void) for (j = 0; j < dun->wall_n; j++) { cave_type *c_ptr; - - /* Access the grid */ y = dun->wall[j].y; x = dun->wall[j].x; - - /* Access the grid */ c_ptr = &cave[y][x]; /* Clear mimic type */ diff --git a/src/floor-streams.c b/src/floor-streams.c index bcc0cee7a..a17272702 100644 --- a/src/floor-streams.c +++ b/src/floor-streams.c @@ -264,8 +264,6 @@ void build_streamer(IDX feat, int chance) if (!in_bounds2(ty, tx)) continue; break; } - - /* Access the grid */ c_ptr = &cave[ty][tx]; f_ptr = &f_info[c_ptr->feat]; diff --git a/src/grid.c b/src/grid.c index b2b97cc05..5f2ebacb0 100644 --- a/src/grid.c +++ b/src/grid.c @@ -412,8 +412,6 @@ static int next_to_corr(POSITION y1, POSITION x1) /* Extract the location */ y = y1 + ddy_ddd[i]; x = x1 + ddx_ddd[i]; - - /* Access the grid */ c_ptr = &cave[y][x]; /* Skip non floors */ diff --git a/src/init1.c b/src/init1.c index e8aa679e4..0ce7d3846 100644 --- a/src/init1.c +++ b/src/init1.c @@ -4002,7 +4002,6 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in for (*x = xmin, i = 0; ((*x < xmax) && (i < len)); (*x)++, s++, i++) { - /* Access the grid */ cave_type *c_ptr = &cave[*y][*x]; int idx = s[0]; diff --git a/src/melee1.c b/src/melee1.c index fe8694452..e1466b7af 100644 --- a/src/melee1.c +++ b/src/melee1.c @@ -1993,7 +1993,6 @@ bool make_attack_normal(MONSTER_IDX m_idx) } } - /* Take some damage */ get_damage += take_hit(DAMAGE_ATTACK, damage, ddesc, -1); /* Learn about the player */ @@ -2018,7 +2017,6 @@ bool make_attack_normal(MONSTER_IDX m_idx) } } - /* Take some damage */ get_damage += take_hit(DAMAGE_ATTACK, damage, ddesc, -1); /* Learn about the player */ @@ -2029,7 +2027,6 @@ bool make_attack_normal(MONSTER_IDX m_idx) case RBE_UN_POWER: { - /* Take some damage */ get_damage += take_hit(DAMAGE_ATTACK, damage, ddesc, -1); if (p_ptr->is_dead || CHECK_MULTISHADOW()) break; @@ -2087,7 +2084,6 @@ bool make_attack_normal(MONSTER_IDX m_idx) case RBE_EAT_GOLD: { - /* Take some damage */ get_damage += take_hit(DAMAGE_ATTACK, damage, ddesc, -1); /* Confused monsters cannot steal successfully. -LM-*/ @@ -2148,7 +2144,6 @@ bool make_attack_normal(MONSTER_IDX m_idx) case RBE_EAT_ITEM: { - /* Take some damage */ get_damage += take_hit(DAMAGE_ATTACK, damage, ddesc, -1); /* Confused monsters cannot steal successfully. -LM-*/ @@ -2262,7 +2257,6 @@ bool make_attack_normal(MONSTER_IDX m_idx) case RBE_EAT_FOOD: { - /* Take some damage */ get_damage += take_hit(DAMAGE_ATTACK, damage, ddesc, -1); if (p_ptr->is_dead || CHECK_MULTISHADOW()) break; @@ -2306,8 +2300,6 @@ bool make_attack_normal(MONSTER_IDX m_idx) { /* Access the lite */ o_ptr = &inventory[INVEN_LITE]; - - /* Take some damage */ get_damage += take_hit(DAMAGE_ATTACK, damage, ddesc, -1); if (p_ptr->is_dead || CHECK_MULTISHADOW()) break; @@ -2672,7 +2664,6 @@ bool make_attack_normal(MONSTER_IDX m_idx) case RBE_DISEASE: { - /* Take some damage */ get_damage += take_hit(DAMAGE_ATTACK, damage, ddesc, -1); if (p_ptr->is_dead || CHECK_MULTISHADOW()) break; diff --git a/src/rooms-vault.c b/src/rooms-vault.c index d4df861c6..3746791ed 100644 --- a/src/rooms-vault.c +++ b/src/rooms-vault.c @@ -337,8 +337,6 @@ static void build_vault(POSITION yval, POSITION xval, POSITION ymax, POSITION xm /* Hack -- skip "non-grids" */ if (*t == ' ') continue; - - /* Access the grid */ c_ptr = &cave[y][x]; /* Lay down a floor */ diff --git a/src/spells2.c b/src/spells2.c index c797edb0d..de3735cdc 100644 --- a/src/spells2.c +++ b/src/spells2.c @@ -38,8 +38,6 @@ static bool detect_feat_flag(POSITION range, int flag, bool known) { int dist = distance(p_ptr->y, p_ptr->x, y, x); if (dist > range) continue; - - /* Access the grid */ c_ptr = &cave[y][x]; /* Hack -- Safe */ @@ -1450,8 +1448,6 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate) /* Stay in the circle of death */ if (k > r) continue; - - /* Access the grid */ c_ptr = &cave[y][x]; /* Lose room and vault */ @@ -1626,8 +1622,6 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate) /* Stay in the circle of death */ if (k > r) continue; - - /* Access the grid */ c_ptr = &cave[y][x]; if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW; @@ -1760,8 +1754,6 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx) /* Skip distant grids */ if (distance(cy, cx, yy, xx) > r) continue; - - /* Access the grid */ c_ptr = &cave[yy][xx]; /* Lose room and vault */ @@ -1875,7 +1867,6 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx) /* Important -- no wall on player */ map[16+p_ptr->y-cy][16+p_ptr->x-cx] = FALSE; - /* Take some damage */ if (damage) { cptr killer; @@ -1910,8 +1901,6 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx) /* Skip unaffected grids */ if (!map[16+yy-cy][16+xx-cx]) continue; - - /* Access the grid */ c_ptr = &cave[yy][xx]; if (c_ptr->m_idx == p_ptr->riding) continue; @@ -1946,7 +1935,6 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx) /* Look for safety */ for (i = 0; i < 8; i++) { - /* Access the grid */ y = yy + ddy_ddd[i]; x = xx + ddx_ddd[i]; @@ -2121,8 +2109,6 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx) /* Skip distant grids */ if (distance(cy, cx, yy, xx) > r) continue; - - /* Access the grid */ c_ptr = &cave[yy][xx]; if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;