arreglos d'estil pa deixar el repo com a plantilla
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user