modernitzat el sistema d'opcions

This commit is contained in:
2026-04-17 19:36:40 +02:00
parent 1bb0ebdef8
commit 7f703390f9
12 changed files with 690 additions and 553 deletions

View File

@@ -4,8 +4,9 @@
#include <vector> // for vector
#include "game/options.hpp" // for Options::Video, Options::Window (per snapshot cancel)
#include "game/scenes/instructions.h" // for mode_e
#include "utils/utils.h" // for input_t, options_t, section_t
#include "utils/utils.h" // for input_t, section_t
class AnimatedSprite;
class Asset;
class Fade;
@@ -85,8 +86,11 @@ class Title {
Uint32 ticksSpeed; // Velocidad a la que se repiten los bucles del programa
Uint8 postFade; // Opción a realizar cuando termina el fundido
menu_t menu; // Variable con todos los objetos menus y sus variables
struct options_t *options; // Variable con todas las variables de las opciones del programa
options_t optionsPrevious; // Variable de respaldo para las opciones
// Snapshot per a permetre CANCEL al menú d'opcions.
Options::Video prevVideo;
Options::Window prevWindow;
Options::Settings prevSettings;
std::vector<input_t> prevInputs;
std::vector<input_t> availableInputDevices; // Vector con todos los metodos de control disponibles
std::vector<int> deviceIndex; // Indice para el jugador [i] del vector de dispositivos de entrada disponibles
@@ -149,7 +153,7 @@ class Title {
public:
// Constructor
Title(SDL_Renderer *renderer, Screen *screen, Input *input, Asset *asset, options_t *options, Lang *lang, section_t *section);
Title(SDL_Renderer *renderer, Screen *screen, Input *input, Asset *asset, Lang *lang, section_t *section);
// Destructor
~Title();