- eliminats accents en titols d'habitacions
- corregits fitxers .fnt (falta aseprite) - corregint font_gent.py - revisades algunes traduccions
This commit is contained in:
@@ -95,10 +95,10 @@ void Debug::setDebugFile(const std::string& path) {
|
||||
// Carga la configuración de debug desde debug.yaml
|
||||
void Debug::loadFromFile() {
|
||||
// Inicializar con valores de release por defecto
|
||||
spawn_settings_.room = Defaults::Game::Room::INITIAL;
|
||||
spawn_settings_.room = Defaults::Game::Room::INITIAL;
|
||||
spawn_settings_.spawn_x = Defaults::Game::Player::SPAWN_X;
|
||||
spawn_settings_.spawn_y = Defaults::Game::Player::SPAWN_Y;
|
||||
spawn_settings_.flip = Defaults::Game::Player::SPAWN_FLIP;
|
||||
spawn_settings_.flip = Defaults::Game::Player::SPAWN_FLIP;
|
||||
|
||||
std::ifstream file(debug_file_path_);
|
||||
if (!file.good()) {
|
||||
@@ -126,10 +126,10 @@ void Debug::loadFromFile() {
|
||||
}
|
||||
} catch (...) {
|
||||
// YAML inválido: resetear a defaults y sobreescribir
|
||||
spawn_settings_.room = Defaults::Game::Room::INITIAL;
|
||||
spawn_settings_.room = Defaults::Game::Room::INITIAL;
|
||||
spawn_settings_.spawn_x = Defaults::Game::Player::SPAWN_X;
|
||||
spawn_settings_.spawn_y = Defaults::Game::Player::SPAWN_Y;
|
||||
spawn_settings_.flip = Defaults::Game::Player::SPAWN_FLIP;
|
||||
spawn_settings_.flip = Defaults::Game::Player::SPAWN_FLIP;
|
||||
saveToFile();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,21 +28,21 @@ class Debug {
|
||||
|
||||
[[nodiscard]] auto isEnabled() const -> bool { return enabled_; } // Obtiene si el debug está activo
|
||||
|
||||
void add(const std::string& text) { slot_.push_back(text); } // Añade texto one-shot al slot (se limpia cada frame)
|
||||
void clear() { slot_.clear(); } // Limpia el slot one-shot (no afecta a watches)
|
||||
void addToLog(const std::string& text) { log_.push_back(text); } // Añade texto al log
|
||||
void clearLog() { log_.clear(); } // Limpia el log
|
||||
void set(const std::string& key, const std::string& value); // Establece/actualiza un valor persistente en el watch window
|
||||
void unset(const std::string& key); // Elimina un valor del watch window
|
||||
void clearWatches() { watches_.clear(); } // Limpia todos los watches
|
||||
void add(const std::string& text) { slot_.push_back(text); } // Añade texto one-shot al slot (se limpia cada frame)
|
||||
void clear() { slot_.clear(); } // Limpia el slot one-shot (no afecta a watches)
|
||||
void addToLog(const std::string& text) { log_.push_back(text); } // Añade texto al log
|
||||
void clearLog() { log_.clear(); } // Limpia el log
|
||||
void set(const std::string& key, const std::string& value); // Establece/actualiza un valor persistente en el watch window
|
||||
void unset(const std::string& key); // Elimina un valor del watch window
|
||||
void clearWatches() { watches_.clear(); } // Limpia todos los watches
|
||||
void setEnabled(bool value) { enabled_ = value; } // Establece si el debug está activo
|
||||
void toggleEnabled() { enabled_ = !enabled_; } // Alterna el estado del debug
|
||||
|
||||
void setDebugFile(const std::string& path); // Establece la ruta del archivo debug.yaml
|
||||
void loadFromFile(); // Carga la configuración de debug desde debug.yaml
|
||||
void saveToFile() const; // Guarda la configuración de debug en debug.yaml
|
||||
[[nodiscard]] auto getSpawnSettings() const -> const SpawnSettings& { return spawn_settings_; } // Obtiene los valores de spawn
|
||||
void setSpawnSettings(const SpawnSettings& s) { spawn_settings_ = s; } // Establece los valores de spawn
|
||||
void setDebugFile(const std::string& path); // Establece la ruta del archivo debug.yaml
|
||||
void loadFromFile(); // Carga la configuración de debug desde debug.yaml
|
||||
void saveToFile() const; // Guarda la configuración de debug en debug.yaml
|
||||
[[nodiscard]] auto getSpawnSettings() const -> const SpawnSettings& { return spawn_settings_; } // Obtiene los valores de spawn
|
||||
void setSpawnSettings(const SpawnSettings& s) { spawn_settings_ = s; } // Establece los valores de spawn
|
||||
|
||||
private:
|
||||
static Debug* debug; // [SINGLETON] Objeto privado
|
||||
@@ -54,11 +54,11 @@ class Debug {
|
||||
std::map<std::string, std::string> watches_; // Watch window: valores persistentes (key→value)
|
||||
std::vector<std::string> slot_; // One-shot: textos que se limpian cada frame
|
||||
std::vector<std::string> log_; // Log persistente
|
||||
int x_ = 0; // Posicion donde escribir el texto de debug
|
||||
int y_ = 0; // Posición donde escribir el texto de debug
|
||||
bool enabled_ = false; // Indica si esta activo el modo debug
|
||||
std::string debug_file_path_; // Ruta del archivo debug.yaml
|
||||
SpawnSettings spawn_settings_; // Configuración de spawn para debug
|
||||
int x_ = 0; // Posicion donde escribir el texto de debug
|
||||
int y_ = 0; // Posición donde escribir el texto de debug
|
||||
bool enabled_ = false; // Indica si esta activo el modo debug
|
||||
std::string debug_file_path_; // Ruta del archivo debug.yaml
|
||||
SpawnSettings spawn_settings_; // Configuración de spawn para debug
|
||||
};
|
||||
|
||||
#endif // _DEBUG
|
||||
Reference in New Issue
Block a user