{
for (x = 0; x < floor_ptr->width; x++)
{
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
}
}
/* Clear mimic type */
floor_ptr->grid_array[*y][*x].mimic = 0;
- place_floor_bold(player_ptr, *y, *x);
+ place_bold(player_ptr, *y, *x, floor);
return TRUE;
}
creature_ptr->x = creature_ptr->current_floor_ptr->width / 2;
/* Give one square */
- place_floor_bold(creature_ptr, creature_ptr->y, creature_ptr->x);
+ place_bold(creature_ptr, creature_ptr->y, creature_ptr->x, floor);
wipe_generate_random_floor_flags(creature_ptr->current_floor_ptr);
}
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (d_info[floor_ptr->dungeon_idx].flags1 & DF1_NO_DOORS)
{
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
return;
}
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (d_info[floor_ptr->dungeon_idx].flags1 & DF1_NO_DOORS)
{
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
return;
}
if (d_info[floor_ptr->dungeon_idx].flags1 & DF1_NO_DOORS)
{
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
return;
}
}
else
{
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
}
delete_monster(player_ptr, y, x);
floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (d_info[floor_ptr->dungeon_idx].flags1 & DF1_NO_DOORS)
{
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
return;
}
if (feat == feat_none)
{
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
return;
}
/* Set to be floor if is a wall (don't touch lakes). */
if (is_extra_bold(floor_ptr, y, x))
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
}
}
-void place_grid(player_type *player_ptr, grid_type *g_ptr, grid_hold_type gh_type)
+void place_grid(player_type *player_ptr, grid_type *g_ptr, grid_bold_type gb_type)
{
- switch (gh_type)
+ switch (gb_type)
{
case floor:
{
}
-void place_floor_bold(player_type *player_ptr, POSITION y, POSITION x)
-{
- floor_type *floor_ptr = player_ptr->current_floor_ptr;
- set_cave_feat(floor_ptr, y, x, feat_ground_type[randint0(100)]);
- floor_ptr->grid_array[y][x].info &= ~(CAVE_MASK);
- add_cave_info(floor_ptr, y, x, CAVE_FLOOR);
- delete_monster(player_ptr, y, x);
-}
-
-
void place_extra_bold(player_type *player_ptr, POSITION y, POSITION x)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
delete_monster(player_ptr, y, x);
}
-void place_hold(player_type *player_ptr, POSITION y, POSITION x, grid_hold_type gh_type)
+void place_bold(player_type *player_ptr, POSITION y, POSITION x, grid_bold_type gb_type)
{
floor_type *floor_ptr = player_ptr->current_floor_ptr;
- switch (gh_type)
+ switch (gb_type)
{
case floor:
{
extern bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode);
extern bool cave_player_teleportable_bold(POSITION y, POSITION x, BIT_FLAGS mode);
-typedef enum grid_hold_type
+typedef enum grid_bold_type
{
floor,
extra,
outer_noperm,
solid,
solid_perm
-} grid_hold_type;
+} grid_bold_type;
-extern void place_grid(player_type *player_ptr, grid_type *g_ptr, grid_hold_type pg_type);
+extern void place_grid(player_type *player_ptr, grid_type *g_ptr, grid_bold_type pg_type);
extern bool darkened_grid(player_type *player_ptr, grid_type *g_ptr);
extern void delete_monster(player_type *player_ptr, POSITION y, POSITION x);
-extern void place_hold(player_type *player_ptr, POSITION y, POSITION x, grid_hold_type gh_type);
-void place_floor_bold(player_type *player_ptr, POSITION y, POSITION x);
+extern void place_bold(player_type *player_ptr, POSITION y, POSITION x, grid_bold_type gh_type);
void place_extra_bold(player_type *player_ptr, POSITION y, POSITION x);
void place_extra_perm_bold(player_type *player_ptr, POSITION y, POSITION x);
void place_inner_bold(player_type *player_ptr, POSITION y, POSITION x);
if (distance(y0, x0, y, x) <= rad - 1)
{
/* inside- so is floor */
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
}
else if (distance(y0, x0, y, x) <= rad + 1)
{
if (dist2(y0, x0, y, x, h1, h2, h3, h4) <= rad - 1)
{
/* inside - so is floor */
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
}
else if (distance(y0, x0, y, x) < 3)
{
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
}
else
{
{
for (y = y1; y <= yval; y++)
{
- place_floor_bold(player_ptr, y, x2);
+ place_bold(player_ptr, y, x2, floor);
place_solid_bold(player_ptr, y, x1 - 1);
}
for (y = yval; y <= y2 + 1; y++)
{
- place_floor_bold(player_ptr, y, x1);
+ place_bold(player_ptr, y, x1, floor);
place_solid_bold(player_ptr, y, x2 + 1);
}
}
{
for (y = yval; y <= y2 + 1; y++)
{
- place_floor_bold(player_ptr, y, x1);
+ place_bold(player_ptr, y, x1, floor);
place_solid_bold(player_ptr, y, x2 + 1);
}
for (y = y1; y <= yval; y++)
{
- place_floor_bold(player_ptr, y, x2);
+ place_bold(player_ptr, y, x2, floor);
place_solid_bold(player_ptr, y, x1 - 1);
}
}
else
{
/* middle of a bubble */
- place_floor_bold(player_ptr, y0 - yhsize + y, x0 - xhsize + x);
+ place_bold(player_ptr, y0 - yhsize + y, x0 - xhsize + x, floor);
}
/* clean up rest of flags */
if (dist2(y0, x0, y, x, h1, h2, h3, h4) <= rad - 1)
{
/* inside- so is floor */
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
}
else
{
place_inner_bold(player_ptr, y0 + 1, x);
}
- place_floor_bold(player_ptr, y0, x0);
+ place_bold(player_ptr, y0, x0, floor);
/* Add doors to vault */
{
floor_ptr->grid_array[y][x].info |= (CAVE_ROOM | CAVE_ICKY);
/* Make everything a floor */
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
}
}
floor_ptr->grid_array[y0][x0].mimic = 0;
/* Add inner open space */
- place_floor_bold(player_ptr, y0, x0);
+ place_bold(player_ptr, y0, x0, floor);
}
/*!
{
for (y = 0; y <= ysize; ++y)
{
- place_floor_bold(player_ptr, y0 + y - yhsize, x0 + x - xhsize);
+ place_bold(player_ptr, y0 + y - yhsize, x0 + x - xhsize, floor);
floor_ptr->grid_array[y0 + y - yhsize][x0 + x - xhsize].info &= ~(CAVE_ICKY);
}
}
if (is_extra_bold(floor_ptr, y1 + y, x1 + x))
{
/* clear the untouched region */
- place_floor_bold(player_ptr, y1 + y, x1 + x);
+ place_bold(player_ptr, y1 + y, x1 + x, floor);
floor_ptr->grid_array[y1 + y][x1 + x].info |= (CAVE_ROOM | CAVE_ICKY);
}
else
visited[node] = 1;
x = 2 * (node % m) + x1;
y = 2 * (node / m) + y1;
- place_floor_bold(player_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
/* setup order of adjacent node visits */
if (one_in_(3))
/* (0,+) - check for bottom boundary */
if ((node / m < n - 1) && (visited[node + m] == 0))
{
- place_floor_bold(player_ptr, y + 1, x);
+ place_bold(player_ptr, y + 1, x, floor);
r_visit(player_ptr, y1, x1, y2, x2, node + m, dir, visited);
}
break;
/* (0,-) - check for top boundary */
if ((node / m > 0) && (visited[node - m] == 0))
{
- place_floor_bold(player_ptr, y - 1, x);
+ place_bold(player_ptr, y - 1, x, floor);
r_visit(player_ptr, y1, x1, y2, x2, node - m, dir, visited);
}
break;
/* (+,0) - check for right boundary */
if ((node % m < m - 1) && (visited[node + 1] == 0))
{
- place_floor_bold(player_ptr, y, x + 1);
+ place_bold(player_ptr, y, x + 1, floor);
r_visit(player_ptr, y1, x1, y2, x2, node + 1, dir, visited);
}
break;
/* (-,0) - check for left boundary */
if ((node % m > 0) && (visited[node - 1] == 0))
{
- place_floor_bold(player_ptr, y, x - 1);
+ place_bold(player_ptr, y, x - 1, floor);
r_visit(player_ptr, y1, x1, y2, x2, node - 1, dir, visited);
}
} /* end switch */
{
/* left and right */
y = randint1(ysize) + y1;
- place_floor_bold(player_ptr, y, x1);
- place_floor_bold(player_ptr, y, x2);
+ place_bold(player_ptr, y, x1, floor);
+ place_bold(player_ptr, y, x2, floor);
}
else
{
/* top and bottom */
x = randint1(xsize) + x1;
- place_floor_bold(player_ptr, y1, x);
- place_floor_bold(player_ptr, y2, x);
+ place_bold(player_ptr, y1, x, floor);
+ place_bold(player_ptr, y2, x, floor);
}
/* Select size of keep */
if (one_in_(2))
{
/* left */
- place_floor_bold(player_ptr, y, x1 + 1);
+ place_bold(player_ptr, y, x1 + 1, floor);
}
else
{
/* right */
- place_floor_bold(player_ptr, y, x2 - 1);
+ place_bold(player_ptr, y, x2 - 1, floor);
}
/* Build the room */