- Tamany i portes de l'habitacio editables
This commit is contained in:
@@ -9,11 +9,16 @@
|
||||
draw::surface *surf;
|
||||
actor::actor_t *box;
|
||||
int room_w = 0;
|
||||
int room_h = 0;
|
||||
int room_xp = 0;
|
||||
int room_xn = 0;
|
||||
int room_yp = 0;
|
||||
int room_yn = 0;
|
||||
|
||||
void restart()
|
||||
{
|
||||
actor::clear();
|
||||
room::load(room_w,3);
|
||||
room::load(room_w, room_h, room_xp, room_xn, room_yp, room_yn);
|
||||
|
||||
box = actor::create("ASCENSOR",{16,32,0}, {8,8,4}, {64,0,32,24}, {0,24});
|
||||
box->flags = FLAG_MOVING;
|
||||
@@ -91,6 +96,38 @@ bool game::loop()
|
||||
restart();
|
||||
}
|
||||
|
||||
draw::print("ROOM HEIGHT:", 330, 28, 15, 0);
|
||||
if (ui::button(SDL_itoa(room_h, buffer, 10), 380, 25, 28, 11))
|
||||
{
|
||||
room_h++;if(room_h>3)room_h=0;
|
||||
restart();
|
||||
}
|
||||
|
||||
draw::print("DOOR XP:", 330, 53, 15, 0);
|
||||
if (ui::button(SDL_itoa(room_xp, buffer, 10), 380, 50, 28, 11))
|
||||
{
|
||||
room_xp++;if(room_xp>5)room_xp=-1;
|
||||
restart();
|
||||
}
|
||||
draw::print("DOOR XN:", 330, 68, 15, 0);
|
||||
if (ui::button(SDL_itoa(room_xn, buffer, 10), 380, 65, 28, 11))
|
||||
{
|
||||
room_xn++;if(room_xn>5)room_xn=-1;
|
||||
restart();
|
||||
}
|
||||
draw::print("DOOR YP:", 330, 83, 15, 0);
|
||||
if (ui::button(SDL_itoa(room_yp, buffer, 10), 380, 80, 28, 11))
|
||||
{
|
||||
room_yp++;if(room_yp>5)room_yp=-1;
|
||||
restart();
|
||||
}
|
||||
draw::print("DOOR YN:", 330, 98, 15, 0);
|
||||
if (ui::button(SDL_itoa(room_yn, buffer, 10), 380, 95, 28, 11))
|
||||
{
|
||||
room_yn++;if(room_yn>5)room_yn=-1;
|
||||
restart();
|
||||
}
|
||||
|
||||
draw::render();
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user