{
concptr name;
bool(*hook_func)(MONRACE_IDX r_idx);
- void(*prep_func)(void);
+ void(*prep_func)(player_type *player_ptr);
DEPTH level;
int chance;
};
n_ptr = &nest_types[cur_nest_type];
/* Process a preparation function if necessary */
- if (n_ptr->prep_func) (*(n_ptr->prep_func))();
- get_mon_num_prep(n_ptr->hook_func, NULL);
+ if (n_ptr->prep_func) (*(n_ptr->prep_func))(player_ptr);
+ get_mon_num_prep(player_ptr, n_ptr->hook_func, NULL);
align.sub_align = SUB_ALIGN_NEUTRAL;
while (attempts--)
{
/* Get a (hard) monster type */
- r_idx = get_mon_num(floor_ptr->dun_level + 11);
+ r_idx = get_mon_num(player_ptr, floor_ptr->dun_level + 11);
r_ptr = &r_info[r_idx];
/* Decline incorrect alignment */
for (x = x1 - 1; x <= x2 + 1; x++)
{
g_ptr = &floor_ptr->grid_array[y][x];
- place_floor_grid(g_ptr);
+ place_grid(g_ptr, floor);
g_ptr->info |= (CAVE_ROOM);
}
}
for (y = y1 - 1; y <= y2 + 1; y++)
{
g_ptr = &floor_ptr->grid_array[y][x1 - 1];
- place_outer_grid(g_ptr);
+ place_grid(g_ptr, outer);
g_ptr = &floor_ptr->grid_array[y][x2 + 1];
- place_outer_grid(g_ptr);
+ place_grid(g_ptr, outer);
}
for (x = x1 - 1; x <= x2 + 1; x++)
{
g_ptr = &floor_ptr->grid_array[y1 - 1][x];
- place_outer_grid(g_ptr);
+ place_grid(g_ptr, outer);
g_ptr = &floor_ptr->grid_array[y2 + 1][x];
- place_outer_grid(g_ptr);
+ place_grid(g_ptr, outer);
}
for (y = y1 - 1; y <= y2 + 1; y++)
{
g_ptr = &floor_ptr->grid_array[y][x1 - 1];
- place_inner_grid(g_ptr);
+ place_grid(g_ptr, inner);
g_ptr = &floor_ptr->grid_array[y][x2 + 1];
- place_inner_grid(g_ptr);
+ place_grid(g_ptr, inner);
}
for (x = x1 - 1; x <= x2 + 1; x++)
{
g_ptr = &floor_ptr->grid_array[y1 - 1][x];
- place_inner_grid(g_ptr);
+ place_grid(g_ptr, inner);
g_ptr = &floor_ptr->grid_array[y2 + 1][x];
- place_inner_grid(g_ptr);
+ place_grid(g_ptr, inner);
}
for (y = y1; y <= y2; y++)
{
r_idx = nest_mon_info[i].r_idx;
/* Place that "random" monster (no groups) */
- (void)place_monster_aux(0, y, x, r_idx, 0L);
+ (void)place_monster_aux(player_ptr, 0, y, x, r_idx, 0L);
nest_mon_info[i].used = TRUE;
}
n_ptr = &pit_types[cur_pit_type];
/* Process a preparation function if necessary */
- if (n_ptr->prep_func) (*(n_ptr->prep_func))();
- get_mon_num_prep(n_ptr->hook_func, NULL);
+ if (n_ptr->prep_func) (*(n_ptr->prep_func))(player_ptr);
+ get_mon_num_prep(player_ptr, n_ptr->hook_func, NULL);
align.sub_align = SUB_ALIGN_NEUTRAL;
while (attempts--)
{
/* Get a (hard) monster type */
- r_idx = get_mon_num(floor_ptr->dun_level + 11);
+ r_idx = get_mon_num(player_ptr, floor_ptr->dun_level + 11);
r_ptr = &r_info[r_idx];
/* Decline incorrect alignment */
for (x = x1 - 1; x <= x2 + 1; x++)
{
g_ptr = &floor_ptr->grid_array[y][x];
- place_floor_grid(g_ptr);
+ place_grid(g_ptr, floor);
g_ptr->info |= (CAVE_ROOM);
}
}
for (y = y1 - 1; y <= y2 + 1; y++)
{
g_ptr = &floor_ptr->grid_array[y][x1 - 1];
- place_outer_grid(g_ptr);
+ place_grid(g_ptr, outer);
g_ptr = &floor_ptr->grid_array[y][x2 + 1];
- place_outer_grid(g_ptr);
+ place_grid(g_ptr, outer);
}
for (x = x1 - 1; x <= x2 + 1; x++)
{
g_ptr = &floor_ptr->grid_array[y1 - 1][x];
- place_outer_grid(g_ptr);
+ place_grid(g_ptr, outer);
g_ptr = &floor_ptr->grid_array[y2 + 1][x];
- place_outer_grid(g_ptr);
+ place_grid(g_ptr, outer);
}
/* Advance to the center room */
for (y = y1 - 1; y <= y2 + 1; y++)
{
g_ptr = &floor_ptr->grid_array[y][x1 - 1];
- place_inner_grid(g_ptr);
+ place_grid(g_ptr, inner);
g_ptr = &floor_ptr->grid_array[y][x2 + 1];
- place_inner_grid(g_ptr);
+ place_grid(g_ptr, inner);
}
for (x = x1 - 1; x <= x2 + 1; x++)
{
g_ptr = &floor_ptr->grid_array[y1 - 1][x];
- place_inner_grid(g_ptr);
+ place_grid(g_ptr, inner);
g_ptr = &floor_ptr->grid_array[y2 + 1][x];
- place_inner_grid(g_ptr);
+ place_grid(g_ptr, inner);
}
for (y = y1; y <= y2; y++)
{
/* Top and bottom rows */
for (x = xval - 9; x <= xval + 9; x++)
{
- place_monster_aux(0, yval - 2, x, what[0], PM_NO_KAGE);
- place_monster_aux(0, yval + 2, x, what[0], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval - 2, x, what[0], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval + 2, x, what[0], PM_NO_KAGE);
}
/* Middle columns */
for (y = yval - 1; y <= yval + 1; y++)
{
- place_monster_aux(0, y, xval - 9, what[0], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 9, what[0], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 9, what[0], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 9, what[0], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 8, what[1], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 8, what[1], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 8, what[1], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 8, what[1], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 7, what[1], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 7, what[1], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 7, what[1], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 7, what[1], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 6, what[2], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 6, what[2], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 6, what[2], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 6, what[2], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 5, what[2], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 5, what[2], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 5, what[2], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 5, what[2], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 4, what[3], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 4, what[3], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 4, what[3], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 4, what[3], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 3, what[3], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 3, what[3], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 3, what[3], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 3, what[3], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 2, what[4], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 2, what[4], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 2, what[4], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 2, what[4], PM_NO_KAGE);
}
/* Above/Below the center monster */
for (x = xval - 1; x <= xval + 1; x++)
{
- place_monster_aux(0, yval + 1, x, what[5], PM_NO_KAGE);
- place_monster_aux(0, yval - 1, x, what[5], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval + 1, x, what[5], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval - 1, x, what[5], PM_NO_KAGE);
}
/* Next to the center monster */
- place_monster_aux(0, yval, xval + 1, what[6], PM_NO_KAGE);
- place_monster_aux(0, yval, xval - 1, what[6], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval, xval + 1, what[6], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval, xval - 1, what[6], PM_NO_KAGE);
/* Center monster */
- place_monster_aux(0, yval, xval, what[7], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval, xval, what[7], PM_NO_KAGE);
return TRUE;
}
*\n
* Note that "monster pits" will never contain "unique" monsters.\n
*/
-bool build_type13(floor_type *floor_ptr)
+bool build_type13(player_type *player_ptr)
{
static int placing[][3] = {
{ -2, -9, 0 },{ -2, -8, 0 },{ -3, -7, 0 },{ -3, -6, 0 },
grid_type *g_ptr;
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
int cur_pit_type = pick_vault_type(floor_ptr, pit_types, d_info[floor_ptr->dungeon_idx].pit);
vault_aux_type *n_ptr;
n_ptr = &pit_types[cur_pit_type];
/* Process a preparation function if necessary */
- if (n_ptr->prep_func) (*(n_ptr->prep_func))();
- get_mon_num_prep(n_ptr->hook_func, vault_aux_trapped_pit);
+ if (n_ptr->prep_func) (*(n_ptr->prep_func))(player_ptr);
+ get_mon_num_prep(player_ptr, n_ptr->hook_func, vault_aux_trapped_pit);
align.sub_align = SUB_ALIGN_NEUTRAL;
while (attempts--)
{
/* Get a (hard) monster type */
- r_idx = get_mon_num(floor_ptr->dun_level + 0);
+ r_idx = get_mon_num(player_ptr, floor_ptr->dun_level + 0);
r_ptr = &r_info[r_idx];
/* Decline incorrect alignment */
for (x = x1 - 1; x <= x2 + 1; x++)
{
g_ptr = &floor_ptr->grid_array[y][x];
- place_inner_grid(g_ptr);
+ place_grid(g_ptr, inner);
g_ptr->info |= (CAVE_ROOM);
}
}
for (x = x1 + 3; x <= x2 - 3; x++)
{
g_ptr = &floor_ptr->grid_array[yval - 2][x];
- place_floor_grid(g_ptr);
+ place_grid(g_ptr, floor);
add_cave_info(floor_ptr, yval - 2, x, CAVE_ICKY);
g_ptr = &floor_ptr->grid_array[yval + 2][x];
- place_floor_grid(g_ptr);
+ place_grid(g_ptr, floor);
add_cave_info(floor_ptr, yval + 2, x, CAVE_ICKY);
}
for (x = x1 + 5; x <= x2 - 5; x++)
{
g_ptr = &floor_ptr->grid_array[yval - 3][x];
- place_floor_grid(g_ptr);
+ place_grid(g_ptr, floor);
add_cave_info(floor_ptr, yval - 3, x, CAVE_ICKY);
g_ptr = &floor_ptr->grid_array[yval + 3][x];
- place_floor_grid(g_ptr);
+ place_grid(g_ptr, floor);
add_cave_info(floor_ptr, yval + 3, x, CAVE_ICKY);
}
for (x = x1; x <= x2; x++)
{
g_ptr = &floor_ptr->grid_array[yval][x];
- place_floor_grid(g_ptr);
+ place_grid(g_ptr, floor);
g_ptr = &floor_ptr->grid_array[y1][x];
- place_floor_grid(g_ptr);
+ place_grid(g_ptr, floor);
g_ptr = &floor_ptr->grid_array[y2][x];
- place_floor_grid(g_ptr);
+ place_grid(g_ptr, floor);
}
/* Place the outer walls */
for (y = y1 - 1; y <= y2 + 1; y++)
{
g_ptr = &floor_ptr->grid_array[y][x1 - 1];
- place_outer_grid(g_ptr);
+ place_grid(g_ptr, outer);
g_ptr = &floor_ptr->grid_array[y][x2 + 1];
- place_outer_grid(g_ptr);
+ place_grid(g_ptr, outer);
}
for (x = x1 - 1; x <= x2 + 1; x++)
{
g_ptr = &floor_ptr->grid_array[y1 - 1][x];
- place_outer_grid(g_ptr);
+ place_grid(g_ptr, outer);
g_ptr = &floor_ptr->grid_array[y2 + 1][x];
- place_outer_grid(g_ptr);
+ place_grid(g_ptr, outer);
}
/* Random corridor */
{
y = yval + placing[i][0];
x = xval + placing[i][1];
- place_monster_aux(0, y, x, what[placing[i][2]], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, x, what[placing[i][2]], PM_NO_KAGE);
}
return TRUE;