- Portes editables

This commit is contained in:
2023-06-08 15:47:33 +02:00
parent 1b1f6751fe
commit 2bc6ad2e30
5 changed files with 6 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 893 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 843 B

After

Width:  |  Height:  |  Size: 1020 B

View File

@@ -16,11 +16,12 @@ int room_yn = -1;
int room_color = 9;
int room_floor = 0;
int room_walls = 0;
int room_doors = 0;
void restart()
{
actor::clear();
room::load(room_w, room_h, room_xp, room_xn, room_yp, room_yn, room_color, room_floor, room_walls);
room::load(room_w, room_h, room_xp, room_xn, room_yp, room_yn, room_color, room_floor, room_walls, room_doors);
/*
box = actor::create("ASCENSOR",{16,32,0}, {8,8,4}, {64,0,32,24}, {0,24});
@@ -121,6 +122,7 @@ bool game::loop()
btn("COLOR:", 330, 110, room_color, 5, 11);
btn("FLOOR:", 330, 125, room_floor, 0, 5);
btn("WALLS:", 330, 140, room_walls, 0, 5);
btn("DOORS:", 330, 155, room_doors, 0, 2);
draw::render();

View File

@@ -36,12 +36,13 @@ namespace room
aux_surf = draw::loadSurface("roomaux.gif");
}
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)
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)
{
init();
color = col;
floor_type = floor;
walls_type = walls;
doors_type = door;
size = {(x+1)*2,(y+1)*2,3};
tmin = {3-x,3-y,0};
tmax = {4+x,4+y,3};

View File

@@ -14,7 +14,7 @@
namespace room
{
void init();
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);
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);
void draw();
void draw2();