}
/* Add "solid" perma-wall */
- place_solid_perm_grid(g_ptr);
+ place_grid(g_ptr, solid_perm);
}
/*!
}
-void place_solid_perm_grid(grid_type *g_ptr)
-{
- g_ptr->feat = feat_permanent;
- g_ptr->info &= ~(CAVE_MASK);
- g_ptr->info |= CAVE_SOLID;
- if (g_ptr->m_idx) delete_monster_idx(g_ptr->m_idx);
-}
-
-
void place_grid(grid_type *g_ptr, place_grid_type pg_type)
{
switch (pg_type)
}
g_ptr->info &= ~(CAVE_MASK);
- if (g_ptr->m_idx) delete_monster_idx(g_ptr->m_idx);
+ if (g_ptr->m_idx > 0) delete_monster_idx(g_ptr->m_idx);
}
solid_perm
} place_grid_type;
-extern void place_solid_perm_grid(grid_type *g_ptr);
extern void place_grid(grid_type *g_ptr, place_grid_type pg_type);
extern bool darkened_grid(player_type *player_ptr, grid_type *g_ptr);
* @brief タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 -- Driver routine to create fractal grid
* @return なし
*/
-bool build_type9(floor_type *floor_ptr)
+bool build_type9(player_type *player_ptr)
{
int grd, roug, cutoff;
POSITION xsize, ysize, y0, x0;
ysize = randint1(15) * 2 + 6;
/* 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))
{
/* Limit to the minimum room size, and retry */
* Still no space?!
* Try normal room
*/
- return build_type1(floor_ptr);
+ return build_type1(player_ptr);
}
}
-
-extern bool build_type9(floor_type *floor_ptr);
+extern bool build_type9(player_type *player_ptr);
-extern bool build_type1(floor_type *floor_ptr);
+extern bool build_type1(player_type *player_ptr);
extern bool build_type2(floor_type *floor_ptr);
extern bool build_type3(player_type *player_ptr);
extern bool build_type4(player_type *player_ptr);
switch (typ)
{
/* Build an appropriate room */
- case ROOM_T_NORMAL: return build_type1(floor_ptr);
+ case ROOM_T_NORMAL: return build_type1(player_ptr);
case ROOM_T_OVERLAP: return build_type2(floor_ptr);
case ROOM_T_CROSS: return build_type3(player_ptr);
case ROOM_T_INNER_FEAT: return build_type4(player_ptr);
case ROOM_T_PIT: return build_type6(player_ptr);
case ROOM_T_LESSER_VAULT: return build_type7(player_ptr);
case ROOM_T_GREATER_VAULT: return build_type8(player_ptr);
- case ROOM_T_FRACAVE: return build_type9(floor_ptr);
+ case ROOM_T_FRACAVE: return build_type9(player_ptr);
case ROOM_T_RANDOM_VAULT: return build_type10(player_ptr);
case ROOM_T_OVAL: return build_type11(floor_ptr);
case ROOM_T_CRYPT: return build_type12(player_ptr);