- Carrega de l'habitació des de arxiu
- Traslladem a jutil funcionetes varies - Comencem a implementar carrega de actors des de arxiu - Comencem a implementar els templates de actors
This commit is contained in:
@@ -24,10 +24,13 @@ int room_walldoors = 0;
|
||||
|
||||
std::vector<std::string> gifs;
|
||||
|
||||
bool editing = false;
|
||||
|
||||
void restart()
|
||||
{
|
||||
room::load(room_w, room_h, room_xp, room_xn, room_yp, room_yn, room_color, room_floor, room_walls, room_doors, room_walldoors);
|
||||
room::load(0); //room_w, room_h, room_xp, room_xn, room_yp, room_yn, room_color, room_floor, room_walls, room_doors, room_walldoors);
|
||||
|
||||
|
||||
/*
|
||||
box = actor::create("ASCENSOR",{16,32,0}, {8,8,4}, {64,0,32,24}, {0,24});
|
||||
box->flags = FLAG_MOVING;
|
||||
@@ -115,7 +118,7 @@ void btn(const char* label, const int x, const int y, int &var, int min, int max
|
||||
if (result)
|
||||
{
|
||||
var=SDL_max(min, SDL_min(max, var-(result-2)));
|
||||
restart();
|
||||
room::editor::setWidth(var);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,11 +263,17 @@ bool game::loop()
|
||||
{
|
||||
if (input::keyDown(SDL_SCANCODE_ESCAPE)) return false;
|
||||
|
||||
|
||||
// WHILE EDITING...
|
||||
//editor_move_selected();
|
||||
//actor::updateEditor(actor::getFirst());
|
||||
|
||||
actor::update(actor::getFirst());
|
||||
if (editing)
|
||||
{
|
||||
editor_move_selected();
|
||||
actor::updateEditor(actor::getFirst());
|
||||
}
|
||||
else
|
||||
{
|
||||
actor::update(actor::getFirst());
|
||||
}
|
||||
|
||||
actor::reorder();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user