OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
authorDeskull <deskull@users.sourceforge.jp>
Thu, 29 Nov 2018 10:52:57 +0000 (19:52 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Thu, 29 Nov 2018 10:52:57 +0000 (19:52 +0900)
src/cave.c
src/cmd1.c
src/floor-generate.c
src/floor-streams.c
src/grid.c
src/init1.c
src/melee1.c
src/rooms-vault.c
src/spells2.c

index 668e861..815f960 100644 (file)
@@ -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) */
index f420d21..5ab57b9 100644 (file)
@@ -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 */
index c502d2f..b1e53d4 100644 (file)
@@ -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 */
index bcc0cee..a172727 100644 (file)
@@ -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];
 
index b2b97cc..5f2ebac 100644 (file)
@@ -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 */
index e8aa679..0ce7d38 100644 (file)
@@ -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];
index fe86944..e1466b7 100644 (file)
@@ -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;
index d4df861..3746791 100644 (file)
@@ -337,8 +337,6 @@ static void build_vault(POSITION yval, POSITION xval, POSITION ymax, POSITION xm
 \r
                        /* Hack -- skip "non-grids" */\r
                        if (*t == ' ') continue;\r
-\r
-                       /* Access the grid */\r
                        c_ptr = &cave[y][x];\r
 \r
                        /* Lay down a floor */\r
index c797edb..de3735c 100644 (file)
@@ -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;