Commit amb la merda de hui
This commit is contained in:
@@ -353,9 +353,14 @@ void Screen::checkInput()
|
||||
}
|
||||
|
||||
// Comprueba el botón de SERVICE
|
||||
if (checkServiceButton(input) == SERVICE_SHADERS)
|
||||
switch (checkServiceButton(input))
|
||||
{
|
||||
case SERVICE_SHADERS:
|
||||
switchShaders();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2050,35 +2050,24 @@ void Game::checkInput()
|
||||
switch (checkServiceButton(input))
|
||||
{
|
||||
case SERVICE_RESET:
|
||||
{
|
||||
section->name = SECTION_PROG_LOGO;
|
||||
screen->showNotification("Reset");
|
||||
break;
|
||||
}
|
||||
|
||||
case SERVICE_MUTE:
|
||||
{
|
||||
const bool value = !options->audio.music.enabled;
|
||||
options->audio.music.enabled = value;
|
||||
options->audio.sound.enabled = value;
|
||||
JA_EnableMusic(value);
|
||||
JA_EnableSound(value);
|
||||
const std::string text = value ? "on" : "off";
|
||||
screen->showNotification("Audio " + text);
|
||||
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;
|
||||
}
|
||||
|
||||
case SERVICE_PAUSE:
|
||||
{
|
||||
pause(!paused);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Modo Demo activo
|
||||
if (demo.enabled)
|
||||
|
||||
@@ -212,29 +212,20 @@ void HiScoreTable::checkInput()
|
||||
switch (checkServiceButton(input))
|
||||
{
|
||||
case SERVICE_RESET:
|
||||
{
|
||||
section->name = SECTION_PROG_LOGO;
|
||||
screen->showNotification("Reset");
|
||||
break;
|
||||
}
|
||||
|
||||
case SERVICE_MUTE:
|
||||
{
|
||||
const bool value = !options->audio.music.enabled;
|
||||
options->audio.music.enabled = value;
|
||||
options->audio.sound.enabled = value;
|
||||
JA_EnableMusic(value);
|
||||
JA_EnableSound(value);
|
||||
const std::string text = value ? "on" : "off";
|
||||
screen->showNotification("Audio " + text);
|
||||
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;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Comprueba el input para el resto de objetos
|
||||
screen->checkInput();
|
||||
|
||||
@@ -342,29 +342,20 @@ void Instructions::checkInput()
|
||||
switch (checkServiceButton(input))
|
||||
{
|
||||
case SERVICE_RESET:
|
||||
{
|
||||
section->name = SECTION_PROG_LOGO;
|
||||
screen->showNotification("Reset");
|
||||
break;
|
||||
}
|
||||
|
||||
case SERVICE_MUTE:
|
||||
{
|
||||
const bool value = !options->audio.music.enabled;
|
||||
options->audio.music.enabled = value;
|
||||
options->audio.sound.enabled = value;
|
||||
JA_EnableMusic(value);
|
||||
JA_EnableSound(value);
|
||||
const std::string text = value ? "on" : "off";
|
||||
screen->showNotification("Audio " + text);
|
||||
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;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Comprueba el input para el resto de objetos
|
||||
screen->checkInput();
|
||||
|
||||
@@ -211,29 +211,20 @@ void Intro::checkInput()
|
||||
switch (checkServiceButton(input))
|
||||
{
|
||||
case SERVICE_RESET:
|
||||
{
|
||||
section->name = SECTION_PROG_LOGO;
|
||||
screen->showNotification("Reset");
|
||||
break;
|
||||
}
|
||||
|
||||
case SERVICE_MUTE:
|
||||
{
|
||||
const bool value = !options->audio.music.enabled;
|
||||
options->audio.music.enabled = value;
|
||||
options->audio.sound.enabled = value;
|
||||
JA_EnableMusic(value);
|
||||
JA_EnableSound(value);
|
||||
const std::string text = value ? "on" : "off";
|
||||
screen->showNotification("Audio " + text);
|
||||
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;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Comprueba el input para el resto de objetos
|
||||
screen->checkInput();
|
||||
|
||||
@@ -122,37 +122,21 @@ void Logo::checkInput()
|
||||
switch (checkServiceButton(input))
|
||||
{
|
||||
case SERVICE_EXIT:
|
||||
{
|
||||
section->name = SECTION_PROG_QUIT;
|
||||
section->options = SECTION_OPTIONS_QUIT_SHUTDOWN;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
case SERVICE_RESET:
|
||||
{
|
||||
section->name = SECTION_PROG_LOGO;
|
||||
screen->showNotification("Reset");
|
||||
break;
|
||||
}
|
||||
|
||||
case SERVICE_MUTE:
|
||||
{
|
||||
const bool value = !options->audio.music.enabled;
|
||||
options->audio.music.enabled = value;
|
||||
options->audio.sound.enabled = value;
|
||||
JA_EnableMusic(value);
|
||||
JA_EnableSound(value);
|
||||
const std::string text = value ? "on" : "off";
|
||||
screen->showNotification("Audio " + text);
|
||||
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;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Comprueba el input para el resto de objetos
|
||||
screen->checkInput();
|
||||
|
||||
@@ -16,12 +16,12 @@ int checkServiceButton(Input *input, int index)
|
||||
|
||||
else if (input->checkInput(input_fire_left, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
|
||||
{
|
||||
return SERVICE_CONFIG;
|
||||
return SERVICE_SHADERS;
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_fire_center, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
|
||||
{
|
||||
return SERVICE_SHADERS;
|
||||
return SERVICE_RESET;
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_fire_right, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
|
||||
@@ -36,7 +36,7 @@ int checkServiceButton(Input *input, int index)
|
||||
|
||||
else if (input->checkInput(input_down, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
|
||||
{
|
||||
return SERVICE_RESET;
|
||||
return SERVICE_CONFIG;
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_left, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
|
||||
@@ -57,12 +57,12 @@ int checkServiceButton(Input *input, int index)
|
||||
|
||||
else if (input->checkInput(input_fire_left, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, index))
|
||||
{
|
||||
return SERVICE_CONFIG;
|
||||
return SERVICE_SHADERS;
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_fire_center, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, index))
|
||||
{
|
||||
return SERVICE_SHADERS;
|
||||
return SERVICE_RESET;
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_fire_right, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, index))
|
||||
@@ -77,7 +77,7 @@ int checkServiceButton(Input *input, int index)
|
||||
|
||||
else if (input->checkInput(input_down, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, index))
|
||||
{
|
||||
return SERVICE_RESET;
|
||||
return SERVICE_CONFIG;
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_left, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, index))
|
||||
|
||||
@@ -271,35 +271,24 @@ void Title::checkInput()
|
||||
switch (checkServiceButton(input))
|
||||
{
|
||||
case SERVICE_RESET:
|
||||
{
|
||||
section->name = SECTION_PROG_LOGO;
|
||||
screen->showNotification("Reset");
|
||||
break;
|
||||
}
|
||||
|
||||
case SERVICE_MUTE:
|
||||
{
|
||||
const bool value = !options->audio.music.enabled;
|
||||
options->audio.music.enabled = value;
|
||||
options->audio.sound.enabled = value;
|
||||
JA_EnableMusic(value);
|
||||
JA_EnableSound(value);
|
||||
const std::string text = value ? "on" : "off";
|
||||
screen->showNotification("Audio " + text);
|
||||
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;
|
||||
}
|
||||
|
||||
case SERVICE_SWAP_CONTROLLERS:
|
||||
{
|
||||
swapControllers();
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Comprueba si algun mando quiere ser configurado
|
||||
for (int i = 0; i < input->getNumControllers(); ++i)
|
||||
|
||||
Reference in New Issue
Block a user