OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
[hengband/hengband.git] / src / cave.c
index 4d9aeb0..6334dad 100644 (file)
@@ -2002,7 +2002,6 @@ void display_map(int *cy, int *cx)
        {
                for (j = 0; j < cur_hgt; ++j)
                {
-                       /* Location */
                        x = i / xrat + 1;
                        y = j / yrat + 1;
 
@@ -2036,7 +2035,6 @@ void display_map(int *cy, int *cx)
        {
                for (i = 0; i < cur_wid; ++i)
                {
-                       /* Location */
                        x = i / xrat + 1;
                        y = j / yrat + 1;
 
@@ -2189,7 +2187,7 @@ void display_map(int *cy, int *cx)
 /*
  * Display a "small-scale" map of the dungeon for the player
  *
- * Currently, the "player" is displayed on the map.  XXX XXX XXX
+ * Currently, the "player" is displayed on the map.  
  */
 void do_cmd_view_map(void)
 {
@@ -2543,8 +2541,6 @@ void forget_lite(void)
 
 
 /*
- * XXX XXX XXX
- *
  * This macro allows us to efficiently add a grid to the "lite" array,
  * note that we are never called for illegal grids, or for grids which
  * have already been placed into the "lite" array, and we are never
@@ -4298,9 +4294,9 @@ void map_area(POSITION range)
 {
        int i;
        POSITION x, y;
-       cave_type       *c_ptr;
-       s16b            feat;
-       feature_type    *f_ptr;
+       cave_type *c_ptr;
+       FEAT_IDX feat;
+       feature_type *f_ptr;
 
        if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
 
@@ -4353,7 +4349,6 @@ void map_area(POSITION range)
        /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
-       /* Window stuff */
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 }
 
@@ -4377,7 +4372,8 @@ void map_area(POSITION range)
  */
 void wiz_lite(bool ninja)
 {
-       int i, y, x;
+       OBJECT_IDX i;
+       POSITION y, x;
        FEAT_IDX feat;
        feature_type *f_ptr;
 
@@ -4460,7 +4456,6 @@ void wiz_lite(bool ninja)
        /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
-       /* Window stuff */
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 
        if (p_ptr->special_defense & NINJA_S_STEALTH)
@@ -4475,8 +4470,8 @@ void wiz_lite(bool ninja)
  */
 void wiz_dark(void)
 {
-       int i, y, x;
-
+       OBJECT_IDX i;
+       POSITION y, x;
 
        /* Forget every grid */
        for (y = 1; y < cur_hgt - 1; y++)
@@ -4535,14 +4530,9 @@ void wiz_dark(void)
        /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
-       /* Window stuff */
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 }
 
-
-
-
-
 /*
  * Change the "feat" flag for a grid, and notice/redraw the grid
  */
@@ -4563,7 +4553,8 @@ void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat)
                /* Hack -- glow the GLOW terrain */
                if (have_flag(f_ptr->flags, FF_GLOW) && !(d_info[dungeon_type].flags1 & DF1_DARKNESS))
                {
-                       int i, yy, xx;
+                       DIRECTION i;
+                       POSITION yy, xx;
 
                        for (i = 0; i < 9; i++)
                        {
@@ -4603,7 +4594,6 @@ void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat)
        /* Update the monster */
        if (c_ptr->m_idx) update_mon(c_ptr->m_idx, FALSE);
 
-       /* Notice */
        note_spot(y, x);
 
        /* Redraw */
@@ -4626,7 +4616,8 @@ void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat)
        /* Hack -- glow the GLOW terrain */
        if (have_flag(f_ptr->flags, FF_GLOW) && !(d_info[dungeon_type].flags1 & DF1_DARKNESS))
        {
-               int i, yy, xx;
+               DIRECTION i;
+               POSITION yy, xx;
                cave_type *cc_ptr;
 
                for (i = 0; i < 9; i++)
@@ -4642,7 +4633,6 @@ void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat)
                                /* Update the monster */
                                if (cc_ptr->m_idx) update_mon(cc_ptr->m_idx, FALSE);
 
-                               /* Notice */
                                note_spot(yy, xx);
 
                                /* Redraw */
@@ -4660,7 +4650,7 @@ void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat)
 }
 
 
-IDX conv_dungeon_feat(IDX newfeat)
+FEAT_IDX conv_dungeon_feat(FEAT_IDX newfeat)
 {
        feature_type *f_ptr = &f_info[newfeat];
 
@@ -4694,7 +4684,7 @@ IDX conv_dungeon_feat(IDX newfeat)
  * Take a feature, determine what that feature becomes
  * through applying the given action.
  */
-IDX feat_state(IDX feat, int action)
+FEAT_IDX feat_state(FEAT_IDX feat, int action)
 {
        feature_type *f_ptr = &f_info[feat];
        int i;
@@ -4789,7 +4779,6 @@ void remove_mirror(POSITION y, POSITION x)
                update_local_illumination(y, x);
        }
 
-       /* Notice */
        note_spot(y, x);
 
        /* Redraw */
@@ -4992,7 +4981,6 @@ void monster_race_track(MONRACE_IDX r_idx)
        /* Save this monster ID */
        p_ptr->monster_race_idx = r_idx;
 
-       /* Window stuff */
        p_ptr->window |= (PW_MONSTER);
 }
 
@@ -5006,7 +4994,6 @@ void object_kind_track(KIND_OBJECT_IDX k_idx)
        /* Save this monster ID */
        p_ptr->object_kind_idx = k_idx;
 
-       /* Window stuff */
        p_ptr->window |= (PW_OBJECT);
 }
 
@@ -5021,7 +5008,7 @@ void object_kind_track(KIND_OBJECT_IDX k_idx)
  *
  * All disturbance cancels repeated commands, resting, and running.
  */
-void disturb(int stop_search, int stop_travel)
+void disturb(bool stop_search, bool stop_travel)
 {
 #ifndef TRAVEL
        /* Unused */