- Portes editables
This commit is contained in:
BIN
data/doors.gif
BIN
data/doors.gif
Binary file not shown.
|
Before Width: | Height: | Size: 893 B After Width: | Height: | Size: 1.4 KiB |
BIN
data/walls.gif
BIN
data/walls.gif
Binary file not shown.
|
Before Width: | Height: | Size: 843 B After Width: | Height: | Size: 1020 B |
@@ -16,11 +16,12 @@ int room_yn = -1;
|
|||||||
int room_color = 9;
|
int room_color = 9;
|
||||||
int room_floor = 0;
|
int room_floor = 0;
|
||||||
int room_walls = 0;
|
int room_walls = 0;
|
||||||
|
int room_doors = 0;
|
||||||
|
|
||||||
void restart()
|
void restart()
|
||||||
{
|
{
|
||||||
actor::clear();
|
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});
|
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("COLOR:", 330, 110, room_color, 5, 11);
|
||||||
btn("FLOOR:", 330, 125, room_floor, 0, 5);
|
btn("FLOOR:", 330, 125, room_floor, 0, 5);
|
||||||
btn("WALLS:", 330, 140, room_walls, 0, 5);
|
btn("WALLS:", 330, 140, room_walls, 0, 5);
|
||||||
|
btn("DOORS:", 330, 155, room_doors, 0, 2);
|
||||||
|
|
||||||
draw::render();
|
draw::render();
|
||||||
|
|
||||||
|
|||||||
@@ -36,12 +36,13 @@ namespace room
|
|||||||
aux_surf = draw::loadSurface("roomaux.gif");
|
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();
|
init();
|
||||||
color = col;
|
color = col;
|
||||||
floor_type = floor;
|
floor_type = floor;
|
||||||
walls_type = walls;
|
walls_type = walls;
|
||||||
|
doors_type = door;
|
||||||
size = {(x+1)*2,(y+1)*2,3};
|
size = {(x+1)*2,(y+1)*2,3};
|
||||||
tmin = {3-x,3-y,0};
|
tmin = {3-x,3-y,0};
|
||||||
tmax = {4+x,4+y,3};
|
tmax = {4+x,4+y,3};
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
namespace room
|
namespace room
|
||||||
{
|
{
|
||||||
void init();
|
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 draw();
|
||||||
void draw2();
|
void draw2();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user