Opció de fer el reset amb o sense reload
This commit is contained in:
@@ -672,6 +672,16 @@ void Director::runDemoGame()
|
|||||||
game->run();
|
game->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ejecuta la sección init
|
||||||
|
void Director::runInit()
|
||||||
|
{
|
||||||
|
if (section::options == section::Options::RELOAD)
|
||||||
|
{
|
||||||
|
Resource::get()->reload();
|
||||||
|
}
|
||||||
|
section::name = section::Name::LOGO;
|
||||||
|
}
|
||||||
|
|
||||||
int Director::run()
|
int Director::run()
|
||||||
{
|
{
|
||||||
// Bucle principal
|
// Bucle principal
|
||||||
@@ -680,8 +690,7 @@ int Director::run()
|
|||||||
switch (section::name)
|
switch (section::name)
|
||||||
{
|
{
|
||||||
case section::Name::INIT:
|
case section::Name::INIT:
|
||||||
Resource::get()->reload();
|
runInit();
|
||||||
section::name = section::Name::LOGO;
|
|
||||||
break;
|
break;
|
||||||
case section::Name::LOGO:
|
case section::Name::LOGO:
|
||||||
runLogo();
|
runLogo();
|
||||||
|
|||||||
@@ -67,6 +67,9 @@ private:
|
|||||||
// Ejecuta el juego en modo demo
|
// Ejecuta el juego en modo demo
|
||||||
void runDemoGame();
|
void runDemoGame();
|
||||||
|
|
||||||
|
// Ejecuta la sección init
|
||||||
|
void runInit();
|
||||||
|
|
||||||
// Obtiene una fichero a partir de un lang::Code
|
// Obtiene una fichero a partir de un lang::Code
|
||||||
std::string getLangFile(lang::Code code);
|
std::string getLangFile(lang::Code code);
|
||||||
#ifdef ARCADE
|
#ifdef ARCADE
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ namespace globalInputs
|
|||||||
options.game.language = lang::change(options.game.language);
|
options.game.language = lang::change(options.game.language);
|
||||||
lang::loadFromFile(getLangFile(static_cast<lang::Code>(options.game.language)));
|
lang::loadFromFile(getLangFile(static_cast<lang::Code>(options.game.language)));
|
||||||
section::name = section::Name::INIT;
|
section::name = section::Name::INIT;
|
||||||
|
section::options = section::Options::RELOAD;
|
||||||
Notifier::get()->showText({getLangName(options.game.language)});
|
Notifier::get()->showText({getLangName(options.game.language)});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ namespace section
|
|||||||
QUIT_WITH_KEYBOARD = 4,
|
QUIT_WITH_KEYBOARD = 4,
|
||||||
QUIT_WITH_CONTROLLER = 5,
|
QUIT_WITH_CONTROLLER = 5,
|
||||||
QUIT_FROM_EVENT = 6,
|
QUIT_FROM_EVENT = 6,
|
||||||
NONE = 7,
|
RELOAD = 7,
|
||||||
|
NONE = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Variables para el Attract Mode
|
// Variables para el Attract Mode
|
||||||
|
|||||||
Reference in New Issue
Block a user