diff --git a/source/room.cpp b/source/room.cpp index c6a76e5..dffb265 100644 --- a/source/room.cpp +++ b/source/room.cpp @@ -123,7 +123,7 @@ namespace room //void load(int x, int y, int8_t xp, int8_t xn, int8_t yp, int8_t yn, uint8_t col, uint8_t floor, uint8_t walls, uint8_t door, uint8_t walldoor) void load(int room, const int door) { - if (room > 64 || room < 0) { + if (room > MAX_ROOMS || room < 0) { room = find_next_room(); exits[inverse_door(door)] = room; if (door<4 && door_height[door]==-1) door_height[door]=0; diff --git a/source/room.h b/source/room.h index c7c8000..c247a50 100644 --- a/source/room.h +++ b/source/room.h @@ -2,6 +2,8 @@ #include "misc.h" #include +#define MAX_ROOMS 64 + #define NO_DOOR 0 #define DOOR_XP 1 #define DOOR_XN 2