};
-void generate_wilderness_area(int terrain, u32b seed, bool border, bool corner)
+static void generate_wilderness_area(int terrain, u32b seed, bool border, bool corner)
{
int x1, y1;
int table_size = sizeof(terrain_table[0]) / sizeof(int);
}
}
- if (wilderness[y][x].entrance && !wilderness[y][x].town && (total_winner || !(d_info[wilderness[y][x].entrance].flags1 & DF1_WINNER)))
+ if (wilderness[y][x].entrance && !wilderness[y][x].town && (p_ptr->total_winner || !(d_info[wilderness[y][x].entrance].flags1 & DF1_WINNER)))
{
int dy, dx;
void wilderness_gen(void)
{
int i, y, x, lim;
- bool daytime;
cave_type *c_ptr;
/* Big town */
/* South east corner */
cave[MAX_HGT - 1][MAX_WID - 1].mimic = border.south_east;
-
- /* Day time */
- if ((turn % (20L * TOWN_DAWN)) < ((20L * TOWN_DAWN) / 2))
- daytime = TRUE;
- else
- daytime = FALSE;
-
/* Light up or darken the area */
for (y = 0; y < cur_hgt; y++)
{
/* Get the cave grid */
c_ptr = &cave[y][x];
- if (daytime)
+ if (is_daytime())
{
/* Assume lit */
c_ptr->info |= (CAVE_GLOW);
/* Darken "boring" features */
if ((c_ptr->feat <= FEAT_INVIS) ||
((c_ptr->feat >= FEAT_DEEP_WATER) &&
- (c_ptr->feat <= FEAT_TREES) &&
+ (c_ptr->feat <= FEAT_MOUNTAIN) &&
(c_ptr->feat != FEAT_MUSEUM)) ||
(x == 0) || (x == cur_wid-1) ||
(y == 0) || (y == cur_hgt-1))
cave[j][i].special = wilderness[j][i].town;
}
else if (wilderness[j][i].road) cave[j][i].feat = FEAT_FLOOR;
- else if (wilderness[j][i].entrance && (total_winner || !(d_info[wilderness[j][i].entrance].flags1 & DF1_WINNER)))
+ else if (wilderness[j][i].entrance && (p_ptr->total_winner || !(d_info[wilderness[j][i].entrance].flags1 & DF1_WINNER)))
{
cave[j][i].feat = FEAT_ENTRANCE;
cave[j][i].special = (byte)wilderness[j][i].entrance;