STORE_BOOK,
};
int n = sizeof stores / sizeof(int);
- POSITION i, y, x, y1, x1, yval, xval;
+ POSITION y1, x1, yval, xval;
int town_hgt = rand_range(MIN_TOWN_HGT, MAX_TOWN_HGT);
int town_wid = rand_range(MIN_TOWN_WID, MAX_TOWN_WID);
- bool prevent_bm = false;
- floor_type *floor_ptr = player_ptr->current_floor_ptr;
-
- // If already exist black market, prevent building
- for (y = 0; (y < floor_ptr->height) && !prevent_bm; y++) {
- for (x = 0; x < floor_ptr->width; x++) {
- const auto f_ptr = &f_info[floor_ptr->grid_array[y][x].feat];
- if (f_ptr->flags.has(FF::STORE) && f_ptr->subtype == STORE_BLACK) {
- prevent_bm = true;
- break;
- }
- }
- }
-
- for (i = 0; i < n; i++)
- if ((stores[i] == STORE_BLACK) && prevent_bm)
- stores[i] = stores[--n];
if (!n)
return false;