OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
authorDeskull <deskull@users.sourceforge.jp>
Sun, 25 Nov 2018 13:34:54 +0000 (22:34 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sun, 25 Nov 2018 13:34:54 +0000 (22:34 +0900)
src/cmd2.c
src/defines.h
src/load.c
src/spells2.c

index 85af3b8..c7c33a5 100644 (file)
@@ -401,19 +401,14 @@ void do_cmd_search(void)
 static OBJECT_IDX chest_check(POSITION y, POSITION x, bool trapped)
 {
        cave_type *c_ptr = &cave[y][x];
-
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
-
        /* Scan all objects in the grid */
        for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
        {
                object_type *o_ptr;
 
-               /* Acquire object */
                o_ptr = &o_list[this_o_idx];
-
-               /* Acquire next object */
                next_o_idx = o_ptr->next_o_idx;
 
                /* Skip unknown chests XXX XXX */
@@ -427,8 +422,6 @@ static OBJECT_IDX chest_check(POSITION y, POSITION x, bool trapped)
                        return (this_o_idx);
                }
        }
-
-       /* No chest */
        return (0);
 }
 
index 643f547..ec8e7db 100644 (file)
  * OM_NOMSG --- temporary flag to suppress messages which were
  *              already printed in autopick_pickup_items().
  */
-#define OM_FOUND        0x01    /* original boolean flag */
+#define OM_FOUND        0x01    /*!< アイテムを一度でも視界に収めたことがあるか */
 #define OM_NOMSG        0x02    /* temporary flag to suppress messages */
 #define OM_NO_QUERY     0x04    /* Query for auto-pick was already answered as 'No' */
 #define OM_AUTODESTROY  0x08    /* Destroy later to avoid illegal inventry shift */
index eb589ff..ab44d09 100644 (file)
@@ -1473,9 +1473,7 @@ static void rd_randomizer(void)
 static void rd_options(void)
 {
        int i, n;
-
        byte b;
-
        u16b c;
 
        BIT_FLAGS flag[8];
@@ -1505,7 +1503,6 @@ static void rd_options(void)
                mana_warn = b;
        }
 
-
        /*** Cheating options ***/
 
        rd_u16b(&c);
index 8d5b444..72f04c6 100644 (file)
@@ -25,8 +25,8 @@
  */
 static bool detect_feat_flag(POSITION range, int flag, bool known)
 {
-       int       x, y;
-       bool      detect = FALSE;
+       int x, y;
+       bool detect = FALSE;
        cave_type *c_ptr;
 
        if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
@@ -207,11 +207,7 @@ bool detect_objects_gold(POSITION range)
                {
                        /* Hack -- memorize it */
                        o_ptr->marked |= OM_FOUND;
-
-                       /* Redraw */
                        lite_spot(y, x);
-
-                       /* Detect */
                        detect = TRUE;
                }
        }
@@ -270,11 +266,7 @@ bool detect_objects_normal(POSITION range)
                {
                        /* Hack -- memorize it */
                        o_ptr->marked |= OM_FOUND;
-
-                       /* Redraw */
                        lite_spot(y, x);
-
-                       /* Detect */
                        detect = TRUE;
                }
        }
@@ -366,11 +358,7 @@ bool detect_objects_magic(POSITION range)
                {
                        /* Memorize the item */
                        o_ptr->marked |= OM_FOUND;
-
-                       /* Redraw */
                        lite_spot(y, x);
-
-                       /* Detect */
                        detect = TRUE;
                }
        }
@@ -426,8 +414,6 @@ bool detect_monsters_normal(POSITION range)
 
                        /* Update the monster */
                        update_mon(i, FALSE);
-
-                       /* Detect */
                        flag = TRUE;
                }
        }
@@ -491,8 +477,6 @@ bool detect_monsters_invis(POSITION range)
 
                        /* Update the monster */
                        update_mon(i, FALSE);
-
-                       /* Detect */
                        flag = TRUE;
                }
        }
@@ -561,8 +545,6 @@ bool detect_monsters_evil(POSITION range)
 
                        /* Update the monster */
                        update_mon(i, FALSE);
-
-                       /* Detect */
                        flag = TRUE;
                }
        }
@@ -623,8 +605,6 @@ bool detect_monsters_nonliving(POSITION range)
 
                        /* Update the monster */
                        update_mon(i, FALSE);
-
-                       /* Detect */
                        flag = TRUE;
                }
        }
@@ -685,8 +665,6 @@ bool detect_monsters_mind(POSITION range)
 
                        /* Update the monster */
                        update_mon(i, FALSE);
-
-                       /* Detect */
                        flag = TRUE;
                }
        }
@@ -749,8 +727,6 @@ bool detect_monsters_string(POSITION range, cptr Match)
 
                        /* Update the monster */
                        update_mon(i, FALSE);
-
-                       /* Detect */
                        flag = TRUE;
                }
        }
@@ -821,8 +797,6 @@ bool detect_monsters_xxx(POSITION range, u32b match_flag)
 
                        /* Update the monster */
                        update_mon(i, FALSE);
-
-                       /* Detect */
                        flag = TRUE;
                }
        }