forked from jaildesigner-jailgames/jaildoctors_dilemma
posat orden en defaults i defines
This commit is contained in:
@@ -16,9 +16,9 @@ namespace Options {
|
||||
|
||||
// Estructura para las opciones de control de teclado
|
||||
struct KeyboardControls {
|
||||
SDL_Scancode key_left{GameDefaults::CONTROL_KEY_LEFT}; // Tecla para mover a la izquierda
|
||||
SDL_Scancode key_right{GameDefaults::CONTROL_KEY_RIGHT}; // Tecla para mover a la derecha
|
||||
SDL_Scancode key_jump{GameDefaults::CONTROL_KEY_JUMP}; // Tecla para saltar
|
||||
SDL_Scancode key_left{Defaults::Controls::KEY_LEFT}; // Tecla para mover a la izquierda
|
||||
SDL_Scancode key_right{Defaults::Controls::KEY_RIGHT}; // Tecla para mover a la derecha
|
||||
SDL_Scancode key_jump{Defaults::Controls::KEY_JUMP}; // Tecla para saltar
|
||||
};
|
||||
|
||||
// Estructura para las opciones de control del gamepad/joystick
|
||||
@@ -29,9 +29,9 @@ struct KeyboardControls {
|
||||
// - 200: Left stick X axis (negativo = izquierda)
|
||||
// - 201: Left stick X axis (positivo = derecha)
|
||||
struct GamepadControls {
|
||||
int button_left{GameDefaults::GAMEPAD_BUTTON_LEFT}; // Botón para mover a la izquierda (por defecto: DPAD_LEFT)
|
||||
int button_right{GameDefaults::GAMEPAD_BUTTON_RIGHT}; // Botón para mover a la derecha (por defecto: DPAD_RIGHT)
|
||||
int button_jump{GameDefaults::GAMEPAD_BUTTON_JUMP}; // Botón para saltar (por defecto: WEST/X button)
|
||||
int button_left{Defaults::Controls::GAMEPAD_BUTTON_LEFT}; // Botón para mover a la izquierda (por defecto: DPAD_LEFT)
|
||||
int button_right{Defaults::Controls::GAMEPAD_BUTTON_RIGHT}; // Botón para mover a la derecha (por defecto: DPAD_RIGHT)
|
||||
int button_jump{Defaults::Controls::GAMEPAD_BUTTON_JUMP}; // Botón para saltar (por defecto: WEST/X button)
|
||||
};
|
||||
|
||||
// Estructura para albergar trucos
|
||||
@@ -41,10 +41,10 @@ struct Cheat {
|
||||
ENABLED = true
|
||||
};
|
||||
|
||||
State infinite_lives{GameDefaults::CHEAT_INFINITE_LIVES ? State::ENABLED : State::DISABLED}; // Indica si el jugador dispone de vidas infinitas
|
||||
State invincible{GameDefaults::CHEAT_INVINCIBLE ? State::ENABLED : State::DISABLED}; // Indica si el jugador puede morir
|
||||
State jail_is_open{GameDefaults::CHEAT_JAIL_IS_OPEN ? State::ENABLED : State::DISABLED}; // Indica si la Jail está abierta
|
||||
State alternate_skin{GameDefaults::CHEAT_ALTERNATE_SKIN ? State::ENABLED : State::DISABLED}; // Indica si se usa una skin diferente para el jugador
|
||||
State infinite_lives{Defaults::Cheat::INFINITE_LIVES ? State::ENABLED : State::DISABLED}; // Indica si el jugador dispone de vidas infinitas
|
||||
State invincible{Defaults::Cheat::INVINCIBLE ? State::ENABLED : State::DISABLED}; // Indica si el jugador puede morir
|
||||
State jail_is_open{Defaults::Cheat::JAIL_IS_OPEN ? State::ENABLED : State::DISABLED}; // Indica si la Jail está abierta
|
||||
State alternate_skin{Defaults::Cheat::ALTERNATE_SKIN ? State::ENABLED : State::DISABLED}; // Indica si se usa una skin diferente para el jugador
|
||||
|
||||
// Método para comprobar si alguno de los tres primeros trucos está activo
|
||||
[[nodiscard]] auto enabled() const -> bool {
|
||||
@@ -56,62 +56,62 @@ struct Cheat {
|
||||
|
||||
// Estructura para almacenar estadísticas
|
||||
struct Stats {
|
||||
int rooms{GameDefaults::STATS_ROOMS}; // Cantidad de habitaciones visitadas
|
||||
int items{GameDefaults::STATS_ITEMS}; // Cantidad de items obtenidos
|
||||
std::string worst_nightmare{GameDefaults::STATS_WORST_NIGHTMARE}; // Habitación con más muertes acumuladas
|
||||
int rooms{Defaults::Stats::ROOMS}; // Cantidad de habitaciones visitadas
|
||||
int items{Defaults::Stats::ITEMS}; // Cantidad de items obtenidos
|
||||
std::string worst_nightmare{Defaults::Stats::WORST_NIGHTMARE}; // Habitación con más muertes acumuladas
|
||||
};
|
||||
|
||||
// Estructura con opciones de la ventana
|
||||
struct Window {
|
||||
std::string caption{WINDOW_CAPTION}; // Texto que aparece en la barra de título de la ventana
|
||||
int zoom{GameDefaults::WINDOW_ZOOM}; // Zoom de la ventana
|
||||
int max_zoom{GameDefaults::WINDOW_ZOOM}; // Máximo tamaño de zoom para la ventana
|
||||
std::string caption{Texts::WINDOW_CAPTION}; // Texto que aparece en la barra de título de la ventana
|
||||
int zoom{Defaults::Window::ZOOM}; // Zoom de la ventana
|
||||
int max_zoom{Defaults::Window::ZOOM}; // Máximo tamaño de zoom para la ventana
|
||||
};
|
||||
|
||||
// Estructura para gestionar el borde de la pantalla
|
||||
struct Border {
|
||||
bool enabled{GameDefaults::BORDER_ENABLED}; // Indica si se ha de mostrar el borde
|
||||
float width{GameDefaults::BORDER_WIDTH}; // Ancho del borde
|
||||
float height{GameDefaults::BORDER_HEIGHT}; // Alto del borde
|
||||
bool enabled{Defaults::Border::ENABLED}; // Indica si se ha de mostrar el borde
|
||||
float width{Defaults::Border::WIDTH}; // Ancho del borde
|
||||
float height{Defaults::Border::HEIGHT}; // Alto del borde
|
||||
};
|
||||
|
||||
// Estructura para las opciones de video
|
||||
struct Video {
|
||||
bool fullscreen{GameDefaults::VIDEO_FULLSCREEN}; // Contiene el valor del modo de pantalla completa
|
||||
Screen::Filter filter{GameDefaults::VIDEO_FILTER}; // Filtro usado para el escalado de la imagen
|
||||
bool vertical_sync{GameDefaults::VIDEO_VERTICAL_SYNC}; // Indica si se quiere usar vsync o no
|
||||
bool shaders{GameDefaults::VIDEO_SHADERS}; // Indica si se van a usar shaders o no
|
||||
bool integer_scale{GameDefaults::VIDEO_INTEGER_SCALE}; // Indica si el escalado de la imagen ha de ser entero en el modo a pantalla completa
|
||||
bool keep_aspect{GameDefaults::VIDEO_KEEP_ASPECT}; // Indica si se ha de mantener la relación de aspecto al poner el modo a pantalla completa
|
||||
bool fullscreen{Defaults::Video::FULLSCREEN}; // Contiene el valor del modo de pantalla completa
|
||||
Screen::Filter filter{Defaults::Video::FILTER}; // Filtro usado para el escalado de la imagen
|
||||
bool vertical_sync{Defaults::Video::VERTICAL_SYNC}; // Indica si se quiere usar vsync o no
|
||||
bool shaders{Defaults::Video::SHADERS}; // Indica si se van a usar shaders o no
|
||||
bool integer_scale{Defaults::Video::INTEGER_SCALE}; // Indica si el escalado de la imagen ha de ser entero en el modo a pantalla completa
|
||||
bool keep_aspect{Defaults::Video::KEEP_ASPECT}; // Indica si se ha de mantener la relación de aspecto al poner el modo a pantalla completa
|
||||
Border border{}; // Borde de la pantalla
|
||||
std::string palette{GameDefaults::PALETTE_NAME}; // Paleta de colores a usar en el juego
|
||||
std::string palette{Defaults::Video::PALETTE_NAME}; // Paleta de colores a usar en el juego
|
||||
std::string info; // Información sobre el modo de vídeo
|
||||
};
|
||||
|
||||
// Estructura para las opciones de musica
|
||||
struct Music {
|
||||
bool enabled{GameDefaults::MUSIC_ENABLED}; // Indica si la música suena o no
|
||||
float volume{GameDefaults::MUSIC_VOLUME}; // Volumen al que suena la música
|
||||
bool enabled{Defaults::Music::ENABLED}; // Indica si la música suena o no
|
||||
float volume{Defaults::Music::VOLUME}; // Volumen al que suena la música
|
||||
};
|
||||
|
||||
// Estructura para las opciones de sonido
|
||||
struct Sound {
|
||||
bool enabled{GameDefaults::SOUND_ENABLED}; // Indica si los sonidos suenan o no
|
||||
float volume{GameDefaults::SOUND_VOLUME}; // Volumen al que suenan los sonidos (0 a 128 internamente)
|
||||
bool enabled{Defaults::Sound::ENABLED}; // Indica si los sonidos suenan o no
|
||||
float volume{Defaults::Sound::VOLUME}; // Volumen al que suenan los sonidos (0 a 128 internamente)
|
||||
};
|
||||
|
||||
// Estructura para las opciones de audio
|
||||
struct Audio {
|
||||
Music music{}; // Opciones para la música
|
||||
Sound sound{}; // Opciones para los efectos de sonido
|
||||
bool enabled{GameDefaults::AUDIO_ENABLED}; // Indica si el audio está activo o no
|
||||
float volume{GameDefaults::AUDIO_VOLUME}; // Volumen al que suenan el audio (0-128 internamente)
|
||||
bool enabled{Defaults::Audio::ENABLED}; // Indica si el audio está activo o no
|
||||
float volume{Defaults::Audio::VOLUME}; // Volumen al que suenan el audio (0-128 internamente)
|
||||
};
|
||||
|
||||
// Estructura para las opciones de juego
|
||||
struct Game {
|
||||
float width{GameDefaults::GAME_WIDTH}; // Ancho de la resolucion del juego
|
||||
float height{GameDefaults::GAME_HEIGHT}; // Alto de la resolucion del juego
|
||||
float width{Defaults::Canvas::WIDTH}; // Ancho de la resolucion del juego
|
||||
float height{Defaults::Canvas::HEIGHT}; // Alto de la resolucion del juego
|
||||
};
|
||||
|
||||
// --- Variables globales (inline C++17+) ---
|
||||
|
||||
Reference in New Issue
Block a user