added --skip-menu switch

actorid
Marc Zinnschlag 11 years ago
parent f19973450f
commit 7a4b604376

@ -139,6 +139,7 @@ OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
, mFpsLevel(0)
, mVerboseScripts (false)
, mNewGame (false)
, mSkipMenu (false)
, mUseSound (true)
, mCompileAll (false)
, mScriptContext (0)
@ -282,6 +283,11 @@ void OMW::Engine::setNewGame(bool newGame)
mNewGame = newGame;
}
void OMW::Engine::setSkipMenu (bool skipMenu)
{
mSkipMenu = skipMenu;
}
std::string OMW::Engine::loadSettings (Settings::Manager & settings)
{
// Create the settings manager and load default settings file
@ -486,6 +492,10 @@ void OMW::Engine::go()
if (!mStartupScript.empty())
MWBase::Environment::get().getWindowManager()->executeInConsole (mStartupScript);
// start in main menu
if (!mSkipMenu)
MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
// Start the main rendering loop
while (!mEnvironment.get().getStateManager()->hasQuitRequest())
Ogre::Root::getSingleton().renderOneFrame();

@ -72,6 +72,7 @@ namespace OMW
int mFpsLevel;
bool mVerboseScripts;
bool mNewGame;
bool mSkipMenu;
bool mUseSound;
bool mCompileAll;
std::string mFocusName;
@ -152,6 +153,8 @@ namespace OMW
/// Start as a new game.
void setNewGame(bool newGame);
void setSkipMenu (bool skipMenu);
/// Initialise and enter main loop.
void go();

@ -134,6 +134,9 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
("new-game", bpo::value<bool>()->implicit_value(true)
->default_value(false), "activate char gen/new game mechanics")
("skip-menu", bpo::value<bool>()->implicit_value(true)
->default_value(false), "skip main menu on game startup")
("fs-strict", bpo::value<bool>()->implicit_value(true)
->default_value(false), "strict file system handling (no case folding)")
@ -223,6 +226,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
// startup-settings
engine.setCell(variables["start"].as<std::string>());
engine.setNewGame(variables["new-game"].as<bool>());
engine.setSkipMenu (variables["skip-menu"].as<bool>());
// other settings
engine.setSoundUsage(!variables["nosound"].as<bool>());

Loading…
Cancel
Save