From 15e70035d079b91f5c6d406e8163349aa7ca4244 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 26 Nov 2024 23:27:29 -0500 Subject: [PATCH] Remove unnecessary macro that wasn't ideally named Also add a comment that states the intent. --- include/rm.h | 1 - src/display.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/rm.h b/include/rm.h index 5cc7546b6..001414a10 100644 --- a/include/rm.h +++ b/include/rm.h @@ -104,7 +104,6 @@ enum levl_typ_types { #define IS_WALL(typ) ((typ) && (typ) <= DBWALL) #define IS_STWALL(typ) ((typ) <= DBWALL) /* STONE <= (typ) <= DBWALL */ #define IS_OBSTRUCTED(typ) ((typ) < POOL) /* absolutely nonaccessible */ -#define IS_CORR(typ) ((typ) == CORR || (typ) == SCORR) #define IS_SDOOR(typ) ((typ) == SDOOR) #define IS_DOOR(typ) ((typ) == DOOR) #define IS_DOORJOIN(typ) (IS_OBSTRUCTED(typ) || (typ) == IRONBARS) diff --git a/src/display.c b/src/display.c index c379331e5..77dd47b47 100644 --- a/src/display.c +++ b/src/display.c @@ -3101,7 +3101,8 @@ check_pos(coordxy x, coordxy y, int which) if (!isok(x, y)) return which; type = levl[x][y].typ; - if (IS_STWALL(type) || IS_CORR(type) || IS_SDOOR(type)) + /* Everything below POOL, excluding TREE */ + if (IS_STWALL(type) || (type) == CORR || (type) == SCORR || IS_SDOOR(type)) return which; return 0; }