- Parametrització de MAX_ROOMS

This commit is contained in:
2024-07-24 13:34:27 +02:00
parent 5e2105cfeb
commit 3f6082328e
2 changed files with 3 additions and 1 deletions

View File

@@ -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 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) void load(int room, const int door)
{ {
if (room > 64 || room < 0) { if (room > MAX_ROOMS || room < 0) {
room = find_next_room(); room = find_next_room();
exits[inverse_door(door)] = room; exits[inverse_door(door)] = room;
if (door<4 && door_height[door]==-1) door_height[door]=0; if (door<4 && door_height[door]==-1) door_height[door]=0;

View File

@@ -2,6 +2,8 @@
#include "misc.h" #include "misc.h"
#include <vector> #include <vector>
#define MAX_ROOMS 64
#define NO_DOOR 0 #define NO_DOOR 0
#define DOOR_XP 1 #define DOOR_XP 1
#define DOOR_XN 2 #define DOOR_XN 2