* Determines if a map location is on or inside the outer walls
* (unsigned version)
*/
-#define in_bounds2u(Y,X) \
- (((Y) < p_ptr->current_floor_ptr->height) && ((X) < p_ptr->current_floor_ptr->width))
+#define in_bounds2u(F,Y,X) \
+ (((Y) < (F)->height) && ((X) < (F)->width))
/*
t_x = p_ptr->current_floor_ptr->m_list[who].fx - 1 + randint1(3);
max_attempts--;
}
- while (max_attempts && in_bounds2u(t_y, t_x) && !projectable(p_ptr->y, p_ptr->x, t_y, t_x));
+ while (max_attempts && in_bounds2u(p_ptr->current_floor_ptr, t_y, t_x) && !projectable(p_ptr->y, p_ptr->x, t_y, t_x));
if (max_attempts < 1)
{
t_x = x_saver - 1 + randint1(3);
max_attempts--;
}
- while (max_attempts && in_bounds2u(t_y, t_x) && !projectable(y, x, t_y, t_x));
+ while (max_attempts && in_bounds2u(p_ptr->current_floor_ptr, t_y, t_x) && !projectable(y, x, t_y, t_x));
if (max_attempts < 1)
{