migrant .ani a .yaml

This commit is contained in:
2025-11-17 13:31:20 +01:00
parent 6a6cc22b21
commit 0c9becae4c
3 changed files with 97 additions and 27 deletions
+4 -6
View File
@@ -301,13 +301,11 @@ void Cache::loadAnimations() {
for (const auto& l : list) {
auto name = getFileName(l);
// Parsear YAML y almacenar datos pre-cargados
std::shared_ptr<Surface> surface;
float frame_width = 0.0F;
float frame_height = 0.0F;
auto animation_data = SurfaceAnimatedSprite::loadAnimationsFromYAML(l, surface, frame_width, frame_height);
// Cargar bytes del archivo YAML sin parsear (carga lazy)
auto yaml_bytes = Helper::loadFile(l);
animations_.emplace_back(name, animation_data, surface, frame_width, frame_height);
animations_.emplace_back(name, yaml_bytes);
printWithDots("Animation : ", name, "[ LOADED ]");
updateLoadingProgress();
}
}