OSDN Git Service

[Refactor] #38997 generate_room_floor() に floor_type * 引数を追加. / Add floor_type *...
authordeskull <deskull@users.sourceforge.jp>
Tue, 10 Dec 2019 01:10:06 +0000 (10:10 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Tue, 10 Dec 2019 01:10:06 +0000 (10:10 +0900)
src/rooms-city.c
src/rooms.c
src/rooms.h

index 611a7d3..fb8f625 100644 (file)
@@ -114,7 +114,7 @@ static void build_stores(POSITION ltcy, POSITION ltcx, int stores[], int n)
                cur_ugbldg = &ugbldg[i];
 
                /* Generate new room */
-               generate_room_floor(
+               generate_room_floor(p_ptr->current_floor_ptr, 
                        ltcy + cur_ugbldg->y0 - 2, ltcx + cur_ugbldg->x0 - 2,
                        ltcy + cur_ugbldg->y1 + 2, ltcx + cur_ugbldg->x1 + 2,
                        FALSE);
@@ -246,7 +246,7 @@ bool build_type16(floor_type *floor_ptr)
        x1 = xval - (town_wid / 2);
 
        /* Generate new room */
-       generate_room_floor(
+       generate_room_floor(floor_ptr,
                y1 + town_hgt / 3, x1 + town_wid / 3,
                y1 + town_hgt * 2 / 3, x1 + town_wid * 2 / 3, FALSE);
 
index 0066fd2..825bb29 100644 (file)
@@ -2040,7 +2040,7 @@ POSITION dist2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, POSITION h1,
 
 
 /* Create a new floor room with optional light */
-void generate_room_floor(POSITION y1, POSITION x1, POSITION y2, POSITION x2, int light)
+void generate_room_floor(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int light)
 {
        POSITION y, x;
        
@@ -2051,7 +2051,7 @@ void generate_room_floor(POSITION y1, POSITION x1, POSITION y2, POSITION x2, int
                for (x = x1; x <= x2; x++)
                {
                        /* Point to grid */
-                       g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
+                       g_ptr = &floor_ptr->grid_array[y][x];
                        place_floor_grid(g_ptr);
                        g_ptr->info |= (CAVE_ROOM);
                        if (light) g_ptr->info |= (CAVE_GLOW);
index 8111fd6..25d970a 100644 (file)
@@ -94,7 +94,7 @@ extern bool find_space(POSITION *y, POSITION *x, POSITION height, POSITION width
 extern void build_small_room(floor_type *floor_ptr, POSITION x0, POSITION y0);
 extern void add_outer_wall(floor_type *floor_ptr, POSITION x, POSITION y, int light, POSITION x1, POSITION y1, POSITION x2, POSITION y2);
 extern POSITION dist2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, POSITION h1, POSITION h2, POSITION h3, POSITION h4);
-extern void generate_room_floor(POSITION y1, POSITION x1, POSITION y2, POSITION x2, int light);
+extern void generate_room_floor(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int light);
 extern void generate_fill_perm_bold(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 extern void generate_hmap(floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsiz, POSITION ysiz, int grd, int roug, int cutoff);
 extern bool generate_fracave(floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int cutoff, bool light, bool room);