mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 13:15:32 +00:00
restored --new-game switch
This commit is contained in:
parent
96cd46568b
commit
a9df3b53fd
4 changed files with 18 additions and 4 deletions
|
@ -182,6 +182,7 @@ OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
|
|||
, mGrab(true)
|
||||
, mScriptBlacklistUse (true)
|
||||
, mExportFonts(false)
|
||||
, mNewGame (false)
|
||||
{
|
||||
std::srand ( std::time(NULL) );
|
||||
MWClass::registerClasses();
|
||||
|
@ -264,9 +265,10 @@ void OMW::Engine::setScriptsVerbosity(bool scriptsVerbosity)
|
|||
mVerboseScripts = scriptsVerbosity;
|
||||
}
|
||||
|
||||
void OMW::Engine::setSkipMenu (bool skipMenu)
|
||||
void OMW::Engine::setSkipMenu (bool skipMenu, bool newGame)
|
||||
{
|
||||
mSkipMenu = skipMenu;
|
||||
mNewGame = newGame;
|
||||
}
|
||||
|
||||
std::string OMW::Engine::loadSettings (Settings::Manager & settings)
|
||||
|
@ -472,7 +474,7 @@ void OMW::Engine::go()
|
|||
}
|
||||
else
|
||||
{
|
||||
MWBase::Environment::get().getStateManager()->newGame (true);
|
||||
MWBase::Environment::get().getStateManager()->newGame (!mNewGame);
|
||||
}
|
||||
|
||||
// Start the main rendering loop
|
||||
|
|
|
@ -93,6 +93,7 @@ namespace OMW
|
|||
Translation::Storage mTranslationDataStorage;
|
||||
std::vector<std::string> mScriptBlacklist;
|
||||
bool mScriptBlacklistUse;
|
||||
bool mNewGame;
|
||||
|
||||
// not implemented
|
||||
Engine (const Engine&);
|
||||
|
@ -153,7 +154,11 @@ namespace OMW
|
|||
/// Disable or enable all sounds
|
||||
void setSoundUsage(bool soundUsage);
|
||||
|
||||
void setSkipMenu (bool skipMenu);
|
||||
/// Skip main menu and go directly into the game
|
||||
///
|
||||
/// \param newGame Start a new game instead off dumping the player into the game
|
||||
/// (ignored if !skipMenu).
|
||||
void setSkipMenu (bool skipMenu, bool newGame);
|
||||
|
||||
void setGrabMouse(bool grab) { mGrab = grab; }
|
||||
|
||||
|
|
|
@ -153,6 +153,9 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
|||
("skip-menu", bpo::value<bool>()->implicit_value(true)
|
||||
->default_value(false), "skip main menu on game startup")
|
||||
|
||||
("new-game", bpo::value<bool>()->implicit_value(true)
|
||||
->default_value(false), "run new game sequence (ignored if skip-menu=0)")
|
||||
|
||||
("fs-strict", bpo::value<bool>()->implicit_value(true)
|
||||
->default_value(false), "strict file system handling (no case folding)")
|
||||
|
||||
|
@ -256,7 +259,9 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
|||
|
||||
// startup-settings
|
||||
engine.setCell(variables["start"].as<std::string>());
|
||||
engine.setSkipMenu (variables["skip-menu"].as<bool>());
|
||||
engine.setSkipMenu (variables["skip-menu"].as<bool>(), variables["new-game"].as<bool>());
|
||||
if (!variables["skip-menu"].as<bool>() && variables["new-game"].as<bool>())
|
||||
std::cerr << "new-game used without skip-menu -> ignoring it" << std::endl;
|
||||
|
||||
// scripts
|
||||
engine.setCompileAll(variables["script-all"].as<bool>());
|
||||
|
|
|
@ -73,6 +73,8 @@ Allowed options:
|
|||
correctly compiled anyway
|
||||
2 - treat warnings as errors
|
||||
--skip-menu [=arg(=1)] (=0) skip main menu on game startup
|
||||
--new-game [=arg(=1)] (=0) run new game sequence (ignored if
|
||||
skip-menu=0)
|
||||
--fs-strict [=arg(=1)] (=0) strict file system handling (no case
|
||||
folding)
|
||||
--encoding arg (=win1252) Character encoding used in OpenMW game
|
||||
|
|
Loading…
Reference in a new issue