Changeset 3358 for code/branches/resource/src/orxonox/gamestates
- Timestamp:
- Jul 27, 2009, 2:42:37 PM (15 years ago)
- Location:
- code/branches/resource/src/orxonox/gamestates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource/src/orxonox/gamestates/GSGraphics.cc
r3357 r3358 68 68 masterInputState_ = InputManager::getInstance().createInputState("master", true); 69 69 masterKeyBinder_ = new KeyBinder(); 70 masterInputState_->setKeyHandler(masterKeyBinder_); 70 71 } 71 72 … … 99 100 100 101 masterKeyBinder_->loadBindings("masterKeybindings.ini"); 101 masterInputState_->setKeyHandler(masterKeyBinder_);102 102 103 103 // Load the SoundManager -
code/branches/resource/src/orxonox/gamestates/GSRoot.cc
r3355 r3358 30 30 31 31 #include "core/Clock.h" 32 #include "core/CommandLine.h"33 32 #include "core/ConsoleCommand.h" 34 33 #include "core/Game.h" … … 46 45 { 47 46 DeclareGameState(GSRoot, "root", false, false); 48 SetCommandLineSwitch(console).information("Start in console mode (text IO only)");49 // Shortcuts for easy direct loading50 SetCommandLineSwitch(server).information("Start in server mode");51 SetCommandLineSwitch(client).information("Start in client mode");52 SetCommandLineSwitch(dedicated).information("Start in dedicated server mode");53 SetCommandLineSwitch(standalone).information("Start in standalone mode");54 47 55 48 GSRoot::GSRoot(const GameStateInfo& info) … … 95 88 // create the global LevelManager 96 89 this->levelManager_ = new LevelManager(); 97 98 // Load level directly?99 bool loadLevel = false;100 if (CommandLine::getValue("standalone").getBool())101 {102 Game::getInstance().requestStates("graphics, standalone, level");103 loadLevel = true;104 }105 if (CommandLine::getValue("server").getBool())106 {107 Game::getInstance().requestStates("graphics, server, level");108 loadLevel = true;109 }110 if (CommandLine::getValue("client").getBool())111 {112 Game::getInstance().requestStates("graphics, client, level");113 loadLevel = true;114 }115 if (CommandLine::getValue("dedicated").getBool())116 {117 Game::getInstance().requestStates("dedicated, level");118 loadLevel = true;119 }120 121 // Determine where to start otherwise122 if (!loadLevel && !CommandLine::getValue("console").getBool())123 {124 // Also load graphics125 Game::getInstance().requestState("graphics");126 }127 90 } 128 91
Note: See TracChangeset
for help on using the changeset viewer.