segon commit
This commit is contained in:
33
source/game/game_control.hpp
Normal file
33
source/game/game_control.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
namespace GameControl {
|
||||
// Disponible en todos los builds — cambia la skin del jugador ("default" o nombre de enemigo)
|
||||
inline std::function<void(const std::string&)> change_player_skin;
|
||||
// Disponible en todos los builds — cambia el color del jugador (-1 = automático, 0-15 = color fijo)
|
||||
inline std::function<void(int)> change_player_color;
|
||||
} // namespace GameControl
|
||||
|
||||
#ifdef _DEBUG
|
||||
namespace GameControl {
|
||||
// Registrada por Game::Game() — cambia la habitación activa
|
||||
inline std::function<bool(const std::string&)> change_room;
|
||||
// Registrada por Game::Game() — devuelve el fichero de la habitación activa (ej. "03.yaml")
|
||||
inline std::function<std::string()> get_current_room;
|
||||
// Registrada por Game::Game() — fija el contador de items recogidos
|
||||
inline std::function<void(int)> set_items;
|
||||
// Registrada por Game::Game() — hace toggle del modo debug (equivale a tecla 0)
|
||||
inline std::function<void()> toggle_debug_mode;
|
||||
// Registrada por Game::Game() — guarda la habitación actual como habitación de inicio en debug.yaml
|
||||
inline std::function<std::string()> set_initial_room;
|
||||
// Registrada por Game::Game() — guarda la posición/flip actuales del jugador como posición de inicio en debug.yaml
|
||||
inline std::function<std::string()> set_initial_pos;
|
||||
// Registradas por Game::Game() — control del editor de mapas
|
||||
inline std::function<void()> enter_editor;
|
||||
inline std::function<void()> exit_editor;
|
||||
inline std::function<std::string()> revert_editor;
|
||||
inline std::function<void()> reload_current_room; // Recarga la habitación actual desde disco
|
||||
inline std::function<std::string(const std::string&)> get_adjacent_room; // Obtiene la room adyacente (UP/DOWN/LEFT/RIGHT)
|
||||
} // namespace GameControl
|
||||
#endif
|
||||
Reference in New Issue
Block a user