mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-10 16:14:26 +00:00
added --skip-menu switch
This commit is contained in:
parent
f19973450f
commit
7a4b604376
@ -139,6 +139,7 @@ OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
|
|||||||
, mFpsLevel(0)
|
, mFpsLevel(0)
|
||||||
, mVerboseScripts (false)
|
, mVerboseScripts (false)
|
||||||
, mNewGame (false)
|
, mNewGame (false)
|
||||||
|
, mSkipMenu (false)
|
||||||
, mUseSound (true)
|
, mUseSound (true)
|
||||||
, mCompileAll (false)
|
, mCompileAll (false)
|
||||||
, mScriptContext (0)
|
, mScriptContext (0)
|
||||||
@ -282,6 +283,11 @@ void OMW::Engine::setNewGame(bool newGame)
|
|||||||
mNewGame = newGame;
|
mNewGame = newGame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OMW::Engine::setSkipMenu (bool skipMenu)
|
||||||
|
{
|
||||||
|
mSkipMenu = skipMenu;
|
||||||
|
}
|
||||||
|
|
||||||
std::string OMW::Engine::loadSettings (Settings::Manager & settings)
|
std::string OMW::Engine::loadSettings (Settings::Manager & settings)
|
||||||
{
|
{
|
||||||
// Create the settings manager and load default settings file
|
// Create the settings manager and load default settings file
|
||||||
@ -486,6 +492,10 @@ void OMW::Engine::go()
|
|||||||
if (!mStartupScript.empty())
|
if (!mStartupScript.empty())
|
||||||
MWBase::Environment::get().getWindowManager()->executeInConsole (mStartupScript);
|
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
|
// Start the main rendering loop
|
||||||
while (!mEnvironment.get().getStateManager()->hasQuitRequest())
|
while (!mEnvironment.get().getStateManager()->hasQuitRequest())
|
||||||
Ogre::Root::getSingleton().renderOneFrame();
|
Ogre::Root::getSingleton().renderOneFrame();
|
||||||
|
@ -72,6 +72,7 @@ namespace OMW
|
|||||||
int mFpsLevel;
|
int mFpsLevel;
|
||||||
bool mVerboseScripts;
|
bool mVerboseScripts;
|
||||||
bool mNewGame;
|
bool mNewGame;
|
||||||
|
bool mSkipMenu;
|
||||||
bool mUseSound;
|
bool mUseSound;
|
||||||
bool mCompileAll;
|
bool mCompileAll;
|
||||||
std::string mFocusName;
|
std::string mFocusName;
|
||||||
@ -152,6 +153,8 @@ namespace OMW
|
|||||||
/// Start as a new game.
|
/// Start as a new game.
|
||||||
void setNewGame(bool newGame);
|
void setNewGame(bool newGame);
|
||||||
|
|
||||||
|
void setSkipMenu (bool skipMenu);
|
||||||
|
|
||||||
/// Initialise and enter main loop.
|
/// Initialise and enter main loop.
|
||||||
void go();
|
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)
|
("new-game", bpo::value<bool>()->implicit_value(true)
|
||||||
->default_value(false), "activate char gen/new game mechanics")
|
->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)
|
("fs-strict", bpo::value<bool>()->implicit_value(true)
|
||||||
->default_value(false), "strict file system handling (no case folding)")
|
->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
|
// startup-settings
|
||||||
engine.setCell(variables["start"].as<std::string>());
|
engine.setCell(variables["start"].as<std::string>());
|
||||||
engine.setNewGame(variables["new-game"].as<bool>());
|
engine.setNewGame(variables["new-game"].as<bool>());
|
||||||
|
engine.setSkipMenu (variables["skip-menu"].as<bool>());
|
||||||
|
|
||||||
// other settings
|
// other settings
|
||||||
engine.setSoundUsage(!variables["nosound"].as<bool>());
|
engine.setSoundUsage(!variables["nosound"].as<bool>());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user