int candidates = 0;
int pick;
- for (y = 1; y < cur_hgt - 1; y++)
+ for (y = 1; y < current_floor_ptr->height - 1; y++)
{
- for (x = 1; x < cur_wid - 1; x++)
+ for (x = 1; x < current_floor_ptr->width - 1; x++)
{
if (alloc_stairs_aux(y, x, walls))
{
/* Choose a random one */
pick = randint1(candidates);
- for (y = 1; y < cur_hgt - 1; y++)
+ for (y = 1; y < current_floor_ptr->height - 1; y++)
{
- for (x = 1; x < cur_wid - 1; x++)
+ for (x = 1; x < current_floor_ptr->width - 1; x++)
{
if (alloc_stairs_aux(y, x, walls))
{
grid_type *g_ptr;
/* A small level has few objects. */
- num = num * cur_hgt * cur_wid / (MAX_HGT*MAX_WID) +1;
+ num = num * current_floor_ptr->height * current_floor_ptr->width / (MAX_HGT*MAX_WID) +1;
/* Place some objects */
for (k = 0; k < num; k++)
dummy++;
- y = randint0(cur_hgt);
- x = randint0(cur_wid);
+ y = randint0(current_floor_ptr->height);
+ x = randint0(current_floor_ptr->width);
g_ptr = ¤t_floor_ptr->grid_array[y][x];
grid_type *g_ptr;
feature_type *f_ptr;
- y = randint0(cur_hgt);
- x = randint0(cur_wid);
+ y = randint0(current_floor_ptr->height);
+ x = randint0(current_floor_ptr->width);
g_ptr = ¤t_floor_ptr->grid_array[y][x];
f_ptr = &f_info[g_ptr->feat];
dun_tun_jct = rand_range(DUN_TUN_JCT_MIN, DUN_TUN_JCT_MAX);
/* Actual maximum number of rooms on this level */
- dun->row_rooms = cur_hgt / BLOCK_HGT;
- dun->col_rooms = cur_wid / BLOCK_WID;
+ dun->row_rooms = current_floor_ptr->height / BLOCK_HGT;
+ dun->col_rooms = current_floor_ptr->width / BLOCK_WID;
/* Initialize the room table */
for (y = 0; y < dun->row_rooms; y++)
if (dun->empty_level)
{
/* Start with floors */
- for (y = 0; y < cur_hgt; y++)
+ for (y = 0; y < current_floor_ptr->height; y++)
{
- for (x = 0; x < cur_wid; x++)
+ for (x = 0; x < current_floor_ptr->width; x++)
{
place_floor_bold(y, x);
}
}
/* Special boundary walls -- Top and bottom */
- for (x = 0; x < cur_wid; x++)
+ for (x = 0; x < current_floor_ptr->width; x++)
{
place_extra_bold(0, x);
- place_extra_bold(cur_hgt - 1, x);
+ place_extra_bold(current_floor_ptr->height - 1, x);
}
/* Special boundary walls -- Left and right */
- for (y = 1; y < (cur_hgt - 1); y++)
+ for (y = 1; y < (current_floor_ptr->height - 1); y++)
{
place_extra_bold(y, 0);
- place_extra_bold(y, cur_wid - 1);
+ place_extra_bold(y, current_floor_ptr->width - 1);
}
}
else
{
/* Start with walls */
- for (y = 0; y < cur_hgt; y++)
+ for (y = 0; y < current_floor_ptr->height; y++)
{
- for (x = 0; x < cur_wid; x++)
+ for (x = 0; x < current_floor_ptr->width; x++)
{
place_extra_bold(y, x);
}
/* Build maze */
if (d_info[p_ptr->dungeon_idx].flags1 & DF1_MAZE)
{
- build_maze_vault(cur_wid/2-1, cur_hgt/2-1, cur_wid-4, cur_hgt-4, FALSE);
+ build_maze_vault(current_floor_ptr->width/2-1, current_floor_ptr->height/2-1, current_floor_ptr->width-4, current_floor_ptr->height-4, FALSE);
/* Place 3 or 4 down stairs near some walls */
if (!alloc_stairs(feat_down_stair, rand_range(2, 3), 3)) return FALSE;
{
while (one_in_(DUN_MOS_DEN))
{
- place_trees(randint1(cur_wid - 2), randint1(cur_hgt - 2));
+ place_trees(randint1(current_floor_ptr->width - 2), randint1(current_floor_ptr->height - 2));
}
}
}
/* Special boundary walls -- Top and bottom */
- for (x = 0; x < cur_wid; x++)
+ for (x = 0; x < current_floor_ptr->width; x++)
{
place_bound_perm_wall(¤t_floor_ptr->grid_array[0][x]);
- place_bound_perm_wall(¤t_floor_ptr->grid_array[cur_hgt - 1][x]);
+ place_bound_perm_wall(¤t_floor_ptr->grid_array[current_floor_ptr->height - 1][x]);
}
/* Special boundary walls -- Left and right */
- for (y = 1; y < (cur_hgt - 1); y++)
+ for (y = 1; y < (current_floor_ptr->height - 1); y++)
{
place_bound_perm_wall(¤t_floor_ptr->grid_array[y][0]);
- place_bound_perm_wall(¤t_floor_ptr->grid_array[y][cur_wid - 1]);
+ place_bound_perm_wall(¤t_floor_ptr->grid_array[y][current_floor_ptr->width - 1]);
}
/* Determine the character location */
i = d_info[p_ptr->dungeon_idx].min_m_alloc_level;
/* To make small levels a bit more playable */
- if (cur_hgt < MAX_HGT || cur_wid < MAX_WID)
+ if (current_floor_ptr->height < MAX_HGT || current_floor_ptr->width < MAX_WID)
{
int small_tester = i;
- i = (i * cur_hgt) / MAX_HGT;
- i = (i * cur_wid) / MAX_WID;
+ i = (i * current_floor_ptr->height) / MAX_HGT;
+ i = (i * current_floor_ptr->width) / MAX_WID;
i += 1;
if (i > small_tester) i = small_tester;
if (dun->empty_level && (!one_in_(DARK_EMPTY) || (randint1(100) > current_floor_ptr->dun_level)) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS))
{
/* Lite the current_floor_ptr->grid_array */
- for (y = 0; y < cur_hgt; y++)
+ for (y = 0; y < current_floor_ptr->height; y++)
{
- for (x = 0; x < cur_wid; x++)
+ for (x = 0; x < current_floor_ptr->width; x++)
{
current_floor_ptr->grid_array[y][x].info |= (CAVE_GLOW);
}
POSITION qx = 0;
/* Smallest area */
- cur_hgt = SCREEN_HGT;
- cur_wid = SCREEN_WID;
+ current_floor_ptr->height = SCREEN_HGT;
+ current_floor_ptr->width = SCREEN_WID;
/* Start with solid walls */
for (y = 0; y < MAX_HGT; y++)
POSITION x, y;
/* Start with perm walls */
- for (y = 0; y < cur_hgt; y++)
+ for (y = 0; y < current_floor_ptr->height; y++)
{
- for (x = 0; x < cur_wid; x++)
+ for (x = 0; x < current_floor_ptr->width; x++)
{
place_solid_perm_bold(y, x);
}
while ((level_height == MAX_HGT/SCREEN_HGT) && (level_width == MAX_WID/SCREEN_WID));
}
- cur_hgt = level_height * SCREEN_HGT;
- cur_wid = level_width * SCREEN_WID;
+ current_floor_ptr->height = level_height * SCREEN_HGT;
+ current_floor_ptr->width = level_width * SCREEN_WID;
/* Assume illegal panel */
- panel_row_min = cur_hgt;
- panel_col_min = cur_wid;
+ panel_row_min = current_floor_ptr->height;
+ panel_col_min = current_floor_ptr->width;
msg_format_wizard(CHEAT_DUNGEON,
_("小さなフロア: X:%d, Y:%d", "A 'small' dungeon level: X:%d, Y:%d."),
- cur_wid, cur_hgt);
+ current_floor_ptr->width, current_floor_ptr->height);
}
else
{
/* Big dungeon */
- cur_hgt = MAX_HGT;
- cur_wid = MAX_WID;
+ current_floor_ptr->height = MAX_HGT;
+ current_floor_ptr->width = MAX_WID;
/* Assume illegal panel */
- panel_row_min = cur_hgt;
- panel_col_min = cur_wid;
+ panel_row_min = current_floor_ptr->height;
+ panel_col_min = current_floor_ptr->width;
}
/* Make a dungeon */
{
POSITION x, y;
- for (y = 0; y < cur_hgt; y++)
+ for (y = 0; y < current_floor_ptr->height; y++)
{
- for (x = 0; x < cur_wid; x++)
+ for (x = 0; x < current_floor_ptr->width; x++)
{
/* Wipe unused flags */
current_floor_ptr->grid_array[y][x].info &= ~(CAVE_MASK);
if (current_floor_ptr->dun_level)
{
- for (y = 1; y < cur_hgt - 1; y++)
+ for (y = 1; y < current_floor_ptr->height - 1; y++)
{
- for (x = 1; x < cur_wid - 1; x++)
+ for (x = 1; x < current_floor_ptr->width - 1; x++)
{
/* There might be trap */
current_floor_ptr->grid_array[y][x].info |= CAVE_UNSAFE;