modificacions en el flujo de globalInputs
afegida font aseprite canvis estetics en la info de debug moviment del cursor del ServiceMenu
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "scoreboard.h" // Para Scoreboard, ScoreboardMode, SCOREB...
|
||||
#include "screen.h" // Para Screen
|
||||
#include "section.h" // Para Name, name, AttractMode, Options
|
||||
#include "service_menu.h" // Para ServiceMenu
|
||||
#include "smart_sprite.h" // Para SmartSprite
|
||||
#include "stage.h" // Para number, get, Stage, total_power
|
||||
#include "tabe.h" // Para Tabe, TabeState
|
||||
@@ -1334,10 +1335,18 @@ int Game::getController(int player_id)
|
||||
// Gestiona la entrada durante el juego
|
||||
void Game::checkInput()
|
||||
{
|
||||
// Verifica si se debe pausar el juego.
|
||||
checkPauseInput();
|
||||
// Comprueba las entradas si no está el menú de servicio activo
|
||||
if (!ServiceMenu::get()->isEnabled())
|
||||
{
|
||||
checkPauseInput();
|
||||
demo_.enabled ? DEMO_handlePassInput() : handlePlayersInput();
|
||||
}
|
||||
|
||||
demo_.enabled ? handleDemoMode() : handlePlayersInput();
|
||||
// Mueve los jugadores en el modo demo
|
||||
if (demo_.enabled)
|
||||
{
|
||||
DEMO_handleInput();
|
||||
}
|
||||
|
||||
// Verifica los inputs globales.
|
||||
globalInputs::check();
|
||||
@@ -1365,8 +1374,19 @@ void Game::checkPauseInput()
|
||||
}
|
||||
}
|
||||
|
||||
// Gestiona las entradas de los jugadores en el modo demo para saltarse la demo.
|
||||
void Game::DEMO_handlePassInput()
|
||||
{
|
||||
if (input_->checkAnyButtonPressed())
|
||||
{
|
||||
section::name = section::Name::TITLE; // Salir del modo demo y regresar al menú principal.
|
||||
section::attract_mode = section::AttractMode::TITLE_TO_DEMO; // El juego volverá a mostrar la demo
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Gestiona las entradas de los jugadores en el modo demo, incluyendo movimientos y disparos automáticos.
|
||||
void Game::handleDemoMode()
|
||||
void Game::DEMO_handleInput()
|
||||
{
|
||||
int index = 0;
|
||||
for (const auto &player : players_)
|
||||
@@ -1374,21 +1394,14 @@ void Game::handleDemoMode()
|
||||
if (player->isPlaying())
|
||||
{
|
||||
// Maneja el input específico del jugador en modo demo.
|
||||
handleDemoPlayerInput(player, index);
|
||||
}
|
||||
|
||||
if (input_->checkAnyButtonPressed())
|
||||
{
|
||||
section::name = section::Name::TITLE; // Salir del modo demo y regresar al menú principal.
|
||||
section::attract_mode = section::AttractMode::TITLE_TO_DEMO; // El juego volverá a mostrar la demo
|
||||
return;
|
||||
DEMO_handlePlayerInput(player, index);
|
||||
}
|
||||
++index;
|
||||
}
|
||||
}
|
||||
|
||||
// Procesa las entradas para un jugador específico durante el modo demo.
|
||||
void Game::handleDemoPlayerInput(const std::shared_ptr<Player> &player, int index)
|
||||
void Game::DEMO_handlePlayerInput(const std::shared_ptr<Player> &player, int index)
|
||||
{
|
||||
const auto &demoData = demo_.data[index][demo_.counter];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user