precarrega les textures del jugador amb variants de paleta

This commit is contained in:
2025-08-10 19:36:10 +02:00
parent 72e606f6d3
commit 645862ecb5
11 changed files with 132 additions and 66 deletions

View File

@@ -197,9 +197,9 @@ void AnimatedSprite::processConfigLine(const std::string& line, AnimationConfig&
// Actualiza los cálculos basados en las dimensiones del frame
void AnimatedSprite::updateFrameCalculations(AnimationConfig& config) {
config.frames_per_row = texture_->getWidth() / config.frame_width;
const int WIDTH = texture_->getWidth() / config.frame_width;
const int HEIGHT = texture_->getHeight() / config.frame_height;
config.frames_per_row = getTexture()->getWidth() / config.frame_width;
const int WIDTH = getTexture()->getWidth() / config.frame_width;
const int HEIGHT = getTexture()->getHeight() / config.frame_height;
config.max_tiles = WIDTH * HEIGHT;
}