fixos en la plataforma mobil

This commit is contained in:
2026-04-08 17:39:19 +02:00
parent 3db74ebd4d
commit 88a822c562
8 changed files with 395 additions and 240 deletions

View File

@@ -162,23 +162,18 @@ auto RoomSaver::buildYAML(const fkyaml::node& original_yaml, const Room::Data& r
out << "platforms:\n";
for (const auto& plat : room_data.platforms) {
out << " - animation: " << plat.animation_path << "\n";
int pos_x = static_cast<int>(std::round(plat.x / Tile::SIZE));
int pos_y = static_cast<int>(std::round(plat.y / Tile::SIZE));
out << " position: {x: " << pos_x << ", y: " << pos_y << "}\n";
out << " velocity: {x: " << plat.vx << ", y: " << plat.vy << "}\n";
int b1_x = plat.x1 / Tile::SIZE;
int b1_y = plat.y1 / Tile::SIZE;
int b2_x = plat.x2 / Tile::SIZE;
int b2_y = plat.y2 / Tile::SIZE;
out << " boundaries:\n";
out << " position1: {x: " << b1_x << ", y: " << b1_y << "}\n";
out << " position2: {x: " << b2_x << ", y: " << b2_y << "}\n";
out << " speed: " << plat.speed << "\n";
out << " loop: " << (plat.loop == LoopMode::CIRCULAR ? "circular" : "pingpong") << "\n";
if (plat.easing != "linear") { out << " easing: " << plat.easing << "\n"; }
if (plat.frame != -1) { out << " frame: " << plat.frame << "\n"; }
out << " path:\n";
for (const auto& wp : plat.path) {
int wx = static_cast<int>(std::round(wp.x / Tile::SIZE));
int wy = static_cast<int>(std::round(wp.y / Tile::SIZE));
out << " - {x: " << wx << ", y: " << wy;
if (wp.wait > 0.0F) { out << ", wait: " << wp.wait; }
out << "}\n";
}
out << "\n";
}
}