- Tamany i portes de l'habitacio editables

This commit is contained in:
2023-06-06 13:02:11 +02:00
parent 0460efc64a
commit 6e166c5e77
3 changed files with 45 additions and 7 deletions

View File

@@ -13,17 +13,18 @@ namespace room
static uint8_t doors = DOOR_XP /*| DOOR_YP*/ ;
static uint8_t door_height[4];
void load(int x, int y)
void load(int x, int y, int8_t xp, int8_t xn, int8_t yp, int8_t yn)
{
size = {(x+1)*2,(y+1)*2,3};
tmin = {3-x,3-y,0};
tmax = {4+x,4+y,3};
min = {tmin.x*8,tmin.y*8,0};
max = {tmax.x*8,tmax.y*8,24};
door_height[0] = 2; //XP
door_height[1] = 3; //XN
door_height[2] = 2; //YP
door_height[3] = 5; //YN
doors = (xp>=0?DOOR_XP:0) | (xn>=0?DOOR_XN:0) | (yp>=0?DOOR_YP:0) | (yn>=0?DOOR_YN:0);
door_height[0] = xp; //XP
door_height[1] = xn; //XN
door_height[2] = yp; //YP
door_height[3] = yn; //YN
if (doors & DOOR_YP)
{