El joc ja no comença al pulsar la combinació de botons per eixir

This commit is contained in:
2024-09-30 19:45:04 +02:00
parent 0af441b5df
commit aaf6dc29a1

View File

@@ -1,25 +1,25 @@
#include "title.h"
#include <SDL2/SDL_keycode.h> // for SDLK_1, SDLK_2, SDLK_3
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <string> // for allocator, basic_string, char_traits
#include <vector> // for vector
#include "asset.h" // for Asset
#include "define_buttons.h" // for DefineButtons
#include "fade.h" // for Fade, FADE_RANDOM_SQUARE
#include "game_logo.h" // for GameLogo
#include "global_inputs.h" // for checkGlobalInputs
#include "input.h" // for Input, inputs_e, INPUT_DO_NOT_ALLOW_RE...
#include "jail_audio.h" // for JA_GetMusicState, JA_Music_state, JA_P...
#include "lang.h" // for getText
#include "options.h" // for options
#include "param.h" // for param
#include "screen.h" // for Screen
#include "section.h" // for options_e, options, name_e, name
#include "sprite.h" // for Sprite
#include "text.h" // for Text, TXT_CENTER, TXT_SHADOW
#include "texture.h" // for Texture
#include "tiled_bg.h" // for Tiledbg, TILED_MODE_RANDOM
#include <SDL2/SDL_keycode.h> // for SDLK_1, SDLK_2, SDLK_3
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <string> // for allocator, basic_string, char_traits
#include <vector> // for vector
#include "asset.h" // for Asset
#include "define_buttons.h" // for DefineButtons
#include "fade.h" // for Fade, FADE_RANDOM_SQUARE
#include "game_logo.h" // for GameLogo
#include "global_inputs.h" // for checkGlobalInputs
#include "input.h" // for Input, inputs_e, INPUT_DO_NOT_ALLOW_RE...
#include "jail_audio.h" // for JA_GetMusicState, JA_Music_state, JA_P...
#include "lang.h" // for getText
#include "options.h" // for options
#include "param.h" // for param
#include "screen.h" // for Screen
#include "section.h" // for options_e, options, name_e, name
#include "sprite.h" // for Sprite
#include "text.h" // for Text, TXT_CENTER, TXT_SHADOW
#include "texture.h" // for Texture
#include "tiled_bg.h" // for Tiledbg, TILED_MODE_RANDOM
struct JA_Music_t;
// Constructor
@@ -299,12 +299,15 @@ void Title::checkInput()
// Comprueba el botón de START de los mandos
if (input->checkInput(input_start, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
{
if (section::options == section::OPTIONS_TITLE_2 || ALLOW_TITLE_ANIMATION_SKIP)
{ // Si no está el botón de servicio activo
if (!input->checkInput(input_service, INPUT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
{
fade->activate();
postFade = options.controller[i].playerId;
return;
if (section::options == section::OPTIONS_TITLE_2 || ALLOW_TITLE_ANIMATION_SKIP)
{
fade->activate();
postFade = options.controller[i].playerId;
return;
}
}
}
}
@@ -313,7 +316,7 @@ void Title::checkInput()
// Comprueba el input para el resto de objetos
screen->checkInput();
defineButtons->checkInput();
// Comprueba los inputs que se pueden introducir en cualquier sección del juego
checkGlobalInputs();
}