follat!
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#include "game.h"
|
||||
#include "service.h"
|
||||
|
||||
#define GAME_OVER_COUNTER 350
|
||||
|
||||
@@ -2038,35 +2037,40 @@ void Game::updateMenace()
|
||||
// Gestiona la entrada durante el juego
|
||||
void Game::checkInput()
|
||||
{
|
||||
// Comprueba las teclas que afectan al programa (solo para el primer jugador)
|
||||
if (input->checkInput(input_exit, INPUT_DO_NOT_ALLOW_REPEAT))
|
||||
// Comprueba si se sale con el teclado
|
||||
if (input->checkInput(input_exit, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_KEYBOARD))
|
||||
{
|
||||
section->name = SECTION_PROG_QUIT;
|
||||
section->options = SECTION_OPTIONS_QUIT_NORMAL;
|
||||
return;
|
||||
}
|
||||
|
||||
// Comprueba el botón de SERVICE
|
||||
switch (checkServiceButton(input))
|
||||
for (int i = 0; i < input->getNumControllers(); ++i)
|
||||
{
|
||||
case SERVICE_RESET:
|
||||
section->name = SECTION_PROG_LOGO;
|
||||
screen->showNotification("Reset");
|
||||
break;
|
||||
// Comprueba si se va a resetear el juego
|
||||
if (input->checkModInput(input_service, input_reset, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
|
||||
{
|
||||
section->name = SECTION_PROG_LOGO;
|
||||
screen->showNotification("Reset");
|
||||
return;
|
||||
}
|
||||
|
||||
case SERVICE_MUTE:
|
||||
options->audio.sound.enabled = options->audio.music.enabled = !options->audio.music.enabled;
|
||||
JA_EnableMusic(options->audio.music.enabled);
|
||||
JA_EnableSound(options->audio.sound.enabled);
|
||||
screen->showNotification("Audio " + boolToOnOff(options->audio.music.enabled));
|
||||
break;
|
||||
// Comprueba si se va a activar o desactivar el audio
|
||||
if (input->checkModInput(input_service, input_mute, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
|
||||
{
|
||||
options->audio.sound.enabled = options->audio.music.enabled = !options->audio.music.enabled;
|
||||
JA_EnableMusic(options->audio.music.enabled);
|
||||
JA_EnableSound(options->audio.sound.enabled);
|
||||
screen->showNotification("Audio " + boolToOnOff(options->audio.music.enabled));
|
||||
return;
|
||||
}
|
||||
|
||||
case SERVICE_PAUSE:
|
||||
pause(!paused);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
// Comprueba si se va a pausar el juego
|
||||
if (input->checkModInput(input_service, input_pause, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
|
||||
{
|
||||
pause(!paused);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Modo Demo activo
|
||||
|
||||
Reference in New Issue
Block a user