migrant .ani a .yaml
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user