migrat Input a la ultima versió

cohesionats tots els metodes update de les escenes
This commit is contained in:
2025-11-01 22:28:51 +01:00
parent 1dd750ba0c
commit 824e7417ad
58 changed files with 26926 additions and 978 deletions

View File

@@ -7,18 +7,18 @@
#include <sstream> // Para basic_stringstream
#include <utility>
#include "core/audio/audio.hpp" // Para Audio
#include "core/rendering/screen.hpp" // Para Screen
#include "core/rendering/surface.hpp" // Para Surface
#include "core/rendering/surface_sprite.hpp" // Para SSprite
#include "core/resources/resource.hpp" // Para Resource
#include "core/audio/audio.hpp" // Para Audio
#include "core/rendering/screen.hpp" // Para Screen
#include "core/rendering/surface.hpp" // Para Surface
#include "core/rendering/surface_sprite.hpp" // Para SSprite
#include "core/resources/resource.hpp" // Para Resource
#include "core/resources/resource_helper.hpp" // Para ResourceHelper
#include "core/system/debug.hpp" // Para Debug
#include "game/gameplay/item_tracker.hpp" // Para ItemTracker
#include "game/gameplay/scoreboard.hpp" // Para ScoreboardData
#include "game/options.hpp" // Para Options, OptionsStats, options
#include "utils/defines.hpp" // Para BLOCK, PLAY_AREA_HEIGHT, PLAY_AREA_WIDTH
#include "utils/utils.hpp" // Para LineHorizontal, LineDiagonal, LineVertical
#include "core/system/debug.hpp" // Para Debug
#include "game/gameplay/item_tracker.hpp" // Para ItemTracker
#include "game/gameplay/scoreboard.hpp" // Para ScoreboardData
#include "game/options.hpp" // Para Options, OptionsStats, options
#include "utils/defines.hpp" // Para BLOCK, PLAY_AREA_HEIGHT, PLAY_AREA_WIDTH
#include "utils/utils.hpp" // Para LineHorizontal, LineDiagonal, LineVertical
// Constructor
Room::Room(const std::string& room_path, std::shared_ptr<ScoreboardData> data)
@@ -869,14 +869,15 @@ auto Room::setEnemy(Enemy::Data* enemy, const std::string& key, const std::strin
try {
/*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") {
enemy->w = std::stoi(value);
} else if (key == "height") {
enemy->h = std::stoi(value);
[/DOC] */
/* [DOC:29/10/2025] w i h ja no fan falta, se pilla del .ANI
} else if (key == "width") {
enemy->w = std::stoi(value);
} else if (key == "height") {
enemy->h = std::stoi(value);
[/DOC] */
} else if (key == "x") {
enemy->x = std::stof(value) * TILE_SIZE;
} else if (key == "y") {
@@ -991,8 +992,7 @@ auto Room::loadRoomTileFile(const std::string& file_path, bool verbose) -> std::
if (verbose) {
std::cout << "TileMap loaded: " << FILENAME.c_str() << '\n';
}
}
else { // El fichero no se puede abrir
} else { // El fichero no se puede abrir
if (verbose) {
std::cout << "Warning: Unable to open " << FILENAME.c_str() << " file" << '\n';
}
@@ -1046,8 +1046,7 @@ auto Room::loadRoomFile(const std::string& file_path, bool verbose) -> Data {
if (verbose) {
std::cout << "Room loaded: " << FILE_NAME.c_str() << '\n';
}
}
else { // El fichero no se puede abrir
} else { // El fichero no se puede abrir
std::cout << "Warning: Unable to open " << FILE_NAME.c_str() << " file" << '\n';
}