- Es pot canviar el color de l'habitació

This commit is contained in:
2023-06-06 19:46:57 +02:00
parent e75eae0c7e
commit f21029f973
4 changed files with 11 additions and 3 deletions

View File

@@ -12,9 +12,11 @@ namespace room
static uint8_t doors = DOOR_XP /*| DOOR_YP*/ ;
static uint8_t door_height[4];
static uint8_t color = 5;
void load(int x, int y, int8_t xp, int8_t xn, int8_t yp, int8_t yn)
void load(int x, int y, int8_t xp, int8_t xn, int8_t yp, int8_t yn, uint8_t col)
{
color = col;
size = {(x+1)*2,(y+1)*2,3};
tmin = {3-x,3-y,0};
tmax = {4+x,4+y,3};
@@ -49,6 +51,8 @@ namespace room
void draw()
{
draw::swapcol(1, color);
// RUTINES DE PINTAT DE LA PORTA DE DALT A LA DRETA
if (doors & DOOR_YN)
{
@@ -112,6 +116,8 @@ namespace room
void draw2()
{
draw::swapcol(1, color);
if (doors & DOOR_YP)
{
// Pintem les voreres dels dos tiles extra per a la porta YP