int side_x = x0 - xhsize + i;
place_outer_noperm_bold(y0 - yhsize + 0, side_x);
- current_floor->grid_array[y0 - yhsize + 0][side_x].info |= (CAVE_ROOM | CAVE_ICKY);
+ current_floor_ptr->grid_array[y0 - yhsize + 0][side_x].info |= (CAVE_ROOM | CAVE_ICKY);
place_outer_noperm_bold(y0 - yhsize + ysize - 1, side_x);
- current_floor->grid_array[y0 - yhsize + ysize - 1][side_x].info |= (CAVE_ROOM | CAVE_ICKY);
+ current_floor_ptr->grid_array[y0 - yhsize + ysize - 1][side_x].info |= (CAVE_ROOM | CAVE_ICKY);
}
/* Left and right boundaries */
int side_y = y0 - yhsize + i;
place_outer_noperm_bold(side_y, x0 - xhsize + 0);
- current_floor->grid_array[side_y][x0 - xhsize + 0].info |= (CAVE_ROOM | CAVE_ICKY);
+ current_floor_ptr->grid_array[side_y][x0 - xhsize + 0].info |= (CAVE_ROOM | CAVE_ICKY);
place_outer_noperm_bold(side_y, x0 - xhsize + xsize - 1);
- current_floor->grid_array[side_y][x0 - xhsize + xsize - 1].info |= (CAVE_ROOM | CAVE_ICKY);
+ current_floor_ptr->grid_array[side_y][x0 - xhsize + xsize - 1].info |= (CAVE_ROOM | CAVE_ICKY);
}
/* Fill in middle with bubbles */
}
/* clean up rest of flags */
- current_floor->grid_array[y0 - yhsize + y][x0 - xhsize + x].info |= (CAVE_ROOM | CAVE_ICKY);
+ current_floor_ptr->grid_array[y0 - yhsize + y][x0 - xhsize + x].info |= (CAVE_ROOM | CAVE_ICKY);
}
}
POSITION y = y0 - yhsize + y1;
place_extra_bold(y, x);
- current_floor->grid_array[y][x].info &= (~CAVE_ICKY);
+ current_floor_ptr->grid_array[y][x].info &= (~CAVE_ICKY);
}
}
}
-/* Create a random vault out of a fractal current_floor->grid_array */
+/* Create a random vault out of a fractal current_floor_ptr->grid_array */
static void build_cave_vault(POSITION x0, POSITION y0, POSITION xsiz, POSITION ysiz)
{
int grd, roug, cutoff;
{
for (y = 0; y <= ysize; y++)
{
- current_floor->grid_array[y0 - yhsize + y][x0 - xhsize + x].info |= CAVE_ICKY;
+ current_floor_ptr->grid_array[y0 - yhsize + y][x0 - xhsize + x].info |= CAVE_ICKY;
}
}
/* Hack -- skip "non-grids" */
if (*t == ' ') continue;
- g_ptr = ¤t_floor->grid_array[y][x];
+ g_ptr = ¤t_floor_ptr->grid_array[y][x];
/* Lay down a floor */
place_floor_grid(g_ptr);
case 'A':
/* Reward for Pattern walk */
- object_level = base_level + 12;
+ current_floor_ptr->object_level = current_floor_ptr->base_level + 12;
place_object(y, x, AM_GOOD | AM_GREAT);
- object_level = base_level;
+ current_floor_ptr->object_level = current_floor_ptr->base_level;
break;
case '~':
/* Analyze the symbol */
switch (*t)
{
- /* Monster */
- case '&':
- {
- monster_level = base_level + 5;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
- monster_level = base_level;
- break;
- }
-
- /* Meaner monster */
- case '@':
- {
- monster_level = base_level + 11;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
- monster_level = base_level;
- break;
- }
+ case '&':
+ {
+ current_floor_ptr->monster_level = current_floor_ptr->base_level + 5;
+ place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ current_floor_ptr->monster_level = current_floor_ptr->base_level;
+ break;
+ }
- /* Meaner monster, plus treasure */
- case '9':
- {
- monster_level = base_level + 9;
- place_monster(y, x, PM_ALLOW_SLEEP);
- monster_level = base_level;
- object_level = base_level + 7;
- place_object(y, x, AM_GOOD);
- object_level = base_level;
- break;
- }
+ /* Meaner monster */
+ case '@':
+ {
+ current_floor_ptr->monster_level = current_floor_ptr->base_level + 11;
+ place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ current_floor_ptr->monster_level = current_floor_ptr->base_level;
+ break;
+ }
- /* Nasty monster and treasure */
- case '8':
- {
- monster_level = base_level + 40;
- place_monster(y, x, PM_ALLOW_SLEEP);
- monster_level = base_level;
- object_level = base_level + 20;
- place_object(y, x, AM_GOOD | AM_GREAT);
- object_level = base_level;
- break;
- }
+ /* Meaner monster, plus treasure */
+ case '9':
+ {
+ current_floor_ptr->monster_level = current_floor_ptr->base_level + 9;
+ place_monster(y, x, PM_ALLOW_SLEEP);
+ current_floor_ptr->monster_level = current_floor_ptr->base_level;
+ current_floor_ptr->object_level = current_floor_ptr->base_level + 7;
+ place_object(y, x, AM_GOOD);
+ current_floor_ptr->object_level = current_floor_ptr->base_level;
+ break;
+ }
- /* Monster and/or object */
- case ',':
- {
- if (randint0(100) < 50)
+ /* Nasty monster and treasure */
+ case '8':
{
- monster_level = base_level + 3;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
- monster_level = base_level;
+ current_floor_ptr->monster_level = current_floor_ptr->base_level + 40;
+ place_monster(y, x, PM_ALLOW_SLEEP);
+ current_floor_ptr->monster_level = current_floor_ptr->base_level;
+ current_floor_ptr->object_level = current_floor_ptr->base_level + 20;
+ place_object(y, x, AM_GOOD | AM_GREAT);
+ current_floor_ptr->object_level = current_floor_ptr->base_level;
+ break;
}
- if (randint0(100) < 50)
+
+ /* Monster and/or object */
+ case ',':
{
- object_level = base_level + 7;
- place_object(y, x, 0L);
- object_level = base_level;
+ if (randint0(100) < 50)
+ {
+ current_floor_ptr->monster_level = current_floor_ptr->base_level + 3;
+ place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ current_floor_ptr->monster_level = current_floor_ptr->base_level;
+ }
+ if (randint0(100) < 50)
+ {
+ current_floor_ptr->object_level = current_floor_ptr->base_level + 7;
+ place_object(y, x, 0L);
+ current_floor_ptr->object_level = current_floor_ptr->base_level;
+ }
+ break;
}
- break;
- }
}
}
y = v_ptr->hgt;
/* Some huge vault cannot be ratated to fit in the dungeon */
- if (x + 2 > cur_hgt - 2)
+ if (x + 2 > current_floor_ptr->height - 2)
{
/* Forbid 90 or 270 degree ratation */
transno &= ~1;
y = v_ptr->hgt;
/* Some huge vault cannot be ratated to fit in the dungeon */
- if (x + 2 > cur_hgt - 2)
+ if (x + 2 > current_floor_ptr->height - 2)
{
/* Forbid 90 or 270 degree ratation */
transno &= ~1;
for (y = y0 - rad; y <= y0 + rad; y++)
{
/* clear room flag */
- current_floor->grid_array[y][x].info &= ~(CAVE_ROOM);
+ current_floor_ptr->grid_array[y][x].info &= ~(CAVE_ROOM);
/* Vault - so is "icky" */
- current_floor->grid_array[y][x].info |= CAVE_ICKY;
+ current_floor_ptr->grid_array[y][x].info |= CAVE_ICKY;
if (dist2(y0, x0, y, x, h1, h2, h3, h4) <= rad - 1)
{
xsize = xhsize * 2;
ysize = yhsize * 2;
- if (dun_level < 25)
+ if (current_floor_ptr->dun_level < 25)
{
/* Earth vault (Rubble) */
type = LAKE_T_EARTH_VAULT;
}
- else if (dun_level < 50)
+ else if (current_floor_ptr->dun_level < 50)
{
/* Air vault (Trees) */
type = LAKE_T_AIR_VAULT;
}
- else if (dun_level < 75)
+ else if (current_floor_ptr->dun_level < 75)
{
/* Water vault (shallow water) */
type = LAKE_T_WATER_VAULT;
{
for (y = 0; y <= ysize; y++)
{
- current_floor->grid_array[y0 - yhsize + y][x0 - xhsize + x].info |= CAVE_ICKY;
+ current_floor_ptr->grid_array[y0 - yhsize + y][x0 - xhsize + x].info |= CAVE_ICKY;
}
}
{
if (!in_bounds(y1 - 2, x)) break;
- current_floor->grid_array[y1 - 2][x].info |= (CAVE_ROOM | CAVE_ICKY);
+ current_floor_ptr->grid_array[y1 - 2][x].info |= (CAVE_ROOM | CAVE_ICKY);
place_outer_noperm_bold(y1 - 2, x);
}
{
if (!in_bounds(y2 + 2, x)) break;
- current_floor->grid_array[y2 + 2][x].info |= (CAVE_ROOM | CAVE_ICKY);
+ current_floor_ptr->grid_array[y2 + 2][x].info |= (CAVE_ROOM | CAVE_ICKY);
place_outer_noperm_bold(y2 + 2, x);
}
{
if (!in_bounds(y, x1 - 2)) break;
- current_floor->grid_array[y][x1 - 2].info |= (CAVE_ROOM | CAVE_ICKY);
+ current_floor_ptr->grid_array[y][x1 - 2].info |= (CAVE_ROOM | CAVE_ICKY);
place_outer_noperm_bold(y, x1 - 2);
}
{
if (!in_bounds(y, x2 + 2)) break;
- current_floor->grid_array[y][x2 + 2].info |= (CAVE_ROOM | CAVE_ICKY);
+ current_floor_ptr->grid_array[y][x2 + 2].info |= (CAVE_ROOM | CAVE_ICKY);
place_outer_noperm_bold(y, x2 + 2);
}
{
for (x = x1 - 1; x <= x2 + 1; x++)
{
- grid_type *g_ptr = ¤t_floor->grid_array[y][x];
+ grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
g_ptr->info |= (CAVE_ROOM | CAVE_ICKY);
{
for (x = x1 - 1; x <= x2 + 1; x++)
{
- current_floor->grid_array[y][x].info |= (CAVE_ROOM | CAVE_ICKY);
+ current_floor_ptr->grid_array[y][x].info |= (CAVE_ROOM | CAVE_ICKY);
/* Make everything a floor */
place_floor_bold(y, x);
}
case 8: build_elemental_vault(x0, y0, xsize, ysize); break;
#endif /* ALLOW_CAVERNS_AND_LAKES */
/* I know how to add a few more... give me some time. */
-
- /* Paranoia */
default: return FALSE;
}
y = v_ptr->hgt;
/* Some huge vault cannot be ratated to fit in the dungeon */
- if (x + 2 > cur_hgt - 2)
+ if (x + 2 > current_floor_ptr->height - 2)
{
/* Forbid 90 or 270 degree ratation */
transno &= ~1;