From 3f6082328e065d01b191f969e370a67a9d963a10 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Wed, 24 Jul 2024 13:34:27 +0200 Subject: [PATCH] =?UTF-8?q?-=20Parametritzaci=C3=B3=20de=20MAX=5FROOMS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/room.cpp | 2 +- source/room.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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