- Parametrització de MAX_ROOMS
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user