netejant capçaleres

This commit is contained in:
2025-11-12 10:14:47 +01:00
parent 580e52a51e
commit cf40865d37
4 changed files with 54 additions and 58 deletions

View File

@@ -149,7 +149,7 @@ auto Cache::getText(const std::string& name) -> std::shared_ptr<Text> {
}
// Obtiene la animación a partir de un nombre
auto Cache::getAnimations(const std::string& name) -> Animations& {
auto Cache::getAnimations(const std::string& name) -> SurfaceAnimatedSprite::Animations& {
auto it = std::ranges::find_if(animations_, [&name](const auto& a) { return a.name == name; });
if (it != animations_.end()) {
@@ -300,7 +300,7 @@ void Cache::loadAnimations() {
for (const auto& l : list) {
auto name = getFileName(l);
animations_.emplace_back(name, loadAnimationsFromFile(l));
animations_.emplace_back(name, SurfaceAnimatedSprite::loadAnimationsFromFile(l));
updateLoadingProgress();
}
}

View File

@@ -80,11 +80,11 @@ struct ResourceText {
// Estructura para almacenar ficheros animaciones y su nombre
struct ResourceAnimation {
std::string name; // Nombre del fichero
Animations animation; // Objeto con las animaciones
std::string name; // Nombre del fichero
SurfaceAnimatedSprite::Animations animation; // Objeto con las animaciones
// Constructor
ResourceAnimation(std::string name, Animations animation)
ResourceAnimation(std::string name, SurfaceAnimatedSprite::Animations animation)
: name(std::move(name)),
animation(std::move(animation)) {}
};
@@ -245,7 +245,7 @@ class Cache {
auto getText(const std::string& name) -> std::shared_ptr<Text>;
// Obtiene la animación a partir de un nombre
auto getAnimations(const std::string& name) -> Animations&;
auto getAnimations(const std::string& name) -> SurfaceAnimatedSprite::Animations&;
// Obtiene el mapa de tiles a partir de un nombre
auto getTileMap(const std::string& name) -> std::vector<int>&;