OSDN Git Service

[Refactor] #37353 files.cの整形修正 / Fixed reshaped files.c
[hengband/hengband.git] / src / rooms-city.c
index fb8f625..dcde92c 100644 (file)
@@ -102,7 +102,7 @@ static bool precalc_ugarcade(int town_hgt, int town_wid, int n)
 * @note
 * Note: ltcy and ltcx indicate "left top corner".
 */
-static void build_stores(POSITION ltcy, POSITION ltcx, int stores[], int n)
+static void build_stores(floor_type *floor_ptr, POSITION ltcy, POSITION ltcx, int stores[], int n)
 {
        int i;
        POSITION y, x;
@@ -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(p_ptr->current_floor_ptr, 
+               generate_room_floor(floor_ptr,
                        ltcy + cur_ugbldg->y0 - 2, ltcx + cur_ugbldg->x0 - 2,
                        ltcy + cur_ugbldg->y1 + 2, ltcx + cur_ugbldg->x1 + 2,
                        FALSE);
@@ -125,7 +125,7 @@ static void build_stores(POSITION ltcy, POSITION ltcx, int stores[], int n)
                cur_ugbldg = &ugbldg[i];
 
                /* Build an invulnerable rectangular building */
-               generate_fill_perm_bold(
+               generate_fill_perm_bold(floor_ptr, 
                        ltcy + cur_ugbldg->y0, ltcx + cur_ugbldg->x0,
                        ltcy + cur_ugbldg->y1, ltcx + cur_ugbldg->x1);
 
@@ -168,7 +168,7 @@ static void build_stores(POSITION ltcy, POSITION ltcx, int stores[], int n)
                /* Clear previous contents, add a store door */
                if (j < max_f_idx)
                {
-                       cave_set_feat(p_ptr->current_floor_ptr, ltcy + y, ltcx + x, j);
+                       cave_set_feat(floor_ptr, ltcy + y, ltcx + x, j);
 
                        /* Init store */
                        store_init(NO_TOWN, stores[i]);
@@ -184,7 +184,7 @@ static void build_stores(POSITION ltcy, POSITION ltcx, int stores[], int n)
 * Town logic flow for generation of new town\n
 * Originally from Vanilla 3.0.3\n
 *\n
-* We start with a fully wiped p_ptr->current_floor_ptr->grid_array of normal floors.\n
+* We start with a fully wiped grids of normal floors.\n
 *\n
 * Note that town_gen_hack() plays games with the R.N.G.\n
 *\n
@@ -234,7 +234,7 @@ bool build_type16(floor_type *floor_ptr)
        }
 
        /* Find and reserve some space in the dungeon.  Get center of room. */
-       if (!find_space(&yval, &xval, town_hgt + 4, town_wid + 4))
+       if (!find_space(floor_ptr, &yval, &xval, town_hgt + 4, town_wid + 4))
        {
                /* Free buildings array */
                C_KILL(ugbldg, n, ugbldg_type);
@@ -251,7 +251,7 @@ bool build_type16(floor_type *floor_ptr)
                y1 + town_hgt * 2 / 3, x1 + town_wid * 2 / 3, FALSE);
 
        /* Build stores */
-       build_stores(y1, x1, stores, n);
+       build_stores(floor_ptr, y1, x1, stores, n);
 
        msg_print_wizard(CHEAT_DUNGEON, _("地下街を生成しました", "Underground arcade was generated."));