fix: bug en el editor al crear habitacions noves
This commit is contained in:
@@ -1328,7 +1328,7 @@ auto MapEditor::createNewRoom(const std::string& direction) -> std::string { //
|
||||
new_room.left_room = "0";
|
||||
new_room.right_room = "0";
|
||||
new_room.conveyor_belt_direction = 0;
|
||||
new_room.tile_map.resize(32 * 16, -1);
|
||||
new_room.tile_map.resize(Map::WIDTH * Map::HEIGHT, -1);
|
||||
|
||||
// Conexión recíproca: la nueva room conecta de vuelta a la actual
|
||||
if (direction == "UP") {
|
||||
@@ -1368,11 +1368,11 @@ auto MapEditor::createNewRoom(const std::string& direction) -> std::string { //
|
||||
file << " conveyorBelt: none\n";
|
||||
file << "\n";
|
||||
file << "tilemap:\n";
|
||||
for (int row = 0; row < 16; ++row) {
|
||||
for (int row = 0; row < Map::HEIGHT; ++row) {
|
||||
file << " - [";
|
||||
for (int col = 0; col < 32; ++col) {
|
||||
for (int col = 0; col < Map::WIDTH; ++col) {
|
||||
file << "-1";
|
||||
if (col < 31) { file << ", "; }
|
||||
if (col < Map::WIDTH - 1) { file << ", "; }
|
||||
}
|
||||
file << "]\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user