arreglos d'estil pa deixar el repo com a plantilla

This commit is contained in:
2025-04-07 13:57:19 +02:00
parent 502ba7297a
commit c3e1abff13
17 changed files with 178 additions and 177 deletions
+5 -29
View File
@@ -1,34 +1,10 @@
#include "global_inputs.h"
#include <SDL3/SDL.h> // Para SDL_RendererLogicalPresentation, SDL_Se...
#include <string> // Para operator+, allocator, char_traits, string
#include <vector> // Para vector
#include "audio.h" // Para JA_SetMusicVolume, JA_SetSoundVolume
#include "options.h" // Para Options, options, VideoOptions, GameOpt...
#include "screen.h" // Para Screen
#include "utils.h" // Para boolToOnOff
#include <SDL3/SDL_keycode.h> // for SDLK_ESCAPE, SDLK_F1, SDLK_F2, SDLK_F3
#include "options.h" // for Options, OptionsLogo, options
#include "screen.h" // for Screen
namespace globalInputs
{
// Activa o desactiva el audio
void toggleAudio()
{
options.audio.enabled = !options.audio.enabled;
Audio::get()->enable(options.audio.enabled);
}
// Cambia el modo de escalado entero
void toggleIntegerScale()
{
Screen::get()->toggleIntegerScale();
}
// Activa / desactiva el vsync
void toggleVSync()
{
Screen::get()->toggleVSync();
}
// Comprueba los inputs que se pueden introducir en cualquier sección del juego
void check(const SDL_Event &event)
{
@@ -58,12 +34,12 @@ namespace globalInputs
// Integer Scale
case SDLK_F5:
toggleIntegerScale();
Screen::get()->toggleIntegerScale();
return;
// VSync
case SDLK_F6:
toggleVSync();
Screen::get()->toggleVSync();
return;
}
}