[DOC:29/10/2025] la surface ara se pillarà del .ANI

Tots els arxius .ani i .room retocats per a adequarse als canvis.
This commit is contained in:
2025-10-29 14:22:36 +01:00
parent 95dd6b4f70
commit 70d6cbfaf8
134 changed files with 133 additions and 620 deletions

View File

@@ -18,7 +18,7 @@
Player::Player(const Data& player)
: room_(player.room) {
// Inicializa algunas variables
initSprite(player.texture_path, player.animations_path);
initSprite(/*player.texture_path, */player.animations_path);
setColor();
applySpawnValues(player.spawn_data);
placeSprite();
@@ -641,11 +641,11 @@ void Player::applySpawnValues(const SpawnData& spawn) {
}
// Inicializa el sprite del jugador
void Player::initSprite(const std::string& surface_path, const std::string& animations_path) {
auto surface = Resource::get()->getSurface(surface_path);
void Player::initSprite(/*const std::string& surface_path, */const std::string& animations_path) {
//auto surface = Resource::get()->getSurface(surface_path);
auto animations = Resource::get()->getAnimations(animations_path);
sprite_ = std::make_shared<SurfaceAnimatedSprite>(surface, animations);
sprite_ = std::make_shared<SurfaceAnimatedSprite>(/*surface, */animations);
sprite_->setWidth(WIDTH);
sprite_->setHeight(HEIGHT);
sprite_->setCurrentAnimation("walk");