Solucionado el problema de no cerrar el juego durante la demo o las instrucciones
This commit is contained in:
@@ -301,7 +301,10 @@ void Title::update()
|
||||
if (demo)
|
||||
{
|
||||
runDemoGame();
|
||||
runInstructions(m_auto);
|
||||
if (section.name != PROG_SECTION_QUIT)
|
||||
{
|
||||
runInstructions(m_auto);
|
||||
}
|
||||
}
|
||||
else
|
||||
section.name = PROG_SECTION_LOGO;
|
||||
@@ -483,7 +486,10 @@ void Title::update()
|
||||
if (demo)
|
||||
{
|
||||
runDemoGame();
|
||||
runInstructions(m_auto);
|
||||
if (section.name != PROG_SECTION_QUIT)
|
||||
{
|
||||
runInstructions(m_auto);
|
||||
}
|
||||
init();
|
||||
demo = false;
|
||||
counter = TITLE_COUNTER;
|
||||
@@ -939,19 +945,23 @@ section_t Title::run()
|
||||
}
|
||||
|
||||
// Ejecuta la parte donde se muestran las instrucciones
|
||||
void Title::runInstructions(mode_e mode)
|
||||
section_t Title::runInstructions(mode_e mode)
|
||||
{
|
||||
instructions = new Instructions(renderer, screen, asset, lang);
|
||||
instructions->run(mode);
|
||||
section = instructions->run(mode);
|
||||
delete instructions;
|
||||
|
||||
return section;
|
||||
}
|
||||
|
||||
// Ejecuta el juego en modo demo
|
||||
void Title::runDemoGame()
|
||||
section_t Title::runDemoGame()
|
||||
{
|
||||
demoGame = new Game(1, 0, renderer, screen, asset, lang, input, true, options);
|
||||
demoGame->run();
|
||||
section = demoGame->run();
|
||||
delete demoGame;
|
||||
|
||||
return section;
|
||||
}
|
||||
|
||||
// Modifica las opciones para los controles de los jugadores
|
||||
|
||||
Reference in New Issue
Block a user