forked from jaildesigner-jailgames/jaildoctors_dilemma
demo.cpp a fer la mar
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
#include "credits.h" // for Credits
|
||||
#include "debug.h" // for Debug
|
||||
#include "defines.h" // for WINDOW_CAPTION, borderColor
|
||||
#include "demo.h" // for Demo
|
||||
#include "ending.h" // for Ending
|
||||
#include "ending2.h" // for Ending2
|
||||
#include "game.h" // for Game
|
||||
@@ -110,41 +109,37 @@ Director::~Director()
|
||||
// Comprueba los parametros del programa
|
||||
std::string Director::checkProgramArguments(int argc, const char *argv[])
|
||||
{
|
||||
// Comprueba los parametros
|
||||
for (int i = 1; i < argc; ++i)
|
||||
{
|
||||
if (strcmp(argv[i], "--console") == 0)
|
||||
{
|
||||
options.console = true;
|
||||
}
|
||||
// Iterar sobre los argumentos del programa
|
||||
for (int i = 1; i < argc; ++i)
|
||||
{
|
||||
std::string argument(argv[i]);
|
||||
|
||||
else if (strcmp(argv[i], "--infiniteLives") == 0)
|
||||
{
|
||||
options.cheats.infinite_lives = Cheat::CheatState::ENABLED;
|
||||
}
|
||||
if (argument == "--console")
|
||||
{
|
||||
options.console = true;
|
||||
}
|
||||
else if (argument == "--infiniteLives")
|
||||
{
|
||||
options.cheats.infinite_lives = Cheat::CheatState::ENABLED;
|
||||
}
|
||||
else if (argument == "--invincible")
|
||||
{
|
||||
options.cheats.invincible = Cheat::CheatState::ENABLED;
|
||||
}
|
||||
else if (argument == "--jailEnabled")
|
||||
{
|
||||
options.cheats.jail_is_open = Cheat::CheatState::ENABLED;
|
||||
}
|
||||
else if (argument == "--altSkin")
|
||||
{
|
||||
options.cheats.alternate_skin = Cheat::CheatState::ENABLED;
|
||||
}
|
||||
}
|
||||
|
||||
else if (strcmp(argv[i], "--invincible") == 0)
|
||||
{
|
||||
options.cheats.invincible = Cheat::CheatState::ENABLED;
|
||||
;
|
||||
}
|
||||
|
||||
else if (strcmp(argv[i], "--jailEnabled") == 0)
|
||||
{
|
||||
options.cheats.jail_is_open = Cheat::CheatState::ENABLED;
|
||||
;
|
||||
}
|
||||
|
||||
else if (strcmp(argv[i], "--altSkin") == 0)
|
||||
{
|
||||
options.cheats.alternate_skin = Cheat::CheatState::ENABLED;
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
return argv[0];
|
||||
return argv[0];
|
||||
}
|
||||
|
||||
|
||||
// Crea la carpeta del sistema donde guardar datos
|
||||
void Director::createSystemFolder(const std::string &folder)
|
||||
{
|
||||
@@ -774,8 +769,8 @@ void Director::runCredits()
|
||||
// Ejecuta la seccion de la demo, donde se ven pantallas del juego
|
||||
void Director::runDemo()
|
||||
{
|
||||
auto demo = std::make_unique<Demo>();
|
||||
demo->run();
|
||||
auto game = std::make_unique<Game>(GameMode::DEMO);
|
||||
game->run();
|
||||
}
|
||||
|
||||
// Ejecuta la seccion del final del juego
|
||||
@@ -803,7 +798,7 @@ void Director::runGameOver()
|
||||
void Director::runGame()
|
||||
{
|
||||
JA_StopMusic();
|
||||
auto game = std::make_unique<Game>();
|
||||
auto game = std::make_unique<Game>(GameMode::GAME);
|
||||
game->run();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user