}
/* Analyze unknown grids and floors considering mimic */
- if (inv || (!(feat & 0x20)))
+ if (inv || feat_floor(feat))
{
/* Looking for open area */
if (find_openarea)
/*
+ * Determine if a "feature" is a "floor"
+ */
+#define feat_floor(F) \
+ (!((F) & 0x20))
+
+
+/*
* Determine if a "legal" grid is a "floor" grid
*
* Line 1 -- forbid doors, rubble, seams, walls
* -KMW-
*/
#define cave_floor_bold(Y,X) \
- (!(cave[Y][X].feat & 0x20))
+ (feat_floor(cave[(Y)][(X)].feat))
/*
* Grid based version of "cave_floor_bold()"
*/
#define cave_floor_grid(C) \
- (!((C)->feat & 0x20))
+ (feat_floor((C)->feat))
/*
* Determine if a "boundary" grid is "floor mimic"
*/
#define boundary_floor_bold(Y,X) \
- ((cave[(Y)][(X)].feat == FEAT_PERM_SOLID) && \
- cave[(Y)][(X)].mimic && \
- !(cave[(Y)][(X)].mimic & 0x20))
+ ((cave[(Y)][(X)].feat == FEAT_PERM_SOLID) && \
+ cave[(Y)][(X)].mimic && feat_floor(cave[(Y)][(X)].mimic))
#define boundary_floor_grid(C) \
- (((C)->feat == FEAT_PERM_SOLID) && \
- (C)->mimic && \
- !((C)->mimic & 0x20))
+ (((C)->feat == FEAT_PERM_SOLID) && \
+ (C)->mimic && feat_floor((C)->mimic))
#define update_playtime() \
{\
c_ptr->mimic = room ? feat_wall_outer : fill_type[randint0(100)];
/* Floor type terrain cannot hide a door */
- if (!(c_ptr->mimic & 0x20))
+ if (feat_floor(c_ptr->mimic))
{
c_ptr->feat = c_ptr->mimic;
c_ptr->mimic = 0;
c_ptr->mimic = feat_wall_inner;
/* Floor type terrain cannot hide a door */
- if (!(c_ptr->mimic & 0x20))
+ if (feat_floor(c_ptr->mimic))
{
c_ptr->feat = c_ptr->mimic;
c_ptr->mimic = 0;