Changeset 2848 for code/branches/gui/src/orxonox/gamestates
- Timestamp:
- Mar 25, 2009, 7:37:00 PM (16 years ago)
- Location:
- code/branches/gui/src/orxonox/gamestates
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/gamestates/GSClient.cc
r2846 r2848 33 33 #include "core/Clock.h" 34 34 #include "core/CommandLine.h" 35 #include "core/Core.h" 35 #include "core/Game.h" 36 #include "core/GameMode.h" 36 37 #include "network/Client.h" 37 #include "core/Game.h"38 38 39 39 namespace orxonox … … 55 55 void GSClient::activate() 56 56 { 57 Core::setIsClient(true);57 GameMode::setIsClient(true); 58 58 59 59 this->client_ = new Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port")); … … 72 72 delete this->client_; 73 73 74 Core::setIsClient(false);74 GameMode::setIsClient(false); 75 75 } 76 76 -
code/branches/gui/src/orxonox/gamestates/GSDedicated.cc
r2844 r2848 32 32 #include "core/Clock.h" 33 33 #include "core/CommandLine.h" 34 #include "core/Core.h" 34 #include "core/Game.h" 35 #include "core/GameMode.h" 35 36 #include "core/Iterator.h" 36 37 #include "network/Server.h" 37 38 #include "objects/Tickable.h" 38 39 #include "util/Sleep.h" 39 #include "core/Game.h"40 40 41 41 namespace orxonox … … 56 56 void GSDedicated::activate() 57 57 { 58 Core::setHasServer(true);58 GameMode::setHasServer(true); 59 59 60 60 this->server_ = new Server(CommandLine::getValue("port")); … … 69 69 delete this->server_; 70 70 71 Core::setHasServer(false);71 GameMode::setHasServer(false); 72 72 } 73 73 -
code/branches/gui/src/orxonox/gamestates/GSGUI.cc
r2845 r2848 33 33 #include "core/Clock.h" 34 34 #include "core/ConsoleCommand.h" 35 #include "core/Game.h" 35 36 #include "core/input/InputManager.h" 36 37 #include "core/input/SimpleInputState.h" 37 38 #include "gui/GUIManager.h" 38 39 #include "GraphicsManager.h" 39 #include "core/Game.h"40 40 41 41 namespace orxonox -
code/branches/gui/src/orxonox/gamestates/GSGraphics.cc
r2847 r2848 38 38 #include "core/CoreIncludes.h" 39 39 #include "core/Game.h" 40 #include "core/GameMode.h" 40 41 #include "core/input/InputManager.h" 41 42 #include "core/input/KeyBinder.h" … … 74 75 void GSGraphics::activate() 75 76 { 76 Core::setShowsGraphics(true);77 GameMode::setShowsGraphics(true); 77 78 78 79 setConfigValues(); … … 128 129 delete graphicsManager_; 129 130 130 Core::setShowsGraphics(false);131 GameMode::setShowsGraphics(false); 131 132 } 132 133 -
code/branches/gui/src/orxonox/gamestates/GSLevel.cc
r2844 r2848 39 39 #include "core/CommandLine.h" 40 40 #include "core/ConfigValueIncludes.h" 41 #include "core/Core.h" 41 42 #include "core/CoreIncludes.h" 42 #include "core/Core.h" 43 #include "core/Game.h" 44 #include "core/GameMode.h" 43 45 #include "objects/Tickable.h" 44 46 #include "objects/Radar.h" … … 47 49 #include "LevelManager.h" 48 50 #include "PlayerManager.h" 49 #include "core/Game.h"50 51 51 52 namespace orxonox … … 83 84 setConfigValues(); 84 85 85 if ( Core::showsGraphics())86 if (GameMode::showsGraphics()) 86 87 { 87 88 inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("game"); … … 99 100 this->playerManager_ = new PlayerManager(); 100 101 101 if ( Core::isMaster())102 if (GameMode::isMaster()) 102 103 { 103 104 // create the global LevelManager … … 107 108 } 108 109 109 if ( Core::showsGraphics())110 if (GameMode::showsGraphics()) 110 111 { 111 112 // TODO: insert slomo console command with … … 149 150 //Loader::close(); 150 151 151 if ( Core::showsGraphics())152 if (GameMode::showsGraphics()) 152 153 InputManager::getInstance().requestLeaveState("game"); 153 154 154 if ( Core::isMaster())155 if (GameMode::isMaster()) 155 156 this->unloadLevel(); 156 157 … … 179 180 } 180 181 181 if ( Core::showsGraphics())182 if (GameMode::showsGraphics()) 182 183 { 183 184 inputState_->setHandler(0); … … 240 241 void GSLevel::keybindInternal(const std::string& command, bool bTemporary) 241 242 { 242 if ( Core::showsGraphics())243 if (GameMode::showsGraphics()) 243 244 { 244 245 static std::string bindingString = ""; -
code/branches/gui/src/orxonox/gamestates/GSRoot.cc
r2846 r2848 33 33 #include "util/Debug.h" 34 34 #include "core/Clock.h" 35 #include "core/Core.h" 35 #include "core/Game.h" 36 #include "core/GameMode.h" 36 37 #include "core/CommandLine.h" 37 38 #include "core/ConsoleCommand.h" … … 39 40 #include "tools/Timer.h" 40 41 #include "objects/Tickable.h" 41 #include "core/Game.h"42 42 43 43 namespace orxonox … … 142 142 void GSRoot::setTimeFactor(float factor) 143 143 { 144 if ( Core::isMaster())144 if (GameMode::isMaster()) 145 145 { 146 146 if (!this->bPaused_) … … 160 160 void GSRoot::pause() 161 161 { 162 if ( Core::isMaster())162 if (GameMode::isMaster()) 163 163 { 164 164 if (!this->bPaused_) -
code/branches/gui/src/orxonox/gamestates/GSServer.cc
r2844 r2848 31 31 32 32 #include "core/CommandLine.h" 33 #include "core/Core.h" 33 #include "core/Game.h" 34 #include "core/GameMode.h" 34 35 #include "network/Server.h" 35 #include "core/Game.h"36 36 37 37 namespace orxonox … … 53 53 void GSServer::activate() 54 54 { 55 Core::setHasServer(true);55 GameMode::setHasServer(true); 56 56 57 57 this->server_ = new Server(CommandLine::getValue("port")); … … 66 66 delete this->server_; 67 67 68 Core::setHasServer(false);68 GameMode::setHasServer(false); 69 69 } 70 70 -
code/branches/gui/src/orxonox/gamestates/GSStandalone.cc
r2844 r2848 32 32 #include <OgreViewport.h> 33 33 #include <OgreCamera.h> 34 #include "core/Core.h" 34 #include "core/Game.h" 35 #include "core/GameMode.h" 35 36 #include "core/ConsoleCommand.h" 36 37 #include "gui/GUIManager.h" 37 38 #include "GraphicsManager.h" 38 #include "core/Game.h"39 39 40 40 namespace orxonox … … 54 54 void GSStandalone::activate() 55 55 { 56 Core::setIsStandalone(true);56 GameMode::setIsStandalone(true); 57 57 58 58 guiManager_ = GUIManager::getInstancePtr(); … … 63 63 void GSStandalone::deactivate() 64 64 { 65 Core::setIsStandalone(false);65 GameMode::setIsStandalone(false); 66 66 } 67 67
Note: See TracChangeset
for help on using the changeset viewer.