[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

@@ -861,9 +861,9 @@ auto Room::setEnemy(Enemy::Data* enemy, const std::string& key, const std::strin
bool success = true;
try {
if (key == "tileSetFile") {
/*if (key == "tileSetFile") {
enemy->surface_path = value;
} else if (key == "animation") {
} else */if (key == "animation") {
enemy->animation_path = value;
/* [DOC:29/10/2025] w i h ja no fan falta, se pilla del .ANI
} else if (key == "width") {

View File

@@ -21,9 +21,9 @@ Scoreboard::Scoreboard(std::shared_ptr<ScoreboardData> data)
constexpr float SURFACE_HEIGHT = 6.0F * TILE_SIZE;
// Reserva memoria para los objetos
auto player_texture = Resource::get()->getSurface(Options::cheats.alternate_skin == Options::Cheat::State::ENABLED ? "player2.gif" : "player.gif");
//auto player_texture = Resource::get()->getSurface(Options::cheats.alternate_skin == Options::Cheat::State::ENABLED ? "player2.gif" : "player.gif");
auto player_animations = Resource::get()->getAnimations(Options::cheats.alternate_skin == Options::Cheat::State::ENABLED ? "player2.ani" : "player.ani");
player_sprite_ = std::make_shared<SurfaceAnimatedSprite>(player_texture, player_animations);
player_sprite_ = std::make_shared<SurfaceAnimatedSprite>(player_animations);
player_sprite_->setCurrentAnimation("walk_menu");
surface_ = std::make_shared<Surface>(SURFACE_WIDTH, SURFACE_HEIGHT);