From 7c8b3ea1a9adb57bafff9ce67cc4d1f9bf235fe4 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sat, 12 Jun 2010 11:49:37 +0200 Subject: [PATCH] added --start command line option to choose a cell for stating the game --- game/main.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/game/main.cpp b/game/main.cpp index f66fed2df..fadb037fd 100644 --- a/game/main.cpp +++ b/game/main.cpp @@ -16,7 +16,7 @@ using namespace std; -void maintest (std::string dataDir) +void maintest (std::string dataDir, const std::string& cellName) { assert (!dataDir.empty()); @@ -48,7 +48,7 @@ void maintest (std::string dataDir) esm.open(dataDir + esmFile); store.load(esm); - cell.loadInt("Beshara", store, esm); + cell.loadInt(cellName, store, esm); // Create the window ogre.createWindow("OpenMW"); @@ -87,8 +87,10 @@ int main(int argc, char**argv) desc.add_options() ("help", "print help message") ("data", boost::program_options::value()->default_value ("data"), - "set data directory" - ); + "set data directory") + ("start", boost::program_options::value()->default_value ("Beshara"), + "set initial cell (only interior cells supported at the moment") + ; boost::program_options::variables_map variables; @@ -108,7 +110,7 @@ int main(int argc, char**argv) } else { - maintest (variables["data"].as()); + maintest (variables["data"].as(), variables["start"].as()); } } catch(exception &e)