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