Changeset 1663 for code/branches/gui/src/orxonox/gamestates
- Timestamp:
- Aug 20, 2008, 10:30:28 PM (16 years ago)
- Location:
- code/branches/gui/src/orxonox/gamestates
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/gamestates/GSLevel.cc
r1662 r1663 35 35 #include "core/input/KeyBinder.h" 36 36 #include "core/Loader.h" 37 #include "core/CommandLine.h" 37 38 #include "overlays/console/InGameConsole.h" 38 39 #include "gui/GUIManager.h" … … 45 46 namespace orxonox 46 47 { 48 SetCommandLineArgument(port, 55556).setShortcut("p"); 49 SetCommandLineArgument(ip, std::string("127.0.0.0")); 50 47 51 GSLevel::GSLevel() 48 52 : GameState("level") -
code/branches/gui/src/orxonox/gamestates/GSRoot.cc
r1662 r1663 38 38 #include "core/TclBind.h" 39 39 #include "core/Core.h" 40 #include "core/CommandLine.h" 40 41 #include "GraphicsEngine.h" 41 42 #include "Settings.h" … … 43 44 namespace orxonox 44 45 { 46 SetCommandLineArgument(dataPath, std::string("./")); 47 45 48 GSRoot::GSRoot() 46 49 : GameState("root") 50 , settings_(0) 47 51 , graphicsEngine_(0) 48 52 { … … 64 68 Factory::createClassHierarchy(); 65 69 66 const Settings::CommandLineArgument* dataPath = Settings::getCommandLineArgument("dataPath"); 67 assert(dataPath); 68 if (!dataPath->bHasDefaultValue_) 70 // instantiate Settings class 71 this->settings_ = new Settings(); 72 73 const CommandLineArgument<std::string>* dataPath = CommandLine::getCommandLineArgument<std::string>("dataPath"); 74 if (!dataPath->hasDefaultValue()) 69 75 { 70 if (*dataPath-> value_.getString().end() != '/' && *dataPath->value_.getString().end() != '\\')71 Settings::tsetDataPath(dataPath-> value_.getString() + "/");76 if (*dataPath->getValue().end() != '/' && *dataPath->getValue().end() != '\\') 77 Settings::tsetDataPath(dataPath->getValue() + "/"); 72 78 else 73 Settings::tsetDataPath(dataPath-> value_.getString());79 Settings::tsetDataPath(dataPath->getValue()); 74 80 } 75 81 … … 89 95 void GSRoot::leave() 90 96 { 91 if (this->graphicsEngine_) 92 delete graphicsEngine_; 97 delete graphicsEngine_; 98 99 delete settings_; 93 100 } 94 101 -
code/branches/gui/src/orxonox/gamestates/GSRoot.h
r1662 r1663 48 48 void leave(); 49 49 50 Settings* settings_; 50 51 GraphicsEngine* graphicsEngine_; //!< our dearest graphics engine <3 51 52 };
Note: See TracChangeset
for help on using the changeset viewer.