centralitzada la gestio d'SKIP per a les escenes
This commit is contained in:
@@ -415,14 +415,7 @@ void EscenaLogo::dibuixar() {
|
||||
}
|
||||
|
||||
auto EscenaLogo::checkSkipButtonPressed() -> bool {
|
||||
auto* input = Input::get();
|
||||
for (auto action : SKIP_BUTTONS_LOGO) {
|
||||
if (input->checkActionPlayer1(action, Input::DO_NOT_ALLOW_REPEAT) ||
|
||||
input->checkActionPlayer2(action, Input::DO_NOT_ALLOW_REPEAT)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return Input::get()->checkAnyPlayerAction(ARCADE_BUTTONS);
|
||||
}
|
||||
|
||||
void EscenaLogo::processar_events(const SDL_Event& event) {
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
#include "core/system/context_escenes.hpp"
|
||||
#include "core/types.hpp"
|
||||
|
||||
// Botones que permiten saltar la escena (extensible)
|
||||
static constexpr std::array<InputAction, 1> SKIP_BUTTONS_LOGO = {
|
||||
InputAction::SHOOT
|
||||
};
|
||||
|
||||
class EscenaLogo {
|
||||
public:
|
||||
explicit EscenaLogo(SDLManager& sdl, GestorEscenes::ContextEscenes& context);
|
||||
|
||||
@@ -585,16 +585,7 @@ void EscenaTitol::dibuixar() {
|
||||
}
|
||||
|
||||
auto EscenaTitol::checkSkipButtonPressed() -> bool {
|
||||
auto* input = Input::get();
|
||||
|
||||
for (auto action : SKIP_BUTTONS_TITOL) {
|
||||
if (input->checkActionPlayer1(action, Input::DO_NOT_ALLOW_REPEAT) ||
|
||||
input->checkActionPlayer2(action, Input::DO_NOT_ALLOW_REPEAT)) {
|
||||
return true; // Don't track players here, just skip
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return Input::get()->checkAnyPlayerAction(ARCADE_BUTTONS);
|
||||
}
|
||||
|
||||
auto EscenaTitol::checkStartGameButtonPressed() -> bool {
|
||||
|
||||
@@ -20,13 +20,6 @@
|
||||
#include "core/system/game_config.hpp"
|
||||
#include "core/types.hpp"
|
||||
|
||||
// Botones que permiten saltar/avanzar escenas ANTES de MAIN (extensible)
|
||||
static constexpr std::array<InputAction, 3> SKIP_BUTTONS_TITOL = {
|
||||
InputAction::SHOOT, // FIRE
|
||||
InputAction::THRUST, // THRUST
|
||||
InputAction::START // START
|
||||
};
|
||||
|
||||
// Botones para INICIAR PARTIDA desde MAIN (solo START)
|
||||
static constexpr std::array<InputAction, 1> START_GAME_BUTTONS = {
|
||||
InputAction::START
|
||||
|
||||
Reference in New Issue
Block a user