- [CHG] La quantitat de pisos, portes i pareds es calcula al carregar cada GIF

- [CHG] Al eixir de edició la Z del personatge se reseteja a 24 o per ahí.
This commit is contained in:
2024-06-17 13:34:43 +02:00
parent 04d5c41328
commit 4f8404e105
3 changed files with 75 additions and 29 deletions

View File

@@ -491,6 +491,7 @@ bool game::loop()
if (ui::button("EDITING", 2, 2, 96, 11, editor::isEditing()))
{
room::load(room::editor::getCurrentRoom());
if (!editor::isEditing()) actor::find("HERO")->pos.z=24;
editor::setEditing(!editor::isEditing());
}
@@ -543,16 +544,16 @@ switch (section)
//changed |= btn_small(64, line, room::editor::refColor(), 5, 11);
line += 10;
ui::label("FLOOR", 2, line, 48, 11);
changed |= btn_small(48, line, room::editor::refFloorTex(), 0, 5, 50);
changed |= btn_small(48, line, room::editor::refFloorTex(), 0, room::getFloorCount()-1, 50);
line += 10;
ui::label("WALL", 2, line, 48, 11);
changed |= btn_small(48, line, room::editor::refWallTex(), 0, 5, 50);
changed |= btn_small(48, line, room::editor::refWallTex(), 0, room::getWallsCount()-1, 50);
line += 10;
ui::label("DOOR", 2, line, 48, 11);
changed |= btn_small(48, line, room::editor::refDoorTex(), 0, 4, 50);
changed |= btn_small(48, line, room::editor::refDoorTex(), 0, room::getDoorCount()-1, 50);
line += 10;
ui::label("UNDER DOOR", 2, line, 48, 11);
changed |= btn_small(48, line, room::editor::refWallDoorTex(), 0, 5, 50);
changed |= btn_small(48, line, room::editor::refWallDoorTex(), 0, room::getWallsCount()-1, 50);
line += 10;
ui::label("EXITS", 2, line, 96, 11, GRAY); line+=10;