* Line 1 -- forbid non-drops
* Line 2 -- forbid object terrains
*/
-#define cave_drop_bold(Y,X) \
+#define cave_drop_bold(F,Y,X) \
(cave_have_flag_bold((Y), (X), FF_DROP) && \
- !(p_ptr->current_floor_ptr->grid_array[Y][X].info & CAVE_OBJECT))
+ !((F)->grid_array[Y][X].info & CAVE_OBJECT))
/*
if (!in_bounds(p_ptr->current_floor_ptr, y, x)) return;
/* Require floor space */
- if (!cave_drop_bold(y, x)) return;
+ if (!cave_drop_bold(p_ptr->current_floor_ptr, y, x)) return;
/* Avoid stacking on other objects */
if (g_ptr->o_idx) return;
if (!in_bounds(p_ptr->current_floor_ptr, y, x)) return;
/* Require floor space */
- if (!cave_drop_bold(y, x)) return;
+ if (!cave_drop_bold(p_ptr->current_floor_ptr, y, x)) return;
/* Avoid stacking on other objects */
if (g_ptr->o_idx) return;
g_ptr = &p_ptr->current_floor_ptr->grid_array[ty][tx];
/* Require floor space */
- if (!cave_drop_bold(ty, tx)) continue;
+ if (!cave_drop_bold(p_ptr->current_floor_ptr, ty, tx)) continue;
/* No objects */
k = 0;
bx = tx;
/* Require floor space */
- if (!cave_drop_bold(by, bx)) continue;
+ if (!cave_drop_bold(p_ptr->current_floor_ptr, by, bx)) continue;
flag = TRUE;
}
for (tx = 1; tx < p_ptr->current_floor_ptr->width - 1; tx++)
{
/* A valid space found */
- if (cave_drop_bold(ty, tx)) candidates++;
+ if (cave_drop_bold(p_ptr->current_floor_ptr, ty, tx)) candidates++;
}
}
{
for (tx = 1; tx < p_ptr->current_floor_ptr->width - 1; tx++)
{
- if (cave_drop_bold(ty, tx))
+ if (cave_drop_bold(p_ptr->current_floor_ptr, ty, tx))
{
pick--;