{
int side_x = x0 - xhsize + i;
- place_outer_noperm_bold(floor_ptr, y0 - yhsize + 0, side_x);
+ place_bold(player_ptr, y0 - yhsize + 0, side_x, outer_noperm);
floor_ptr->grid_array[y0 - yhsize + 0][side_x].info |= (CAVE_ROOM | CAVE_ICKY);
- place_outer_noperm_bold(floor_ptr, y0 - yhsize + ysize - 1, side_x);
+ place_bold(player_ptr, y0 - yhsize + ysize - 1, side_x, outer_noperm);
floor_ptr->grid_array[y0 - yhsize + ysize - 1][side_x].info |= (CAVE_ROOM | CAVE_ICKY);
}
{
int side_y = y0 - yhsize + i;
- place_outer_noperm_bold(floor_ptr, side_y, x0 - xhsize + 0);
+ place_bold(player_ptr, side_y, x0 - xhsize + 0, outer_noperm);
floor_ptr->grid_array[side_y][x0 - xhsize + 0].info |= (CAVE_ROOM | CAVE_ICKY);
- place_outer_noperm_bold(floor_ptr, side_y, x0 - xhsize + xsize - 1);
+ place_bold(player_ptr, side_y, x0 - xhsize + xsize - 1, outer_noperm);
floor_ptr->grid_array[side_y][x0 - xhsize + xsize - 1].info |= (CAVE_ROOM | CAVE_ICKY);
}
if (((min2 - min1) <= 2) && (!(min1 < 3)))
{
/* Boundary at midpoint+ not at inner region of bubble */
- place_outer_noperm_bold(floor_ptr, y0 - yhsize + y, x0 - xhsize + x);
+ place_bold(player_ptr, y0 - yhsize + y, x0 - xhsize + x, outer_noperm);
}
else
{
/* middle of a bubble */
- place_floor_bold(floor_ptr, y0 - yhsize + y, x0 - xhsize + x);
+ place_bold(player_ptr, y0 - yhsize + y, x0 - xhsize + x, floor);
}
/* clean up rest of flags */
{
POSITION y = y0 - yhsize + y1;
- place_extra_bold(floor_ptr, y, x);
+ place_bold(player_ptr, y, x, extra);
floor_ptr->grid_array[y][x].info &= (~CAVE_ICKY);
}
}
x2 = randint1(xhsize) * 2 + x0 - xhsize;
y1 = randint1(yhsize) * 2 + y0 - yhsize;
y2 = randint1(yhsize) * 2 + y0 - yhsize;
- build_room(floor_ptr, x1, x2, y1, y2);
+ build_room(player_ptr, x1, x2, y1, y2);
}
/* Add some random doors */
generate_hmap(floor_ptr, y0, x0, xsize, ysize, grd, roug, cutoff);
/* Convert to normal format+ clean up */
- done = generate_fracave(floor_ptr, y0, x0, xsize, ysize, cutoff, light, room);
+ done = generate_fracave(player_ptr, y0, x0, xsize, ysize, cutoff, light, room);
}
/* Set icky flag because is a vault */
g_ptr = &floor_ptr->grid_array[y][x];
/* Lay down a floor */
- place_floor_grid(g_ptr);
+ place_grid(player_ptr, g_ptr, floor);
/* Remove any mimic */
g_ptr->mimic = 0;
{
/* Granite wall (outer) */
case '%':
- place_outer_noperm_grid(g_ptr);
+ place_grid(player_ptr, g_ptr, outer_noperm);
break;
/* Granite wall (inner) */
case '#':
- place_inner_grid(g_ptr);
+ place_grid(player_ptr, g_ptr, inner);
break;
/* Glass wall (inner) */
case '$':
- place_inner_grid(g_ptr);
+ place_grid(player_ptr, g_ptr, inner);
g_ptr->feat = feat_glass_wall;
break;
/* Permanent wall (inner) */
case 'X':
- place_inner_perm_grid(g_ptr);
+ place_grid(player_ptr, g_ptr, inner_perm);
break;
/* Permanent glass wall (inner) */
case 'Y':
- place_inner_perm_grid(g_ptr);
+ place_grid(player_ptr, g_ptr, inner_perm);
g_ptr->feat = feat_permanent_glass_wall;
break;
/* Secret glass doors */
case '-':
place_secret_door(player_ptr, y, x, DOOR_GLASS_DOOR);
- if (is_closed_door(g_ptr->feat)) g_ptr->mimic = feat_glass_wall;
+ if (is_closed_door(player_ptr, g_ptr->feat)) g_ptr->mimic = feat_glass_wall;
break;
/* Curtains */
case '&':
{
floor_ptr->monster_level = floor_ptr->base_level + 5;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ place_monster(player_ptr, y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
floor_ptr->monster_level = floor_ptr->base_level;
break;
}
case '@':
{
floor_ptr->monster_level = floor_ptr->base_level + 11;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ place_monster(player_ptr, y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
floor_ptr->monster_level = floor_ptr->base_level;
break;
}
case '9':
{
floor_ptr->monster_level = floor_ptr->base_level + 9;
- place_monster(y, x, PM_ALLOW_SLEEP);
+ place_monster(player_ptr, y, x, PM_ALLOW_SLEEP);
floor_ptr->monster_level = floor_ptr->base_level;
floor_ptr->object_level = floor_ptr->base_level + 7;
place_object(player_ptr, y, x, AM_GOOD);
case '8':
{
floor_ptr->monster_level = floor_ptr->base_level + 40;
- place_monster(y, x, PM_ALLOW_SLEEP);
+ place_monster(player_ptr, y, x, PM_ALLOW_SLEEP);
floor_ptr->monster_level = floor_ptr->base_level;
floor_ptr->object_level = floor_ptr->base_level + 20;
place_object(player_ptr, y, x, AM_GOOD | AM_GREAT);
if (randint0(100) < 50)
{
floor_ptr->monster_level = floor_ptr->base_level + 3;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ place_monster(player_ptr, y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
floor_ptr->monster_level = floor_ptr->base_level;
}
if (randint0(100) < 50)
}
/* Find and reserve some space in the dungeon. Get center of room. */
- if (!find_space(floor_ptr, &yval, &xval, abs(y), abs(x))) return FALSE;
+ if (!find_space(player_ptr, &yval, &xval, abs(y), abs(x))) return FALSE;
#ifdef FORCE_V_IDX
v_ptr = &v_info[2];
* prevent generation of vaults with no-entrance.
*/
/* Find and reserve some space in the dungeon. Get center of room. */
- if (!find_space(floor_ptr, &yval, &xval, (POSITION)(abs(y) + 2), (POSITION)(abs(x) + 2))) return FALSE;
+ if (!find_space(player_ptr, &yval, &xval, (POSITION)(abs(y) + 2), (POSITION)(abs(x) + 2))) return FALSE;
#ifdef FORCE_V_IDX
v_ptr = &v_info[76 + randint1(3)];
if (dist2(y0, x0, y, x, h1, h2, h3, h4) <= rad - 1)
{
/* inside- so is floor */
- place_floor_bold(floor_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
}
else
{
/* make granite outside so arena works */
- place_extra_bold(floor_ptr, y, x);
+ place_bold(player_ptr, y, x, extra);
}
/* proper boundary for arena */
if (((y + rad) == y0) || ((y - rad) == y0) ||
((x + rad) == x0) || ((x - rad) == x0))
{
- place_extra_bold(floor_ptr, y, x);
+ place_bold(player_ptr, y, x, extra);
}
}
}
/* Find visible outer walls and set to be FEAT_OUTER */
- add_outer_wall(floor_ptr, x0, y0, FALSE, x0 - rad - 1, y0 - rad - 1, x0 + rad + 1, y0 + rad + 1);
+ add_outer_wall(player_ptr, x0, y0, FALSE, x0 - rad - 1, y0 - rad - 1, x0 + rad + 1, y0 + rad + 1);
/* Add inner wall */
for (x = x0 - rad / 2; x <= x0 + rad / 2; x++)
if (dist2(y0, x0, y, x, h1, h2, h3, h4) == rad / 2)
{
/* Make an internal wall */
- place_inner_bold(floor_ptr, y, x);
+ place_bold(player_ptr, y, x, inner);
}
}
}
/* Add perpendicular walls */
for (x = x0 - rad; x <= x0 + rad; x++)
{
- place_inner_bold(floor_ptr, y0, x);
+ place_bold(player_ptr, y0, x, inner);
}
for (y = y0 - rad; y <= y0 + rad; y++)
{
- place_inner_bold(floor_ptr, y, x0);
+ place_bold(player_ptr, y, x0, inner);
}
/* Make inner vault */
for (y = y0 - 1; y <= y0 + 1; y++)
{
- place_inner_bold(floor_ptr, y, x0 - 1);
- place_inner_bold(floor_ptr, y, x0 + 1);
+ place_bold(player_ptr, y, x0 - 1, inner);
+ place_bold(player_ptr, y, x0 + 1, inner);
}
for (x = x0 - 1; x <= x0 + 1; x++)
{
- place_inner_bold(floor_ptr, y0 - 1, x);
- place_inner_bold(floor_ptr, y0 + 1, x);
+ place_bold(player_ptr, y0 - 1, x, inner);
+ place_bold(player_ptr, y0 + 1, x, inner);
}
- place_floor_bold(floor_ptr, y0, x0);
+ place_bold(player_ptr, y0, x0, floor);
/* Add doors to vault */
generate_hmap(floor_ptr, y0, x0, xsize, ysize, grd, roug, c3);
/* Convert to normal format+ clean up */
- done = generate_lake(floor_ptr, y0, x0, xsize, ysize, c1, c2, c3, type);
+ done = generate_lake(player_ptr, y0, x0, xsize, ysize, c1, c2, c3, type);
}
/* Set icky flag because is a vault */
floor_ptr->grid_array[y1 - 2][x].info |= (CAVE_ROOM | CAVE_ICKY);
- place_outer_noperm_bold(floor_ptr, y1 - 2, x);
+ place_bold(player_ptr, y1 - 2, x, outer_noperm);
}
for (x = x1 - 2; x <= x2 + 2; x++)
floor_ptr->grid_array[y2 + 2][x].info |= (CAVE_ROOM | CAVE_ICKY);
- place_outer_noperm_bold(floor_ptr, y2 + 2, x);
+ place_bold(player_ptr, y2 + 2, x, outer_noperm);
}
for (y = y1 - 2; y <= y2 + 2; y++)
floor_ptr->grid_array[y][x1 - 2].info |= (CAVE_ROOM | CAVE_ICKY);
- place_outer_noperm_bold(floor_ptr, y, x1 - 2);
+ place_bold(player_ptr, y, x1 - 2, outer_noperm);
}
for (y = y1 - 2; y <= y2 + 2; y++)
floor_ptr->grid_array[y][x2 + 2].info |= (CAVE_ROOM | CAVE_ICKY);
- place_outer_noperm_bold(floor_ptr, y, x2 + 2);
+ place_bold(player_ptr, y, x2 + 2, outer_noperm);
}
for (y = y1 - 1; y <= y2 + 1; y++)
g_ptr->info |= (CAVE_ROOM | CAVE_ICKY);
/* Permanent walls */
- place_inner_perm_grid(g_ptr);
+ place_grid(player_ptr, g_ptr, inner_perm);
}
}
C_MAKE(visited, num_vertices, int);
/* traverse the graph to create a spannng tree, pick a random root */
- r_visit(floor_ptr, y1, x1, y2, x2, randint0(num_vertices), 0, visited);
+ r_visit(player_ptr, y1, x1, y2, x2, randint0(num_vertices), 0, visited);
/* Make it look like a checker board vault */
for (x = x1; x <= x2; x++)
/* If total is odd- and is a floor then make a wall */
if ((total % 2 == 1) && is_floor_bold(floor_ptr, y, x))
{
- place_inner_bold(floor_ptr, y, x);
+ place_bold(player_ptr, y, x, inner);
}
}
}
{
/* left and right */
y = randint1(dy) + dy / 2;
- place_inner_bold(floor_ptr, y1 + y, x1 - 1);
- place_inner_bold(floor_ptr, y1 + y, x2 + 1);
+ place_bold(player_ptr, y1 + y, x1 - 1, inner);
+ place_bold(player_ptr, y1 + y, x2 + 1, inner);
}
else
{
/* top and bottom */
x = randint1(dx) + dx / 2;
- place_inner_bold(floor_ptr, y1 - 1, x1 + x);
- place_inner_bold(floor_ptr, y2 + 1, x1 + x);
+ place_bold(player_ptr, y1 - 1, x1 + x, inner);
+ place_bold(player_ptr, y2 + 1, x1 + x, inner);
}
/* Fill with monsters and treasure, highest difficulty */
{
floor_ptr->grid_array[y][x].info |= (CAVE_ROOM | CAVE_ICKY);
/* Make everything a floor */
- place_floor_bold(floor_ptr, y, x);
+ place_bold(player_ptr, y, x, floor);
}
}
/* Make the castle */
- build_recursive_room(floor_ptr, x1, y1, x2, y2, randint1(5));
+ build_recursive_room(player_ptr, x1, y1, x2, y2, randint1(5));
/* Fill with monsters and treasure, low difficulty */
fill_treasure(player_ptr, x1, x2, y1, y2, randint1(3));
/* Find and reserve some space in the dungeon. Get center of room. */
floor_type *floor_ptr = player_ptr->current_floor_ptr;
- if (!find_space(floor_ptr, &y0, &x0, ysize + 1, xsize + 1)) return FALSE;
+ if (!find_space(player_ptr, &y0, &x0, ysize + 1, xsize + 1)) return FALSE;
/* Select type of vault */
#ifdef ALLOW_CAVERNS_AND_LAKES
}
/* Find and reserve some space in the dungeon. Get center of room. */
- if (!find_space(floor_ptr, &yval, &xval, abs(y), abs(x))) return FALSE;
+ if (!find_space(player_ptr, &yval, &xval, abs(y), abs(x))) return FALSE;
#ifdef FORCE_V_IDX
v_ptr = &v_info[2];