- ambits en la consola
- verifica que la habitacio de debug.yaml existisca
This commit is contained in:
@@ -50,6 +50,20 @@ Game::Game(Mode mode)
|
||||
current_room_(Defaults::Game::Room::INITIAL),
|
||||
spawn_data_(Player::SpawnData(Defaults::Game::Player::SPAWN_X, Defaults::Game::Player::SPAWN_Y, 0, 0, 0, Player::State::ON_GROUND, Defaults::Game::Player::SPAWN_FLIP)) {
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
// Validar que la room de debug existe; si no, fallback a la default
|
||||
if (Resource::List::get()->get(current_room_).empty()) {
|
||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "Debug room %s not found, using default", current_room_.c_str());
|
||||
current_room_ = Defaults::Game::Room::INITIAL;
|
||||
spawn_data_ = Player::SpawnData(Defaults::Game::Player::SPAWN_X, Defaults::Game::Player::SPAWN_Y, 0, 0, 0, Player::State::ON_GROUND, Defaults::Game::Player::SPAWN_FLIP);
|
||||
auto ss = Debug::get()->getSpawnSettings();
|
||||
ss.room = current_room_;
|
||||
Debug::get()->setSpawnSettings(ss);
|
||||
Debug::get()->saveToFile();
|
||||
}
|
||||
#endif
|
||||
|
||||
// Crea objetos e inicializa variables
|
||||
ItemTracker::init();
|
||||
demoInit();
|
||||
|
||||
Reference in New Issue
Block a user