OSDN Git Service

[Refactor] #37353 NO_TOWN, SECRET_TOWN を wild.h へ移動.
[hengband/hengband.git] / src / rooms-city.c
index 58b1ab0..2e3dc4d 100644 (file)
@@ -1,9 +1,13 @@
 #include "angband.h"
+#include "util.h"
+
 #include "grid.h"
-#include "generate.h"
+#include "floor.h"
+#include "floor-generate.h"
 #include "rooms.h"
 #include "rooms-city.h"
 #include "store.h"
+#include "wild.h"
 
 
 
@@ -180,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 cave of normal floors.\n
+* We start with a fully wiped current_floor_ptr->grid_array of normal floors.\n
 *\n
 * Note that town_gen_hack() plays games with the R.N.G.\n
 *\n
@@ -201,13 +205,13 @@ bool build_type16(void)
        bool prevent_bm = FALSE;
 
        /* Hack -- If already exist black market, prevent building */
-       for (y = 0; (y < cur_hgt) && !prevent_bm; y++)
+       for (y = 0; (y < current_floor_ptr->height) && !prevent_bm; y++)
        {
-               for (x = 0; x < cur_wid; x++)
+               for (x = 0; x < current_floor_ptr->width; x++)
                {
-                       if (cave[y][x].feat == FF_STORE)
+                       if (current_floor_ptr->grid_array[y][x].feat == FF_STORE)
                        {
-                               prevent_bm = (f_info[cave[y][x].feat].subtype == STORE_BLACK);
+                               prevent_bm = (f_info[current_floor_ptr->grid_array[y][x].feat].subtype == STORE_BLACK);
                                break;
                        }
                }