break;
}
}
+
+/*!
+ * @brief 指定のマスが床系地形であるかを返す / Function that sees if a square is a floor. (Includes range checking.)
+ * @param x チェックするマスのX座標
+ * @param y チェックするマスのY座標
+ * @return 床系地形ならばTRUE
+ */
+bool get_is_floor(floor_type *floor_ptr, POSITION x, POSITION y)
+{
+ if (!in_bounds(p_ptr->current_floor_ptr, y, x))
+ {
+ /* Out of bounds */
+ return (FALSE);
+ }
+
+ /* Do the real check */
+ if (is_floor_bold(p_ptr->current_floor_ptr, y, x)) return (TRUE);
+
+ return (FALSE);
+}
extern void wipe_o_list(floor_type *floor_ptr);
extern void vault_trap_aux(floor_type *floor_ptr, POSITION y, POSITION x, POSITION yd, POSITION xd);
+extern bool get_is_floor(floor_type *floor_ptr, POSITION x, POSITION y);
+
}
/*!
- * @brief 指定のマスが床系地形であるかを返す / Function that sees if a square is a floor. (Includes range checking.)
- * @param x チェックするマスのX座標
- * @param y チェックするマスのY座標
- * @return 床系地形ならばTRUE
- */
-bool get_is_floor(POSITION x, POSITION y)
-{
- if (!in_bounds(p_ptr->current_floor_ptr, y, x))
- {
- /* Out of bounds */
- return (FALSE);
- }
-
- /* Do the real check */
- if (is_floor_bold(p_ptr->current_floor_ptr, y, x)) return (TRUE);
-
- return (FALSE);
-}
-
-/*!
* @brief 指定のマスを床地形に変える / Set a square to be floor. (Includes range checking.)
* @param x 地形を変えたいマスのX座標
* @param y 地形を変えたいマスのY座標
extern void vault_objects(POSITION y, POSITION x, int num);
extern void vault_traps(POSITION y, POSITION x, POSITION yd, POSITION xd, int num);
-extern bool get_is_floor(POSITION x, POSITION y);
extern void set_floor(POSITION x, POSITION y);
extern void place_bound_perm_wall(grid_type *g_ptr);
bool old_is_floor, new_is_floor;
count = 0;
- old_is_floor = get_is_floor(x1 - 1, y1);
+ old_is_floor = get_is_floor(p_ptr->current_floor_ptr, x1 - 1, y1);
/*
* Count the number of floor-wall boundaries around the room
/* Above the top boundary */
for (x = x1; x <= x2; x++)
{
- new_is_floor = get_is_floor(x, y1 - 1);
+ new_is_floor = get_is_floor(p_ptr->current_floor_ptr, x, y1 - 1);
/* Increment counter if they are different */
if (new_is_floor != old_is_floor) count++;
/* Right boundary */
for (y = y1; y <= y2; y++)
{
- new_is_floor = get_is_floor(x2 + 1, y);
+ new_is_floor = get_is_floor(p_ptr->current_floor_ptr, x2 + 1, y);
/* increment counter if they are different */
if (new_is_floor != old_is_floor) count++;
/* Bottom boundary */
for (x = x2; x >= x1; x--)
{
- new_is_floor = get_is_floor(x, y2 + 1);
+ new_is_floor = get_is_floor(p_ptr->current_floor_ptr, x, y2 + 1);
/* increment counter if they are different */
if (new_is_floor != old_is_floor) count++;
/* Left boundary */
for (y = y2; y >= y1; y--)
{
- new_is_floor = get_is_floor(x1 - 1, y);
+ new_is_floor = get_is_floor(p_ptr->current_floor_ptr, x1 - 1, y);
/* increment counter if they are different */
if (new_is_floor != old_is_floor) count++;