OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
[hengband/hengband.git] / src / rooms.c
index 6c7a29d..be495ea 100644 (file)
@@ -174,7 +174,6 @@ static void check_room_boundary(POSITION x1, POSITION y1, POSITION x2, POSITION
        bool old_is_floor, new_is_floor;
 
 
-       /* Initialize */
        count = 0;
 
        old_is_floor = get_is_floor(x1 - 1, y1);
@@ -1095,7 +1094,7 @@ bool generate_fracave(POSITION y0, POSITION x0, POSITION xsize, POSITION ysize,
        }
 
        /*
-        * XXX XXX XXX There is a slight problem when tunnels pierce the caves:
+        * There is a slight problem when tunnels pierce the caves:
         * Extra doors appear inside the system.  (Its not very noticeable though.)
         * This can be removed by "filling" from the outside in.  This allows a separation
         * from _outer_ with _inner_.  (Internal walls are  _outer_ instead.)
@@ -1499,7 +1498,6 @@ void build_room(POSITION x1, POSITION x2, POSITION y1, POSITION y2)
        /* Check if rectangle has no width */
        if ((x1 == x2) || (y1 == y2)) return;
 
-       /* initialize */
        if (x1 > x2)
        {
                /* Swap boundaries if in wrong order */
@@ -1990,9 +1988,9 @@ void add_outer_wall(POSITION x, POSITION y, int light, POSITION x1, POSITION y1,
  * Hacked distance formula - gives the 'wrong' answer.
  * Used to build crypts
  */
-int dist2(int x1, int y1, int x2, int y2, int h1, int h2, int h3, int h4)
+POSITION dist2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, POSITION h1, POSITION h2, POSITION h3, POSITION h4)
 {
-       int dx, dy;
+       POSITION dx, dy;
        dx = abs(x2 - x1);
        dy = abs(y2 - y1);
 
@@ -2015,9 +2013,9 @@ int dist2(int x1, int y1, int x2, int y2, int h1, int h2, int h3, int h4)
 
 
 /* Create a new floor room with optional light */
-void generate_room_floor(int y1, int x1, int y2, int x2, int light)
+void generate_room_floor(POSITION y1, POSITION x1, POSITION y2, POSITION x2, int light)
 {
-       int y, x;
+       POSITION y, x;
        
        cave_type *c_ptr;
 
@@ -2034,9 +2032,9 @@ void generate_room_floor(int y1, int x1, int y2, int x2, int light)
        }
 }
 
-void generate_fill_perm_bold(int y1, int x1, int y2, int x2)
+void generate_fill_perm_bold(POSITION y1, POSITION x1, POSITION y2, POSITION x2)
 {
-       int y, x;
+       POSITION y, x;
 
        for (y = y1; y <= y2; y++)
        {
@@ -2055,7 +2053,7 @@ void generate_fill_perm_bold(int y1, int x1, int y2, int x2)
  * @note that we restrict the number of "crowded" rooms to reduce the chance of overflowing the monster list during level creation.
  * @return 部屋の精製に成功した場合 TRUE を返す。
  */
-static bool room_build(int typ)
+static bool room_build(EFFECT_ID typ)
 {
        /* Build a room */
        switch (typ)