Changeset 3323 for code/trunk/src
- Timestamp:
- Jul 19, 2009, 3:11:15 PM (15 years ago)
- Location:
- code/trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/core/CommandLine.cc
r3280 r3323 332 332 Parses only the command line for CommandLineArguments. 333 333 */ 334 void CommandLine::_parseCommandLine( int argc, char** argv)334 void CommandLine::_parseCommandLine(const std::string& cmdLine) 335 335 { 336 336 std::vector<std::string> args; 337 for (int i = 1; i < argc; ++i) 338 args.push_back(argv[i]); 337 SubString tokens(cmdLine, " ", " ", false, '\\', true, '"', true, '(', ')', false); 338 for (unsigned i = 0; i < tokens.size(); ++i) 339 args.push_back(tokens[i]); 339 340 this->_parse(args, false); 340 341 } … … 363 364 //if (!(line[0] == '#' || line[0] == '%')) 364 365 //{ 365 SubString tokens(line, " ", " ", false, 92, false, 34, false, 40, 41, false, '#');366 SubString tokens(line, " ", " ", false, '\\', true, '"', true, '(', ')', false, '#'); 366 367 for (unsigned i = 0; i < tokens.size(); ++i) 367 368 if (tokens[i][0] != '#') -
code/trunk/src/core/CommandLine.h
r3300 r3323 142 142 143 143 //! Parse redirection to internal member method. 144 static void parseCommandLine( int argc, char** argv) { _getInstance()._parseCommandLine(argc, argv); }144 static void parseCommandLine(const std::string& cmdLine) { _getInstance()._parseCommandLine(cmdLine); } 145 145 static void parseFile() { _getInstance()._parseFile(); } 146 146 … … 174 174 static CommandLine& _getInstance(); 175 175 176 void _parseCommandLine( int argc, char** argv);176 void _parseCommandLine(const std::string& cmdLine); 177 177 void _parseFile(); 178 178 void _parse(const std::vector<std::string>& arguments, bool bParsingFile); -
code/trunk/src/core/Core.cc
r3280 r3323 229 229 230 230 231 Core::Core( int argc, char** argv)231 Core::Core(const std::string& cmdLine) 232 232 { 233 233 if (singletonRef_s != 0) … … 242 242 243 243 // Parse command line arguments first 244 CommandLine::parseCommandLine( argc, argv);244 CommandLine::parseCommandLine(cmdLine); 245 245 246 246 // Determine and set the location of the executable -
code/trunk/src/core/Core.h
r3280 r3323 66 66 GeneralException 67 67 */ 68 Core( int argc, char** argv);68 Core(const std::string& cmdLine); 69 69 ~Core(); 70 70 -
code/trunk/src/core/Game.cc
r3318 r3323 110 110 Non-initialising constructor. 111 111 */ 112 Game::Game( int argc, char** argv)112 Game::Game(const std::string& cmdLine) 113 113 { 114 114 if (singletonRef_s != 0) … … 137 137 138 138 // Create the Core 139 this->core_ = new Core( argc, argv);139 this->core_ = new Core(cmdLine); 140 140 141 141 // After the core has been created, we can safely instantiate the GameStates -
code/trunk/src/core/Game.h
r3280 r3323 68 68 { 69 69 public: 70 Game( int argc, char** argv);70 Game(const std::string& cmdLine); 71 71 ~Game(); 72 72 -
code/trunk/src/orxonox/GraphicsManager.cc
r3280 r3323 278 278 boost::filesystem::path folder(ogrePluginsFolder_); 279 279 // Do some SubString magic to get the comma separated list of plugins 280 SubString plugins(ogrePlugins_, ",", " ", false, 92, false, 34, false, 40, 41, false, '\0');280 SubString plugins(ogrePlugins_, ",", " ", false, '\\', false, '"', false, '(', ')', false, '\0'); 281 281 // Use backslash paths on Windows! file_string() already does that though. 282 282 for (unsigned int i = 0; i < plugins.size(); ++i) -
code/trunk/src/orxonox/Main.cc
r3280 r3323 35 35 36 36 #include "OrxonoxPrereqs.h" 37 #include "SpecialConfig.h" 38 39 #ifdef ORXONOX_USE_WINMAIN 40 # ifndef WIN32_LEAN_AND_MEAN 41 # define WIN32_LEAN_AND_MEAN 42 # endif 43 #include <windows.h> 44 #endif 37 45 38 46 #include "util/Debug.h" … … 55 63 try 56 64 { 57 game = new Game(argc, argv); 65 #ifndef ORXONOX_USE_WINMAIN 66 std::string strCmdLine; 67 for (int i = 1; i < argc; ++i) 68 strCmdLine += argv[i] + std::string(" "); 69 #endif 70 game = new Game(strCmdLine); 58 71 59 72 game->setStateHierarchy(
Note: See TracChangeset
for help on using the changeset viewer.