- Edició de piso i pareds
- Nous pisos i pareds en els GIFs
This commit is contained in:
BIN
data/floor.gif
BIN
data/floor.gif
Binary file not shown.
|
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 360 B |
BIN
data/walls.gif
BIN
data/walls.gif
Binary file not shown.
|
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 843 B |
@@ -14,11 +14,13 @@ int room_xn = -1;
|
||||
int room_yp = -1;
|
||||
int room_yn = -1;
|
||||
int room_color = 9;
|
||||
int room_floor = 0;
|
||||
int room_walls = 0;
|
||||
|
||||
void restart()
|
||||
{
|
||||
actor::clear();
|
||||
room::load(room_w, room_h, room_xp, room_xn, room_yp, room_yn, room_color);
|
||||
room::load(room_w, room_h, room_xp, room_xn, room_yp, room_yn, room_color, room_floor, room_walls);
|
||||
|
||||
/*
|
||||
box = actor::create("ASCENSOR",{16,32,0}, {8,8,4}, {64,0,32,24}, {0,24});
|
||||
@@ -45,7 +47,7 @@ void game::init()
|
||||
{
|
||||
draw::init("The Pool", 420, 240, 3);
|
||||
|
||||
room::init();
|
||||
//room::init();
|
||||
surf = draw::loadSurface("test.gif");
|
||||
draw::setSource(surf);
|
||||
draw::loadPalette("test.gif");
|
||||
@@ -117,6 +119,8 @@ bool game::loop()
|
||||
btn("DOOR YP:", 330, 80, room_yp, -1, 5);
|
||||
btn("DOOR YN:", 330, 95, room_yn, -1, 5);
|
||||
btn("COLOR:", 330, 110, room_color, 5, 11);
|
||||
btn("FLOOR:", 330, 125, room_floor, 0, 5);
|
||||
btn("WALLS:", 330, 140, room_walls, 0, 5);
|
||||
|
||||
draw::render();
|
||||
|
||||
|
||||
@@ -25,15 +25,23 @@ namespace room
|
||||
|
||||
void init()
|
||||
{
|
||||
if (floor_surf) draw::freeSurface(floor_surf);
|
||||
if (walls_surf) draw::freeSurface(walls_surf);
|
||||
if (doors_surf) draw::freeSurface(doors_surf);
|
||||
if (aux_surf) draw::freeSurface(aux_surf);
|
||||
|
||||
floor_surf = draw::loadSurface("floor.gif");
|
||||
walls_surf = draw::loadSurface("walls.gif");
|
||||
doors_surf = draw::loadSurface("doors.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)
|
||||
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)
|
||||
{
|
||||
init();
|
||||
color = col;
|
||||
floor_type = floor;
|
||||
walls_type = walls;
|
||||
size = {(x+1)*2,(y+1)*2,3};
|
||||
tmin = {3-x,3-y,0};
|
||||
tmax = {4+x,4+y,3};
|
||||
|
||||
@@ -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);
|
||||
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 draw();
|
||||
void draw2();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user