Changeset 3196 for code/trunk/src/orxonox
- Timestamp:
- Jun 20, 2009, 9:20:47 AM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 21 deleted
- 341 edited
- 17 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/pch (added) merged: 3114-3118,3124-3125,3127-3131,3133,3138-3194
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/CMakeLists.txt
r3110 r3196 28 28 ADD_SUBDIRECTORY(gamestates) 29 29 ADD_SUBDIRECTORY(gui) 30 ADD_SUBDIRECTORY(interfaces) 30 31 ADD_SUBDIRECTORY(objects) 31 32 ADD_SUBDIRECTORY(overlays) 33 ADD_SUBDIRECTORY(sound) 32 34 ADD_SUBDIRECTORY(tools) 33 ADD_SUBDIRECTORY(sound)34 GET_ALL_HEADER_FILES(ORXONOX_HDR_FILES)35 SET(ORXONOX_FILES ${ORXONOX_SRC_FILES} ${ORXONOX_HDR_FILES})36 35 37 GENERATE_SOURCE_GROUPS(${ORXONOX_FILES}) 38 GENERATE_TOLUA_BINDINGS(Orxonox ORXONOX_FILES INPUTFILES gui/GUIManager.h objects/quest/QuestManager.h objects/quest/QuestDescription.h objects/pickup/PickupInventory.h objects/pickup/BaseItem.h) 36 # Translate argument 37 IF(ORXONOX_USE_WINMAIN) 38 SET(ORXONOX_WIN32 WIN32) 39 ENDIF() 39 40 40 ADD_EXECUTABLE(orxonox ${ORXONOX_FILES}) 41 ORXONOX_ADD_EXECUTABLE(orxonox 42 FIND_HEADER_FILES 43 TOLUA_FILES 44 gui/GUIManager.h 45 objects/pickup/BaseItem.h 46 objects/pickup/PickupInventory.h 47 objects/quest/QuestDescription.h 48 objects/quest/QuestManager.h 49 PCH_FILE 50 OrxonoxPrecompiledHeaders.h 51 PCH_NO_DEFAULT 52 # When defined as WIN32 this removes the console window on Windows 53 ${ORXONOX_WIN32} 54 LINK_LIBRARIES 55 ${OGRE_LIBRARY} 56 ${CEGUI_LIBRARY} 57 ${LUA_LIBRARIES} 58 ${CEGUILUA_LIBRARY} 59 ${Boost_SYSTEM_LIBRARY} 60 ${OPENAL_LIBRARY} 61 ${ALUT_LIBRARY} 62 ${VORBISFILE_LIBRARY} 63 ${VORBIS_LIBRARY} 64 ${OGG_LIBRARY} 65 ogreceguirenderer_orxonox 66 tinyxml++_orxonox 67 tolua++_orxonox 68 bullet_orxonox 69 util 70 core 71 network 72 SOURCE_FILES ${ORXONOX_SRC_FILES} 73 ) 74 41 75 GET_TARGET_PROPERTY(_exec_loc orxonox LOCATION) 42 76 GET_FILENAME_COMPONENT(_exec_name ${_exec_loc} NAME) 43 77 SET(ORXONOX_EXECUTABLE_NAME ${_exec_name} CACHE INTERNAL "") 44 45 TARGET_LINK_LIBRARIES(orxonox46 ${OGRE_LIBRARY}47 ${CEGUI_LIBRARY}48 ${LUA_LIBRARIES}49 ${CEGUILUA_LIBRARY}50 ${Boost_SYSTEM_LIBRARY}51 ${OPENAL_LIBRARY}52 ${ALUT_LIBRARY}53 ${VORBISFILE_LIBRARY}54 ${VORBIS_LIBRARY}55 ${OGG_LIBRARY}56 ogreceguirenderer_orxonox57 tinyxml++_orxonox58 tolua++_orxonox59 bullet_orxonox60 util61 core62 network63 )64 65 ORXONOX_INSTALL(orxonox)66 78 67 79 … … 81 93 STRING(REGEX REPLACE "^Visual Studio ([0-9][0-9]?) .*$" "\\1" 82 94 VISUAL_STUDIO_VERSION_SIMPLE "${CMAKE_GENERATOR}") 83 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/orxonox.vcproj.user " "${CMAKE_CURRENT_BINARY_DIR}/orxonox.vcproj.user")95 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/orxonox.vcproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/orxonox.vcproj.user") 84 96 ENDIF(MSVC) -
code/trunk/src/orxonox/CameraManager.cc
r3110 r3196 30 30 #include <OgreSceneManager.h> 31 31 #include <OgreViewport.h> 32 #include <OgreCamera.h>33 32 #include <OgreCompositorManager.h> 34 #include <OgreResource.h>35 33 34 #include "util/String.h" 36 35 #include "core/GameMode.h" 37 #include "core/Iterator.h" 36 #include "core/ObjectList.h" 37 #include "tools/Shader.h" 38 38 #include "objects/worldentities/Camera.h" 39 39 #include "objects/Scene.h" 40 #include "tools/Shader.h"41 #include "util/String.h"42 40 #include "gui/GUIManager.h" 43 41 -
code/trunk/src/orxonox/CameraManager.h
r3068 r3196 40 40 #include <cassert> 41 41 #include <list> 42 #include <OgrePrerequisites.h>42 #include "util/OgreForwardRefs.h" 43 43 44 44 namespace orxonox … … 55 55 void releaseFocus(Camera* camera); 56 56 57 void useCamera(Ogre::Camera* camera); 58 57 59 static CameraManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; } 58 60 static CameraManager* getInstancePtr() { return singletonRef_s; } 59 61 60 void useCamera(Ogre::Camera* camera); 62 private: 63 CameraManager(const CameraManager&); // don't use 61 64 62 private: 63 CameraManager(const CameraManager&); 64 65 std::list<Camera*> cameraList_; 66 Ogre::Viewport* viewport_; 67 Ogre::Camera* fallbackCamera_; 65 std::list<Camera*> cameraList_; 66 Ogre::Viewport* viewport_; 67 Ogre::Camera* fallbackCamera_; 68 68 69 69 static CameraManager* singletonRef_s; -
code/trunk/src/orxonox/GraphicsManager.cc
r3110 r3196 52 52 53 53 #include "SpecialConfig.h" 54 #include "util/Debug.h"55 54 #include "util/Exception.h" 56 55 #include "util/String.h" … … 63 62 #include "core/Game.h" 64 63 #include "core/GameMode.h" 65 #include "tools/WindowEventListener.h"66 64 #include "tools/ParticleInterface.h" 65 #include "interfaces/WindowEventListener.h" 66 67 // HACK! 68 #include "overlays/map/Map.h" 67 69 68 70 namespace orxonox … … 88 90 , viewport_(0) 89 91 , ogreWindowEventListener_(0) 90 , avgTickTime_(0.0f)91 , avgFramesPerSecond_(0.0f)92 92 { 93 93 RegisterObject(GraphicsManager); … … 144 144 // Ogre::RenderSystem* renderer = this->ogreRoot_->getRenderSystem(); 145 145 // renderer->destroyRenderWindow("Orxonox"); 146 147 // HACK! This fixes an exit crash 148 Map::hackDestroyMap(); 146 149 147 150 // unload all compositors -
code/trunk/src/orxonox/GraphicsManager.h
r2896 r3196 39 39 #include "OrxonoxPrereqs.h" 40 40 41 #include <cassert> 41 42 #include <string> 42 #include <cassert>43 43 #include <OgreLog.h> 44 45 44 #include "core/OrxonoxClass.h" 46 45 … … 66 65 { return this->detailLevelParticle_; } 67 66 68 inline Ogre::Viewport* getViewport() const67 inline Ogre::Viewport* getViewport() 69 68 { return this->viewport_; } 70 69 inline Ogre::RenderWindow* getRenderWindow() … … 73 72 void setCamera(Ogre::Camera* camera); 74 73 75 static GraphicsManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; } 74 inline static GraphicsManager& getInstance() 75 { assert(singletonRef_s); return *singletonRef_s; } 76 76 77 77 private: … … 101 101 OgreWindowEventListener* ogreWindowEventListener_; 102 102 103 // stats (Hack)104 float avgTickTime_; //!< time in ms to tick() one frame105 float avgFramesPerSecond_; //!< number of frames processed in one second106 107 103 // config values 108 104 unsigned int detailLevelParticle_; //!< Detail level of particle effects (0: off, 1: low, 2: normal, 3: high) -
code/trunk/src/orxonox/LevelManager.cc
r3110 r3196 29 29 #include "LevelManager.h" 30 30 31 #include <map> 31 32 #include "PlayerManager.h" 32 33 #include "objects/Level.h" -
code/trunk/src/orxonox/LevelManager.h
r2171 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <cassert> 34 35 #include <list> 35 #include <map>36 #include <cassert>37 36 38 37 namespace orxonox … … 57 56 58 57 std::list<Level*> levels_s; 58 59 59 static LevelManager* singletonRef_s; 60 60 }; -
code/trunk/src/orxonox/Main.cc
r3110 r3196 28 28 */ 29 29 30 /** 31 @mainpage Orxonox Documentation 32 */ 30 /** 31 @file 32 @brief 33 Entry point of the program. 34 */ 33 35 34 /** 35 @file 36 @brief Entry point of the program. 37 */ 38 39 #include "OrxonoxConfig.h" 36 #include "OrxonoxPrereqs.h" 40 37 41 38 #include "util/Debug.h" … … 47 44 Main method. Game starts here (except for static initialisations). 48 45 */ 46 #ifdef ORXONOX_USE_WINMAIN 47 INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT) 48 #else 49 49 int main(int argc, char** argv) 50 #endif 50 51 { 51 52 { -
code/trunk/src/orxonox/OrxonoxPrereqs.h
r3099 r3196 247 247 template <class T> 248 248 class Timer; 249 class DynamicLines;250 class DynamicRenderable;251 249 252 250 // overlays … … 254 252 class DebugFPSText; 255 253 class DebugRTRText; 254 class GUIOverlay; 256 255 class HUDBar; 257 256 class HUDNavigation; … … 288 287 namespace Ogre 289 288 { 290 // some got forgotten in OgrePrerequisites 291 class BorderPanelOverlayElement; 292 class PanelOverlayElement; 293 class TextAreaOverlayElement; 289 // OGRE Wiki adapted code 290 class DynamicLines; 291 class DynamicRenderable; 294 292 } 295 293 296 294 namespace CEGUI 297 295 { 296 class DefaultLogger; 298 297 class LuaScriptModule; 299 298 … … 304 303 305 304 // Bullet Physics Engine 306 307 305 class btTransform; 308 306 class btVector3; … … 324 322 class btSequentialImpulseConstraintSolver; 325 323 326 // lua 324 // ALUT 325 typedef struct ALCcontext_struct ALCcontext; 326 typedef struct ALCdevice_struct ALCdevice; 327 typedef unsigned int ALuint; 328 typedef int ALint; 329 330 // Lua 327 331 struct lua_State; 328 332 -
code/trunk/src/orxonox/PawnManager.cc
r3110 r3196 31 31 #include "core/CoreIncludes.h" 32 32 #include "objects/worldentities/pawns/Pawn.h" 33 34 33 35 34 namespace orxonox -
code/trunk/src/orxonox/PawnManager.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 #include " objects/Tickable.h"33 #include "interfaces/Tickable.h" 34 34 35 35 namespace orxonox -
code/trunk/src/orxonox/PlayerManager.cc
r3110 r3196 29 29 #include "PlayerManager.h" 30 30 31 #include " LevelManager.h"31 #include "core/CoreIncludes.h" 32 32 #include "core/GameMode.h" 33 #include "core/CoreIncludes.h"34 33 #include "objects/Level.h" 35 34 #include "objects/infos/HumanPlayer.h" 35 #include "LevelManager.h" 36 36 37 37 namespace orxonox -
code/trunk/src/orxonox/PlayerManager.h
r2662 r3196 44 44 virtual ~PlayerManager(); 45 45 46 static PlayerManager& getInstance()47 { assert(singletonRef_s); return *singletonRef_s; }46 inline static PlayerManager& getInstance() 47 { assert(singletonRef_s); return *singletonRef_s; } 48 48 49 49 PlayerInfo* getClient(unsigned int clientID) const; -
code/trunk/src/orxonox/gamestates/GSClient.cc
r3110 r3196 29 29 #include "GSClient.h" 30 30 31 #include " core/input/InputManager.h"31 #include "util/Exception.h" 32 32 #include "core/Clock.h" 33 33 #include "core/CommandLine.h" -
code/trunk/src/orxonox/gamestates/GSClient.h
r2896 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "core/GameState.h" 34 35 #include "network/NetworkPrereqs.h" -
code/trunk/src/orxonox/gamestates/GSDedicated.cc
r3110 r3196 29 29 #include "GSDedicated.h" 30 30 31 #include "util/Debug.h" 32 #include "util/Sleep.h" 31 33 #include "core/Clock.h" 32 34 #include "core/CommandLine.h" 33 35 #include "core/Game.h" 34 36 #include "core/GameMode.h" 35 #include "core/Iterator.h"36 37 #include "network/Server.h" 37 #include "objects/Tickable.h"38 #include "util/Sleep.h"39 38 40 39 namespace orxonox -
code/trunk/src/orxonox/gamestates/GSDedicated.h
r2896 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "core/GameState.h" 34 35 #include "network/NetworkPrereqs.h" -
code/trunk/src/orxonox/gamestates/GSGraphics.cc
r3110 r3196 28 28 29 29 /** 30 @file 31 @brief Implementation of Graphics GameState class. 30 @file 31 @brief 32 Implementation of Graphics GameState class. 32 33 */ 33 34 … … 37 38 #include <OgreRenderWindow.h> 38 39 39 #include "util/Debug.h"40 40 #include "core/ConfigValueIncludes.h" 41 41 #include "core/Clock.h" … … 52 52 #include "overlays/console/InGameConsole.h" 53 53 #include "gui/GUIManager.h" 54 #include "sound/SoundManager.h" 54 55 #include "GraphicsManager.h" 55 56 … … 64 65 , guiManager_(0) 65 66 , graphicsManager_(0) 67 , soundManager_(0) 66 68 , masterKeyBinder_(0) 67 69 , masterInputState_(0) … … 95 97 \li creates input manager 96 98 \li loads master key bindings 99 \li loads the SoundManager 97 100 \li loads ingame console 98 101 \li loads GUI interface (GUIManager) … … 128 131 masterKeyBinder_->loadBindings("masterKeybindings.ini"); 129 132 masterInputState_->setKeyHandler(masterKeyBinder_); 133 134 // Load the SoundManager 135 soundManager_ = new SoundManager(); 130 136 131 137 // Load the InGameConsole … … 173 179 delete this->debugOverlay_; 174 180 181 delete this->soundManager_; 182 175 183 delete this->inputManager_; 176 184 this->inputManager_ = 0; -
code/trunk/src/orxonox/gamestates/GSGraphics.h
r3084 r3196 27 27 */ 28 28 29 /** 30 @file 31 @brief Declaration of the Graphics GameState class. 32 */ 29 /** 30 @file 31 @brief 32 Declaration of the Graphics GameState class. 33 */ 33 34 34 35 #ifndef _GSGraphics_H__ … … 36 37 37 38 #include "OrxonoxPrereqs.h" 39 38 40 #include "core/GameState.h" 39 #include " tools/WindowEventListener.h"41 #include "interfaces/WindowEventListener.h" 40 42 41 43 namespace orxonox 42 44 { 43 45 /** 44 @class GSGraphics45 46 @brief 46 Game state used when displaying graphics of any kind 47 Game state used when displaying graphics of any kind. Another blubb resides here. 47 48 48 49 This game state is only left out if we start a dedicated server where no graphics are present. … … 71 72 GUIManager* guiManager_; //!< Interface to GUI 72 73 GraphicsManager* graphicsManager_; //!< Interface to Ogre 74 SoundManager* soundManager_; //!< Keeps track of SoundBase objects 73 75 74 76 KeyBinder* masterKeyBinder_; //!< Key binder for master key bindings -
code/trunk/src/orxonox/gamestates/GSIOConsole.cc
r3110 r3196 30 30 31 31 #include <iostream> 32 #include <OgreFrameListener.h>33 #include <OgreRoot.h>34 #include <OgreTimer.h>35 32 36 33 #include "core/ConsoleCommand.h" -
code/trunk/src/orxonox/gamestates/GSLevel.cc
r3110 r3196 33 33 #include "core/input/SimpleInputState.h" 34 34 #include "core/input/KeyBinder.h" 35 #include "core/Loader.h" 36 #include "core/XMLFile.h" 37 #include "core/CommandExecutor.h" 35 #include "core/Clock.h" 36 #include "core/CommandLine.h" 38 37 #include "core/ConsoleCommand.h" 39 #include "core/CommandLine.h"40 38 #include "core/ConfigValueIncludes.h" 41 #include "core/Core.h"42 39 #include "core/CoreIncludes.h" 43 40 #include "core/Game.h" 44 41 #include "core/GameMode.h" 45 #include "objects/Tickable.h" 42 #include "core/Core.h" 43 #include "core/Loader.h" 44 #include "core/XMLFile.h" 45 46 #include "interfaces/Tickable.h" 46 47 #include "objects/Radar.h" 48 #include "objects/quest/QuestManager.h" 49 #include "overlays/notifications/NotificationManager.h" 50 #include "gui/GUIManager.h" 47 51 #include "CameraManager.h" 48 52 #include "GraphicsManager.h" 49 53 #include "LevelManager.h" 50 54 #include "PlayerManager.h" 51 #include "gui/GUIManager.h"52 #include "objects/quest/QuestManager.h"53 #include "overlays/notifications/NotificationManager.h"54 55 55 56 namespace orxonox … … 148 149 if (show) 149 150 { 150 GUIManager::getInstance Ptr()->showGUI("inGameTest");151 GUIManager::getInstance Ptr()->executeCode("showCursor()");151 GUIManager::getInstance().showGUI("inGameTest"); 152 GUIManager::getInstance().executeCode("showCursor()"); 152 153 InputManager::getInstance().requestEnterState("guiMouseOnly"); 153 154 } 154 155 else 155 156 { 156 GUIManager::getInstance Ptr()->executeCode("hideGUI(\"inGameTest\")");157 GUIManager::getInstance Ptr()->executeCode("hideCursor()");157 GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")"); 158 GUIManager::getInstance().executeCode("hideCursor()"); 158 159 InputManager::getInstance().requestLeaveState("guiMouseOnly"); 159 160 } -
code/trunk/src/orxonox/gamestates/GSLevel.h
r3008 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <string> 33 35 #include "core/OrxonoxClass.h" 34 36 #include "core/GameState.h" … … 48 50 49 51 static void showIngameGUI(bool show); 50 static void setLevel(std::string levelName);51 52 52 53 static XMLFile* startFile_s; … … 69 70 LevelManager* levelManager_; //!< global level manager 70 71 PlayerManager* playerManager_; //!< player manager for this level 71 QuestManager* 72 QuestManager* questManager_; 72 73 NotificationManager* notificationManager_; 73 74 -
code/trunk/src/orxonox/gamestates/GSMainMenu.cc
r3110 r3196 29 29 #include "GSMainMenu.h" 30 30 31 //#include <OgreViewport.h>32 31 #include <OgreSceneManager.h> 32 33 #include "core/input/InputManager.h" 34 #include "core/input/SimpleInputState.h" 35 #include "core/Game.h" 33 36 #include "core/Clock.h" 34 37 #include "core/ConsoleCommand.h" 35 #include "core/Game.h" 36 #include "core/input/InputManager.h" 37 #include "core/input/SimpleInputState.h" 38 #include "objects/Scene.h" 38 39 #include "gui/GUIManager.h" 39 #include " objects/Scene.h"40 #include "sound/SoundMainMenu.h" 40 41 #include "GraphicsManager.h" 41 #include "sound/SoundMainMenu.h"42 42 43 43 namespace orxonox -
code/trunk/src/orxonox/gamestates/GSMainMenu.h
r3094 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 #include <OgrePrerequisites.h> 33 34 #include "util/OgreForwardRefs.h" 34 35 #include "core/GameState.h" 35 36 -
code/trunk/src/orxonox/gamestates/GSRoot.cc
r3110 r3196 29 29 #include "GSRoot.h" 30 30 31 #include "util/Exception.h"32 #include "util/Debug.h"33 31 #include "core/Clock.h" 32 #include "core/CommandLine.h" 33 #include "core/ConsoleCommand.h" 34 34 #include "core/Game.h" 35 35 #include "core/GameMode.h" 36 #include "core/CommandLine.h"37 #include "core/ConsoleCommand.h"38 #include "tools/TimeFactorListener.h"39 36 #include "tools/Timer.h" 40 #include "objects/Tickable.h" 37 #include "interfaces/TimeFactorListener.h" 38 #include "interfaces/Tickable.h" 41 39 42 40 namespace orxonox -
code/trunk/src/orxonox/gamestates/GSRoot.h
r3084 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 #include "core/GameState.h" 34 #include "core/OrxonoxClass.h"35 34 36 35 namespace orxonox -
code/trunk/src/orxonox/gamestates/GSServer.cc
r3110 r3196 29 29 #include "GSServer.h" 30 30 31 #include "util/Debug.h" 31 32 #include "core/CommandLine.h" 32 33 #include "core/Game.h" -
code/trunk/src/orxonox/gamestates/GSServer.h
r2896 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "core/GameState.h" 34 35 #include "network/NetworkPrereqs.h" -
code/trunk/src/orxonox/gamestates/GSStandalone.cc
r3110 r3196 29 29 #include "GSStandalone.h" 30 30 31 #include <OgreViewport.h>32 #include <OgreCamera.h>33 31 #include "core/Game.h" 34 32 #include "core/GameMode.h" 35 #include "core/ConsoleCommand.h"36 #include "gui/GUIManager.h"37 #include "GraphicsManager.h"38 33 39 34 namespace orxonox -
code/trunk/src/orxonox/gui/GUIManager.cc
r3110 r3196 24 24 * Benjamin Knecht 25 25 * Co-authors: 26 * 26 * ... 27 27 * 28 28 */ 29 29 30 30 /** 31 32 33 31 @file 32 @brief 33 Implementation of the GUIManager class. 34 34 */ 35 35 36 36 #include "GUIManager.h" 37 37 38 #include <boost/filesystem/path.hpp> 39 #include < OgreRenderWindow.h>40 #include <CEGUI.h> 38 extern "C" { 39 #include <lua.h> 40 } 41 41 #include <CEGUIDefaultLogger.h> 42 #include <CEGUIExceptions.h> 43 #include <CEGUIInputEvent.h> 44 #include <CEGUIResourceProvider.h> 45 #include <CEGUISystem.h> 42 46 #include <ogreceguirenderer/OgreCEGUIRenderer.h> 47 43 48 #include "SpecialConfig.h" // Configures the macro below 44 49 #ifdef CEGUILUA_USE_INTERNAL_LIBRARY … … 49 54 50 55 #include "util/Exception.h" 51 #include "core/ConsoleCommand.h"52 56 #include "core/Core.h" 53 57 #include "core/Clock.h" … … 56 60 #include "core/Loader.h" 57 61 58 extern "C" {59 #include <lua.h>60 }61 62 62 namespace orxonox 63 63 { 64 static CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button); 64 65 GUIManager* GUIManager::singletonRef_s = 0; 65 66 … … 139 140 140 141 // Create our own logger to specify the filepath 141 boost::filesystem::path ceguiLogFilepath(Core::getLogPath() / "cegui.log");142 142 this->ceguiLogger_ = new DefaultLogger(); 143 this->ceguiLogger_->setLogFilename( ceguiLogFilepath.string());143 this->ceguiLogger_->setLogFilename(Core::getLogPathString() + "cegui.log"); 144 144 // set the log level according to ours (translate by subtracting 1) 145 145 this->ceguiLogger_->setLoggingLevel( … … 271 271 Returns false if the Overlay was already present. 272 272 */ 273 bool GUIManager::registerOverlay( std::stringname, GUIOverlay* overlay)273 bool GUIManager::registerOverlay(const std::string& name, GUIOverlay* overlay) 274 274 { 275 275 return (this->guiOverlays_.insert(std::pair<std::string, GUIOverlay*>(name, overlay))).second; … … 284 284 Returns a pointer to the GUIOverlay. 285 285 */ 286 GUIOverlay* GUIManager::getOverlay( std::stringname)286 GUIOverlay* GUIManager::getOverlay(const std::string& name) 287 287 { 288 288 return (this->guiOverlays_.find(name))->second; … … 340 340 } 341 341 342 void GUIManager::keyPressed(const KeyEvent& evt) 343 { 344 guiSystem_->injectKeyDown(evt.key); guiSystem_->injectChar(evt.text); 345 } 346 void GUIManager::keyReleased(const KeyEvent& evt) 347 { 348 guiSystem_->injectKeyUp(evt.key); 349 } 350 342 351 /** 343 352 @brief … … 382 391 COUT(1) << ex.getMessage() << std::endl; 383 392 } 393 } 394 395 void GUIManager::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize) 396 { 397 guiSystem_->injectMouseMove(static_cast<float>(rel.x), static_cast<float>(rel.y)); 398 } 399 void GUIManager::mouseScrolled(int abs, int rel) 400 { 401 guiSystem_->injectMouseWheelChange(static_cast<float>(rel)); 384 402 } 385 403 … … 394 412 Simple convertion from mouse event code in Orxonox to the one used in CEGUI. 395 413 */ 396 inline CEGUI::MouseButton GUIManager::convertButton(MouseButtonCode::ByEnum button)414 static inline CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button) 397 415 { 398 416 switch (button) -
code/trunk/src/orxonox/gui/GUIManager.h
r3008 r3196 22 22 * Author: 23 23 * Reto Grieder 24 * Benjamin Knecht 24 25 * Co-authors: 25 * Benjamin Knecht26 * ... 26 27 * 27 28 */ 28 29 29 30 /** 30 @file 31 @brief Declaration of the GUIManager class. 31 @file 32 @brief 33 Declaration of the GUIManager class. 32 34 */ 33 35 … … 36 38 37 39 #include "OrxonoxPrereqs.h" 38 #include <OgrePrerequisites.h> 40 41 #include <map> 42 #include <string> 39 43 #include <CEGUIForwardRefs.h> 40 #include <CEGUIInputEvent.h> 41 #include <CEGUISystem.h>44 45 #include "util/OgreForwardRefs.h" 42 46 #include "core/input/InputInterfaces.h" 43 #include <map>44 #include "overlays/GUIOverlay.h"45 46 // Forward declaration47 namespace CEGUI { class DefaultLogger; }48 47 49 48 // tolua_begin … … 89 88 void executeCode(const std::string& str); 90 89 91 bool registerOverlay( std::stringname, GUIOverlay* overlay); //!< Register a GUIOverlay with the GUIManager.92 GUIOverlay* getOverlay( std::stringname); // Get the GUIOverlay of the GUI with the given name.90 bool registerOverlay(const std::string& name, GUIOverlay* overlay); //!< Register a GUIOverlay with the GUIManager. 91 GUIOverlay* getOverlay(const std::string& name); // Get the GUIOverlay of the GUI with the given name. 93 92 94 93 void setCamera(Ogre::Camera* camera); … … 105 104 106 105 // keyHandler functions 107 void keyPressed (const KeyEvent& evt) 108 { guiSystem_->injectKeyDown(evt.key); guiSystem_->injectChar(evt.text); } 109 void keyReleased(const KeyEvent& evt) 110 { guiSystem_->injectKeyUp(evt.key); } 106 void keyPressed (const KeyEvent& evt); 107 void keyReleased(const KeyEvent& evt); 111 108 void keyHeld (const KeyEvent& evt) { } 112 109 … … 115 112 void mouseButtonReleased(MouseButtonCode::ByEnum id); 116 113 void mouseButtonHeld (MouseButtonCode::ByEnum id) { } 117 void mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize) 118 { guiSystem_->injectMouseMove(rel.x, rel.y); } 119 void mouseScrolled (int abs, int rel) 120 { guiSystem_->injectMouseWheelChange(rel);} 114 void mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize); 115 void mouseScrolled (int abs, int rel); 121 116 122 117 void updateInput(float dt) { } 123 118 void updateKey (float dt) { } 124 119 void updateMouse(float dt) { } 125 126 static CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button);127 120 128 121 Ogre::RenderWindow* renderWindow_; //!< Ogre's render window to give CEGUI access to it -
code/trunk/src/orxonox/objects/CMakeLists.txt
r3099 r3196 3 3 EventDispatcher.cc 4 4 EventTarget.cc 5 GametypeMessageListener.cc6 5 GlobalShader.cc 7 6 Level.cc 8 7 Radar.cc 9 RadarListener.cc10 RadarViewable.cc11 Teamcolourable.cc12 Tickable.cc13 8 Scene.cc 14 9 Script.cc -
code/trunk/src/orxonox/objects/EventDispatcher.cc
r3110 r3196 32 32 #include "core/EventIncludes.h" 33 33 #include "core/XMLPort.h" 34 #include "core/EventIncludes.h"35 34 #include "EventTarget.h" 36 35 -
code/trunk/src/orxonox/objects/EventDispatcher.h
r2087 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <list> 33 35 #include "core/BaseObject.h" 34 36 -
code/trunk/src/orxonox/objects/EventListener.cc
r3110 r3196 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "core/EventIncludes.h"33 32 #include "core/XMLPort.h" 34 33 -
code/trunk/src/orxonox/objects/EventListener.h
r2087 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <string> 33 35 #include "core/BaseObject.h" 34 36 #include "core/XMLNameListener.h" -
code/trunk/src/orxonox/objects/EventTarget.cc
r3110 r3196 28 28 29 29 #include "EventTarget.h" 30 31 30 #include "core/CoreIncludes.h" 32 #include "core/EventIncludes.h"33 31 34 32 namespace orxonox -
code/trunk/src/orxonox/objects/EventTarget.h
r2087 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "core/BaseObject.h" 34 35 #include "core/XMLNameListener.h" -
code/trunk/src/orxonox/objects/GlobalShader.cc
r3110 r3196 29 29 #include "GlobalShader.h" 30 30 31 #include "util/Exception.h" 31 32 #include "core/CoreIncludes.h" 32 33 #include "core/XMLPort.h" 33 34 #include "objects/Scene.h" 34 #include "util/Exception.h"35 35 36 36 namespace orxonox -
code/trunk/src/orxonox/objects/Level.cc
r3110 r3196 29 29 #include "Level.h" 30 30 31 #include "util/Math.h" 32 #include "core/Core.h" 31 33 #include "core/CoreIncludes.h" 34 #include "core/Loader.h" 35 #include "core/Template.h" 36 #include "core/XMLFile.h" 32 37 #include "core/XMLPort.h" 33 #include "core/Loader.h"34 #include "core/XMLFile.h"35 #include "core/Template.h"36 #include "core/Core.h"37 38 38 #include "LevelManager.h"39 39 #include "objects/infos/PlayerInfo.h" 40 40 #include "objects/gametypes/Gametype.h" 41 41 #include "overlays/OverlayGroup.h" 42 42 #include "sound/SoundBase.h" 43 44 #include "util/Math.h" 43 #include "LevelManager.h" 45 44 46 45 namespace orxonox -
code/trunk/src/orxonox/objects/Level.h
r3068 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <list> 35 #include <string> 36 #include "core/BaseObject.h" 34 37 #include "network/synchronisable/Synchronisable.h" 35 #include "core/BaseObject.h"36 38 37 39 namespace orxonox -
code/trunk/src/orxonox/objects/Radar.cc
r3110 r3196 28 28 29 29 /** 30 31 30 @file 31 @brief 32 32 */ 33 33 34 34 #include "Radar.h" 35 #include <cfloat> 35 36 36 #include <cassert> 37 #include "core/CoreIncludes.h" 37 38 //#include "util/Math.h" 38 39 #include "core/ConsoleCommand.h" 39 #include "core/ Iterator.h"40 #include " RadarListener.h"40 #include "core/ObjectList.h" 41 #include "interfaces/RadarListener.h" 41 42 42 43 namespace orxonox -
code/trunk/src/orxonox/objects/Radar.h
r1818 r3196 28 28 29 29 /** 30 31 30 @file 31 @brief 32 32 */ 33 33 … … 39 39 #include <map> 40 40 #include <string> 41 #include "core/Iterator.h" 42 #include "core/O rxonoxClass.h"43 #include " objects/Tickable.h"44 #include " RadarViewable.h"41 42 #include "core/ObjectListIterator.h" 43 #include "interfaces/RadarViewable.h" 44 #include "interfaces/Tickable.h" 45 45 46 46 namespace orxonox -
code/trunk/src/orxonox/objects/Scene.cc
r3110 r3196 31 31 32 32 #include <OgreRoot.h> 33 #include <OgreSceneManager.h> 33 34 #include <OgreSceneManagerEnumerator.h> 34 35 #include <OgreSceneNode.h> 35 36 36 #include "BulletCollision/BroadphaseCollision/btAxisSweep3.h"37 #include "BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h"38 #include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"39 #include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h"37 #include <BulletCollision/BroadphaseCollision/btAxisSweep3.h> 38 #include <BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h> 39 #include <BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h> 40 #include <BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h> 40 41 41 42 #include "core/CoreIncludes.h" … … 58 59 if (GameMode::showsGraphics()) 59 60 { 60 if (Ogre::Root::getSingletonPtr()) 61 { 62 this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC); 63 this->rootSceneNode_ = this->sceneManager_->getRootSceneNode(); 64 } 65 else 66 { 67 this->sceneManager_ = 0; 68 this->rootSceneNode_ = 0; 69 } 61 assert(Ogre::Root::getSingletonPtr()); 62 this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC); 63 this->rootSceneNode_ = this->sceneManager_->getRootSceneNode(); 70 64 } 71 65 else … … 94 88 if (this->isInitialized()) 95 89 { 96 if (Ogre::Root::getSingletonPtr()) 97 { 90 if (GameMode::showsGraphics()) 98 91 Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_); 99 } 100 else if (!GameMode::showsGraphics()) 101 { 92 else 102 93 delete this->sceneManager_; 103 }104 94 105 95 this->setPhysicalWorld(false); … … 112 102 113 103 XMLPortParam(Scene, "skybox", setSkybox, getSkybox, xmlelement, mode); 114 XMLPortParam(Scene, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2 , 0.2, 0.2, 1));104 XMLPortParam(Scene, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2f, 0.2f, 0.2f, 1.0f)); 115 105 XMLPortParam(Scene, "shadow", setShadow, getShadow, xmlelement, mode).defaultValues(true); 116 106 … … 139 129 { 140 130 CCOUT(2) << "Warning: Setting the negative world range to a very small value: " 141 << omni_cast<std::string>(range) << std::endl;131 << multi_cast<std::string>(range) << std::endl; 142 132 } 143 133 if (this->hasPhysics()) … … 158 148 { 159 149 CCOUT(2) << "Warning: Setting the positive world range to a very small value: " 160 << omni_cast<std::string>(range) << std::endl;150 << multi_cast<std::string>(range) << std::endl; 161 151 } 162 152 if (this->hasPhysics()) … … 176 166 this->gravity_ = gravity; 177 167 if (this->hasPhysics()) 178 this->physicalWorld_->setGravity( omni_cast<btVector3>(this->gravity_));168 this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_)); 179 169 } 180 170 … … 187 177 // It would require further investigation to properly dertermine the right choices. 188 178 this->broadphase_ = new bt32BitAxisSweep3( 189 omni_cast<btVector3>(this->negativeWorldRange_), omni_cast<btVector3>(this->positiveWorldRange_));179 multi_cast<btVector3>(this->negativeWorldRange_), multi_cast<btVector3>(this->positiveWorldRange_)); 190 180 this->collisionConfig_ = new btDefaultCollisionConfiguration(); 191 181 this->dispatcher_ = new btCollisionDispatcher(this->collisionConfig_); … … 193 183 194 184 this->physicalWorld_ = new btDiscreteDynamicsWorld(this->dispatcher_, this->broadphase_, this->solver_, this->collisionConfig_); 195 this->physicalWorld_->setGravity( omni_cast<btVector3>(this->gravity_));185 this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_)); 196 186 197 187 // also set the collision callback variable. -
code/trunk/src/orxonox/objects/Scene.h
r2662 r3196 33 33 #include "OrxonoxPrereqs.h" 34 34 35 #include <list> 36 #include <set> 37 #include <string> 38 39 #include "util/Math.h" 40 #include "util/OgreForwardRefs.h" 41 #include "core/BaseObject.h" 35 42 #include "network/synchronisable/Synchronisable.h" 36 #include "core/BaseObject.h" 37 #include "util/Math.h" 38 #include "objects/Tickable.h" 43 #include "interfaces/Tickable.h" 39 44 40 45 namespace orxonox -
code/trunk/src/orxonox/objects/Script.cc
r3110 r3196 29 29 #include "Script.h" 30 30 31 #include "util/Debug.h"31 #include <tinyxml/ticpp.h> 32 32 #include "core/CoreIncludes.h" 33 #include "core/XMLPort.h"34 33 #include "core/LuaBind.h" 35 34 -
code/trunk/src/orxonox/objects/Script.h
r2087 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <string> 34 35 #include "core/BaseObject.h" 35 36 -
code/trunk/src/orxonox/objects/Test.h
r3084 r3196 33 33 #include "core/BaseObject.h" 34 34 #include "network/synchronisable/Synchronisable.h" 35 #include " Tickable.h"35 #include "interfaces/Tickable.h" 36 36 37 37 -
code/trunk/src/orxonox/objects/collisionshapes/BoxCollisionShape.cc
r3110 r3196 29 29 #include "BoxCollisionShape.h" 30 30 31 #include "BulletCollision/CollisionShapes/btBoxShape.h"31 #include <BulletCollision/CollisionShapes/btBoxShape.h> 32 32 33 33 #include "core/CoreIncludes.h" … … 72 72 btCollisionShape* BoxCollisionShape::createNewShape() const 73 73 { 74 return new btBoxShape( omni_cast<btVector3>(this->halfExtents_));74 return new btBoxShape(multi_cast<btVector3>(this->halfExtents_)); 75 75 } 76 76 } -
code/trunk/src/orxonox/objects/collisionshapes/BoxCollisionShape.h
r2662 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "util/Math.h" 34 35 #include "CollisionShape.h" 35 36 -
code/trunk/src/orxonox/objects/collisionshapes/CollisionShape.cc
r3110 r3196 29 29 #include "CollisionShape.h" 30 30 31 #include "BulletCollision/CollisionShapes/btCollisionShape.h"31 #include <BulletCollision/CollisionShapes/btCollisionShape.h> 32 32 33 #include "util/Exception.h"34 33 #include "core/CoreIncludes.h" 35 34 #include "core/XMLPort.h" 36 #include "tools/BulletConversions.h"37 38 35 #include "objects/worldentities/WorldEntity.h" 39 36 #include "CompoundCollisionShape.h" … … 129 126 bool CollisionShape::hasTransform() const 130 127 { 131 return (!this->position_.positionEquals(Vector3(0, 0, 0), 0.001 ) ||132 !this->orientation_.equals(Quaternion(1,0,0,0), Degree(0.1 )));128 return (!this->position_.positionEquals(Vector3(0, 0, 0), 0.001f) || 129 !this->orientation_.equals(Quaternion(1,0,0,0), Degree(0.1f))); 133 130 } 134 131 -
code/trunk/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc
r3110 r3196 29 29 #include "CompoundCollisionShape.h" 30 30 31 #include "BulletCollision/CollisionShapes/btCompoundShape.h"31 #include <BulletCollision/CollisionShapes/btCompoundShape.h> 32 32 33 #include "util/Exception.h"34 33 #include "core/CoreIncludes.h" 35 34 #include "core/XMLPort.h" … … 89 88 { 90 89 // Only actually attach if we didn't pick a CompoundCollisionShape with no content 91 btTransform transf( omni_cast<btQuaternion>(shape->getOrientation()), omni_cast<btVector3>(shape->getPosition()));90 btTransform transf(multi_cast<btQuaternion>(shape->getOrientation()), multi_cast<btVector3>(shape->getPosition())); 92 91 this->compoundShape_->addChildShape(transf, shape->getCollisionShape()); 93 92 … … 134 133 { 135 134 // Only actually attach if we didn't pick a CompoundCollisionShape with no content 136 btTransform transf( omni_cast<btQuaternion>(shape->getOrientation()), omni_cast<btVector3>(shape->getPosition()));135 btTransform transf(multi_cast<btQuaternion>(shape->getOrientation()), multi_cast<btVector3>(shape->getPosition())); 137 136 this->compoundShape_->addChildShape(transf, shape->getCollisionShape()); 138 137 it->second = shape->getCollisionShape(); -
code/trunk/src/orxonox/objects/collisionshapes/CompoundCollisionShape.h
r2662 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <vector>35 34 #include <cassert> 35 #include <map> 36 36 #include "CollisionShape.h" 37 37 -
code/trunk/src/orxonox/objects/collisionshapes/ConeCollisionShape.cc
r3110 r3196 29 29 #include "ConeCollisionShape.h" 30 30 31 #include "BulletCollision/CollisionShapes/btConeShape.h"31 #include <BulletCollision/CollisionShapes/btConeShape.h> 32 32 33 33 #include "core/CoreIncludes.h" 34 34 #include "core/XMLPort.h" 35 #include "tools/BulletConversions.h"36 35 37 36 namespace orxonox -
code/trunk/src/orxonox/objects/collisionshapes/ConeCollisionShape.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 33 #include "CollisionShape.h" 35 34 -
code/trunk/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc
r3110 r3196 29 29 #include "PlaneCollisionShape.h" 30 30 31 #include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"31 #include <BulletCollision/CollisionShapes/btStaticPlaneShape.h> 32 32 33 33 #include "core/CoreIncludes.h" … … 72 72 btCollisionShape* PlaneCollisionShape::createNewShape() const 73 73 { 74 return new btStaticPlaneShape( omni_cast<btVector3>(this->normal_), this->offset_);74 return new btStaticPlaneShape(multi_cast<btVector3>(this->normal_), this->offset_); 75 75 } 76 76 } -
code/trunk/src/orxonox/objects/collisionshapes/PlaneCollisionShape.h
r2662 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "util/Math.h" 34 35 #include "CollisionShape.h" 35 36 -
code/trunk/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc
r3110 r3196 29 29 #include "SphereCollisionShape.h" 30 30 31 #include "BulletCollision/CollisionShapes/btSphereShape.h"31 #include <BulletCollision/CollisionShapes/btSphereShape.h> 32 32 33 33 #include "core/CoreIncludes.h" 34 34 #include "core/XMLPort.h" 35 #include "tools/BulletConversions.h"36 35 37 36 namespace orxonox -
code/trunk/src/orxonox/objects/collisionshapes/SphereCollisionShape.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 33 #include "CollisionShape.h" 35 34 -
code/trunk/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.cc
r3110 r3196 29 29 #include "WorldEntityCollisionShape.h" 30 30 31 #include "BulletCollision/CollisionShapes/btCompoundShape.h"31 #include <BulletCollision/CollisionShapes/btCompoundShape.h> 32 32 33 #include "util/ Exception.h"33 #include "util/OrxAssert.h" 34 34 #include "core/CoreIncludes.h" 35 35 #include "objects/worldentities/WorldEntity.h" -
code/trunk/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 33 #include "CompoundCollisionShape.h" 35 34 -
code/trunk/src/orxonox/objects/controllers/AIController.cc
r3110 r3196 29 29 #include "AIController.h" 30 30 31 #include "util/Math.h" 31 32 #include "core/CoreIncludes.h" 32 33 #include "core/Executor.h" … … 107 108 this->moveToTargetPosition(); 108 109 109 if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0 ))110 if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0f)) 110 111 this->getControllableEntity()->fire(0); 111 112 -
code/trunk/src/orxonox/objects/controllers/AIController.h
r2662 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "tools/Timer.h" 35 #include "interfaces/Tickable.h" 34 36 #include "ArtificialController.h" 35 #include "objects/Tickable.h"36 #include "tools/Timer.h"37 37 38 38 namespace orxonox -
code/trunk/src/orxonox/objects/controllers/ArtificialController.cc
r3110 r3196 32 32 #include "objects/worldentities/ControllableEntity.h" 33 33 #include "objects/worldentities/pawns/Pawn.h" 34 34 #include "objects/worldentities/pawns/TeamBaseMatchBase.h" 35 35 #include "objects/gametypes/TeamDeathmatch.h" 36 36 #include "objects/controllers/WaypointPatrolController.h" 37 #include "objects/worldentities/pawns/TeamBaseMatchBase.h"38 37 39 38 namespace orxonox -
code/trunk/src/orxonox/objects/controllers/ArtificialController.h
r3049 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "util/Math.h" 35 #include "interfaces/PawnListener.h" 34 36 #include "Controller.h" 35 #include "objects/worldentities/pawns/Pawn.h"36 #include "util/Math.h"37 37 38 38 namespace orxonox -
code/trunk/src/orxonox/objects/controllers/Controller.cc
r3110 r3196 28 28 29 29 #include "Controller.h" 30 31 30 #include "core/CoreIncludes.h" 32 #include "overlays/OverlayGroup.h"33 31 34 32 namespace orxonox -
code/trunk/src/orxonox/objects/controllers/Controller.h
r2826 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 33 #include "core/BaseObject.h" 35 34 -
code/trunk/src/orxonox/objects/controllers/HumanController.cc
r3110 r3196 192 192 HumanController::localController_s->controllableEntity_->dropItems(); 193 193 } 194 195 Pawn* HumanController::getLocalControllerEntityAsPawn() 196 { 197 if (HumanController::localController_s) 198 return dynamic_cast<Pawn*>(HumanController::localController_s->getControllableEntity()); 199 else 200 return NULL; 201 } 194 202 } -
code/trunk/src/orxonox/objects/controllers/HumanController.h
r3089 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include "util/Math.h"35 33 #include "Controller.h" 36 #include "objects/worldentities/pawns/Pawn.h"37 34 38 35 namespace orxonox … … 69 66 static inline HumanController* getLocalControllerSingleton() 70 67 { return HumanController::localController_s; } 71 static inline Pawn* getLocalControllerEntityAsPawn() 72 { 73 if (HumanController::localController_s) { 74 return dynamic_cast<Pawn*>(HumanController::localController_s->getControllableEntity()); 75 } else { 76 return NULL; 77 } 78 } 79 68 static Pawn* getLocalControllerEntityAsPawn(); 80 69 //friend class, for mouselook 81 70 friend class Map; -
code/trunk/src/orxonox/objects/controllers/PongAI.cc
r3110 r3196 31 31 #include "core/CoreIncludes.h" 32 32 #include "core/ConfigValueIncludes.h" 33 #include "tools/Timer.h" 33 34 #include "objects/worldentities/ControllableEntity.h" 34 35 #include "objects/worldentities/PongBall.h" 35 #include "tools/Timer.h"36 36 37 37 namespace orxonox … … 39 39 CreateUnloadableFactory(PongAI); 40 40 41 const static float MAX_REACTION_TIME = 0.4 ;41 const static float MAX_REACTION_TIME = 0.4f; 42 42 43 43 PongAI::PongAI(BaseObject* creator) : Controller(creator) … … 49 49 this->ballEndPosition_ = 0; 50 50 this->randomOffset_ = 0; 51 this->relHysteresisOffset_ = 0.02 ;52 this->strength_ = 0.5 ;51 this->relHysteresisOffset_ = 0.02f; 52 this->strength_ = 0.5f; 53 53 this->movement_ = 0; 54 54 this->oldMove_ = 0; … … 171 171 172 172 // The position shouln't be larger than 0.5 (50% of the bat-length from the middle is the end) 173 position *= 0.48 ;173 position *= 0.48f; 174 174 175 175 // Both sides are equally probable … … 190 190 191 191 // Calculate bounces 192 for (float limit = 0.35 ; limit < this->strength_ || this->strength_ > 0.99; limit += 0.4)192 for (float limit = 0.35f; limit < this->strength_ || this->strength_ > 0.99f; limit += 0.4f) 193 193 { 194 194 // Calculate a random prediction error, based on the vertical speed of the ball and the strength of the AI -
code/trunk/src/orxonox/objects/controllers/PongAI.h
r2885 r3196 33 33 34 34 #include <list> 35 35 #include "util/Math.h" 36 #include "interfaces/Tickable.h" 36 37 #include "Controller.h" 37 #include "objects/Tickable.h"38 #include "util/Math.h"39 38 40 39 namespace orxonox -
code/trunk/src/orxonox/objects/controllers/ScriptController.cc
r3110 r3196 28 28 29 29 #include "ScriptController.h" 30 31 30 #include "core/CoreIncludes.h" 32 31 … … 39 38 RegisterObject(ScriptController); 40 39 } 41 42 ScriptController::~ScriptController()43 {44 }45 40 } -
code/trunk/src/orxonox/objects/controllers/ScriptController.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 33 #include "ArtificialController.h" 35 34 … … 40 39 public: 41 40 ScriptController(BaseObject* creator); 42 virtual ~ScriptController(); 43 44 protected: 41 virtual ~ScriptController() { } 45 42 46 43 private: -
code/trunk/src/orxonox/objects/controllers/WaypointController.cc
r3110 r3196 31 31 #include "core/CoreIncludes.h" 32 32 #include "core/XMLPort.h" 33 #include "objects/worldentities/ControllableEntity.h" 33 34 34 35 namespace orxonox -
code/trunk/src/orxonox/objects/controllers/WaypointController.h
r3078 r3196 33 33 34 34 #include <vector> 35 35 #include "interfaces/Tickable.h" 36 36 #include "ArtificialController.h" 37 #include "objects/Tickable.h"38 37 39 38 namespace orxonox -
code/trunk/src/orxonox/objects/controllers/WaypointPatrolController.cc
r3110 r3196 29 29 #include "WaypointPatrolController.h" 30 30 31 #include "util/Math.h" 31 32 #include "core/CoreIncludes.h" 32 33 #include "core/XMLPort.h" 34 #include "objects/worldentities/pawns/Pawn.h" 33 35 34 36 namespace orxonox -
code/trunk/src/orxonox/objects/controllers/WaypointPatrolController.h
r3078 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "tools/Timer.h" 34 35 #include "WaypointController.h" 35 #include "tools/Timer.h"36 36 37 37 namespace orxonox -
code/trunk/src/orxonox/objects/gametypes/Asteroids.cc
r3110 r3196 30 30 31 31 #include "core/CoreIncludes.h" 32 #include " objects/infos/PlayerInfo.h"32 #include "network/Host.h" 33 33 #include "objects/worldentities/pawns/Pawn.h" 34 35 #include "network/Host.h"36 34 37 35 namespace orxonox -
code/trunk/src/orxonox/objects/gametypes/Asteroids.h
r3064 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 33 #include "Gametype.h" 35 34 -
code/trunk/src/orxonox/objects/gametypes/Deathmatch.cc
r3110 r3196 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "network/Host.h" 32 33 #include "objects/infos/PlayerInfo.h" 33 34 #include "objects/worldentities/pawns/Pawn.h" 34 35 #include "network/Host.h"36 35 37 36 namespace orxonox -
code/trunk/src/orxonox/objects/gametypes/Deathmatch.h
r2826 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 33 #include "Gametype.h" 35 34 -
code/trunk/src/orxonox/objects/gametypes/Gametype.cc
r3110 r3196 29 29 #include "Gametype.h" 30 30 31 #include <cstdlib> 32 #include <ctime> 33 31 #include "util/Math.h" 34 32 #include "core/CoreIncludes.h" 35 33 #include "core/ConfigValueIncludes.h" 36 #include "core/Template.h"37 34 #include "core/GameMode.h" 38 #include "overlays/OverlayGroup.h" 35 39 36 #include "objects/infos/PlayerInfo.h" 40 37 #include "objects/infos/Bot.h" 38 #include "objects/worldentities/Camera.h" 39 #include "objects/worldentities/ControllableEntity.h" 40 #include "objects/worldentities/SpawnPoint.h" 41 41 #include "objects/worldentities/pawns/Spectator.h" 42 #include "objects/worldentities/ SpawnPoint.h"43 #include "o bjects/worldentities/Camera.h"42 #include "objects/worldentities/pawns/Pawn.h" 43 #include "overlays/OverlayGroup.h" 44 44 45 45 namespace orxonox … … 287 287 if (this->spawnpoints_.size() > 0) 288 288 { 289 unsigned int randomspawn = (unsigned int)rnd(this->spawnpoints_.size());289 unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(this->spawnpoints_.size()))); 290 290 unsigned int index = 0; 291 291 for (std::set<SpawnPoint*>::const_iterator it = this->spawnpoints_.begin(); it != this->spawnpoints_.end(); ++it) -
code/trunk/src/orxonox/objects/gametypes/Gametype.h
r3033 r3196 33 33 34 34 #include <map> 35 #include <set> 36 #include <string> 35 37 36 38 #include "core/BaseObject.h" 37 39 #include "core/Identifier.h" 38 #include "objects/worldentities/ControllableEntity.h" 39 #include "objects/Tickable.h" 40 #include "interfaces/Tickable.h" 40 41 #include "objects/infos/GametypeInfo.h" 41 42 -
code/trunk/src/orxonox/objects/gametypes/Pong.cc
r3110 r3196 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "core/ConfigValueIncludes.h"33 32 #include "core/Executor.h" 34 #include "objects/worldentities/Model.h"35 33 #include "objects/worldentities/PongCenterpoint.h" 36 34 #include "objects/worldentities/PongBall.h" 37 35 #include "objects/worldentities/PongBat.h" 38 #include "objects/infos/HumanPlayer.h"39 36 #include "objects/infos/PongBot.h" 40 37 #include "objects/controllers/PongAI.h" -
code/trunk/src/orxonox/objects/gametypes/Pong.h
r2890 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "tools/Timer.h" 34 35 #include "Deathmatch.h" 35 #include "tools/Timer.h"36 36 37 37 namespace orxonox -
code/trunk/src/orxonox/objects/gametypes/TeamBaseMatch.cc
r3104 r3196 29 29 #include "TeamBaseMatch.h" 30 30 31 #include "core/CoreIncludes.h" 32 #include "core/Executor.h" 31 33 #include "objects/worldentities/pawns/TeamBaseMatchBase.h" 32 #include "core/CoreIncludes.h"33 34 #include "objects/infos/PlayerInfo.h" 34 35 -
code/trunk/src/orxonox/objects/gametypes/TeamBaseMatch.h
r3104 r3196 33 33 34 34 #include <set> 35 #include "tools/Timer.h" 35 36 #include "TeamDeathmatch.h" 36 #include "tools/Timer.h"37 37 38 38 namespace orxonox -
code/trunk/src/orxonox/objects/gametypes/TeamDeathmatch.cc
r3110 r3196 31 31 #include "core/CoreIncludes.h" 32 32 #include "core/ConfigValueIncludes.h" 33 #include " objects/Teamcolourable.h"33 #include "interfaces/TeamColourable.h" 34 34 #include "objects/worldentities/TeamSpawnPoint.h" 35 #include "objects/worldentities/pawns/Pawn.h" 35 36 36 37 namespace orxonox … … 53 54 static ColourValue colours[] = 54 55 { 55 ColourValue(1.0 , 0.3, 0.3),56 ColourValue(0.3 , 0.3, 1.0),57 ColourValue(0.3 , 1.0, 0.3),58 ColourValue(1.0 , 1.0, 0.0)56 ColourValue(1.0f, 0.3f, 0.3f), 57 ColourValue(0.3f, 0.3f, 1.0f), 58 ColourValue(0.3f, 1.0f, 0.3f), 59 ColourValue(1.0f, 1.0f, 0.0f) 59 60 }; 60 61 static std::vector<ColourValue> defaultcolours(colours, colours + sizeof(colours) / sizeof(ColourValue)); … … 138 139 if (teamSpawnPoints.size() > 0) 139 140 { 140 unsigned int randomspawn = (unsigned int)rnd(teamSpawnPoints.size());141 unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size()))); 141 142 unsigned int index = 0; 142 143 for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it) … … 168 169 for (std::set<WorldEntity*>::iterator it = pawnAttachments.begin(); it != pawnAttachments.end(); ++it) 169 170 { 170 if ((*it)->isA(Class(Team colourable)))171 if ((*it)->isA(Class(TeamColourable))) 171 172 { 172 Team colourable* tc = dynamic_cast<Teamcolourable*>(*it);173 TeamColourable* tc = dynamic_cast<TeamColourable*>(*it); 173 174 tc->setTeamColour(this->teamcolours_[it_player->second]); 174 175 } -
code/trunk/src/orxonox/objects/gametypes/TeamDeathmatch.h
r3068 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <map> 34 35 #include <vector> 35 36 36 #include "Deathmatch.h" 37 37 -
code/trunk/src/orxonox/objects/gametypes/UnderAttack.cc
r3110 r3196 29 29 #include "UnderAttack.h" 30 30 31 #include "util/Convert.h" 31 32 #include "core/CoreIncludes.h" 32 33 #include "core/ConfigValueIncludes.h" 33 #include "util/Convert.h"34 34 #include "network/Host.h" 35 36 35 #include "objects/worldentities/pawns/Destroyer.h" 37 36 #include "objects/infos/PlayerInfo.h" -
code/trunk/src/orxonox/objects/gametypes/UnderAttack.h
r3033 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "interfaces/PawnListener.h" 34 35 #include "TeamDeathmatch.h" 35 #include "objects/worldentities/pawns/Pawn.h"36 36 37 37 namespace orxonox -
code/trunk/src/orxonox/objects/infos/Bot.cc
r3110 r3196 29 29 #include "Bot.h" 30 30 31 #include "util/Math.h" 31 32 #include "core/GameMode.h" 32 33 #include "core/CoreIncludes.h" … … 34 35 #include "objects/gametypes/Gametype.h" 35 36 #include "objects/controllers/AIController.h" 36 #include "util/Math.h"37 37 38 38 namespace orxonox … … 66 66 void Bot::setConfigValues() 67 67 { 68 static std::string names[] =68 static const std::string names[] = 69 69 { 70 70 "Dr. Julius No", -
code/trunk/src/orxonox/objects/infos/Bot.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <vector> 34 35 35 #include "PlayerInfo.h" 36 36 -
code/trunk/src/orxonox/objects/infos/GametypeInfo.cc
r3110 r3196 33 33 #include "network/NetworkFunction.h" 34 34 #include "network/Host.h" 35 #include " objects/GametypeMessageListener.h"35 #include "interfaces/GametypeMessageListener.h" 36 36 37 37 namespace orxonox … … 68 68 } 69 69 70 void GametypeInfo::sendAnnounceMessage(const std::string& message) const70 void GametypeInfo::sendAnnounceMessage(const std::string& message) 71 71 { 72 72 if (GameMode::isMaster()) … … 77 77 } 78 78 79 void GametypeInfo::sendAnnounceMessage(const std::string& message, unsigned int clientID) const79 void GametypeInfo::sendAnnounceMessage(const std::string& message, unsigned int clientID) 80 80 { 81 81 if (GameMode::isMaster()) … … 88 88 } 89 89 90 void GametypeInfo::sendKillMessage(const std::string& message, unsigned int clientID) const90 void GametypeInfo::sendKillMessage(const std::string& message, unsigned int clientID) 91 91 { 92 92 if (GameMode::isMaster()) … … 99 99 } 100 100 101 void GametypeInfo::sendDeathMessage(const std::string& message, unsigned int clientID) const101 void GametypeInfo::sendDeathMessage(const std::string& message, unsigned int clientID) 102 102 { 103 103 if (GameMode::isMaster()) … … 110 110 } 111 111 112 void GametypeInfo::dispatchAnnounceMessage(const std::string& message) const112 void GametypeInfo::dispatchAnnounceMessage(const std::string& message) 113 113 { 114 114 for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it) … … 116 116 } 117 117 118 void GametypeInfo::dispatchKillMessage(const std::string& message) const118 void GametypeInfo::dispatchKillMessage(const std::string& message) 119 119 { 120 120 for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it) … … 122 122 } 123 123 124 void GametypeInfo::dispatchDeathMessage(const std::string& message) const124 void GametypeInfo::dispatchDeathMessage(const std::string& message) 125 125 { 126 126 for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it) -
code/trunk/src/orxonox/objects/infos/GametypeInfo.h
r3099 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <string> 34 35 #include "Info.h" 35 36 … … 59 60 { return this->hudtemplate_; } 60 61 61 void sendAnnounceMessage(const std::string& message) const;62 void sendAnnounceMessage(const std::string& message, unsigned int clientID) const;63 void sendKillMessage(const std::string& message, unsigned int clientID) const;64 void sendDeathMessage(const std::string& message, unsigned int clientID) const;62 void sendAnnounceMessage(const std::string& message); 63 void sendAnnounceMessage(const std::string& message, unsigned int clientID); 64 void sendKillMessage(const std::string& message, unsigned int clientID); 65 void sendDeathMessage(const std::string& message, unsigned int clientID); 65 66 66 void dispatchAnnounceMessage(const std::string& message) const;67 void dispatchKillMessage(const std::string& message) const;68 void dispatchDeathMessage(const std::string& message) const;67 void dispatchAnnounceMessage(const std::string& message); 68 void dispatchKillMessage(const std::string& message); 69 void dispatchDeathMessage(const std::string& message); 69 70 70 71 private: -
code/trunk/src/orxonox/objects/infos/HumanPlayer.cc
r3110 r3196 29 29 #include "HumanPlayer.h" 30 30 31 #include "core/GameMode.h"32 31 #include "core/CoreIncludes.h" 33 32 #include "core/ConfigValueIncludes.h" 33 #include "core/GameMode.h" 34 34 #include "network/ClientInformation.h" 35 35 #include "network/Host.h" … … 143 143 float HumanPlayer::getPing() const 144 144 { 145 return ClientInformation::findClient(this->getClientID())->getRTT();145 return static_cast<float>(ClientInformation::findClient(this->getClientID())->getRTT()); 146 146 } 147 147 148 148 float HumanPlayer::getPacketLossRatio() const 149 149 { 150 return ClientInformation::findClient(this->getClientID())->getPacketLoss();150 return static_cast<float>(ClientInformation::findClient(this->getClientID())->getPacketLoss()); 151 151 } 152 152 -
code/trunk/src/orxonox/objects/infos/HumanPlayer.h
r2973 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <string> 34 35 #include "PlayerInfo.h" 35 36 -
code/trunk/src/orxonox/objects/infos/Info.cc
r3110 r3196 28 28 29 29 #include "Info.h" 30 31 30 #include "core/CoreIncludes.h" 32 31 -
code/trunk/src/orxonox/objects/infos/PlayerInfo.cc
r3110 r3196 34 34 #include "network/ClientInformation.h" 35 35 #include "objects/gametypes/Gametype.h" 36 #include "objects/worldentities/ControllableEntity.h" 36 37 37 38 namespace orxonox -
code/trunk/src/orxonox/objects/infos/PongBot.h
r2839 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 33 #include "Bot.h" 35 34 -
code/trunk/src/orxonox/objects/items/Engine.cc
r3110 r3196 29 29 #include "Engine.h" 30 30 31 #include "util/Math.h" 31 32 #include "core/CoreIncludes.h" 32 33 #include "core/ConfigValueIncludes.h" … … 34 35 #include "objects/Scene.h" 35 36 #include "objects/worldentities/pawns/SpaceShip.h" 37 #include "objects/pickup/ModifierType.h" 36 38 #include "tools/Shader.h" 37 39 #include "sound/SoundBase.h" -
code/trunk/src/orxonox/objects/items/Engine.h
r3060 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "interfaces/Tickable.h" 34 35 #include "Item.h" 35 #include "objects/Tickable.h"36 #include "util/Math.h"37 36 38 37 namespace orxonox -
code/trunk/src/orxonox/objects/items/Item.cc
r3110 r3196 28 28 29 29 #include "Item.h" 30 31 30 #include "core/CoreIncludes.h" 32 31 … … 37 36 RegisterObject(Item); 38 37 } 39 40 Item::~Item()41 {42 }43 38 } -
code/trunk/src/orxonox/objects/items/Item.h
r2662 r3196 41 41 public: 42 42 Item(BaseObject* creator); 43 virtual ~Item() ;43 virtual ~Item() {} 44 44 }; 45 45 } -
code/trunk/src/orxonox/objects/items/MultiStateEngine.cc
r3110 r3196 29 29 #include "MultiStateEngine.h" 30 30 31 #include "core/CoreIncludes.h" 31 32 #include "core/GameMode.h" 32 #include "core/CoreIncludes.h"33 33 #include "core/XMLPort.h" 34 34 #include "objects/worldentities/pawns/SpaceShip.h" -
code/trunk/src/orxonox/objects/items/MultiStateEngine.h
r2662 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <list> 34 35 #include "Engine.h" 35 36 -
code/trunk/src/orxonox/objects/pickup/BaseItem.cc
r3073 r3196 34 34 #include "BaseItem.h" 35 35 36 #include "PickupCollection.h"37 38 36 #include "core/CoreIncludes.h" 39 37 #include "core/XMLPort.h" … … 55 53 this->setGUIText(""); 56 54 } 57 //! De constructor.55 //! Destructor. 58 56 BaseItem::~BaseItem() 59 57 { … … 105 103 } 106 104 107 const std::string& BaseItem::getGUIText() const { return this->guiText_; } 105 const std::string& BaseItem::getGUIText() const 106 { 107 return this->guiText_; 108 } 108 109 } -
code/trunk/src/orxonox/objects/pickup/BaseItem.h
r3073 r3196 37 37 #include "OrxonoxPrereqs.h" 38 38 39 #include <string> 39 40 #include "core/BaseObject.h" 40 41 -
code/trunk/src/orxonox/objects/pickup/DroppedItem.cc
r3079 r3196 29 29 #include "DroppedItem.h" 30 30 31 #include "util/Math.h" 32 #include "core/CoreIncludes.h" 33 #include "core/Executor.h" 31 34 #include "BaseItem.h" 35 #include "objects/worldentities/Billboard.h" 36 #include "objects/worldentities/Model.h" 32 37 #include "objects/worldentities/pawns/Pawn.h" 33 #include "objects/worldentities/Model.h"34 #include "objects/worldentities/Billboard.h"35 36 #include "core/CoreIncludes.h"37 38 38 39 namespace orxonox -
code/trunk/src/orxonox/objects/pickup/DroppedItem.h
r3079 r3196 29 29 /** 30 30 @file 31 @brief Definition of BaseItem (base-class for items/pickups).31 @brief Definition of DroppedItem 32 32 */ 33 33 … … 37 37 #include "OrxonoxPrereqs.h" 38 38 39 #include "objects/Tickable.h" 39 #include "tools/Timer.h" 40 #include "interfaces/Tickable.h" 40 41 #include "objects/worldentities/StaticEntity.h" 41 #include "tools/Timer.h"42 42 43 43 namespace orxonox -
code/trunk/src/orxonox/objects/pickup/EquipmentItem.cc
r3073 r3196 33 33 34 34 #include "EquipmentItem.h" 35 36 35 #include "core/CoreIncludes.h" 37 36 … … 46 45 RegisterObject(EquipmentItem); 47 46 } 48 //! Deconstructor.49 EquipmentItem::~EquipmentItem()50 {51 }52 47 } -
code/trunk/src/orxonox/objects/pickup/EquipmentItem.h
r3073 r3196 38 38 39 39 #include "BaseItem.h" 40 41 40 namespace orxonox 42 41 { … … 49 48 public: 50 49 EquipmentItem(BaseObject* creator); 51 virtual ~EquipmentItem() ;50 virtual ~EquipmentItem() {} 52 51 }; 53 52 } -
code/trunk/src/orxonox/objects/pickup/ModifierPickup.cc
r3079 r3196 33 33 34 34 #include "ModifierPickup.h" 35 #include "PickupCollection.h"36 35 37 36 #include "core/CoreIncludes.h" 38 37 #include "core/XMLPort.h" 39 40 38 #include "objects/worldentities/pawns/Pawn.h" 41 39 -
code/trunk/src/orxonox/objects/pickup/ModifierPickup.h
r3073 r3196 35 35 #define _ModifierPickup_H__ 36 36 37 #include <climits>38 39 37 #include "OrxonoxPrereqs.h" 40 38 39 #include <climits> 40 #include <map> 41 42 #include "orxonox/tools/Timer.h" 43 #include "ModifierType.h" 41 44 #include "PassiveItem.h" 42 #include "ModifierType.h"43 #include "orxonox/tools/Timer.h"44 45 45 46 namespace orxonox -
code/trunk/src/orxonox/objects/pickup/ModifierType.h
r3073 r3196 35 35 #define _ModifierType_H__ 36 36 37 #include "OrxonoxPrereqs.h" 38 37 39 namespace orxonox 38 40 { -
code/trunk/src/orxonox/objects/pickup/PassiveItem.cc
r3073 r3196 28 28 29 29 #include "PassiveItem.h" 30 31 30 #include "core/CoreIncludes.h" 32 31 … … 41 40 RegisterObject(PassiveItem); 42 41 } 43 //! Deconstructor.44 PassiveItem::~PassiveItem()45 {46 }47 42 } -
code/trunk/src/orxonox/objects/pickup/PassiveItem.h
r3073 r3196 36 36 37 37 #include "OrxonoxPrereqs.h" 38 39 38 #include "BaseItem.h" 40 39 … … 49 48 public: 50 49 PassiveItem(BaseObject* creator); 51 virtual ~PassiveItem() ;50 virtual ~PassiveItem() {} 52 51 }; 53 52 } -
code/trunk/src/orxonox/objects/pickup/PickupCollection.cc
r3079 r3196 34 34 #include "PickupCollection.h" 35 35 36 #include " BaseItem.h"36 #include "core/CoreIncludes.h" 37 37 #include "EquipmentItem.h" 38 38 #include "PassiveItem.h" 39 39 #include "UsableItem.h" 40 41 #include "core/CoreIncludes.h"42 40 43 41 namespace orxonox -
code/trunk/src/orxonox/objects/pickup/PickupCollection.h
r3079 r3196 37 37 #include "OrxonoxPrereqs.h" 38 38 39 #include <deque> 39 40 #include <map> 40 #include <deque>41 41 #include <string> 42 42 43 43 #include "util/Math.h" 44 45 44 #include "ModifierType.h" 46 45 -
code/trunk/src/orxonox/objects/pickup/PickupInventory.cc
r3085 r3196 28 28 29 29 #include "PickupInventory.h" 30 31 #include "EquipmentItem.h"32 #include "PassiveItem.h"33 #include "UsableItem.h"34 35 #include "core/ConsoleCommand.h"36 #include "core/input/InputManager.h"37 38 #include "gui/GUIManager.h"39 #include "objects/controllers/HumanController.h"40 #include "objects/worldentities/pawns/Pawn.h"41 30 42 31 #include <CEGUIImage.h> … … 47 36 #include <elements/CEGUITabControl.h> 48 37 38 #include "core/ConsoleCommand.h" 39 #include "core/input/InputManager.h" 40 #include "gui/GUIManager.h" 41 #include "objects/controllers/HumanController.h" 42 #include "objects/worldentities/pawns/Pawn.h" 43 44 #include "EquipmentItem.h" 45 #include "PassiveItem.h" 46 #include "UsableItem.h" 47 48 49 49 namespace orxonox 50 50 { … … 86 86 { 87 87 if(PickupInventory::getSingleton()->isVisible()) { 88 GUIManager::getInstance Ptr()->executeCode("hideGUI(\"PickupInventory\")");89 GUIManager::getInstance Ptr()->executeCode("hideCursor()");88 GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")"); 89 GUIManager::getInstance().executeCode("hideCursor()"); 90 90 InputManager::getInstance().requestLeaveState("guiMouseOnly"); 91 91 } 92 92 else 93 93 { 94 GUIManager::getInstance Ptr()->showGUI("PickupInventory");95 GUIManager::getInstance Ptr()->executeCode("showCursor()");94 GUIManager::getInstance().showGUI("PickupInventory"); 95 GUIManager::getInstance().executeCode("showCursor()"); 96 96 InputManager::getInstance().requestEnterState("guiMouseOnly"); 97 97 } -
code/trunk/src/orxonox/objects/pickup/PickupInventory.h
r3079 r3196 37 37 #include "OrxonoxPrereqs.h" 38 38 39 #include <CEGUIForwardRefs.h> 39 40 #include "core/BaseObject.h" 40 41 namespace CEGUI { class Window; class WindowManager; class Image; }42 41 43 42 // tolua_begin -
code/trunk/src/orxonox/objects/pickup/PickupSpawner.cc
r3079 r3196 33 33 34 34 #include "PickupSpawner.h" 35 35 36 #include "BaseItem.h" 36 #include "PickupInventory.h" // HACK; Only for hack, remove later37 #include "gui/GUIManager.h" // HACK; see above38 37 39 38 #include "core/CoreIncludes.h" 39 #include "core/Template.h" 40 40 #include "core/XMLPort.h" 41 #include "core/Template.h" 41 #include "gui/GUIManager.h" // HACK; see below 42 #include "objects/worldentities/pawns/Pawn.h" 43 #include "PickupInventory.h" // HACK; Only for hack, remove later 42 44 43 #include "objects/worldentities/pawns/Pawn.h"44 45 45 46 namespace orxonox … … 95 96 // & load the GUI itself too, along with some empty windows 96 97 // = even less delays 97 GUIManager::getInstance Ptr()->showGUI("PickupInventory");98 GUIManager::getInstance Ptr()->executeCode("hideGUI(\"PickupInventory\")");98 GUIManager::getInstance().showGUI("PickupInventory"); 99 GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")"); 99 100 PickupInventory::getSingleton(); 100 101 } -
code/trunk/src/orxonox/objects/pickup/PickupSpawner.h
r3079 r3196 37 37 #include "OrxonoxPrereqs.h" 38 38 39 #include "objects/Tickable.h" 39 #include <string> 40 #include "tools/Timer.h" 41 #include "interfaces/Tickable.h" 40 42 #include "objects/worldentities/StaticEntity.h" 41 #include "tools/Timer.h"42 43 43 44 namespace orxonox -
code/trunk/src/orxonox/objects/pickup/UsableItem.cc
r3073 r3196 33 33 34 34 #include "UsableItem.h" 35 36 35 #include "core/CoreIncludes.h" 37 36 … … 46 45 RegisterObject(UsableItem); 47 46 } 48 //! Deconstructor.49 UsableItem::~UsableItem()50 {51 }52 47 } -
code/trunk/src/orxonox/objects/pickup/UsableItem.h
r3073 r3196 36 36 37 37 #include "OrxonoxPrereqs.h" 38 39 38 #include "BaseItem.h" 40 39 … … 49 48 public: 50 49 UsableItem(BaseObject* creator); 51 virtual ~UsableItem() ;50 virtual ~UsableItem() { } 52 51 53 52 /** -
code/trunk/src/orxonox/objects/pickup/items/HealthImmediate.cc
r3079 r3196 34 34 #include "HealthImmediate.h" 35 35 36 #include "objects/worldentities/pawns/Pawn.h"37 38 36 #include "core/CoreIncludes.h" 39 37 #include "core/XMLPort.h" 38 #include "objects/worldentities/pawns/Pawn.h" 40 39 41 40 namespace orxonox -
code/trunk/src/orxonox/objects/pickup/items/HealthImmediate.h
r3079 r3196 36 36 37 37 #include "OrxonoxPrereqs.h" 38 39 38 #include "objects/pickup/PassiveItem.h" 40 39 -
code/trunk/src/orxonox/objects/pickup/items/HealthUsable.cc
r3079 r3196 33 33 34 34 #include "HealthUsable.h" 35 #include "objects/pickup/DroppedItem.h"36 35 37 #include "objects/worldentities/pawns/Pawn.h" 38 36 #include "util/Math.h" 39 37 #include "core/CoreIncludes.h" 40 38 #include "core/XMLPort.h" 39 #include "objects/pickup/DroppedItem.h" 40 #include "objects/worldentities/pawns/Pawn.h" 41 41 42 42 namespace orxonox -
code/trunk/src/orxonox/objects/pickup/items/HealthUsable.h
r3081 r3196 35 35 #define _HealthUsable_H__ 36 36 37 #include <climits>38 39 37 #include "OrxonoxPrereqs.h" 40 38 39 #include <climits> 41 40 #include "objects/pickup/UsableItem.h" 42 #include "util/Math.h"43 41 44 42 namespace orxonox -
code/trunk/src/orxonox/objects/pickup/items/Jump.cc
r3079 r3196 33 33 34 34 #include "Jump.h" 35 #include "objects/pickup/DroppedItem.h"36 37 #include "objects/worldentities/pawns/Pawn.h"38 35 39 36 #include "core/CoreIncludes.h" 40 37 #include "core/XMLPort.h" 38 #include "objects/pickup/DroppedItem.h" 39 #include "objects/worldentities/pawns/Pawn.h" 41 40 42 41 namespace orxonox -
code/trunk/src/orxonox/objects/pickup/items/Jump.h
r3079 r3196 39 39 #include "OrxonoxPrereqs.h" 40 40 41 #include <climits> 42 #include "util/Math.h" 41 43 #include "objects/pickup/UsableItem.h" 42 #include "util/Math.h"43 44 44 45 namespace orxonox -
code/trunk/src/orxonox/objects/quest/AddQuest.cc
r3110 r3196 28 28 29 29 /** 30 @file AddQuest.cc30 @file 31 31 @brief Implementation of the AddQuest class. 32 32 */ … … 34 34 #include "AddQuest.h" 35 35 36 #include <string> 37 36 #include "util/Exception.h" 38 37 #include "core/CoreIncludes.h" 39 #include "util/Exception.h"40 41 #include "orxonox/objects/infos/PlayerInfo.h"42 38 #include "QuestManager.h" 43 #include "QuestDescription.h"44 39 #include "Quest.h" 45 40 -
code/trunk/src/orxonox/objects/quest/AddQuest.h
r3068 r3196 28 28 29 29 /** 30 @file AddQuest.h30 @file 31 31 @brief Definition of the AddQuest class. 32 32 */ … … 36 36 37 37 #include "OrxonoxPrereqs.h" 38 39 #include <string>40 41 #include "core/XMLPort.h"42 38 #include "ChangeQuestStatus.h" 43 39 -
code/trunk/src/orxonox/objects/quest/AddQuestHint.cc
r3110 r3196 28 28 29 29 /** 30 @file AddQuestHint.cc30 @file 31 31 @brief Implementation of the AddQuestHint class. 32 32 */ … … 34 34 #include "AddQuestHint.h" 35 35 36 #include "util/Exception.h" 36 37 #include "core/CoreIncludes.h" 37 #include "util/Exception.h" 38 39 #include "orxonox/objects/infos/PlayerInfo.h" 38 #include "core/XMLPort.h" 40 39 #include "QuestManager.h" 41 40 #include "QuestItem.h" -
code/trunk/src/orxonox/objects/quest/AddQuestHint.h
r3068 r3196 28 28 29 29 /** 30 @file AddQuestHint.h30 @file 31 31 @brief Definition of the AddQuestHint class. 32 32 */ … … 38 38 39 39 #include <string> 40 41 40 #include "QuestEffect.h" 42 41 -
code/trunk/src/orxonox/objects/quest/AddReward.cc
r3110 r3196 28 28 29 29 /** 30 @file AddReward.cc30 @file 31 31 @brief Implementation of the AddReward class. 32 32 */ … … 35 35 36 36 #include "core/CoreIncludes.h" 37 38 #include "orxonox/objects/infos/PlayerInfo.h" 39 #include "Rewardable.h" 37 #include "core/XMLPort.h" 38 #include "interfaces/Rewardable.h" 40 39 41 40 namespace orxonox -
code/trunk/src/orxonox/objects/quest/AddReward.h
r3068 r3196 28 28 29 29 /** 30 @file AddReward.h30 @file 31 31 @brief Definition of the AddReward class. 32 32 */ … … 38 38 39 39 #include <list> 40 41 #include "core/XMLPort.h"42 40 #include "QuestEffect.h" 43 41 -
code/trunk/src/orxonox/objects/quest/CMakeLists.txt
r2911 r3196 17 17 QuestManager.cc 18 18 QuestNotification.cc 19 Rewardable.cc20 19 ) -
code/trunk/src/orxonox/objects/quest/ChangeQuestStatus.cc
r3110 r3196 28 28 29 29 /** 30 @file ChangeQuestStatus.cc30 @file 31 31 @brief Implementation of the ChangeQuestStatus class. 32 32 */ … … 35 35 36 36 #include "core/CoreIncludes.h" 37 37 #include "core/XMLPort.h" 38 38 #include "QuestItem.h" 39 39 -
code/trunk/src/orxonox/objects/quest/ChangeQuestStatus.h
r3068 r3196 28 28 29 29 /** 30 @file ChangeQuestStatus.h30 @file 31 31 @brief Definition of the ChangeQuestStatus class. 32 32 */ … … 38 38 39 39 #include <string> 40 41 #include "core/XMLPort.h"42 40 #include "QuestEffect.h" 43 41 -
code/trunk/src/orxonox/objects/quest/CompleteQuest.cc
r3110 r3196 28 28 29 29 /** 30 @file CompleteQuest.cc30 @file 31 31 @brief Implementation of the CompleteQuest class. 32 32 */ … … 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "util/Exception.h" 38 39 #include "orxonox/objects/infos/PlayerInfo.h" 37 #include "core/XMLPort.h" 40 38 #include "QuestManager.h" 41 39 #include "Quest.h" -
code/trunk/src/orxonox/objects/quest/CompleteQuest.h
r3068 r3196 28 28 29 29 /** 30 @file CompleteQuest.h30 @file 31 31 @brief Definition of the CompleteQuest class. 32 32 */ … … 36 36 37 37 #include "OrxonoxPrereqs.h" 38 39 #include <string>40 41 #include "core/XMLPort.h"42 38 #include "ChangeQuestStatus.h" 43 39 -
code/trunk/src/orxonox/objects/quest/FailQuest.cc
r3110 r3196 28 28 29 29 /** 30 @file FailQuest.cc30 @file 31 31 @brief Implementation of the FailQuest class. 32 32 */ … … 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "util/Exception.h" 38 39 #include "orxonox/objects/infos/PlayerInfo.h" 37 #include "core/XMLPort.h" 40 38 #include "QuestManager.h" 41 39 #include "Quest.h" -
code/trunk/src/orxonox/objects/quest/FailQuest.h
r3068 r3196 28 28 29 29 /** 30 @file FailQuest.h30 @file 31 31 @brief Definition of the FailQuest class. 32 32 */ … … 36 36 37 37 #include "OrxonoxPrereqs.h" 38 39 #include <string>40 41 #include "core/XMLPort.h"42 38 #include "ChangeQuestStatus.h" 43 39 -
code/trunk/src/orxonox/objects/quest/GlobalQuest.cc
r3110 r3196 28 28 29 29 /** 30 @file GlobalQuest.cc30 @file 31 31 @brief Implementation of the GlobalQuest class. 32 32 */ … … 34 34 #include "GlobalQuest.h" 35 35 36 #include "orxonox/objects/infos/PlayerInfo.h"37 36 #include "core/CoreIncludes.h" 38 #include "core/Super.h" 39 #include "util/Exception.h" 40 37 #include "core/XMLPort.h" 41 38 #include "QuestEffect.h" 42 39 -
code/trunk/src/orxonox/objects/quest/GlobalQuest.h
r3068 r3196 28 28 29 29 /** 30 @file GlobalQuest.h30 @file 31 31 @brief Definition of the GlobalQuest class. 32 32 */ … … 37 37 #include "OrxonoxPrereqs.h" 38 38 39 #include <list> 39 40 #include <set> 40 #include <list>41 42 #include "core/XMLPort.h"43 41 #include "Quest.h" 44 42 -
code/trunk/src/orxonox/objects/quest/LocalQuest.cc
r3110 r3196 28 28 29 29 /** 30 @file LocalQuest.cc30 @file 31 31 @brief Implementation of the LocalQuest class. 32 32 */ … … 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "core/Super.h" 38 #include "util/Exception.h" 39 40 #include "orxonox/objects/infos/PlayerInfo.h" 37 #include "core/XMLPort.h" 41 38 #include "QuestEffect.h" 42 39 -
code/trunk/src/orxonox/objects/quest/LocalQuest.h
r3068 r3196 28 28 29 29 /** 30 @file LocalQuest.h30 @file 31 31 @brief Definition of the LocalQuest class. 32 32 */ … … 38 38 39 39 #include <map> 40 #include <string>41 42 #include "core/XMLPort.h"43 40 #include "Quest.h" 44 41 -
code/trunk/src/orxonox/objects/quest/Quest.cc
r3110 r3196 28 28 29 29 /** 30 @file Quest.cc30 @file 31 31 @brief Implementation of the Quest class. 32 32 */ … … 35 35 36 36 #include "core/CoreIncludes.h" 37 38 #include "orxonox/objects/infos/PlayerInfo.h" 37 #include "core/XMLPort.h" 39 38 #include "QuestManager.h" 40 39 #include "QuestDescription.h" -
code/trunk/src/orxonox/objects/quest/Quest.h
r3068 r3196 28 28 29 29 /** 30 @file Quest.h30 @file 31 31 @brief Definition of the Quest class. 32 32 The Quest is the parent class of LocalQuest and GlobalQuest. … … 39 39 40 40 #include <list> 41 #include <string>42 43 #include "core/XMLPort.h"44 45 41 #include "QuestItem.h" 46 42 -
code/trunk/src/orxonox/objects/quest/QuestDescription.cc
r3110 r3196 28 28 29 29 /** 30 @file QuestDescription.cc30 @file 31 31 @brief Implementation of the QuestDescription class. 32 32 */ … … 36 36 37 37 #include "core/CoreIncludes.h" 38 #include "core/XMLPort.h" 38 39 #include "QuestNotification.h" 39 40 -
code/trunk/src/orxonox/objects/quest/QuestDescription.h
r3068 r3196 28 28 29 29 /** 30 @file QuestDescription.h30 @file 31 31 @brief Definition of the QuestDescription class. 32 32 */ … … 38 38 39 39 #include <string> 40 41 40 #include "core/BaseObject.h" 42 #include "core/XMLPort.h"43 41 44 42 // tolua_begin -
code/trunk/src/orxonox/objects/quest/QuestEffect.cc
r3110 r3196 28 28 29 29 /** 30 @file QuestEffect.cc30 @file 31 31 @brief Implementation of the QuestEffect class. 32 32 */ 33 33 34 34 #include "QuestEffect.h" 35 36 35 #include "core/CoreIncludes.h" 37 38 #include "orxonox/objects/infos/PlayerInfo.h"39 36 40 37 namespace orxonox -
code/trunk/src/orxonox/objects/quest/QuestEffect.h
r3068 r3196 28 28 29 29 /** 30 @file QuestEffect.h30 @file 31 31 @brief Definition of the QuestEffect class. 32 32 */ … … 38 38 39 39 #include <list> 40 41 40 #include "core/BaseObject.h" 42 41 -
code/trunk/src/orxonox/objects/quest/QuestEffectBeacon.cc
r3110 r3196 28 28 29 29 /** 30 @file QuestEffectBeacon.cc30 @file 31 31 @brief Implementation of the QuestEffectBeacon class. 32 32 */ … … 36 36 #include "core/CoreIncludes.h" 37 37 #include "core/XMLPort.h" 38 #include "core/Event.h"39 38 #include "core/EventIncludes.h" 40 41 #include "orxonox/objects/infos/PlayerInfo.h"42 39 #include "orxonox/objects/worldentities/pawns/Pawn.h" 43 40 #include "orxonox/objects/worldentities/triggers/PlayerTrigger.h" … … 89 86 SUPER(QuestEffectBeacon, processEvent, event); 90 87 91 SetSubclassEvent(QuestEffectBeacon, "execute", execute, event, PlayerTrigger);88 ORXONOX_SET_SUBCLASS_EVENT(QuestEffectBeacon, "execute", execute, event, PlayerTrigger); 92 89 } 93 90 -
code/trunk/src/orxonox/objects/quest/QuestEffectBeacon.h
r2911 r3196 28 28 29 29 /** 30 @file QuestEffectBeacon.h30 @file 31 31 @brief Definition of the QuestEffectBeacon class. 32 32 */ … … 37 37 #include "OrxonoxPrereqs.h" 38 38 39 #include <list> 39 40 #include "orxonox/objects/worldentities/StaticEntity.h" 40 41 -
code/trunk/src/orxonox/objects/quest/QuestHint.cc
r3110 r3196 28 28 29 29 /** 30 @file QuestHint.cc30 @file 31 31 @brief Implementation of the QuestHint class. 32 32 */ … … 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "util/Exception.h" 38 39 #include "orxonox/objects/infos/PlayerInfo.h" 37 #include "core/XMLPort.h" 40 38 #include "QuestManager.h" 41 39 #include "QuestDescription.h" -
code/trunk/src/orxonox/objects/quest/QuestHint.h
r3068 r3196 28 28 29 29 /** 30 @file QuestHint.h30 @file 31 31 @brief Definition of the QuestHint class. 32 32 */ … … 38 38 39 39 #include <map> 40 #include <string>41 42 #include "core/XMLPort.h"43 40 #include "QuestItem.h" 44 41 -
code/trunk/src/orxonox/objects/quest/QuestItem.cc
r3110 r3196 28 28 29 29 /** 30 @file QuestItem.cc30 @file 31 31 @brief Implementation of the QuestItem class. 32 32 */ … … 35 35 36 36 #include "core/CoreIncludes.h" 37 37 #include "core/XMLPort.h" 38 38 #include "QuestDescription.h" 39 39 -
code/trunk/src/orxonox/objects/quest/QuestItem.h
r3068 r3196 28 28 29 29 /** 30 @file QuestItem.h30 @file 31 31 @brief Definition of the QuestItem class. 32 32 The QuestItem is the parent class of Quest and QuestHint. … … 40 40 41 41 #include <string> 42 43 42 #include "core/BaseObject.h" 44 #include "core/XMLPort.h"45 43 46 44 namespace orxonox -
code/trunk/src/orxonox/objects/quest/QuestListener.cc
r3110 r3196 28 28 29 29 /** 30 @file QuestListener.cc30 @file 31 31 @brief Implementation of the QuestListener class. 32 32 */ … … 36 36 #include "core/CoreIncludes.h" 37 37 #include "core/XMLPort.h" 38 #include "util/Exception.h"39 40 38 #include "Quest.h" 41 39 #include "QuestManager.h" … … 164 162 Return the mode of the QuestListener. Can be eighter 'all', 'start', 'fail' or 'complete'. 165 163 */ 166 conststd::string QuestListener::getMode(void)164 std::string QuestListener::getMode(void) 167 165 { 168 166 if(this->mode_ == questListenerMode::all) … … 191 189 /** 192 190 @brief 191 Get the questId of the Quest the QuestListener reacts to. 192 @return 193 Returns the questId of the Quest the QuestListener reacts to. 194 */ 195 const std::string & QuestListener::getQuestId(void) 196 { 197 return this->quest_->getId(); 198 } 199 200 /** 201 @brief 193 202 Executes the QuestListener, resp. fires an Event. 194 203 @return -
code/trunk/src/orxonox/objects/quest/QuestListener.h
r2911 r3196 28 28 29 29 /** 30 @file QuestListener.h30 @file 31 31 @brief Definition of the QuestListener class. 32 32 */ … … 39 39 #include <string> 40 40 #include <list> 41 42 41 #include "core/BaseObject.h" 43 44 #include "Quest.h"45 42 46 43 namespace orxonox … … 90 87 bool setMode(const std::string & mode); //!< Sets the mode of the QuestListener. 91 88 92 conststd::string getMode(void); //!< Get the mode of the QuestListener.89 std::string getMode(void); //!< Get the mode of the QuestListener. 93 90 94 /** 95 @brief Get the questId of the Quest the QuestListener reacts to. 96 @return Returns the questId of the Quest the QuestListener reacts to. 97 */ 98 inline const std::string & getQuestId(void) 99 { return this->quest_->getId(); } 100 91 const std::string & getQuestId(void); 101 92 bool execute(void); //!< Executes the QuestListener, resp. fires an Event. 102 93 -
code/trunk/src/orxonox/objects/quest/QuestManager.cc
r3110 r3196 28 28 29 29 /** 30 @file QuestManager.cc30 @file 31 31 @brief Implementation of the QuestManager class. 32 32 */ … … 34 34 #include "QuestManager.h" 35 35 36 #include "util/Exception.h" 36 37 #include "core/CoreIncludes.h" 37 #include "core/ConsoleCommand.h"38 #include "core/input/InputManager.h"39 40 #include "util/Exception.h"41 38 #include "gui/GUIManager.h" 39 42 40 #include "objects/infos/PlayerInfo.h" 41 #include "objects/infos/PlayerInfo.h" 42 #include "overlays/GUIOverlay.h" 43 43 #include "Quest.h" 44 44 #include "QuestHint.h" 45 #include "QuestItem.h" 45 46 46 47 namespace orxonox -
code/trunk/src/orxonox/objects/quest/QuestManager.h
r3068 r3196 28 28 29 29 /** 30 @file QuestManager.h30 @file 31 31 @brief Definition of the QuestManager class. 32 32 */ … … 37 37 #include "OrxonoxPrereqs.h" 38 38 39 #include <list> 39 40 #include <map> 40 #include <list>41 41 #include <string> 42 43 42 #include "core/OrxonoxClass.h" 44 #include "orxonox/objects/infos/PlayerInfo.h"45 #include "overlays/GUIOverlay.h"46 43 47 44 // tolua_begin -
code/trunk/src/orxonox/objects/quest/QuestNotification.cc
r3110 r3196 28 28 29 29 #include "QuestNotification.h" 30 31 30 #include "core/CoreIncludes.h" 32 33 #include "orxonox/overlays/notifications/Notification.h"34 31 35 32 namespace orxonox { -
code/trunk/src/orxonox/objects/quest/QuestNotification.h
r3078 r3196 33 33 34 34 #include <string> 35 36 #include "orxonox/overlays/notifications/Notification.h" 35 #include "overlays/notifications/Notification.h" 37 36 38 37 namespace orxonox { -
code/trunk/src/orxonox/objects/weaponsystem/DefaultWeaponmodeLink.cc
r3110 r3196 31 31 #include "core/CoreIncludes.h" 32 32 #include "core/XMLPort.h" 33 34 33 #include "WeaponSystem.h" 35 34 -
code/trunk/src/orxonox/objects/weaponsystem/Munition.cc
r3110 r3196 29 29 30 30 #include "Munition.h" 31 32 31 #include "core/CoreIncludes.h" 33 32 -
code/trunk/src/orxonox/objects/weaponsystem/Munition.h
r3053 r3196 34 34 35 35 #include <map> 36 37 36 #include "core/BaseObject.h" 38 37 #include "tools/Timer.h" -
code/trunk/src/orxonox/objects/weaponsystem/MuzzleFlash.cc
r3110 r3196 30 30 #include "MuzzleFlash.h" 31 31 32 #include "core/GameMode.h"33 32 #include "core/CoreIncludes.h" 34 #include "core/XMLPort.h" 35 #include "util/Math.h" 33 #include "core/Executor.h" 36 34 37 35 namespace orxonox … … 42 40 { 43 41 RegisterObject(MuzzleFlash); 44 this->setScale(0.1 );42 this->setScale(0.1f); 45 43 46 44 this->delayTimer_.setTimer(0.1f, false, this, createExecutor(createFunctor(&MuzzleFlash::destroy))); -
code/trunk/src/orxonox/objects/weaponsystem/MuzzleFlash.h
r3053 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include "tools/Timer.h" 33 35 #include "objects/worldentities/Billboard.h" 34 #include "tools/Timer.h"35 36 36 37 37 namespace orxonox -
code/trunk/src/orxonox/objects/weaponsystem/Weapon.h
r3053 r3196 32 32 33 33 #include "OrxonoxPrereqs.h" 34 35 #include <map> 36 #include "tools/Timer.h" 34 37 #include "objects/worldentities/StaticEntity.h" 35 36 #include "tools/Timer.h"37 38 38 39 namespace orxonox -
code/trunk/src/orxonox/objects/weaponsystem/WeaponMode.h
r3053 r3196 32 32 33 33 #include "OrxonoxPrereqs.h" 34 35 #include <string> 36 #include "util/Math.h" 34 37 #include "core/BaseObject.h" 35 38 #include "core/Identifier.h" 36 39 #include "tools/Timer.h" 37 #include "core/Identifier.h"38 #include "util/Math.h"39 40 40 41 namespace orxonox -
code/trunk/src/orxonox/objects/weaponsystem/WeaponPack.cc
r3110 r3196 31 31 #include "core/CoreIncludes.h" 32 32 #include "core/XMLPort.h" 33 #include "objects/worldentities/pawns/Pawn.h"34 33 35 34 #include "Weapon.h" 36 #include "WeaponSlot.h"37 35 #include "WeaponSystem.h" 38 36 #include "DefaultWeaponmodeLink.h" -
code/trunk/src/orxonox/objects/weaponsystem/WeaponPack.h
r3053 r3196 34 34 35 35 #include <set> 36 37 36 #include "core/BaseObject.h" 38 37 -
code/trunk/src/orxonox/objects/weaponsystem/WeaponSet.h
r3053 r3196 34 34 35 35 #include <map> 36 37 36 #include "core/BaseObject.h" 38 37 -
code/trunk/src/orxonox/objects/weaponsystem/WeaponSystem.h
r3053 r3196 33 33 #include "OrxonoxPrereqs.h" 34 34 35 #include <map> 35 36 #include <set> 36 #include <map>37 37 #include <vector> 38 39 38 #include "core/BaseObject.h" 40 39 -
code/trunk/src/orxonox/objects/weaponsystem/munitions/FusionMunition.cc
r3110 r3196 28 28 29 29 #include "FusionMunition.h" 30 31 30 #include "core/CoreIncludes.h" 32 31 -
code/trunk/src/orxonox/objects/weaponsystem/munitions/LaserMunition.cc
r3110 r3196 28 28 29 29 #include "LaserMunition.h" 30 31 30 #include "core/CoreIncludes.h" 32 31 -
code/trunk/src/orxonox/objects/weaponsystem/munitions/ReplenishingMunition.cc
r3110 r3196 28 28 29 29 #include "ReplenishingMunition.h" 30 31 30 #include "core/CoreIncludes.h" 32 31 -
code/trunk/src/orxonox/objects/weaponsystem/munitions/ReplenishingMunition.h
r3053 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include "tools/Timer.h" 33 35 #include "objects/weaponsystem/Munition.h" 34 #include "tools/Timer.h"35 36 36 37 namespace orxonox -
code/trunk/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.cc
r3110 r3196 29 29 #include "BillboardProjectile.h" 30 30 31 #include <OgreBillboardSet.h> 32 31 #include "core/CoreIncludes.h" 33 32 #include "core/GameMode.h" 34 #include "core/CoreIncludes.h"35 33 #include "objects/Scene.h" 36 34 … … 46 44 { 47 45 assert(this->getScene()->getSceneManager()); // getScene() was already checked by WorldEntity 48 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(0.5 , 0.5, 0.7, 0.8), 1);46 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(0.5f, 0.5f, 0.7f, 0.8f), 1); 49 47 this->attachOgreObject(this->billboard_.getBillboardSet()); 50 48 } -
code/trunk/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.h
r3053 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "util/Math.h" 35 #include "tools/BillboardSet.h" 34 36 #include "Projectile.h" 35 #include "tools/BillboardSet.h"36 #include "util/Math.h"37 37 38 38 namespace orxonox -
code/trunk/src/orxonox/objects/weaponsystem/projectiles/LightningGunProjectile.cc
r3110 r3196 29 29 #include "LightningGunProjectile.h" 30 30 31 #include <OgreBillboardSet.h> 32 33 #include "core/GameMode.h" 31 #include "util/Convert.h" 34 32 #include "core/CoreIncludes.h" 35 #include "objects/Scene.h"36 #include "util/Convert.h"37 33 38 34 namespace orxonox … … 46 42 this->textureIndex_ = 1; 47 43 this->maxTextureIndex_ = 8; 48 this->textureTimer_.setTimer(0.01 , true, this, createExecutor(createFunctor(&LightningGunProjectile::changeTexture)));44 this->textureTimer_.setTimer(0.01f, true, this, createExecutor(createFunctor(&LightningGunProjectile::changeTexture))); 49 45 50 46 registerVariables(); -
code/trunk/src/orxonox/objects/weaponsystem/projectiles/LightningGunProjectile.h
r3088 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <string> 34 35 #include "tools/Timer.h" 35 36 36 #include "BillboardProjectile.h" 37 37 -
code/trunk/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.cc
r3110 r3196 29 29 #include "ParticleProjectile.h" 30 30 31 #include <OgreParticleSystem.h>32 31 #include <OgreParticleEmitter.h> 33 34 #include "core/GameMode.h" 32 #include "tools/ParticleInterface.h" 35 33 #include "core/CoreIncludes.h" 36 #include "core/ConfigValueIncludes.h"37 34 #include "objects/Scene.h" 38 35 -
code/trunk/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.h
r3053 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 33 #include "BillboardProjectile.h" 35 #include "tools/ParticleInterface.h"36 #include "util/Math.h"37 34 38 35 namespace orxonox -
code/trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc
r3110 r3196 29 29 #include "Projectile.h" 30 30 31 #include <OgreBillboard.h>32 33 31 #include "core/CoreIncludes.h" 32 #include "core/ConfigValueIncludes.h" 34 33 #include "core/Executor.h" 35 #include "core/ConfigValueIncludes.h" 36 #include "core/Iterator.h" 37 #include "tools/ParticleInterface.h" 38 39 #include "objects/worldentities/Model.h" 34 #include "core/GameMode.h" 35 #include "objects/collisionshapes/SphereCollisionShape.h" 36 #include "objects/worldentities/pawns/Pawn.h" 40 37 #include "objects/worldentities/ParticleSpawner.h" 41 #include "objects/collisionshapes/SphereCollisionShape.h"42 #include "core/GameMode.h"43 38 44 39 namespace orxonox -
code/trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.h
r3053 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "tools/Timer.h" 35 #include "interfaces/PawnListener.h" 34 36 #include "objects/worldentities/MovableEntity.h" 35 #include "objects/worldentities/pawns/Pawn.h"36 #include "tools/Timer.h"37 37 38 38 namespace orxonox -
code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/EnergyDrink.cc
r3110 r3196 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "core/Executor.h" 32 33 #include "core/XMLPort.h" 33 #include "objects/weaponsystem/projectiles/ParticleProjectile.h"34 34 #include "objects/worldentities/Model.h" 35 36 #include "objects/weaponsystem/projectiles/Projectile.h" 35 37 #include "objects/weaponsystem/MuzzleFlash.h" 36 37 38 #include "objects/weaponsystem/Weapon.h" 38 39 #include "objects/weaponsystem/WeaponPack.h" … … 69 70 { 70 71 this->material_ = material; 71 }72 73 std::string& EnergyDrink::getMaterial()74 {75 return this->material_;76 72 } 77 73 -
code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/EnergyDrink.h
r3053 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <string> 35 #include "tools/Timer.h" 33 36 #include "objects/weaponsystem/WeaponMode.h" 34 #include "tools/Timer.h"35 37 36 38 namespace orxonox … … 47 49 private: 48 50 void setMaterial(const std::string& material); 49 std::string& getMaterial(); 51 inline const std::string& getMaterial() 52 { return this->material_; } 50 53 void setDelay(float d); 51 54 float getDelay() const; -
code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/FusionFire.cc
r3110 r3196 29 29 #include "FusionFire.h" 30 30 31 #include "util/Math.h" 31 32 #include "core/CoreIncludes.h" 32 33 #include "objects/weaponsystem/projectiles/BillboardProjectile.h" -
code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/HsW01.cc
r3110 r3196 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "core/Executor.h" 32 33 #include "core/XMLPort.h" 33 #include "objects/weaponsystem/projectiles/ParticleProjectile.h"34 34 #include "objects/worldentities/Model.h" 35 36 #include "objects/weaponsystem/projectiles/Projectile.h" 35 37 #include "objects/weaponsystem/MuzzleFlash.h" 36 37 38 #include "objects/weaponsystem/Weapon.h" 38 39 #include "objects/weaponsystem/WeaponPack.h" -
code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/HsW01.h
r3053 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include "tools/Timer.h" 33 35 #include "objects/weaponsystem/WeaponMode.h" 34 #include "tools/Timer.h"35 36 36 37 namespace orxonox -
code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/LaserFire.cc
r3110 r3196 31 31 #include "core/CoreIncludes.h" 32 32 #include "objects/weaponsystem/projectiles/ParticleProjectile.h" 33 34 33 #include "objects/weaponsystem/Weapon.h" 35 34 #include "objects/weaponsystem/WeaponPack.h" -
code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/LightningGun.cc
r3110 r3196 30 30 31 31 #include "core/CoreIncludes.h" 32 33 #include "objects/worldentities/Billboard.h" 34 32 #include "objects/weaponsystem/projectiles/LightningGunProjectile.h" 35 33 #include "objects/weaponsystem/Weapon.h" 36 34 #include "objects/weaponsystem/WeaponPack.h" 37 35 #include "objects/weaponsystem/WeaponSystem.h" 38 39 #include "objects/weaponsystem/projectiles/LightningGunProjectile.h"40 41 #include "util/Math.h"42 36 43 37 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Attacher.h
r3078 r3196 33 33 34 34 #include <list> 35 35 #include <string> 36 #include "core/XMLNameListener.h" 36 37 #include "objects/worldentities/StaticEntity.h" 37 #include "core/XMLNameListener.h"38 38 39 39 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Backlight.cc
r3110 r3196 31 31 #include <OgreRibbonTrail.h> 32 32 #include <OgreSceneManager.h> 33 33 #include <OgreSceneNode.h> 34 35 #include "util/Exception.h" 36 #include "core/CoreIncludes.h" 34 37 #include "core/GameMode.h" 35 #include "core/CoreIncludes.h"36 #include "core/Executor.h"37 38 #include "core/XMLPort.h" 38 39 #include "objects/Scene.h" 39 #include "util/Exception.h"40 40 41 41 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Backlight.h
r3068 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <string> 35 #include "interfaces/TimeFactorListener.h" 33 36 #include "FadingBillboard.h" 34 #include "tools/TimeFactorListener.h"35 37 36 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/BigExplosion.cc
r3110 r3196 28 28 29 29 #include "BigExplosion.h" 30 #include "MovableEntity.h" 30 31 //#include <sstream> 32 33 #include "util/Exception.h" 34 #include "core/CoreIncludes.h" 35 #include "core/CommandExecutor.h" 36 #include "core/Executor.h" 37 #include "core/GameMode.h" 38 #include "tools/ParticleInterface.h" 39 #include "objects/Scene.h" 40 #include "objects/worldentities/ParticleSpawner.h" 31 41 #include "Model.h" 32 33 #include <OgreParticleSystem.h>34 #include <OgreSceneNode.h>35 #include <sstream>36 37 #include "core/GameMode.h"38 #include "core/CoreIncludes.h"39 #include "core/Executor.h"40 #include "core/CommandExecutor.h"41 #include "objects/Scene.h"42 #include "tools/ParticleInterface.h"43 #include "objects/worldentities/ParticleSpawner.h"44 #include "util/Exception.h"45 42 46 43 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/BigExplosion.h
r3087 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <string> 34 35 35 #include "tools/Timer.h" 36 36 #include "MovableEntity.h" 37 #include "tools/Timer.h"38 37 39 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Billboard.cc
r3110 r3196 29 29 #include "Billboard.h" 30 30 31 #include <OgreBillboardSet.h>32 33 31 #include "core/CoreIncludes.h" 32 #include "core/GameMode.h" 34 33 #include "core/XMLPort.h" 35 #include "core/GameMode.h"36 34 #include "objects/Scene.h" 37 35 -
code/trunk/src/orxonox/objects/worldentities/Billboard.h
r3053 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 #include "StaticEntity.h" 33 34 34 #include "util/Math.h" 35 35 #include "tools/BillboardSet.h" 36 #include "objects/Teamcolourable.h" 36 #include "interfaces/TeamColourable.h" 37 #include "StaticEntity.h" 37 38 38 39 namespace orxonox 39 40 { 40 class _OrxonoxExport Billboard : public StaticEntity, public Team colourable41 class _OrxonoxExport Billboard : public StaticEntity, public TeamColourable 41 42 { 42 43 public: -
code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.cc
r3110 r3196 29 29 #include "BlinkingBillboard.h" 30 30 31 #include "core/CoreIncludes.h" 31 32 #include "core/GameMode.h" 32 #include "core/CoreIncludes.h"33 33 #include "core/XMLPort.h" 34 #include "util/Math.h"35 34 36 35 namespace orxonox … … 80 79 this->time_ += dt; 81 80 if (this->bQuadratic_) 82 this->setScale(this->amplitude_ * s quare(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)));81 this->setScale(this->amplitude_ * static_cast<float>(square(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)))); 83 82 else 84 this->setScale(this->amplitude_ * s in((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_));83 this->setScale(this->amplitude_ * static_cast<float>(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_))); 85 84 } 86 85 } -
code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.h
r2087 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include "util/Math.h" 35 #include "interfaces/Tickable.h" 33 36 #include "Billboard.h" 34 #include "objects/Tickable.h"35 37 36 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Camera.cc
r3110 r3196 29 29 #include "Camera.h" 30 30 31 #include <string>32 #include <cassert>33 34 31 #include <OgreCamera.h> 35 32 #include <OgreSceneManager.h> … … 37 34 38 35 #include "util/Exception.h" 36 #include "util/String.h" 39 37 #include "core/CoreIncludes.h" 40 38 #include "core/ConfigValueIncludes.h" -
code/trunk/src/orxonox/objects/worldentities/Camera.h
r3068 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <OgrePrerequisites.h> 34 #include "util/OgreForwardRefs.h" 35 #include "interfaces/Tickable.h" 35 36 #include "objects/worldentities/StaticEntity.h" 36 #include "objects/Tickable.h"37 37 38 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/CameraPosition.cc
r3110 r3196 28 28 29 29 #include "CameraPosition.h" 30 31 #include <OgreCamera.h>32 30 33 31 #include "core/CoreIncludes.h" -
code/trunk/src/orxonox/objects/worldentities/CameraPosition.h
r3089 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 33 #include "objects/worldentities/StaticEntity.h" 35 34 -
code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc
r3110 r3196 30 30 31 31 #include <OgreSceneManager.h> 32 #include <OgreSceneNode.h> 32 33 33 34 #include "core/CoreIncludes.h" … … 35 36 #include "core/GameMode.h" 36 37 #include "core/XMLPort.h" 37 #include "core/Template.h"38 38 39 39 #include "objects/Scene.h" -
code/trunk/src/orxonox/objects/worldentities/ControllableEntity.h
r3089 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <list> 35 #include <string> 36 #include "util/Math.h" 33 37 #include "MobileEntity.h" 34 38 -
code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.cc
r3110 r3196 29 29 #include "ExplosionChunk.h" 30 30 31 #include <OgreParticleSystem.h>32 33 #include "core/GameMode.h"34 31 #include "core/CoreIncludes.h" 35 32 #include "core/Executor.h" 33 #include "core/GameMode.h" 34 #include "util/Exception.h" 36 35 #include "objects/Scene.h" 37 36 #include "tools/ParticleInterface.h" 38 #include "util/Exception.h"39 37 40 38 namespace orxonox … … 153 151 Vector3 change(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)); 154 152 change.normalise(); 155 change *= rnd(0.4 , 0.8);153 change *= rnd(0.4f, 0.8f); 156 154 Vector3 velocity = this->getVelocity(); 157 155 velocity.normalise(); 158 156 velocity += change; 159 157 velocity.normalise(); 160 velocity *= length * rnd(0.8 , 1.0);158 velocity *= length * rnd(0.8f, 1.0f); 161 159 162 160 this->setVelocity(velocity); -
code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.h
r2662 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "tools/Timer.h" 34 35 #include "MovableEntity.h" 35 #include "tools/Timer.h"36 36 37 37 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/FadingBillboard.cc
r3110 r3196 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "core/Executor.h"33 32 #include "core/XMLPort.h" 34 33 -
code/trunk/src/orxonox/objects/worldentities/FadingBillboard.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include "util/Math.h" 35 #include "tools/Timer.h" 36 #include "interfaces/Tickable.h" 33 37 #include "Billboard.h" 34 #include "objects/Tickable.h"35 #include "tools/Timer.h"36 38 37 39 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/ForceField.cc
r3064 r3196 28 28 29 29 #include "ForceField.h" 30 #include "core/XMLPort.h"31 30 32 31 #include "core/CoreIncludes.h" 32 #include "core/XMLPort.h" 33 33 #include "objects/worldentities/MobileEntity.h" 34 34 -
code/trunk/src/orxonox/objects/worldentities/ForceField.h
r3064 r3196 31 31 #define _ForceField_H__ 32 32 33 #include "OrxonoxPrereqs.h" 34 35 #include "interfaces/Tickable.h" 33 36 #include "StaticEntity.h" 34 #include "objects/Tickable.h"35 37 36 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Light.cc
r3110 r3196 29 29 #include "Light.h" 30 30 31 #include <sstream>32 #include <cassert>33 34 31 #include <OgreSceneManager.h> 32 #include <OgreLight.h> 33 #include <boost/static_assert.hpp> 35 34 36 35 #include "util/String.h" 37 36 #include "util/Exception.h" 37 #include "core/CoreIncludes.h" 38 38 #include "core/GameMode.h" 39 #include "core/CoreIncludes.h"40 39 #include "core/XMLPort.h" 41 40 #include "objects/Scene.h" … … 44 43 { 45 44 CreateFactory(Light); 45 46 // Be sure we don't do bad conversions 47 BOOST_STATIC_ASSERT((int)Ogre::Light::LT_POINT == (int)Light::LT_POINT); 48 BOOST_STATIC_ASSERT((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::LT_DIRECTIONAL); 49 BOOST_STATIC_ASSERT((int)Ogre::Light::LT_SPOTLIGHT == (int)Light::LT_SPOTLIGHT); 46 50 47 51 Light::Light(BaseObject* creator) : StaticEntity(creator) … … 52 56 this->diffuse_ = ColourValue::White; 53 57 this->specular_ = ColourValue::White; 54 this->type_ = Ogre::Light::LT_POINT;58 this->type_ = Light::LT_POINT; 55 59 this->attenuation_ = Vector4(100000, 1, 0, 0); 56 60 this->spotlightRange_ = Vector3(40.0f, 30.0f, 1.0f); … … 136 140 { 137 141 if (type == "point") 138 this->setType( Ogre::Light::LT_POINT);142 this->setType(Light::LT_POINT); 139 143 else if (type == "directional") 140 this->setType( Ogre::Light::LT_DIRECTIONAL);144 this->setType(Light::LT_DIRECTIONAL); 141 145 else if (type == "spotlight") 142 this->setType( Ogre::Light::LT_SPOTLIGHT);146 this->setType(Light::LT_SPOTLIGHT); 143 147 else 144 this->setType( Ogre::Light::LT_POINT);148 this->setType(Light::LT_POINT); 145 149 } 146 150 … … 149 153 switch (this->type_) 150 154 { 151 case Ogre::Light::LT_DIRECTIONAL:155 case Light::LT_DIRECTIONAL: 152 156 return "directional"; 153 case Ogre::Light::LT_SPOTLIGHT:157 case Light::LT_SPOTLIGHT: 154 158 return "spotlight"; 155 case Ogre::Light::LT_POINT:159 case Light::LT_POINT: 156 160 default: 157 161 return "point"; … … 163 167 if (this->light_) 164 168 { 165 this->light_->setType( this->type_);169 this->light_->setType(static_cast<Ogre::Light::LightTypes>(this->type_)); 166 170 167 171 if (this->type_ != Ogre::Light::LT_DIRECTIONAL) -
code/trunk/src/orxonox/objects/worldentities/Light.h
r2826 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 #include "StaticEntity.h"34 33 35 34 #include <string> 36 #include <OgreLight.h>37 38 35 #include "util/Math.h" 39 #include "objects/Teamcolourable.h" 36 #include "interfaces/TeamColourable.h" 37 #include "StaticEntity.h" 40 38 41 39 namespace orxonox 42 40 { 43 class _OrxonoxExport Light : public StaticEntity, public Team colourable41 class _OrxonoxExport Light : public StaticEntity, public TeamColourable 44 42 { 43 public: 44 enum LightTypes // Copy from the Ogre enum 45 { 46 /// Point light sources give off light equally in all directions, so require only position not direction 47 LT_POINT, 48 /// Directional lights simulate parallel light beams from a distant source, hence have direction but no position 49 LT_DIRECTIONAL, 50 /// Spotlights simulate a cone of light from a source so require position and direction, plus extra values for falloff 51 LT_SPOTLIGHT 52 }; 53 45 54 public: 46 55 Light(BaseObject* creator); … … 55 64 { return this->light_; } 56 65 57 inline void setType( Ogre::Light::LightTypes type)66 inline void setType(Light::LightTypes type) 58 67 { this->type_ = type; this->updateType(); } 59 inline Ogre::Light::LightTypes getType() const68 inline Light::LightTypes getType() const 60 69 { return this->type_; } 61 70 … … 133 142 134 143 Ogre::Light* light_; 135 Ogre::Light::LightTypes type_;144 LightTypes type_; 136 145 ColourValue diffuse_; 137 146 ColourValue specular_; -
code/trunk/src/orxonox/objects/worldentities/MobileEntity.cc
r3110 r3196 30 30 31 31 #include <OgreSceneNode.h> 32 #include "BulletDynamics/Dynamics/btRigidBody.h" 33 34 #include "util/Debug.h" 35 #include "util/MathConvert.h" 36 #include "util/Exception.h" 32 #include <BulletDynamics/Dynamics/btRigidBody.h> 33 37 34 #include "core/CoreIncludes.h" 38 35 #include "core/XMLPort.h" 39 40 36 #include "objects/Scene.h" 41 37 … … 96 92 this->angularVelocity_.z += angularAcceleration_.z * dt; 97 93 // Calculate new orientation with quaternion derivative. This is about 30% faster than with angle/axis method. 98 float mult = dt * 0.5 ;94 float mult = dt * 0.5f; 99 95 // TODO: this could be optimized by writing it out. The calls currently create 4 new Quaternions! 100 96 Quaternion newOrientation(0.0f, this->angularVelocity_.x * mult, this->angularVelocity_.y * mult, this->angularVelocity_.z * mult); -
code/trunk/src/orxonox/objects/worldentities/MobileEntity.h
r3084 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "util/Math.h" 35 #include "interfaces/Tickable.h" 34 36 #include "WorldEntity.h" 35 #include "objects/Tickable.h"36 37 37 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Model.cc
r3110 r3196 27 27 */ 28 28 29 #include "Model.h" 29 30 30 31 #include <OgreEntity.h> 31 #include "Model.h" 32 33 #include "core/CoreIncludes.h" 32 34 #include "core/GameMode.h" 33 #include "core/CoreIncludes.h"34 35 #include "core/XMLPort.h" 35 36 #include "objects/Scene.h" -
code/trunk/src/orxonox/objects/worldentities/Model.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <string> 35 #include "tools/Mesh.h" 33 36 #include "StaticEntity.h" 34 #include "tools/Mesh.h"35 37 36 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/MovableEntity.cc
r3110 r3196 31 31 32 32 #include "core/CoreIncludes.h" 33 #include "core/XMLPort.h"34 33 #include "core/Executor.h" 35 34 #include "core/GameMode.h" 35 #include "core/XMLPort.h" 36 36 #include "objects/worldentities/pawns/Pawn.h" 37 37 -
code/trunk/src/orxonox/objects/worldentities/MovableEntity.h
r3033 r3196 33 33 #include "OrxonoxPrereqs.h" 34 34 35 #include " MobileEntity.h"35 #include "util/Math.h" 36 36 #include "network/ClientConnectionListener.h" 37 37 #include "tools/Timer.h" 38 #include "MobileEntity.h" 38 39 39 40 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.cc
r3110 r3196 34 34 #include "ParticleEmitter.h" 35 35 36 #include <OgreParticleSystem.h> 37 36 #include "util/Exception.h" 37 #include "core/CoreIncludes.h" 38 #include "core/GameMode.h" 39 #include "core/XMLPort.h" 38 40 #include "tools/ParticleInterface.h" 39 #include "util/Exception.h"40 #include "core/GameMode.h"41 #include "core/CoreIncludes.h"42 #include "core/XMLPort.h"43 41 #include "objects/Scene.h" 44 42 -
code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <string> 33 35 #include "StaticEntity.h" 34 36 -
code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.cc
r3110 r3196 75 75 SUPER(ParticleSpawner, processEvent, event); 76 76 77 SetEvent(ParticleSpawner, "spawn", spawn, event);77 ORXONOX_SET_EVENT(ParticleSpawner, "spawn", spawn, event); 78 78 } 79 79 -
code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.h
r3068 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "tools/Timer.h" 34 35 #include "ParticleEmitter.h" 35 #include "tools/Timer.h"36 36 37 37 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Planet.cc
r3110 r3196 29 29 #include "Planet.h" 30 30 31 #include <math.h>32 33 31 #include <OgreEntity.h> 34 32 #include <OgreBillboardSet.h> 35 #include <OgreHardwareVertexBuffer.h> 36 #include <OgreMeshManager.h> 33 #include <OgreProgressiveMesh.h> 37 34 38 35 #include "core/CoreIncludes.h" 36 #include "core/GameMode.h" 39 37 #include "core/XMLPort.h" 40 38 #include "objects/Scene.h" 39 #include "Camera.h" 41 40 #include "CameraManager.h" 42 #include "Camera.h"43 #include "GraphicsManager.h"44 41 45 42 namespace orxonox … … 70 67 return; 71 68 72 Camera* activeCamera = CameraManager::getInstance().getActiveCamera(); 73 if(activeCamera) 69 if (GameMode::showsGraphics()) 74 70 { 75 float distance = this->getPosition().distance( activeCamera->getWorldPosition() ); 76 // COUT(2) << distance << std::endl; 77 float planetRadius = this->getScale(); 71 Camera* activeCamera = CameraManager::getInstance().getActiveCamera(); 72 if(activeCamera) 73 { 74 float distance = this->getPosition().distance( activeCamera->getWorldPosition() ); 75 // COUT(2) << distance << std::endl; 76 float planetRadius = this->getScale(); 78 77 79 float newScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius);80 float tempTest = newScale*(1+float(this->atmosphereSize)/float(this->imageSize));81 newScale = tempTest;78 float newScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius); 79 float tempTest = newScale*(1+float(this->atmosphereSize)/float(this->imageSize)); 80 newScale = tempTest; 82 81 83 this->billboard_.getBillboardSet()->setDefaultDimensions(newScale, newScale); 82 this->billboard_.getBillboardSet()->setDefaultDimensions(newScale, newScale); 83 } 84 84 } 85 85 … … 91 91 float scaleFactor = this->getScale(); 92 92 93 this->distList.push_back(10.0 *scaleFactor);94 this->distList.push_back(19.0 *scaleFactor);95 this->distList.push_back(27.0 *scaleFactor);96 this->distList.push_back(34.0 *scaleFactor);97 this->distList.push_back(40.0 *scaleFactor);98 this->distList.push_back(45.0 *scaleFactor);99 this->distList.push_back(49.0 *scaleFactor);100 this->distList.push_back(52.0 *scaleFactor);101 this->distList.push_back(54.0 *scaleFactor);102 this->distList.push_back(55.0 *scaleFactor);93 this->distList.push_back(10.0f*scaleFactor); 94 this->distList.push_back(19.0f*scaleFactor); 95 this->distList.push_back(27.0f*scaleFactor); 96 this->distList.push_back(34.0f*scaleFactor); 97 this->distList.push_back(40.0f*scaleFactor); 98 this->distList.push_back(45.0f*scaleFactor); 99 this->distList.push_back(49.0f*scaleFactor); 100 this->distList.push_back(52.0f*scaleFactor); 101 this->distList.push_back(54.0f*scaleFactor); 102 this->distList.push_back(55.0f*scaleFactor); 103 103 104 float reductionValue = 0.2 ;104 float reductionValue = 0.2f; 105 105 106 106 this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue); … … 145 145 SUPER(Planet, XMLPort, xmlelement, mode); 146 146 147 XMLPortParam(Planet, "atmosphere", setAtmosphere, getAtmosphere, xmlelement, mode).defaultValues("planet/Atmosphere"); 148 XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode); 149 XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode); 150 XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode); 151 XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true); 147 if (GameMode::showsGraphics()) 148 { 149 XMLPortParam(Planet, "atmosphere", setAtmosphere, getAtmosphere, xmlelement, mode).defaultValues("planet/Atmosphere"); 150 XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode); 151 XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode); 152 XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode); 153 XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true); 154 } 152 155 } 153 156 -
code/trunk/src/orxonox/objects/worldentities/Planet.h
r2710 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <OgreMesh.h> 35 34 #include <string> 36 35 #include "tools/BillboardSet.h" 37 36 #include "tools/Mesh.h" 38 37 #include "MovableEntity.h" 39 #include "objects/Tickable.h"40 38 41 39 namespace orxonox … … 108 106 float atmosphereSize; 109 107 float imageSize; 110 Ogre::Mesh::LodDistanceListdistList;108 std::vector<float> distList; 111 109 BillboardSet billboard_; 112 110 bool bCastShadows_; -
code/trunk/src/orxonox/objects/worldentities/PongBall.cc
r3110 r3196 32 32 #include "core/GameMode.h" 33 33 #include "objects/gametypes/Gametype.h" 34 #include "objects/worldentities/PongBat.h" 34 35 #include "sound/SoundBase.h" 35 36 … … 49 50 this->batID_[0] = OBJECTID_UNKNOWN; 50 51 this->batID_[1] = OBJECTID_UNKNOWN; 51 this->relMercyOffset_ = 0.05 ;52 this->relMercyOffset_ = 0.05f; 52 53 53 54 this->registerVariables(); … … 102 103 if (position.x > this->fieldWidth_ / 2 && this->bat_[1]) 103 104 { 104 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10 ) / 2);105 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2); 105 106 if (fabs(distance) <= 1) 106 107 { … … 122 123 if (position.x < -this->fieldWidth_ / 2 && this->bat_[0]) 123 124 { 124 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10 ) / 2);125 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2); 125 126 if (fabs(distance) <= 1) 126 127 { … … 172 173 if (position.x > this->fieldWidth_ / 2 && this->bat_[1]) 173 174 { 174 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10 ) / 2);175 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2); 175 176 if (fabs(distance) <= 1) 176 177 { … … 183 184 if (position.x < -this->fieldWidth_ / 2 && this->bat_[0]) 184 185 { 185 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10 ) / 2);186 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2); 186 187 if (fabs(distance) <= 1) 187 188 { … … 217 218 } 218 219 } 220 221 void PongBall::setBats(PongBat** bats) 222 { 223 this->bat_ = bats; 224 this->batID_[0] = this->bat_[0]->getObjectID(); 225 this->batID_[1] = this->bat_[1]->getObjectID(); 226 } 227 228 void PongBall::applyBats() 229 { 230 if (!this->bat_) 231 this->bat_ = new PongBat*[2]; 232 if (this->batID_[0] != OBJECTID_UNKNOWN) 233 this->bat_[0] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[0])); 234 if (this->batID_[1] != OBJECTID_UNKNOWN) 235 this->bat_[1] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[1])); 236 } 219 237 } -
code/trunk/src/orxonox/objects/worldentities/PongBall.h
r3108 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "util/Math.h" 34 35 #include "objects/worldentities/MovableEntity.h" 35 #include "objects/worldentities/PongBat.h"36 36 37 37 namespace orxonox … … 63 63 { return this->batlength_; } 64 64 65 void setBats(PongBat** bats) 66 { this->bat_ = bats; this->batID_[0] = this->bat_[0]->getObjectID(); this->batID_[1] = this->bat_[1]->getObjectID(); } 67 68 void applyBats() 69 { if(!this->bat_) this->bat_ = new PongBat*[2]; if(this->batID_[0] != OBJECTID_UNKNOWN) this->bat_[0] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[0])); if(this->batID_[1] != OBJECTID_UNKNOWN) this->bat_[1] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[1])); } 65 void setBats(PongBat** bats); 66 void applyBats(); 70 67 71 68 static const float MAX_REL_Z_VELOCITY; -
code/trunk/src/orxonox/objects/worldentities/PongBat.h
r2839 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 33 #include "objects/worldentities/ControllableEntity.h" 35 34 -
code/trunk/src/orxonox/objects/worldentities/PongCenterpoint.h
r2826 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <string> 35 #include <util/Math.h> 34 36 #include "objects/worldentities/StaticEntity.h" 35 37 -
code/trunk/src/orxonox/objects/worldentities/SpawnPoint.cc
r3110 r3196 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "core/Template.h" 32 33 #include "core/XMLPort.h" 33 34 #include "objects/gametypes/Gametype.h" 35 #include "objects/worldentities/pawns/Pawn.h" 34 36 35 37 namespace orxonox … … 71 73 } 72 74 75 void SpawnPoint::setTemplate(Template* temp) 76 { 77 this->template_ = temp; 78 this->templatename_ = temp->getName(); 79 } 80 73 81 Pawn* SpawnPoint::spawn() 74 82 { -
code/trunk/src/orxonox/objects/worldentities/SpawnPoint.h
r2662 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <string> 34 35 #include "core/Identifier.h" 35 #include "core/Template.h"36 #include "objects/worldentities/pawns/Pawn.h"37 36 #include "objects/worldentities/StaticEntity.h" 38 37 … … 52 51 { return this->spawnclass_; } 53 52 54 inline void setTemplate(Template* temp) 55 { this->template_ = temp; this->templatename_ = temp->getName(); } 53 void setTemplate(Template* temp); 56 54 inline Template* getTemplate() const 57 55 { return this->template_; } -
code/trunk/src/orxonox/objects/worldentities/StaticEntity.cc
r3110 r3196 31 31 32 32 #include <OgreSceneNode.h> 33 #include "BulletDynamics/Dynamics/btRigidBody.h" 34 35 #include "util/Exception.h" 33 #include <BulletDynamics/Dynamics/btRigidBody.h> 34 #include "util/OrxAssert.h" 36 35 #include "core/CoreIncludes.h" 37 36 -
code/trunk/src/orxonox/objects/worldentities/TeamSpawnPoint.h
r2826 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "objects/worldentities/pawns/Pawn.h" 34 35 #include "SpawnPoint.h" 35 36 -
code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc
r3110 r3196 30 30 #include "WorldEntity.h" 31 31 32 #include <cassert> 32 #include <OgreBillboardSet.h> 33 #include <OgreCamera.h> 34 #include <OgreEntity.h> 35 #include <OgreParticleSystem.h> 36 #include <OgreSceneManager.h> 33 37 #include <OgreSceneNode.h> 34 #include <OgreSceneManager.h> 35 #include "BulletDynamics/Dynamics/btRigidBody.h" 36 38 #include <BulletDynamics/Dynamics/btRigidBody.h> 39 #include <boost/static_assert.hpp> 40 41 #include "util/OrxAssert.h" 42 #include "util/Convert.h" 37 43 #include "util/Exception.h" 38 #include "util/Convert.h"39 44 #include "core/CoreIncludes.h" 40 45 #include "core/XMLPort.h" 41 42 46 #include "objects/Scene.h" 43 47 #include "objects/collisionshapes/WorldEntityCollisionShape.h" … … 51 55 const Vector3 WorldEntity::DOWN = Vector3::NEGATIVE_UNIT_Y; 52 56 const Vector3 WorldEntity::UP = Vector3::UNIT_Y; 57 58 // Be sure we don't do bad conversions 59 BOOST_STATIC_ASSERT((int)Ogre::Node::TS_LOCAL == (int)WorldEntity::Local); 60 BOOST_STATIC_ASSERT((int)Ogre::Node::TS_PARENT == (int)WorldEntity::Parent); 61 BOOST_STATIC_ASSERT((int)Ogre::Node::TS_WORLD == (int)WorldEntity::World); 53 62 54 63 /** … … 463 472 //! Attaches an Ogre::MovableObject to this WorldEntity. 464 473 void WorldEntity::attachOgreObject(Ogre::MovableObject* object) 465 { 466 this->node_->attachObject(object); 467 } 474 { this->node_->attachObject(object); } 475 void WorldEntity::attachOgreObject(Ogre::BillboardSet* object) 476 { this->node_->attachObject(object); } 477 void WorldEntity::attachOgreObject(Ogre::Camera* object) 478 { this->node_->attachObject(object); } 479 void WorldEntity::attachOgreObject(Ogre::Entity* object) 480 { this->node_->attachObject(object); } 481 void WorldEntity::attachOgreObject(Ogre::ParticleSystem* object) 482 { this->node_->attachObject(object); } 468 483 469 484 //! Detaches an Ogre::MovableObject from this WorldEntity. 470 485 void WorldEntity::detachOgreObject(Ogre::MovableObject* object) 471 { 472 this->node_->detachObject(object); 473 } 486 { this->node_->detachObject(object); } 487 void WorldEntity::detachOgreObject(Ogre::BillboardSet* object) 488 { this->node_->detachObject(object); } 489 void WorldEntity::detachOgreObject(Ogre::Camera* object) 490 { this->node_->detachObject(object); } 491 void WorldEntity::detachOgreObject(Ogre::Entity* object) 492 { this->node_->detachObject(object); } 493 void WorldEntity::detachOgreObject(Ogre::ParticleSystem* object) 494 { this->node_->detachObject(object); } 474 495 475 496 //! Detaches an Ogre::MovableObject (by string) from this WorldEntity. … … 501 522 502 523 // Note: These functions are placed in WorldEntity.h as inline functions for the release build. 503 #ifndef NDEBUG524 #ifndef ORXONOX_RELEASE 504 525 const Vector3& WorldEntity::getPosition() const 505 526 { … … 574 595 Translates this WorldEntity by a vector. 575 596 @param relativeTo 576 @see TransformSpace::Enum577 */ 578 void WorldEntity::translate(const Vector3& distance, TransformSpace ::EnumrelativeTo)597 @see WorldEntity::TransformSpace 598 */ 599 void WorldEntity::translate(const Vector3& distance, TransformSpace relativeTo) 579 600 { 580 601 switch (relativeTo) 581 602 { 582 case TransformSpace::Local:603 case WorldEntity::Local: 583 604 // position is relative to parent so transform downwards 584 605 this->setPosition(this->getPosition() + this->getOrientation() * distance); 585 606 break; 586 case TransformSpace::Parent:607 case WorldEntity::Parent: 587 608 this->setPosition(this->getPosition() + distance); 588 609 break; 589 case TransformSpace::World:610 case WorldEntity::World: 590 611 // position is relative to parent so transform upwards 591 612 if (this->node_->getParent()) … … 602 623 Rotates this WorldEntity by a quaternion. 603 624 @param relativeTo 604 @see TransformSpace::Enum605 */ 606 void WorldEntity::rotate(const Quaternion& rotation, TransformSpace ::EnumrelativeTo)625 @see WorldEntity::TransformSpace 626 */ 627 void WorldEntity::rotate(const Quaternion& rotation, TransformSpace relativeTo) 607 628 { 608 629 switch(relativeTo) 609 630 { 610 case TransformSpace::Local:631 case WorldEntity::Local: 611 632 this->setOrientation(this->getOrientation() * rotation); 612 633 break; 613 case TransformSpace::Parent:634 case WorldEntity::Parent: 614 635 // Rotations are normally relative to local axes, transform up 615 636 this->setOrientation(rotation * this->getOrientation()); 616 637 break; 617 case TransformSpace::World:638 case WorldEntity::World: 618 639 // Rotations are normally relative to local axes, transform up 619 640 this->setOrientation(this->getOrientation() * this->getWorldOrientation().Inverse() … … 627 648 Makes this WorldEntity look a specific target location. 628 649 @param relativeTo 629 @see TransformSpace::Enum650 @see WorldEntity::TransformSpace 630 651 @param localDirectionVector 631 652 The vector which normally describes the natural direction of the object, usually -Z. 632 653 */ 633 void WorldEntity::lookAt(const Vector3& target, TransformSpace ::EnumrelativeTo, const Vector3& localDirectionVector)634 { 635 Vector3 origin ;654 void WorldEntity::lookAt(const Vector3& target, TransformSpace relativeTo, const Vector3& localDirectionVector) 655 { 656 Vector3 origin(0, 0, 0); 636 657 switch (relativeTo) 637 658 { 638 case TransformSpace::Local:659 case WorldEntity::Local: 639 660 origin = Vector3::ZERO; 640 661 break; 641 case TransformSpace::Parent:662 case WorldEntity::Parent: 642 663 origin = this->getPosition(); 643 664 break; 644 case TransformSpace::World:665 case WorldEntity::World: 645 666 origin = this->getWorldPosition(); 646 667 break; … … 653 674 Makes this WorldEntity look in specific direction. 654 675 @param relativeTo 655 @see TransformSpace::Enum676 @see WorldEntity::TransformSpace 656 677 @param localDirectionVector 657 678 The vector which normally describes the natural direction of the object, usually -Z. 658 679 */ 659 void WorldEntity::setDirection(const Vector3& direction, TransformSpace ::EnumrelativeTo, const Vector3& localDirectionVector)680 void WorldEntity::setDirection(const Vector3& direction, TransformSpace relativeTo, const Vector3& localDirectionVector) 660 681 { 661 682 Quaternion savedOrientation(this->getOrientation()); 662 Ogre::Node::TransformSpace ogreRelativeTo; 663 switch (relativeTo) 664 { 665 case TransformSpace::Local: 666 ogreRelativeTo = Ogre::Node::TS_LOCAL; break; 667 case TransformSpace::Parent: 668 ogreRelativeTo = Ogre::Node::TS_PARENT; break; 669 case TransformSpace::World: 670 ogreRelativeTo = Ogre::Node::TS_WORLD; break; 671 default: OrxAssert(false, "Faulty TransformSpace::Enum assigned."); 672 } 673 this->node_->setDirection(direction, ogreRelativeTo, localDirectionVector); 683 this->node_->setDirection(direction, static_cast<Ogre::Node::TransformSpace>(relativeTo), localDirectionVector); 674 684 Quaternion newOrientation(this->node_->getOrientation()); 675 685 this->node_->setOrientation(savedOrientation); … … 772 782 break; 773 783 case Kinematic: 774 this->physicalBody_->setCollisionFlags( this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_STATIC_OBJECT| btCollisionObject::CF_KINEMATIC_OBJECT);784 this->physicalBody_->setCollisionFlags((this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_STATIC_OBJECT) | btCollisionObject::CF_KINEMATIC_OBJECT); 775 785 break; 776 786 case Static: 777 this->physicalBody_->setCollisionFlags( this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_KINEMATIC_OBJECT| btCollisionObject::CF_STATIC_OBJECT);787 this->physicalBody_->setCollisionFlags((this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_KINEMATIC_OBJECT) | btCollisionObject::CF_STATIC_OBJECT); 778 788 break; 779 789 case None: -
code/trunk/src/orxonox/objects/worldentities/WorldEntity.h
r3077 r3196 33 33 #include "OrxonoxPrereqs.h" 34 34 35 #ifdef NDEBUG 36 #include <OgreSceneNode.h> 37 #else 38 #include <OgrePrerequisites.h> 35 #ifdef ORXONOX_RELEASE 36 # include <OgreSceneNode.h> 39 37 #endif 40 #include "LinearMath/btMotionState.h"38 #include <LinearMath/btMotionState.h> 41 39 42 40 #include "util/Math.h" 41 #include "util/OgreForwardRefs.h" 43 42 #include "core/BaseObject.h" 44 43 #include "network/synchronisable/Synchronisable.h" … … 75 74 76 75 public: 76 // Define our own transform space enum to avoid Ogre includes here 77 /** 78 @brief 79 Enumeration denoting the spaces which a transform can be relative to. 80 */ 81 enum TransformSpace 82 { 83 //! Transform is relative to the local space 84 Local, 85 //! Transform is relative to the space of the parent node 86 Parent, 87 //! Transform is relative to world space 88 World 89 }; 90 91 public: 77 92 WorldEntity(BaseObject* creator); 78 93 virtual ~WorldEntity(); … … 97 112 const Vector3& getWorldPosition() const; 98 113 99 void translate(const Vector3& distance, TransformSpace ::Enum relativeTo = TransformSpace::Parent);100 inline void translate(float x, float y, float z, TransformSpace ::Enum relativeTo = TransformSpace::Parent)114 void translate(const Vector3& distance, TransformSpace relativeTo = WorldEntity::Parent); 115 inline void translate(float x, float y, float z, TransformSpace relativeTo = WorldEntity::Parent) 101 116 { this->translate(Vector3(x, y, z), relativeTo); } 102 117 … … 114 129 const Quaternion& getWorldOrientation() const; 115 130 116 void rotate(const Quaternion& rotation, TransformSpace ::Enum relativeTo = TransformSpace::Local);117 inline void rotate(const Vector3& axis, const Degree& angle, TransformSpace ::Enum relativeTo = TransformSpace::Local)131 void rotate(const Quaternion& rotation, TransformSpace relativeTo = WorldEntity::Local); 132 inline void rotate(const Vector3& axis, const Degree& angle, TransformSpace relativeTo = WorldEntity::Local) 118 133 { this->rotate(Quaternion(angle, axis), relativeTo); } 119 134 120 inline void yaw(const Degree& angle, TransformSpace ::Enum relativeTo = TransformSpace::Local)135 inline void yaw(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local) 121 136 { this->rotate(Quaternion(angle, Vector3::UNIT_Y), relativeTo); } 122 inline void pitch(const Degree& angle, TransformSpace ::Enum relativeTo = TransformSpace::Local)137 inline void pitch(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local) 123 138 { this->rotate(Quaternion(angle, Vector3::UNIT_X), relativeTo); } 124 inline void roll(const Degree& angle, TransformSpace ::Enum relativeTo = TransformSpace::Local)139 inline void roll(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local) 125 140 { this->rotate(Quaternion(angle, Vector3::UNIT_Z), relativeTo); } 126 141 127 void lookAt(const Vector3& target, TransformSpace ::Enum relativeTo = TransformSpace::Parent, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);128 void setDirection(const Vector3& direction, TransformSpace ::Enum relativeTo = TransformSpace::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);129 inline void setDirection(float x, float y, float z, TransformSpace ::Enum relativeTo = TransformSpace::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z)142 void lookAt(const Vector3& target, TransformSpace relativeTo = WorldEntity::Parent, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z); 143 void setDirection(const Vector3& direction, TransformSpace relativeTo = WorldEntity::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z); 144 inline void setDirection(float x, float y, float z, TransformSpace relativeTo = WorldEntity::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z) 130 145 { this->setDirection(Vector3(x, y, z), relativeTo, localDirectionVector); } 131 146 … … 157 172 { return this->children_; } 158 173 159 void attachOgreObject(Ogre::MovableObject* object); 160 void detachOgreObject(Ogre::MovableObject* object); 174 void attachOgreObject(Ogre::MovableObject* object); 175 void attachOgreObject(Ogre::BillboardSet* object); 176 void attachOgreObject(Ogre::Camera* object); 177 void attachOgreObject(Ogre::Entity* object); 178 void attachOgreObject(Ogre::ParticleSystem* object); 179 180 void detachOgreObject(Ogre::MovableObject* object); 181 void detachOgreObject(Ogre::BillboardSet* object); 182 void detachOgreObject(Ogre::Camera* object); 183 void detachOgreObject(Ogre::Entity* object); 184 void detachOgreObject(Ogre::ParticleSystem* object); 185 161 186 Ogre::MovableObject* detachOgreObject(const Ogre::String& name); 162 187 … … 427 452 428 453 // Inline heavily used functions for release builds. In debug, we better avoid including OgreSceneNode here. 429 #ifdef NDEBUG454 #ifdef ORXONOX_RELEASE 430 455 inline const Vector3& WorldEntity::getPosition() const 431 456 { return this->node_->getPosition(); } -
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc
r3110 r3196 29 29 #include "Pawn.h" 30 30 31 #include "core/CoreIncludes.h" 31 32 #include "core/GameMode.h" 32 #include "core/CoreIncludes.h"33 33 #include "core/XMLPort.h" 34 #include "util/Math.h" 34 #include "network/NetworkFunction.h" 35 36 #include "interfaces/PawnListener.h" 35 37 #include "PawnManager.h" 36 38 #include "objects/infos/PlayerInfo.h" … … 39 41 #include "objects/worldentities/ExplosionChunk.h" 40 42 #include "objects/worldentities/BigExplosion.h" 41 42 43 #include "objects/weaponsystem/WeaponSystem.h" 43 44 #include "objects/weaponsystem/WeaponSlot.h" … … 45 46 #include "objects/weaponsystem/WeaponSet.h" 46 47 47 #include "network/NetworkFunction.h"48 48 49 49 namespace orxonox … … 373 373 this->isHumanShip_ = true; 374 374 } 375 376 377 ///////////////////378 // Pawn Listener //379 ///////////////////380 PawnListener::PawnListener()381 {382 RegisterRootObject(PawnListener);383 }384 375 } -
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h
r3089 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <string> 35 #include "interfaces/RadarViewable.h" 33 36 #include "objects/worldentities/ControllableEntity.h" 34 #include "objects/RadarViewable.h"35 37 #include "objects/pickup/PickupCollection.h" 36 38 … … 147 149 { this->weaponSystem_ = weaponsystem; } 148 150 }; 149 150 class _OrxonoxExport PawnListener : virtual public OrxonoxClass151 {152 public:153 PawnListener();154 virtual ~PawnListener() {}155 156 virtual void destroyedPawn(Pawn* pawn) = 0;157 };158 151 } 159 152 -
code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
r3110 r3196 29 29 #include "SpaceShip.h" 30 30 31 #include "BulletDynamics/Dynamics/btRigidBody.h" 32 33 #include "util/Math.h" 34 #include "util/Exception.h" 31 #include <BulletDynamics/Dynamics/btRigidBody.h> 32 35 33 #include "core/CoreIncludes.h" 36 34 #include "core/ConfigValueIncludes.h" -
code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.h
r2662 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "LinearMath/btVector3.h" 35 34 #include <string> 35 #include <LinearMath/btVector3.h> 36 #include "util/Math.h" 36 37 #include "Pawn.h" 37 38 -
code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc
r3110 r3196 29 29 #include "Spectator.h" 30 30 31 #include <OgreBillboardSet.h>32 33 31 #include "core/CoreIncludes.h" 34 32 #include "core/ConfigValueIncludes.h" 35 33 #include "core/GameMode.h" 36 #include "objects/worldentities/Model.h" 34 35 #include "tools/BillboardSet.h" 37 36 #include "objects/Scene.h" 38 37 #include "objects/infos/PlayerInfo.h" 39 #include "objects/gametypes/Gametype.h"40 #include "tools/BillboardSet.h"41 #include "overlays/OverlayText.h"42 #include "overlays/OverlayGroup.h"43 #include "util/Convert.h"44 38 45 39 namespace orxonox … … 65 59 { 66 60 this->greetingFlare_ = new BillboardSet(); 67 this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0 , 1.0, 0.8), Vector3(0, 20, 0), 1);61 this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0f, 1.0f, 0.8f), Vector3(0, 20, 0), 1); 68 62 if (this->greetingFlare_->getBillboardSet()) 69 63 this->attachOgreObject(this->greetingFlare_->getBillboardSet()); -
code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.h
r3053 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "util/Math.h" 34 35 #include "objects/worldentities/ControllableEntity.h" 35 36 -
code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc
r3086 r3196 29 29 30 30 #include "TeamBaseMatchBase.h" 31 31 32 #include "core/CoreIncludes.h" 33 #include "interfaces/PawnListener.h" 34 #include "interfaces/TeamColourable.h" 32 35 #include "objects/gametypes/TeamBaseMatch.h" 33 #include "objects/Teamcolourable.h"34 36 35 37 namespace orxonox … … 80 82 for (std::set<WorldEntity*>::iterator it = attachments.begin(); it != attachments.end(); ++it) 81 83 { 82 if ((*it)->isA(Class(Team colourable)))84 if ((*it)->isA(Class(TeamColourable))) 83 85 { 84 Team colourable* tc = dynamic_cast<Teamcolourable*>(*it);86 TeamColourable* tc = dynamic_cast<TeamColourable*>(*it); 85 87 tc->setTeamColour(colour); 86 88 } -
code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h
r3033 r3196 30 30 #define _TeamBaseMatchBase_H__ 31 31 32 #include "OrxonoxPrereqs.h" 33 32 34 #include "Pawn.h" 33 35 34 36 namespace orxonox 35 37 { 36 37 38 38 namespace BaseState 39 39 { -
code/trunk/src/orxonox/objects/worldentities/triggers/CheckPoint.cc
r3110 r3196 31 31 #include "core/CoreIncludes.h" 32 32 #include "core/XMLPort.h" 33 34 33 #include "objects/gametypes/Asteroids.h" 35 #include "o rxonox/objects/worldentities/pawns/Pawn.h"34 #include "objects/worldentities/pawns/Pawn.h" 36 35 37 36 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/triggers/CheckPoint.h
r3064 r3196 35 35 #define _CheckPoint_H__ 36 36 37 #include "OrxonoxPrereqs.h" 38 39 #include "interfaces/RadarViewable.h" 37 40 #include "DistanceTrigger.h" 38 #include "objects/RadarViewable.h"39 41 40 42 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc
r3110 r3196 29 29 #include "DistanceTrigger.h" 30 30 31 #include <OgreNode.h>32 33 31 #include "core/CoreIncludes.h" 34 32 #include "core/XMLPort.h" 35 36 33 #include "orxonox/objects/worldentities/pawns/Pawn.h" 37 34 -
code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h
r3068 r3196 30 30 #define _DistanceTrigger_H__ 31 31 32 #include " PlayerTrigger.h"32 #include "OrxonoxPrereqs.h" 33 33 34 34 #include <set> 35 36 35 #include "core/ClassTreeMask.h" 37 #include "core/BaseObject.h" 38 39 #include "orxonox/objects/worldentities/ControllableEntity.h" 36 #include "PlayerTrigger.h" 40 37 41 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.cc
r3110 r3196 51 51 SUPER(EventTrigger, processEvent, event); 52 52 53 SetEvent(EventTrigger, "trigger", trigger, event);53 ORXONOX_SET_EVENT(EventTrigger, "trigger", trigger, event); 54 54 } 55 55 -
code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.h
r2087 r3196 30 30 #define _EventTrigger_H__ 31 31 32 #include "OrxonoxPrereqs.h" 32 33 #include "Trigger.h" 33 34 #include "core/ClassTreeMask.h"35 #include "core/BaseObject.h"36 34 37 35 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.cc
r3110 r3196 34 34 35 35 #include "PlayerTrigger.h" 36 37 36 #include "core/CoreIncludes.h" 38 37 -
code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h
r3033 r3196 37 37 38 38 #include "OrxonoxPrereqs.h" 39 40 39 #include "Trigger.h" 41 40 -
code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc
r3110 r3196 29 29 #include "Trigger.h" 30 30 31 #include <OgreBillboard.h>32 #include <OgreBillboardSet.h>33 #include "util/Debug.h"34 31 #include "core/CoreIncludes.h" 35 32 #include "core/ConsoleCommand.h" 33 #include "core/GameMode.h" 36 34 #include "core/XMLPort.h" 37 #include "core/GameMode.h"38 35 #include "objects/Scene.h" 39 36 … … 237 234 { 238 235 if (( (this->latestState_ & 2) && this->bStayActive_ && (this->remainingActivations_ <= 0)) 239 || (!(this->latestState_ & 2) ) && (this->remainingActivations_ == 0))236 || (!(this->latestState_ & 2) && (this->remainingActivations_ == 0))) 240 237 return false; 241 238 else -
code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.h
r3068 r3196 30 30 #define _Trigger_H__ 31 31 32 #include "OrxonoxPrereqs.h" 33 32 34 #include <set> 33 35 #include <queue> 34 36 35 #include "OrxonoxPrereqs.h" 36 37 #include "objects/Tickable.h" 37 #include "tools/BillboardSet.h" 38 #include "interfaces/Tickable.h" 38 39 #include "objects/worldentities/StaticEntity.h" 39 #include "tools/BillboardSet.h"40 40 41 41 namespace orxonox -
code/trunk/src/orxonox/overlays/FadeoutText.cc
r3110 r3196 30 30 31 31 #include <OgreTextAreaOverlayElement.h> 32 32 #include "util/Math.h" 33 33 #include "core/CoreIncludes.h" 34 34 #include "core/XMLPort.h" -
code/trunk/src/orxonox/overlays/FadeoutText.h
r3099 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "tools/Timer.h" 35 #include "interfaces/Tickable.h" 34 36 #include "overlays/OverlayText.h" 35 #include "objects/Tickable.h"36 #include "tools/Timer.h"37 37 38 38 namespace orxonox -
code/trunk/src/orxonox/overlays/GUIOverlay.cc
r3110 r3196 28 28 29 29 #include "GUIOverlay.h" 30 30 31 #include <string> 31 32 #include <sstream> 33 32 34 #include "core/input/InputManager.h" 33 34 #include "../gui/GUIManager.h" 35 #include "core/CoreIncludes.h" 36 #include "core/XMLPort.h" 37 #include "gui/GUIManager.h" 35 38 36 39 namespace orxonox … … 53 56 XMLPortParam(GUIOverlay, "guiname", setGUIName, getGUIName, xmlElement, mode); 54 57 55 GUIManager::getInstance Ptr()->registerOverlay(this->guiName_, this);58 GUIManager::getInstance().registerOverlay(this->guiName_, this); 56 59 } 57 60 … … 66 69 out << (long)this; 67 70 str = out.str(); 68 GUIManager::getInstance Ptr()->executeCode("showCursor()");71 GUIManager::getInstance().executeCode("showCursor()"); 69 72 InputManager::getInstance().requestEnterState("guiMouseOnly"); 70 GUIManager::getInstance Ptr()->executeCode("showGUI(\"" + this->guiName_ + "\", " + str + ")");73 GUIManager::getInstance().executeCode("showGUI(\"" + this->guiName_ + "\", " + str + ")"); 71 74 } 72 75 else 73 76 { 74 GUIManager::getInstance Ptr()->executeCode("hideGUI(\"" + this->guiName_ + "\")");75 GUIManager::getInstance Ptr()->executeCode("hideCursor()");77 GUIManager::getInstance().executeCode("hideGUI(\"" + this->guiName_ + "\")"); 78 GUIManager::getInstance().executeCode("hideCursor()"); 76 79 InputManager::getInstance().requestLeaveState("guiMouseOnly"); 77 80 } -
code/trunk/src/orxonox/overlays/GUIOverlay.h
r3078 r3196 30 30 #define _GUIOverlay_H__ 31 31 32 33 #include "OrxonoxOverlay.h"34 32 #include "OrxonoxPrereqs.h" 35 33 36 #include <OgrePrerequisites.h> 37 38 #include "core/XMLPort.h" 34 #include <string> 35 #include "OrxonoxOverlay.h" 39 36 40 37 namespace orxonox -
code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
r3110 r3196 215 215 if (angle < 0.0) 216 216 angle = -angle; 217 angle -= 180.0 * (int)(angle / 180.0);217 angle -= 180.0f * (int)(angle / 180.0); 218 218 219 219 // take the reverse if angle is about 90 degrees 220 220 float tempAspect; 221 if (angle > 89.0 && angle < 91.0)221 if (angle > 89.0f && angle < 91.0f) 222 222 { 223 223 tempAspect = 1.0 / this->windowAspectRatio_; … … 231 231 else 232 232 { 233 tempAspect = 1.0 ;233 tempAspect = 1.0f; 234 234 rotState_ = Inbetween; 235 235 } … … 238 238 // magnitude of the width is about the magnitude of the height. 239 239 // Correctly we would have to take the square root of width*height 240 this->sizeCorrection_.x = 2.0 / (tempAspect + 1.0);240 this->sizeCorrection_.x = 2.0f / (tempAspect + 1.0f); 241 241 this->sizeCorrection_.y = tempAspect * this->sizeCorrection_.x; 242 242 } -
code/trunk/src/orxonox/overlays/OrxonoxOverlay.h
r2993 r3196 37 37 #include "OrxonoxPrereqs.h" 38 38 39 #include < OgrePrerequisites.h>40 #include "tools/WindowEventListener.h" 39 #include <string> 40 41 41 #include "util/Math.h" 42 #include "util/OgreForwardRefs.h" 42 43 #include "core/BaseObject.h" 44 #include "interfaces/WindowEventListener.h" 43 45 44 46 namespace orxonox … … 134 136 135 137 //! Gets the current size that was set (uncorrected) 136 const Vector2& getSize() const 138 const Vector2& getSize() const { return this->size_; } 137 139 138 140 //! Gets the actual size of the overlay on the screen (corrected) 139 Vector2 getActualSize() const { return this->size_ * this->sizeCorrection_; }141 Vector2 getActualSize() const { return this->size_ * this->sizeCorrection_; } 140 142 141 143 //! Gets the current size correction (default: 1.0, 1.0) … … 198 200 Vector2 pickPoint_; //!< Point on the overlay to pick when translating 199 201 Degree angle_; //!< Rotation angle of the overlay 200 RotationState rotState_; //!< horizontal, vertical or inbetween202 RotationState rotState_; //!< horizontal, vertical or inbetween 201 203 202 204 private: -
code/trunk/src/orxonox/overlays/OverlayGroup.cc
r3110 r3196 34 34 #include "OverlayGroup.h" 35 35 36 #include "util/Debug.h"37 36 #include "core/ConsoleCommand.h" 38 37 #include "core/CoreIncludes.h" 39 #include "core/Iterator.h"40 38 #include "core/XMLPort.h" 41 39 #include "OrxonoxOverlay.h" -
code/trunk/src/orxonox/overlays/OverlayGroup.h
r2911 r3196 38 38 39 39 #include <set> 40 #include <OgrePrerequisites.h> 40 #include "util/Math.h" 41 #include "util/OgreForwardRefs.h" 41 42 #include "core/BaseObject.h" 42 #include "util/Math.h"43 43 44 44 namespace orxonox -
code/trunk/src/orxonox/overlays/OverlayText.cc
r3110 r3196 31 31 #include <OgreOverlayManager.h> 32 32 #include <OgrePanelOverlayElement.h> 33 #include <OgreTextAreaOverlayElement.h> 34 #include <boost/static_assert.hpp> 33 35 34 36 #include "util/String.h" … … 36 38 #include "core/XMLPort.h" 37 39 40 38 41 namespace orxonox 39 42 { 40 43 CreateFactory(OverlayText); 44 45 BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Left == (int)OverlayText::Left); 46 BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Center == (int)OverlayText::Center); 47 BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Right == (int)OverlayText::Right); 41 48 42 49 OverlayText::OverlayText(BaseObject* creator) … … 76 83 } 77 84 78 void OverlayText::setFont(const std::string& font)79 {80 if (font != "")81 this->text_->setFontName(font);82 }83 84 85 void OverlayText::setAlignmentString(const std::string& alignment) 85 86 { 86 87 if (alignment == "right") 87 this->setAlignment(O gre::TextAreaOverlayElement::Right);88 this->setAlignment(OverlayText::Right); 88 89 else if (alignment == "center") 89 this->setAlignment(O gre::TextAreaOverlayElement::Center);90 this->setAlignment(OverlayText::Center); 90 91 else // "left" and default 91 this->setAlignment(O gre::TextAreaOverlayElement::Left);92 this->setAlignment(OverlayText::Left); 92 93 } 93 94 … … 120 121 positionChanged(); 121 122 } 123 124 void OverlayText::setCaption(const std::string& caption) 125 { 126 this->text_->setCaption(caption); 127 this->changedCaption(); 128 } 129 std::string OverlayText::getCaption() const 130 { 131 return this->text_->getCaption(); 132 } 133 134 void OverlayText::setFont(const std::string& font) 135 { 136 if (font != "") 137 this->text_->setFontName(font); 138 } 139 const std::string& OverlayText::getFont() const 140 { 141 return this->text_->getFontName(); 142 } 143 144 void OverlayText::setSpaceWidth(float width) 145 { 146 this->text_->setSpaceWidth(width); 147 } 148 float OverlayText::getSpaceWidth() const 149 { 150 return this->text_->getSpaceWidth(); 151 } 152 153 void OverlayText::setColour(const ColourValue& colour) 154 { 155 this->text_->setColour(colour); this->changedColour(); 156 } 157 const ColourValue& OverlayText::getColour() const 158 { 159 return this->text_->getColour(); 160 } 161 162 void OverlayText::setAlignment(OverlayText::Alignment alignment) 163 { 164 this->text_->setAlignment(static_cast<Ogre::TextAreaOverlayElement::Alignment>(alignment)); 165 } 166 OverlayText::Alignment OverlayText::getAlignment() const 167 { 168 return static_cast<OverlayText::Alignment>(this->text_->getAlignment()); 169 } 122 170 } -
code/trunk/src/orxonox/overlays/OverlayText.h
r3099 r3196 33 33 34 34 #include <string> 35 #include <OgrePrerequisites.h>36 #include <OgreTextAreaOverlayElement.h>35 #include "util/Math.h" 36 #include "util/OgreForwardRefs.h" 37 37 #include "OrxonoxOverlay.h" 38 38 … … 42 42 { 43 43 public: 44 enum Alignment 45 { 46 Left, 47 Right, 48 Center 49 }; 50 44 51 OverlayText(BaseObject* creator); 45 52 virtual ~OverlayText(); … … 47 54 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); 48 55 49 inline void setCaption(const std::string& caption) { this->text_->setCaption(caption); this->changedCaption(); }50 inline std::string getCaption() const { return this->text_->getCaption(); }56 void setCaption(const std::string& caption); 57 std::string getCaption() const; 51 58 52 59 void setFont(const std::string& font); 53 inline const std::string& getFont() const { return this->text_->getFontName(); }60 const std::string& getFont() const; 54 61 55 inline void setSpaceWidth(float width) { this->text_->setSpaceWidth(width); }56 inline float getSpaceWidth() const { return this->text_->getSpaceWidth(); }62 void setSpaceWidth(float width); 63 float getSpaceWidth() const; 57 64 58 inline void setColour(const ColourValue& colour) { this->text_->setColour(colour); this->changedColour(); }59 inline const ColourValue& getColour() const { return this->text_->getColour(); }65 void setColour(const ColourValue& colour); 66 const ColourValue& getColour() const; 60 67 61 inline void setAlignment(Ogre::TextAreaOverlayElement::Alignment alignment) { this->text_->setAlignment(alignment); }62 inline Ogre::TextAreaOverlayElement::Alignment getAlignment() const { return this->text_->getAlignment(); }68 void setAlignment(OverlayText::Alignment alignment); 69 OverlayText::Alignment getAlignment() const; 63 70 64 71 void setAlignmentString(const std::string& alignment); -
code/trunk/src/orxonox/overlays/console/InGameConsole.cc
r3110 r3196 35 35 #include <OgreOverlayManager.h> 36 36 #include <OgreOverlayContainer.h> 37 #include <OgreBorderPanelOverlayElement.h> 38 #include <OgreTextAreaOverlayElement.h> 37 39 #include <OgreFontManager.h> 38 40 #include <OgreFont.h> … … 40 42 #include "util/Math.h" 41 43 #include "util/Convert.h" 42 #include "util/ Debug.h"44 #include "util/UTFStringConversions.h" 43 45 #include "core/Clock.h" 44 46 #include "core/CoreIncludes.h" … … 466 468 { 467 469 ++linesUsed; 468 this->consoleOverlayTextAreas_[index]->setCaption( convert2UTF(output.substr(0, this->maxCharsPerLine_)));470 this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output.substr(0, this->maxCharsPerLine_))); 469 471 output.erase(0, this->maxCharsPerLine_); 470 472 output.insert(0, 1, ' '); … … 473 475 this->colourLine(level, index); 474 476 } 475 this->consoleOverlayTextAreas_[index]->setCaption( convert2UTF(output));477 this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output)); 476 478 this->displayedText_ = output; 477 479 this->numLinesShifted_ = linesUsed; … … 491 493 this->inputWindowStart_ = 0; 492 494 this->displayedText_ = output; 493 this->consoleOverlayTextAreas_[index]->setCaption( convert2UTF(output));495 this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output)); 494 496 } 495 497 } … … 606 608 InGameConsole::getInstance().deactivate(); 607 609 } 608 609 /**610 @brief Converts a string into an Ogre::UTFString.611 @param s The string to convert612 @return The converted string613 */614 /*static*/ Ogre::UTFString InGameConsole::convert2UTF(const std::string& text)615 {616 Ogre::UTFString utf;617 Ogre::UTFString::code_point cp;618 for (unsigned int i = 0; i < text.size(); ++i)619 {620 cp = text[i];621 cp &= 0xFF;622 utf.append(1, cp);623 }624 return utf;625 }626 610 } -
code/trunk/src/orxonox/overlays/console/InGameConsole.h
r2896 r3196 32 32 33 33 #include "OrxonoxPrereqs.h" 34 #include <OgrePrerequisites.h>35 #include <OgreBorderPanelOverlayElement.h>36 #include <OgreTextAreaOverlayElement.h>37 34 35 #include <string> 36 #include "util/OgreForwardRefs.h" 38 37 #include "core/Shell.h" 39 #include "core/OrxonoxClass.h" 40 #include "tools/WindowEventListener.h" 41 38 #include "interfaces/WindowEventListener.h" 42 39 43 40 namespace orxonox 44 41 { 45 class _OrxonoxExport InGameConsole : virtual public OrxonoxClass,public ShellListener, public WindowEventListener42 class _OrxonoxExport InGameConsole : public ShellListener, public WindowEventListener 46 43 { 47 44 public: // functions … … 60 57 static void openConsole(); 61 58 static void closeConsole(); 62 63 static Ogre::UTFString convert2UTF(const std::string& text);64 59 65 60 private: // functions -
code/trunk/src/orxonox/overlays/debug/DebugFPSText.cc
r3110 r3196 28 28 29 29 #include "DebugFPSText.h" 30 #include <OgreTextAreaOverlayElement.h> 30 31 31 #include "util/Convert.h" 32 32 #include "core/CoreIncludes.h" … … 51 51 52 52 float fps = Game::getInstance().getAvgFPS(); 53 this->setCaption( convertToString(fps));53 this->setCaption(multi_cast<std::string>(fps)); 54 54 } 55 55 } -
code/trunk/src/orxonox/overlays/debug/DebugFPSText.h
r2087 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "interfaces/Tickable.h" 34 35 #include "overlays/OverlayText.h" 35 #include "objects/Tickable.h"36 36 37 37 namespace orxonox … … 41 41 public: 42 42 DebugFPSText(BaseObject* creator); 43 ~DebugFPSText();43 virtual ~DebugFPSText(); 44 44 45 45 virtual void tick(float dt); -
code/trunk/src/orxonox/overlays/debug/DebugRTRText.cc
r3110 r3196 28 28 29 29 #include "DebugRTRText.h" 30 #include <OgreTextAreaOverlayElement.h> 30 31 #include "util/Convert.h" 31 32 #include "core/CoreIncludes.h" 32 #include "util/Convert.h"33 33 #include "core/Game.h" 34 34 … … 51 51 52 52 float rtr = Game::getInstance().getAvgTickTime(); 53 this->setCaption( convertToString(rtr));53 this->setCaption(multi_cast<std::string>(rtr)); 54 54 } 55 55 } -
code/trunk/src/orxonox/overlays/debug/DebugRTRText.h
r2087 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "interfaces/Tickable.h" 34 35 #include "overlays/OverlayText.h" 35 #include "objects/Tickable.h"36 36 37 37 namespace orxonox … … 41 41 public: 42 42 DebugRTRText(BaseObject* creator); 43 ~DebugRTRText();43 virtual ~DebugRTRText(); 44 44 45 45 virtual void tick(float dt); -
code/trunk/src/orxonox/overlays/hud/AnnounceMessage.h
r3099 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "interfaces/GametypeMessageListener.h" 34 35 #include "overlays/FadeoutText.h" 35 #include "objects/GametypeMessageListener.h"36 36 37 37 namespace orxonox -
code/trunk/src/orxonox/overlays/hud/ChatOverlay.cc
r3110 r3196 29 29 #include "ChatOverlay.h" 30 30 31 #include <string> 31 32 #include <OgreTextAreaOverlayElement.h> 32 33 34 #include "util/Convert.h" 35 #include "util/UTFStringConversions.h" 33 36 #include "core/CoreIncludes.h" 34 37 #include "core/ConfigValueIncludes.h" 35 38 #include "core/Executor.h" 36 39 37 #include " network/ClientInformation.h"38 40 #include "tools/Timer.h" 41 #include "objects/infos/PlayerInfo.h" 39 42 #include "PlayerManager.h" 40 #include "objects/infos/PlayerInfo.h"41 #include "overlays/console/InGameConsole.h"42 #include "tools/Timer.h"43 44 #include "util/Convert.h"45 43 46 44 namespace orxonox … … 86 84 } 87 85 88 this->messages_.push_back( InGameConsole::convert2UTF(text));86 this->messages_.push_back(multi_cast<Ogre::UTFString>(text)); 89 87 COUT(0) << "Chat: " << text << std::endl; 90 88 -
code/trunk/src/orxonox/overlays/hud/ChatOverlay.h
r2171 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <OgreTextAreaOverlayElement.h> 34 #include <list> 35 #include <OgreUTFString.h> 35 36 36 37 #include "network/ChatListener.h" … … 43 44 public: 44 45 ChatOverlay(BaseObject* creator); 45 ~ChatOverlay();46 virtual ~ChatOverlay(); 46 47 47 48 void setConfigValues(); -
code/trunk/src/orxonox/overlays/hud/DeathMessage.h
r3099 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "interfaces/GametypeMessageListener.h" 34 35 #include "overlays/FadeoutText.h" 35 #include "objects/GametypeMessageListener.h"36 36 37 37 namespace orxonox -
code/trunk/src/orxonox/overlays/hud/GametypeStatus.cc
r3110 r3196 29 29 #include "GametypeStatus.h" 30 30 31 #include <OgreTextAreaOverlayElement.h> 32 31 #include "util/Convert.h" 33 32 #include "core/CoreIncludes.h" 34 #include "util/Convert.h"35 33 #include "objects/infos/GametypeInfo.h" 36 34 #include "objects/infos/PlayerInfo.h" -
code/trunk/src/orxonox/overlays/hud/GametypeStatus.h
r2973 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "interfaces/Tickable.h" 34 35 #include "overlays/OverlayText.h" 35 #include "objects/Tickable.h"36 36 37 37 namespace orxonox … … 41 41 public: 42 42 GametypeStatus(BaseObject* creator); 43 ~GametypeStatus();43 virtual ~GametypeStatus(); 44 44 45 45 virtual void tick(float dt); -
code/trunk/src/orxonox/overlays/hud/HUDBar.cc
r3110 r3196 34 34 #include <OgreMaterialManager.h> 35 35 #include <OgreTechnique.h> 36 #include <OgrePass.h> 36 37 #include <OgrePanelOverlayElement.h> 37 38 … … 77 78 this->textureUnitState_->setTextureName("bar2.tga"); 78 79 // use the default colour 79 this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, ColourValue(0.2 , 0.7, 0.2));80 this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, ColourValue(0.2f, 0.7f, 0.2f)); 80 81 81 82 this->bar_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton() -
code/trunk/src/orxonox/overlays/hud/HUDBar.h
r2662 r3196 35 35 36 36 #include <map> 37 #include <OgrePrerequisites.h> 37 #include <vector> 38 38 39 #include "util/Math.h" 40 #include "util/OgreForwardRefs.h" 41 #include "core/BaseObject.h" 39 42 #include "overlays/OrxonoxOverlay.h" 40 43 … … 45 48 public: 46 49 BarColour(BaseObject* creator); 47 ~BarColour() { }50 virtual ~BarColour() { } 48 51 49 52 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); -
code/trunk/src/orxonox/overlays/hud/HUDHealthBar.cc
r3110 r3196 29 29 #include "HUDHealthBar.h" 30 30 31 #include <OgreOverlayManager.h> 32 #include <OgrePanelOverlayElement.h> 33 31 #include "util/Convert.h" 34 32 #include "core/CoreIncludes.h" 35 33 #include "core/XMLPort.h" 36 34 #include "objects/worldentities/pawns/Pawn.h" 37 #include "objects/items/Engine.h"38 35 #include "overlays/OverlayGroup.h" 39 #include "util/Convert.h"40 36 41 37 namespace orxonox -
code/trunk/src/orxonox/overlays/hud/HUDHealthBar.h
r2662 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "util/Math.h" 35 #include "interfaces/Tickable.h" 36 #include "overlays/OverlayText.h" 34 37 #include "HUDBar.h" 35 #include "objects/Tickable.h"36 #include "overlays/OverlayText.h"37 38 38 39 namespace orxonox … … 42 43 public: 43 44 HUDHealthBar(BaseObject* creator); 44 ~HUDHealthBar();45 virtual ~HUDHealthBar(); 45 46 46 47 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); … … 64 65 { return this->bUseBarColour_; } 65 66 66 inline void setTextAlignment(O gre::TextAreaOverlayElement::Alignment alignment)67 inline void setTextAlignment(OverlayText::Alignment alignment) 67 68 { this->textoverlay_->setAlignment(alignment); } 68 inline O gre::TextAreaOverlayElement::Alignment getTextAlignment() const69 inline OverlayText::Alignment getTextAlignment() const 69 70 { return this->textoverlay_->getAlignment(); } 70 71 -
code/trunk/src/orxonox/overlays/hud/HUDNavigation.cc
r3110 r3196 29 29 #include "HUDNavigation.h" 30 30 31 #include <string> 31 32 #include <OgreOverlayManager.h> 32 33 #include <OgreTextAreaOverlayElement.h> … … 36 37 #include "util/String.h" 37 38 #include "util/Convert.h" 38 #include "core/ConsoleCommand.h"39 39 #include "core/CoreIncludes.h" 40 40 #include "core/XMLPort.h" -
code/trunk/src/orxonox/overlays/hud/HUDNavigation.h
r2087 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <OgrePrerequisites.h> 34 #include "util/OgreForwardRefs.h" 35 #include "interfaces/Tickable.h" 35 36 #include "overlays/OrxonoxOverlay.h" 36 #include "objects/Tickable.h"37 37 38 38 namespace orxonox … … 42 42 public: 43 43 HUDNavigation(BaseObject* creator); 44 ~HUDNavigation();44 virtual ~HUDNavigation(); 45 45 46 46 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); -
code/trunk/src/orxonox/overlays/hud/HUDRadar.cc
r3110 r3196 35 35 #include "util/Math.h" 36 36 #include "util/String.h" 37 #include "core/ConsoleCommand.h"38 37 #include "core/CoreIncludes.h" 39 38 #include "core/XMLPort.h" 40 #include " objects/Radar.h"39 #include "tools/TextureGenerator.h" 41 40 #include "objects/worldentities/WorldEntity.h" 42 41 #include "objects/worldentities/pawns/Pawn.h" 43 #include "tools/TextureGenerator.h"44 42 45 43 namespace orxonox -
code/trunk/src/orxonox/overlays/hud/HUDRadar.h
r2662 r3196 33 33 #include "OrxonoxPrereqs.h" 34 34 35 #include <map> 35 36 #include <vector> 36 #include <map> 37 #include <OgrePrerequisites.h> 37 38 #include "util/OgreForwardRefs.h" 39 #include "interfaces/RadarListener.h" 40 #include "interfaces/RadarViewable.h" 38 41 #include "overlays/OrxonoxOverlay.h" 39 #include "objects/RadarListener.h"40 #include "objects/RadarViewable.h"41 42 42 43 namespace orxonox … … 46 47 public: 47 48 HUDRadar(BaseObject* creator); 48 ~HUDRadar();49 virtual ~HUDRadar(); 49 50 50 51 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); -
code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.cc
r3110 r3196 29 29 30 30 #include "HUDSpeedBar.h" 31 31 32 #include "core/CoreIncludes.h" 32 33 #include "objects/worldentities/pawns/SpaceShip.h" -
code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.h
r2662 r3196 33 33 #include "OrxonoxPrereqs.h" 34 34 35 #include "interfaces/Tickable.h" 35 36 #include "HUDBar.h" 36 #include "objects/Tickable.h"37 37 38 38 namespace orxonox … … 42 42 public: 43 43 HUDSpeedBar(BaseObject* creator); 44 ~HUDSpeedBar();44 virtual ~HUDSpeedBar(); 45 45 46 46 virtual void tick(float dt); -
code/trunk/src/orxonox/overlays/hud/HUDTimer.cc
r3110 r3196 29 29 #include "HUDTimer.h" 30 30 31 #include "util/Convert.h" 31 32 #include "core/CoreIncludes.h" 32 #include "util/Convert.h"33 33 #include "objects/worldentities/ControllableEntity.h" 34 34 #include "objects/gametypes/Gametype.h" … … 36 36 namespace orxonox 37 37 { 38 CreateFactory(HUDTimer);38 CreateFactory(HUDTimer); 39 39 40 HUDTimer::HUDTimer(BaseObject* creator) : OverlayText(creator)41 {42 RegisterObject(HUDTimer);40 HUDTimer::HUDTimer(BaseObject* creator) : OverlayText(creator) 41 { 42 RegisterObject(HUDTimer); 43 43 44 this->owner_ = 0;45 }44 this->owner_ = 0; 45 } 46 46 47 HUDTimer::~HUDTimer()48 {49 }47 HUDTimer::~HUDTimer() 48 { 49 } 50 50 51 void HUDTimer::tick(float dt)52 {53 SUPER(HUDTimer, tick, dt);51 void HUDTimer::tick(float dt) 52 { 53 SUPER(HUDTimer, tick, dt); 54 54 55 Gametype* gametype = this->getGametype(); 56 57 if(gametype) 55 Gametype* gametype = this->getGametype(); 56 57 if (gametype) 58 { 59 if (gametype->getTimerIsActive()) 60 { 61 this->setCaption(convertToString((int)gametype->getTime() + 1)); 62 } 63 } 64 } 65 66 void HUDTimer::changedOwner() 58 67 { 59 if (gametype->getTimerIsActive()) 60 { 61 this->setCaption(convertToString((int)gametype->getTime() + 1)); 62 } 68 SUPER(HUDTimer, changedOwner); 69 70 this->owner_ = dynamic_cast<ControllableEntity*>(this->getOwner()); 63 71 } 64 }65 66 void HUDTimer::changedOwner()67 {68 SUPER(HUDTimer, changedOwner);69 70 this->owner_ = dynamic_cast<ControllableEntity*>(this->getOwner());71 }72 72 } -
code/trunk/src/orxonox/overlays/hud/HUDTimer.h
r3033 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "interfaces/Tickable.h" 34 35 #include "overlays/OverlayText.h" 35 #include "objects/Tickable.h"36 36 37 37 namespace orxonox 38 38 { 39 class _OrxonoxExport HUDTimer : public OverlayText, public Tickable40 {39 class _OrxonoxExport HUDTimer : public OverlayText, public Tickable 40 { 41 41 public: 42 HUDTimer(BaseObject* creator);43 ~HUDTimer();42 HUDTimer(BaseObject* creator); 43 virtual ~HUDTimer(); 44 44 45 virtual void tick(float dt);45 virtual void tick(float dt); 46 46 47 virtual void changedOwner();47 virtual void changedOwner(); 48 48 49 49 private: 50 50 ControllableEntity* owner_; 51 };51 }; 52 52 } 53 53 #endif /* _HUDTimer_H__ */ -
code/trunk/src/orxonox/overlays/hud/KillMessage.h
r3099 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "interfaces/GametypeMessageListener.h" 34 35 #include "overlays/FadeoutText.h" 35 #include "objects/GametypeMessageListener.h"36 36 37 37 namespace orxonox -
code/trunk/src/orxonox/overlays/hud/PongScore.cc
r3110 r3196 29 29 #include "PongScore.h" 30 30 31 #include <OgreTextAreaOverlayElement.h> 32 31 #include "util/Convert.h" 33 32 #include "core/CoreIncludes.h" 34 33 #include "core/XMLPort.h" 35 #include "util/Convert.h"36 34 #include "objects/gametypes/Pong.h" 37 35 #include "objects/infos/PlayerInfo.h" -
code/trunk/src/orxonox/overlays/hud/PongScore.h
r3078 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "interfaces/Tickable.h" 34 35 #include "overlays/OverlayText.h" 35 #include "objects/Tickable.h"36 36 37 37 namespace orxonox … … 41 41 public: 42 42 PongScore(BaseObject* creator); 43 ~PongScore();43 virtual ~PongScore(); 44 44 45 45 virtual void tick(float dt); -
code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.cc
r3110 r3196 28 28 29 29 #include "TeamBaseMatchScore.h" 30 31 #include <OgreTextAreaOverlayElement.h>32 30 33 31 #include "core/CoreIncludes.h" -
code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.h
r3104 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "interfaces/Tickable.h" 34 35 #include "overlays/OverlayText.h" 35 #include "objects/Tickable.h"36 36 37 37 namespace orxonox … … 41 41 public: 42 42 TeamBaseMatchScore(BaseObject* creator); 43 ~TeamBaseMatchScore();43 virtual ~TeamBaseMatchScore(); 44 44 45 45 virtual void tick(float dt); -
code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.cc
r3110 r3196 47 47 this->text_ = new OverlayText(this); 48 48 this->text_->setFont("Monofur"); 49 this->text_->setTextSize(0.04 );49 this->text_->setTextSize(0.04f); 50 50 this->text_->setAlignmentString("center"); 51 51 this->text_->setColour(ColourValue::White); -
code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.h
r3104 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "util/Math.h" 35 #include "tools/Timer.h" 34 36 #include "HUDHealthBar.h" 35 #include "tools/Timer.h"36 37 37 38 namespace orxonox -
code/trunk/src/orxonox/overlays/map/Map.cc
r3110 r3196 24 24 * 25 25 */ 26 26 27 #include "Map.h" 27 28 28 29 #include <string> 29 #include "util/String.h" 30 31 #include <OgreBorderPanelOverlayElement.h> 32 #include <OgreCamera.h> 33 #include <OgreEntity.h> 34 #include <OgreHardwarePixelBuffer.h> 35 #include <OgreMaterialManager.h> 36 #include <OgreMovablePlane.h> 37 #include <OgreOverlay.h> 38 #include <OgreOverlayContainer.h> 39 #include <OgreOverlayManager.h> 40 #include <OgrePass.h> 41 #include <OgreRenderTexture.h> 42 #include <OgreResourceGroupManager.h> 43 #include <OgreRoot.h> 30 44 #include <OgreSceneManager.h> 31 45 #include <OgreSceneNode.h> 32 #include <OgreEntity.h> 33 #include <OgreNode.h> 34 35 36 #include <OgreRenderWindow.h> 37 #include <OgreRenderTexture.h> 46 #include <OgreTechnique.h> 38 47 #include <OgreTexture.h> 48 #include <OgreTextureManager.h> 39 49 #include <OgreViewport.h> 40 50 41 #include <OgreMaterialManager.h> 42 #include <OgreRoot.h> 43 #include <OgreHardwarePixelBuffer.h> 51 #include "core/ConsoleCommand.h" 52 #include "core/CoreIncludes.h" 53 #include "core/XMLPort.h" 54 #include "interfaces/RadarViewable.h" 55 #include "objects/Scene.h" 56 #include "objects/controllers/HumanController.h" 57 #include "objects/worldentities/CameraPosition.h" 44 58 #include "objects/worldentities/ControllableEntity.h" 45 #include "objects/worldentities/CameraPosition.h"46 47 #include <OgreOverlay.h>48 #include <OgreMovablePlane.h>49 #include <OgreOverlayElement.h>50 #include <OgreOverlayManager.h>51 #include <OgreOverlayContainer.h>52 #include "core/CoreIncludes.h"53 #include "core/ConfigValueIncludes.h"54 #include "core/ConsoleCommand.h"55 #include "objects/Scene.h"56 #include "objects/RadarViewable.h"57 #include "objects/controllers/HumanController.h"58 59 59 60 namespace orxonox … … 264 265 } 265 266 266 Ogre::MaterialPtr Map::createRenderCamera(Ogre::Camera * cam, std::stringmatName)267 Ogre::MaterialPtr Map::createRenderCamera(Ogre::Camera * cam, const std::string& matName) 267 268 { 268 269 Ogre::TexturePtr rttTex = Ogre::TextureManager::getSingleton().createManual(matName+"_tex", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_2D, 512, 512, 0, Ogre::PF_R8G8B8, Ogre::TU_RENDERTARGET); … … 400 401 } 401 402 403 // HACK! 404 void Map::hackDestroyMap() 405 { 406 Map::OverlayMaterial_.setNull(); 407 } 408 402 409 void Map::tick(float dt) 403 410 { -
code/trunk/src/orxonox/overlays/map/Map.h
r3101 r3196 25 25 */ 26 26 27 #ifndef _M AP_H__28 #define _M AP_H__27 #ifndef _Map_H__ 28 #define _Map_H__ 29 29 30 #include <string>31 30 #include "OrxonoxPrereqs.h" 32 #include <OgrePrerequisites.h>33 #include <OgreSceneManager.h>34 #include <OgreSceneNode.h>35 #include <OgreEntity.h>36 #include <OgreOverlay.h>37 #include <OgreOverlayElement.h>38 #include <OgreOverlayManager.h>39 #include <OgreOverlayContainer.h>40 #include <OgreMovablePlane.h>41 31 42 #include <OgreBorderPanelOverlayElement.h> 43 #include <OgreTextAreaOverlayElement.h> 32 #include <OgreMaterial.h> 44 33 34 #include "util/UtilPrereqs.h" 35 #include "interfaces/Tickable.h" 45 36 #include "overlays/OrxonoxOverlay.h" 46 #include "objects/Tickable.h"47 48 49 37 50 38 namespace orxonox … … 55 43 public: // functions 56 44 Map(BaseObject* creator); 57 ~Map();45 virtual ~Map(); 58 46 59 47 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); … … 61 49 virtual void changedOwner(); 62 50 63 static Ogre::MaterialPtr createRenderCamera(Ogre::Camera * cam, std::stringmatName);51 static Ogre::MaterialPtr createRenderCamera(Ogre::Camera * cam, const std::string& matName); 64 52 65 53 static void openMap(); 54 // HACK! 55 static void hackDestroyMap(); 66 56 67 57 //Not yet implemented … … 126 116 } 127 117 128 #endif /* _M AP_H__ */118 #endif /* _Map_H__ */ -
code/trunk/src/orxonox/overlays/notifications/Notification.cc
r3110 r3196 28 28 29 29 /** 30 @file Notification.cc30 @file 31 31 @brief Implementation of the Notification class. 32 32 */ … … 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "util/Exception.h"38 39 37 #include "NotificationManager.h" 40 38 … … 48 46 Notification::Notification(BaseObject* creator) : BaseObject(creator) 49 47 { 48 RegisterObject(Notification); 50 49 this->initialize(); 51 50 } … … 76 75 void Notification::initialize(void) 77 76 { 78 RegisterObject(Notification);79 80 77 this->message_ = ""; 81 78 this->sender_ = NotificationManager::NONE; -
code/trunk/src/orxonox/overlays/notifications/Notification.h
r3034 r3196 28 28 29 29 /** 30 @file Notification.h30 @file 31 31 @brief Definition of the Notification class. 32 32 */ … … 38 38 39 39 #include <string> 40 41 40 #include "core/BaseObject.h" 42 41 -
code/trunk/src/orxonox/overlays/notifications/NotificationManager.cc
r3110 r3196 28 28 29 29 /** 30 @file NotificationManager.cc30 @file 31 31 @brief Implementation of the NotificationManager class. 32 32 */ … … 34 34 #include "NotificationManager.h" 35 35 36 #include <set> 37 36 38 #include "core/CoreIncludes.h" 37 38 #include <set>39 40 39 #include "Notification.h" 41 40 #include "NotificationQueue.h" -
code/trunk/src/orxonox/overlays/notifications/NotificationManager.h
r3034 r3196 28 28 29 29 /** 30 @file NotificationManager.h30 @file 31 31 @brief Definition of the NotificationManager class. 32 32 */ … … 37 37 #include "OrxonoxPrereqs.h" 38 38 39 #include "core/OrxonoxClass.h" 40 39 #include <ctime> 41 40 #include <map> 42 41 #include <string> 43 #include <ctime> 44 45 #include "NotificationOverlay.h" 42 #include "core/OrxonoxClass.h" 46 43 47 44 namespace orxonox -
code/trunk/src/orxonox/overlays/notifications/NotificationOverlay.cc
r3110 r3196 28 28 29 29 /** 30 @file NotificationOverlay.cc30 @file 31 31 @brief Implementation of the NotificationOverlay class. 32 32 */ … … 34 34 #include "NotificationOverlay.h" 35 35 36 #include <OgreOverlayManager.h> 37 #include <OgreTextAreaOverlayElement.h> 38 #include <OgrePanelOverlayElement.h> 39 36 #include "util/Exception.h" 40 37 #include "core/CoreIncludes.h" 41 #include "util/Exception.h"42 43 38 #include "Notification.h" 44 39 #include "NotificationQueue.h" … … 53 48 NotificationOverlay::NotificationOverlay(BaseObject* creator) : OverlayText(creator) 54 49 { 50 RegisterObject(NotificationOverlay); 55 51 this->initialize(); 56 52 } … … 87 83 void NotificationOverlay::initialize(void) 88 84 { 89 RegisterObject(NotificationOverlay);90 91 85 this->queue_ = NULL; 92 86 } … … 133 127 Clips the input message so that it meets the requirements for the maximal length of Notifications given by the NotificationQueue. 134 128 */ 135 conststd::string NotificationOverlay::clipMessage(const std::string & message)129 std::string NotificationOverlay::clipMessage(const std::string & message) 136 130 { 137 131 if(message.length() <= (unsigned int)this->queue_->getNotificationLength()) //!< If the message is not too long. -
code/trunk/src/orxonox/overlays/notifications/NotificationOverlay.h
r3078 r3196 28 28 29 29 /** 30 @file NotificationOverlay.h30 @file 31 31 @brief Definition of the NotificationOverlay class. 32 32 */ … … 38 38 #include "OrxonoxPrereqs.h" 39 39 40 #include <string> 40 41 #include "orxonox/overlays/OverlayText.h" 41 42 #include <string>43 #include <set>44 #include <OgrePrerequisites.h>45 #include <OgreTextAreaOverlayElement.h>46 42 47 43 namespace orxonox … … 72 68 73 69 protected: 74 conststd::string clipMessage(const std::string & message); //!< Clips the input message if too long.70 std::string clipMessage(const std::string & message); //!< Clips the input message if too long. 75 71 76 72 private: -
code/trunk/src/orxonox/overlays/notifications/NotificationQueue.cc
r3110 r3196 28 28 29 29 /** 30 @file NotificationQueue.cc30 @file 31 31 @brief Implementation of the NotificationQueue class. 32 32 */ … … 34 34 #include "NotificationQueue.h" 35 35 36 #include <OgreOverlayManager.h>37 #include <OgreTextAreaOverlayElement.h>38 #include <list>39 #include <iostream>40 36 #include <sstream> 41 37 42 38 #include "core/CoreIncludes.h" 43 39 #include "core/XMLPort.h" 44 45 #include "Notification.h"46 40 #include "NotificationOverlay.h" 41 #include "NotificationManager.h" 47 42 48 43 namespace orxonox … … 53 48 const std::string NotificationQueue::DEFAULT_FONT = "VeraMono"; 54 49 const Vector2 NotificationQueue::DEFAULT_POSITION = Vector2(0.0,0.0); 55 const float NotificationQueue::DEFAULT_FONT_SIZE = 0.025 ;50 const float NotificationQueue::DEFAULT_FONT_SIZE = 0.025f; 56 51 57 52 /** … … 61 56 NotificationQueue::NotificationQueue(BaseObject* creator) : OverlayGroup(creator) 62 57 { 58 RegisterObject(NotificationQueue); 63 59 this->initialize(); 64 60 } … … 81 77 void NotificationQueue::initialize(void) 82 78 { 83 RegisterObject(NotificationQueue);84 85 79 this->size_ = 0; 86 80 this->tickTime_ = 0.0; -
code/trunk/src/orxonox/overlays/notifications/NotificationQueue.h
r2926 r3196 28 28 29 29 /** 30 @file NotificationQueue.h30 @file 31 31 @brief Definition of the NotificationQueue class. 32 32 */ … … 37 37 #include "OrxonoxPrereqs.h" 38 38 39 #include <ctime> 40 #include <map> 41 #include <set> 39 42 #include <string> 40 #include <set> 41 #include <OgreOverlayManager.h> 42 #include <OgreTextAreaOverlayElement.h> 43 #include <OgrePanelOverlayElement.h> 44 #include <map> 45 #include <ctime> 46 47 #include "orxonox/overlays/OverlayGroup.h" 48 #include "orxonox/objects/Tickable.h" 49 50 #include "NotificationManager.h" 43 44 #include "util/Math.h" 45 #include "interfaces/Tickable.h" 46 #include "overlays/OverlayGroup.h" 51 47 52 48 namespace orxonox -
code/trunk/src/orxonox/overlays/stats/CMakeLists.txt
r2710 r3196 3 3 Scoreboard.cc 4 4 Stats.cc 5 StatsTest.cc6 5 ) -
code/trunk/src/orxonox/overlays/stats/CreateLines.cc
r3110 r3196 26 26 27 27 #include "CreateLines.h" 28 29 #include <string>30 #include <OgreOverlay.h>31 #include <OgreOverlayElement.h>32 #include <OgreOverlayManager.h>33 #include <OgreOverlayContainer.h>34 35 #include "util/Convert.h"36 #include "util/Debug.h"37 #include "core/CoreIncludes.h"38 #include "core/ConfigValueIncludes.h"39 28 40 29 #include "overlays/OverlayText.h" -
code/trunk/src/orxonox/overlays/stats/CreateLines.h
r2662 r3196 28 28 #define _CreateLines_H__ 29 29 30 31 30 #include "OrxonoxPrereqs.h" 32 #include <OgrePrerequisites.h>33 #include <OgreBorderPanelOverlayElement.h>34 #include <OgreTextAreaOverlayElement.h>35 36 #include "overlays/OrxonoxOverlay.h"37 #include "objects/Tickable.h"38 39 31 40 32 namespace orxonox -
code/trunk/src/orxonox/overlays/stats/Scoreboard.cc
r3110 r3196 27 27 #include "Scoreboard.h" 28 28 29 #include <string>30 #include <OgreOverlay.h>31 #include <OgreOverlayElement.h>32 #include <OgreOverlayManager.h>33 #include <OgreOverlayContainer.h>34 35 29 #include "util/Convert.h" 36 #include "util/Debug.h"37 30 #include "core/CoreIncludes.h" 38 #include "core/ConfigValueIncludes.h"39 31 #include "objects/gametypes/Gametype.h" 40 32 #include "objects/infos/PlayerInfo.h" … … 101 93 for (std::map<PlayerInfo*, Player>::const_iterator it = playerList.begin(); it != playerList.end(); ++it) 102 94 { 103 this->lines_[index]->setPlayerName( omni_cast<std::string>(it->first->getName()));104 this->lines_[index]->setScore( omni_cast<std::string>(it->second.frags_));105 this->lines_[index]->setDeaths( omni_cast<std::string>(it->second.killed_));95 this->lines_[index]->setPlayerName(multi_cast<std::string>(it->first->getName())); 96 this->lines_[index]->setScore(multi_cast<std::string>(it->second.frags_)); 97 this->lines_[index]->setDeaths(multi_cast<std::string>(it->second.killed_)); 106 98 index++; 107 99 } -
code/trunk/src/orxonox/overlays/stats/Scoreboard.h
r2662 r3196 30 30 31 31 #include "OrxonoxPrereqs.h" 32 #include <OgrePrerequisites.h>33 #include <OgreBorderPanelOverlayElement.h>34 #include <OgreTextAreaOverlayElement.h>35 32 33 #include <string> 34 #include <vector> 35 #include "interfaces/Tickable.h" 36 36 #include "overlays/OrxonoxOverlay.h" 37 #include "objects/Tickable.h"38 39 37 40 38 namespace orxonox … … 42 40 class _OrxonoxExport Scoreboard : public OrxonoxOverlay, public Tickable 43 41 { 44 45 42 public: // functions 46 43 Scoreboard(BaseObject* creator); -
code/trunk/src/orxonox/overlays/stats/Stats.cc
r3110 r3196 30 30 31 31 #include <string> 32 #include <OgreOverlay.h>33 #include <OgreOverlayElement.h>34 32 #include <OgreOverlayManager.h> 35 #include <Ogre OverlayContainer.h>33 #include <OgreBorderPanelOverlayElement.h> 36 34 37 #include "util/Convert.h" 38 #include "util/Debug.h" 35 #include "util/String.h" 39 36 #include "core/CoreIncludes.h" 40 37 #include "core/ConfigValueIncludes.h" -
code/trunk/src/orxonox/overlays/stats/Stats.h
r2662 r3196 30 30 #define _Stats_H__ 31 31 32 #include "OrxonoxPrereqs.h" 32 33 33 #include "OrxonoxPrereqs.h" 34 #include <OgrePrerequisites.h> 35 #include <OgreBorderPanelOverlayElement.h> 36 #include <OgreTextAreaOverlayElement.h> 37 34 #include "util/OgreForwardRefs.h" 35 #include "interfaces/Tickable.h" 38 36 #include "overlays/OrxonoxOverlay.h" 39 #include "objects/Tickable.h"40 41 37 42 38 namespace orxonox -
code/trunk/src/orxonox/sound/CMakeLists.txt
r3078 r3196 1 1 ADD_SOURCE_FILES(ORXONOX_SRC_FILES 2 SoundManager.h3 SoundBase.h4 SoundMainMenu.h5 6 2 SoundManager.cc 7 3 SoundBase.cc -
code/trunk/src/orxonox/sound/SoundBase.cc
r3108 r3196 26 26 * 27 27 */ 28 29 #include "SoundBase.h" 30 31 #include <string> 28 32 #include <vector> 29 33 #include <AL/alut.h> 30 34 #include <vorbis/vorbisfile.h> 31 35 36 #include "util/Math.h" 37 #include "core/Core.h" 32 38 #include "orxonox/objects/worldentities/WorldEntity.h" 33 #include "util/Math.h"34 #include "SoundBase.h"35 39 #include "SoundManager.h" 36 #include "core/Core.h"37 40 38 41 namespace orxonox 39 42 { 40 SoundManager* SoundBase::soundmanager_s = NULL;41 42 43 SoundBase::SoundBase(WorldEntity* entity) 43 44 { 44 if(SoundBase::soundmanager_s == NULL)45 {46 SoundBase::soundmanager_s = new SoundManager();47 }48 49 45 this->source_ = 0; 50 46 this->buffer_ = 0; 51 47 this->entity_ = entity; 52 48 53 Sound Base::soundmanager_s->addSound(this);49 SoundManager::getInstance().addSound(this); 54 50 } 55 51 … … 141 137 filename = Core::getMediaPathString() + "/audio/" + filename; 142 138 143 if(!Sound Base::soundmanager_s->isSoundAvailable())139 if(!SoundManager::getInstance().isSoundAvailable()) 144 140 { 145 141 COUT(3) << "Sound: not available, skipping " << filename << std::endl; … … 179 175 } 180 176 181 ALuint SoundBase::loadOggFile( std::stringfilename)177 ALuint SoundBase::loadOggFile(const std::string& filename) 182 178 { 183 179 char inbuffer[4096]; -
code/trunk/src/orxonox/sound/SoundBase.h
r3078 r3196 26 26 * 27 27 */ 28 #ifndef _SOUNDBASE_H__ 29 #define _SOUNDBASE_H__ 30 31 #include <AL/al.h> 32 #include <string> 28 #ifndef _SoundBase_H__ 29 #define _SoundBase_H__ 33 30 34 31 #include "OrxonoxPrereqs.h" 32 #include <cstring> // define NULL 35 33 36 34 namespace orxonox … … 60 58 61 59 private: 62 ALuint loadOggFile( std::stringfilename);60 ALuint loadOggFile(const std::string& filename); 63 61 ALuint source_; 64 62 ALuint buffer_; … … 66 64 67 65 ALint getSourceState(); 68 69 static SoundManager* soundmanager_s;70 66 }; // class SoundBase 71 67 } // namepsace orxonox 72 68 73 #endif / / _SOUNDBASE_H__69 #endif /* _SoundBase_H__ */ -
code/trunk/src/orxonox/sound/SoundMainMenu.cc
r3078 r3196 28 28 29 29 #include "SoundMainMenu.h" 30 30 31 #include "core/CoreIncludes.h" 31 32 #include "core/ConfigValueIncludes.h" -
code/trunk/src/orxonox/sound/SoundMainMenu.h
r3078 r3196 27 27 */ 28 28 29 #ifndef _SOUNDMAINMENU_H__ 30 #define _SOUNDMAINMENU_H__ 29 #ifndef _SoundMainMenu_H__ 30 #define _SoundMainMenu_H__ 31 32 #include "OrxonoxPrereqs.h" 31 33 32 34 #include <string> 33 34 35 #include "core/OrxonoxClass.h" 35 #include "OrxonoxPrereqs.h"36 36 #include "SoundBase.h" 37 37 … … 48 48 }; 49 49 } 50 #endif 50 51 #endif /* _SoundMainMenu_H__ */ -
code/trunk/src/orxonox/sound/SoundManager.cc
r3108 r3196 27 27 */ 28 28 29 #include "SoundManager.h" 30 29 31 #include <AL/alut.h> 30 32 33 #include "util/Math.h" 31 34 #include "orxonox/CameraManager.h" 32 35 #include "orxonox/objects/worldentities/Camera.h" 33 #include "util/Math.h"34 36 #include "SoundBase.h" 35 #include "SoundManager.h"36 37 37 38 namespace orxonox 38 39 { 40 SoundManager* SoundManager::singletonRef_s = NULL; 39 41 ALCdevice* SoundManager::device_s = NULL; 40 42 … … 44 46 SoundManager::SoundManager() 45 47 { 48 assert(singletonRef_s == NULL); 49 singletonRef_s = this; 50 46 51 this->soundavailable_ = true; 47 52 if(!alutInitWithoutContext(NULL,NULL)) … … 90 95 SoundManager::~SoundManager() 91 96 { 97 assert(singletonRef_s != NULL); 98 singletonRef_s = NULL; 99 92 100 alcDestroyContext(this->context_); 93 101 alcCloseDevice(SoundManager::device_s); -
code/trunk/src/orxonox/sound/SoundManager.h
r3078 r3196 25 25 * ... 26 26 */ 27 #ifndef _SOUNDMANGER_H__ 28 #define _SOUNDMANGER_H__ 29 30 #include <AL/al.h> 31 #include <AL/alc.h> 27 #ifndef _SoundManager_H__ 28 #define _SoundManager_H__ 32 29 33 30 #include "OrxonoxPrereqs.h" 34 #include "orxonox/objects/Tickable.h" 31 32 #include <cassert> 33 #include <list> 34 #include "interfaces/Tickable.h" 35 35 36 36 namespace orxonox … … 49 49 void addSound(SoundBase* sound); 50 50 void removeSound(SoundBase* sound); 51 v irtual void tick(float dt);51 void tick(float dt); 52 52 bool isSoundAvailable(); 53 54 static SoundManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; } 53 55 54 56 private: … … 58 60 bool soundavailable_; 59 61 62 static SoundManager* singletonRef_s; 60 63 }; // class SoundManager 61 64 } // namespace orxonox 62 65 63 #endif / / _SOUNDMANAGER_H__66 #endif /* _SoundManager_H__ */ -
code/trunk/src/orxonox/tools/BillboardSet.cc
r3110 r3196 29 29 #include "BillboardSet.h" 30 30 31 #include <cassert> 32 #include <string> 31 33 #include <sstream> 32 #include <cassert>33 34 34 #include <OgreSceneManager.h> 35 35 #include <OgreBillboardSet.h> 36 36 #include <OgreBillboard.h> 37 37 38 #include "util/Convert.h" 39 #include "util/Math.h" 40 #include "util/String.h" 38 41 #include "core/GameMode.h" 39 #include "util/Convert.h"40 #include "util/String.h"41 42 42 43 namespace orxonox -
code/trunk/src/orxonox/tools/BillboardSet.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <string> 35 #include <OgrePrerequisites.h> 36 37 #include "util/Math.h" 33 #include "util/OgreForwardRefs.h" 38 34 39 35 namespace orxonox … … 52 48 inline Ogre::BillboardSet* getBillboardSet() 53 49 { return this->billboardSet_; } 54 inline Ogre::SceneManager* getSceneManager() 50 inline Ogre::SceneManager* getSceneManager() const 55 51 { return this->scenemanager_; } 56 52 … … 69 65 void destroyBillboardSet(); 70 66 71 static unsigned int billboardSetCounter_s;72 67 Ogre::BillboardSet* billboardSet_; 73 68 Ogre::SceneManager* scenemanager_; 69 70 static unsigned int billboardSetCounter_s; 74 71 }; 75 72 } -
code/trunk/src/orxonox/tools/BulletConversions.h
r2662 r3196 34 34 #include "util/Convert.h" 35 35 #include "util/Math.h" 36 #include "LinearMath/btQuaternion.h"37 #include "LinearMath/btVector3.h"36 #include <LinearMath/btQuaternion.h> 37 #include <LinearMath/btVector3.h> 38 38 39 39 namespace orxonox … … 43 43 struct ConverterExplicit<orxonox::Vector3, btVector3> 44 44 { 45 static bool convert(btVector3* output, const orxonox::Vector3& input)45 FORCEINLINE static bool convert(btVector3* output, const orxonox::Vector3& input) 46 46 { 47 47 output->setX(input.x); … … 56 56 struct ConverterExplicit<btVector3, orxonox::Vector3> 57 57 { 58 static bool convert(orxonox::Vector3* output, const btVector3& input)58 FORCEINLINE static bool convert(orxonox::Vector3* output, const btVector3& input) 59 59 { 60 60 output->x = input.x(); … … 69 69 struct ConverterExplicit<orxonox::Quaternion, btQuaternion> 70 70 { 71 static bool convert(btQuaternion* output, const orxonox::Quaternion& input)71 FORCEINLINE static bool convert(btQuaternion* output, const orxonox::Quaternion& input) 72 72 { 73 73 output->setW(input.w); … … 83 83 struct ConverterExplicit<btQuaternion, orxonox::Quaternion> 84 84 { 85 static bool convert(orxonox::Quaternion* output, const btQuaternion& input)85 FORCEINLINE static bool convert(orxonox::Quaternion* output, const btQuaternion& input) 86 86 { 87 87 output->w = input.w(); -
code/trunk/src/orxonox/tools/CMakeLists.txt
r3089 r3196 1 1 ADD_SOURCE_FILES(ORXONOX_SRC_FILES 2 2 BillboardSet.cc 3 DynamicLines.cc 4 DynamicRenderable.cc 3 5 Mesh.cc 4 6 ParticleInterface.cc 5 7 Shader.cc 6 8 TextureGenerator.cc 7 TimeFactorListener.cc8 9 Timer.cc 9 WindowEventListener.cc10 DynamicLines.cpp11 DynamicRenderable.cpp12 10 ) -
code/trunk/src/orxonox/tools/DynamicLines.h
r3089 r3196 1 #ifndef _DYNAMIC_LINES_H_ 2 #define _DYNAMIC_LINES_H_ 1 /* 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < 4 * 5 * 6 * License notice: 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 2 11 * of the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 * 22 * Author: 23 * Baxissimo, Emmeran, DWORD, EtherDrive (OGRE Wiki) 24 * Co-authors: 25 * ... 26 * 27 */ 3 28 29 #ifndef _DynamicLines_H__ 30 #define _DynamicLines_H__ 31 32 #include "OrxonoxPrereqs.h" 33 34 #include <vector> 4 35 #include "DynamicRenderable.h" 5 #include <vector>6 36 7 namespace orxonox37 namespace Ogre 8 38 { 9 class DynamicLines : public DynamicRenderable 10 { 11 typedef Ogre::Vector3 Vector3; 12 typedef Ogre::Quaternion Quaternion; 13 typedef Ogre::Camera Camera; 14 typedef Ogre::Real Real; 15 typedef Ogre::RenderOperation::OperationType OperationType; 39 class DynamicLines : public DynamicRenderable 40 { 41 typedef RenderOperation::OperationType OperationType; 16 42 17 public:18 /// Constructor - see setOperationType() for description of argument.19 DynamicLines(OperationType opType=Ogre::RenderOperation::OT_LINE_STRIP);20 virtual ~DynamicLines();43 public: 44 /// Constructor - see setOperationType() for description of argument. 45 DynamicLines(OperationType opType = RenderOperation::OT_LINE_STRIP); 46 virtual ~DynamicLines(); 21 47 22 /// Add a point to the point list23 void addPoint(const Ogre::Vector3 &p);24 /// Add a point to the point list25 void addPoint(Real x, Real y, Real z);48 /// Add a point to the point list 49 void addPoint(const Vector3 &p); 50 /// Add a point to the point list 51 void addPoint(Real x, Real y, Real z); 26 52 27 /// Change the location of an existing point in the point list28 void setPoint(unsigned short index, const Vector3 &value);53 /// Change the location of an existing point in the point list 54 void setPoint(unsigned short index, const Vector3 &value); 29 55 30 /// Return the location of an existing point in the point list31 const Vector3& getPoint(unsigned short index) const;56 /// Return the location of an existing point in the point list 57 const Vector3& getPoint(unsigned short index) const; 32 58 33 /// Return the total number of points in the point list34 unsigned short getNumPoints(void) const;59 /// Return the total number of points in the point list 60 unsigned short getNumPoints(void) const; 35 61 36 /// Remove all points from the point list37 void clear();62 /// Remove all points from the point list 63 void clear(); 38 64 39 /// Call this to update the hardware buffer after making changes.40 void update();65 /// Call this to update the hardware buffer after making changes. 66 void update(); 41 67 42 /** Set the type of operation to draw with. 43 * @param opType Can be one of 44 * - RenderOperation::OT_LINE_STRIP 45 * - RenderOperation::OT_LINE_LIST 46 * - RenderOperation::OT_POINT_LIST 47 * - RenderOperation::OT_TRIANGLE_LIST 48 * - RenderOperation::OT_TRIANGLE_STRIP 49 * - RenderOperation::OT_TRIANGLE_FAN 50 * The default is OT_LINE_STRIP. 51 */ 52 void setOperationType(OperationType opType); 53 OperationType getOperationType() const; 68 /** 69 @brief 70 Set the type of operation to draw with. 71 @param opType 72 Can be one of 73 - RenderOperation::OT_LINE_STRIP 74 - RenderOperation::OT_LINE_LIST 75 - RenderOperation::OT_POINT_LIST 76 - RenderOperation::OT_TRIANGLE_LIST 77 - RenderOperation::OT_TRIANGLE_STRIP 78 - RenderOperation::OT_TRIANGLE_FAN 79 The default is OT_LINE_STRIP. 80 */ 81 void setOperationType(OperationType opType); 82 OperationType getOperationType() const; 54 83 55 protected:56 /// Implementation DynamicRenderable, creates a simple vertex-only decl57 virtual void createVertexDeclaration();58 /// Implementation DynamicRenderable, pushes point list out to hardware memory59 virtual void fillHardwareBuffers();84 protected: 85 /// Implementation DynamicRenderable, creates a simple vertex-only decl 86 virtual void createVertexDeclaration(); 87 /// Implementation DynamicRenderable, pushes point list out to hardware memory 88 virtual void fillHardwareBuffers(); 60 89 61 private:62 std::vector<Vector3> mPoints;63 bool mDirty;64 };90 private: 91 std::vector<Vector3> mPoints; 92 bool mDirty; 93 }; 65 94 } 66 95 67 #endif 96 #endif /* _DynamicLines_H__ */ -
code/trunk/src/orxonox/tools/DynamicRenderable.h
r3089 r3196 1 #ifndef DYNAMIC_RENDERABLE_H 2 #define DYNAMIC_RENDERABLE_H 1 /* 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < 4 * 5 * 6 * License notice: 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 2 11 * of the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 * 22 * Author: 23 * Sinbad, Baxissimo, DWORD, TheBren (OGRE Wiki) 24 * Co-authors: 25 * ... 26 * 27 */ 28 29 #ifndef _DynamicRenderable_H__ 30 #define _DynamicRenderable_H__ 31 32 #include "OrxonoxPrereqs.h" 3 33 4 34 #include <OgreSimpleRenderable.h> 5 35 6 namespace orxonox36 namespace Ogre 7 37 { 8 /// Abstract base class providing mechanisms for dynamically growing hardware buffers.9 class DynamicRenderable : public Ogre::SimpleRenderable10 {11 public:12 /// Constructor13 DynamicRenderable();14 /// Virtual destructor15 virtual ~DynamicRenderable();38 /// Abstract base class providing mechanisms for dynamically growing hardware buffers. 39 class DynamicRenderable : public SimpleRenderable 40 { 41 public: 42 /// Constructor 43 DynamicRenderable(); 44 /// Virtual destructor 45 virtual ~DynamicRenderable(); 16 46 17 /** Initializes the dynamic renderable. 18 @remarks 19 This function should only be called once. It initializes the 20 render operation, and calls the abstract function 21 createVertexDeclaration(). 22 @param operationType The type of render operation to perform. 23 @param useIndices Specifies whether to use indices to determine the 24 vertices to use as input. */ 25 void initialize(Ogre::RenderOperation::OperationType operationType, 26 bool useIndices); 47 /** 48 @brief 49 Initializes the dynamic renderable. 50 @remarks 51 This function should only be called once. It initializes the 52 render operation, and calls the abstract function 53 createVertexDeclaration(). 54 @param operationType 55 The type of render operation to perform. 56 @param useIndices 57 Specifies whether to use indices to determine the vertices to use as input. 58 */ 59 void initialize(RenderOperation::OperationType operationType, 60 bool useIndices); 27 61 28 /// Implementation of Ogre::SimpleRenderable29 virtual Ogre::Real getBoundingRadius(void) const;30 /// Implementation of Ogre::SimpleRenderable31 virtual Ogre::Real getSquaredViewDepth(const Ogre::Camera* cam) const;62 /// Implementation of SimpleRenderable 63 virtual Real getBoundingRadius(void) const; 64 /// Implementation of SimpleRenderable 65 virtual Real getSquaredViewDepth(const Camera* cam) const; 32 66 33 protected:34 /// Maximum capacity of the currently allocated vertex buffer.35 size_t mVertexBufferCapacity;36 /// Maximum capacity of the currently allocated index buffer.37 size_t mIndexBufferCapacity;67 protected: 68 /// Maximum capacity of the currently allocated vertex buffer. 69 size_t mVertexBufferCapacity; 70 /// Maximum capacity of the currently allocated index buffer. 71 size_t mIndexBufferCapacity; 38 72 39 /** Creates the vertex declaration. 40 @remarks 41 Override and set mRenderOp.vertexData->vertexDeclaration here. 42 mRenderOp.vertexData will be created for you before this method 43 is called. */ 44 virtual void createVertexDeclaration() = 0; 73 /** 74 @brief 75 Creates the vertex declaration. 76 @remarks 77 Override and set mRenderOp.vertexData->vertexDeclaration here. 78 mRenderOp.vertexData will be created for you before this method 79 is called. 80 */ 81 virtual void createVertexDeclaration() = 0; 45 82 46 /** Prepares the hardware buffers for the requested vertex and index counts. 47 @remarks 48 This function must be called before locking the buffers in 49 fillHardwareBuffers(). It guarantees that the hardware buffers 50 are large enough to hold at least the requested number of 51 vertices and indices (if using indices). The buffers are 52 possibly reallocated to achieve this. 53 @par 54 The vertex and index count in the render operation are set to 55 the values of vertexCount and indexCount respectively. 56 @param vertexCount The number of vertices the buffer must hold. 83 /** 84 @brief 85 Prepares the hardware buffers for the requested vertex and index counts. 86 @remarks 87 This function must be called before locking the buffers in 88 fillHardwareBuffers(). It guarantees that the hardware buffers 89 are large enough to hold at least the requested number of 90 vertices and indices (if using indices). The buffers are 91 possibly reallocated to achieve this. 92 @par 93 The vertex and index count in the render operation are set to 94 the values of vertexCount and indexCount respectively. 95 @param vertexCount 96 The number of vertices the buffer must hold. 97 @param indexCount 98 The number of indices the buffer must hold. This 99 parameter is ignored if not using indices. 100 */ 101 void prepareHardwareBuffers(size_t vertexCount, size_t indexCount); 57 102 58 @param indexCount The number of indices the buffer must hold. This 59 parameter is ignored if not using indices. */ 60 void prepareHardwareBuffers(size_t vertexCount, size_t indexCount); 61 62 /** Fills the hardware vertex and index buffers with data. 63 @remarks 64 This function must call prepareHardwareBuffers() before locking 65 the buffers to ensure the they are large enough for the data to 66 be written. Afterwards the vertex and index buffers (if using 67 indices) can be locked, and data can be written to them. */ 68 virtual void fillHardwareBuffers() = 0; 69 }; 103 /** 104 @brief 105 Fills the hardware vertex and index buffers with data. 106 @remarks 107 This function must call prepareHardwareBuffers() before locking 108 the buffers to ensure the they are large enough for the data to 109 be written. Afterwards the vertex and index buffers (if using 110 indices) can be locked, and data can be written to them. 111 */ 112 virtual void fillHardwareBuffers() = 0; 113 }; 70 114 } 71 115 72 #endif / / DYNAMIC_RENDERABLE_H116 #endif /* _DynamicRenderable_H__ */ -
code/trunk/src/orxonox/tools/Mesh.cc
r3110 r3196 29 29 #include "Mesh.h" 30 30 31 #include <cassert> 31 32 #include <sstream> 33 #include <string> 32 34 #include <OgreEntity.h> 33 35 #include <OgreSceneManager.h> 34 #include <cassert>35 36 36 #include "core/GameMode.h"37 37 #include "util/Convert.h" 38 38 #include "util/String.h" 39 #include "core/GameMode.h" 39 40 40 41 namespace orxonox -
code/trunk/src/orxonox/tools/Mesh.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <string> 35 #include <OgrePrerequisites.h> 33 #include "util/OgreForwardRefs.h" 36 34 37 35 namespace orxonox … … 58 56 59 57 private: 60 static unsigned int meshCounter_s;61 58 Ogre::Entity* entity_; 62 59 bool bCastShadows_; 63 60 Ogre::SceneManager* scenemanager_; 61 62 static unsigned int meshCounter_s; 64 63 }; 65 64 } -
code/trunk/src/orxonox/tools/ParticleInterface.cc
r3110 r3196 34 34 #include "ParticleInterface.h" 35 35 36 #include <cassert> 37 #include <string> 36 38 #include <OgreParticleSystem.h> 37 39 #include <OgreParticleEmitter.h> 38 40 #include <OgreSceneManager.h> 39 #include <cassert> 40 41 42 #include "util/Convert.h" 43 #include "util/Math.h" 44 #include "core/CoreIncludes.h" 45 #include "core/GameMode.h" 41 46 #include "GraphicsManager.h" 42 #include "core/GameMode.h"43 #include "core/CoreIncludes.h"44 #include "util/Convert.h"45 47 46 48 namespace orxonox … … 132 134 return 0; 133 135 } 134 Ogre::ParticleAffector* ParticleInterface::getAffector(unsigned int affectorNr) const136 Ogre::ParticleAffector* ParticleInterface::getAffector(unsigned int affectorNr) 135 137 { 136 138 if (this->particleSystem_ && (affectorNr < this->particleSystem_->getNumAffectors())) -
code/trunk/src/orxonox/tools/ParticleInterface.h
r2896 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <string> 35 #include <OgrePrerequisites.h> 36 37 #include "core/OrxonoxClass.h" 38 #include "util/Math.h" 39 #include "tools/TimeFactorListener.h" 34 #include "util/OgreForwardRefs.h" 35 #include "interfaces/TimeFactorListener.h" 40 36 41 37 #define getAllEmitters() \ … … 52 48 virtual ~ParticleInterface(); 53 49 54 inline Ogre::ParticleSystem* getParticleSystem() const50 inline Ogre::ParticleSystem* getParticleSystem() 55 51 { return this->particleSystem_; } 56 52 … … 62 58 63 59 Ogre::ParticleAffector* addAffector(const std::string& name); 64 Ogre::ParticleAffector* getAffector(unsigned int affectorNr) const;60 Ogre::ParticleAffector* getAffector(unsigned int affectorNr); 65 61 void removeAffector(unsigned int affectorNr); 66 62 void removeAllAffectors(); … … 95 91 void updateVisibility(); 96 92 97 static ParticleInterface* currentParticleInterface_s;98 static unsigned int counter_s;99 100 93 Ogre::ParticleSystem* particleSystem_; 94 Ogre::SceneManager* scenemanager_; 101 95 bool bVisible_; 102 96 bool bEnabled_; … … 104 98 unsigned int detaillevel_; //!< Detail level of this particle effect (0: off, 1: low, 2: normal, 3: high) 105 99 float speedFactor_; 106 Ogre::SceneManager* scenemanager_; 100 101 static ParticleInterface* currentParticleInterface_s; 102 static unsigned int counter_s; 107 103 }; 108 104 } -
code/trunk/src/orxonox/tools/Shader.cc
r3110 r3196 34 34 #include <OgreRoot.h> 35 35 #include <OgrePlugin.h> 36 37 #include "core/GameMode.h"38 #include "core/CoreIncludes.h"39 #include "core/Executor.h"40 #include "GraphicsManager.h"41 #include "util/Exception.h"42 43 36 #include <OgreMaterial.h> 44 37 #include <OgreTechnique.h> 45 38 #include <OgrePass.h> 46 39 #include <OgreMaterialManager.h> 40 41 #include "core/CoreIncludes.h" 42 #include "core/GameMode.h" 43 #include "GraphicsManager.h" 47 44 48 45 namespace orxonox … … 219 216 return (*((float*)pointer->second)); 220 217 else 221 return (*((int*)pointer->second));218 return static_cast<float>(*((int*)pointer->second)); 222 219 } 223 220 else -
code/trunk/src/orxonox/tools/Shader.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 #include <OgrePrerequisites.h> 33 34 #include <map> 35 #include <string> 34 36 #include <vector> 35 #include <map>36 37 37 #include "objects/Tickable.h" 38 #include "util/OgreForwardRefs.h" 39 #include "interfaces/Tickable.h" 38 40 39 41 namespace orxonox -
code/trunk/src/orxonox/tools/TextureGenerator.cc
r3110 r3196 33 33 34 34 #include "TextureGenerator.h" 35 35 36 #include <OgreMaterialManager.h> 36 37 #include <OgreTechnique.h> 37 38 #include "util/Convert.h" 39 #include "util/Math.h" 38 40 39 41 namespace std 40 42 { 41 43 template <> 42 bool less<orxonox::ColourValue>::operator()(const orxonox::ColourValue& __x, const orxonox::ColourValue& __y) const44 inline bool less<orxonox::ColourValue>::operator()(const orxonox::ColourValue& __x, const orxonox::ColourValue& __y) const 43 45 { 44 46 if (__x.r == __y.r) … … 63 65 unsigned int TextureGenerator::materialCount_s = 0; 64 66 65 /*static*/ const std::string& TextureGenerator::getMaterialName( std::stringtextureName, const ColourValue& colour)67 /*static*/ const std::string& TextureGenerator::getMaterialName(const std::string& textureName, const ColourValue& colour) 66 68 { 67 69 std::map<ColourValue, std::string>& colourMap = materials_s[textureName]; -
code/trunk/src/orxonox/tools/TextureGenerator.h
r1625 r3196 36 36 37 37 #include "OrxonoxPrereqs.h" 38 39 #include <map> 38 40 #include <string> 39 #include <map> 40 #include "util/Math.h" 41 #include "util/UtilPrereqs.h" 41 42 42 43 namespace orxonox … … 45 46 { 46 47 public: 47 static const std::string& getMaterialName( std::stringtextureName, const ColourValue& colour);48 static const std::string& getMaterialName(const std::string& textureName, const ColourValue& colour); 48 49 49 50 private: -
code/trunk/src/orxonox/tools/Timer.cc
r3110 r3196 27 27 */ 28 28 29 #include "Timer.h" 30 29 31 #include <set> 30 32 31 #include "Timer.h"32 33 #include "core/Executor.h"34 33 #include "core/CoreIncludes.h" 35 34 #include "core/ConsoleCommand.h" 36 35 #include "core/CommandExecutor.h" 37 36 #include "core/Clock.h" 37 #include "core/Functor.h" 38 38 39 39 namespace orxonox -
code/trunk/src/orxonox/tools/Timer.h
r2896 r3196 62 62 63 63 #include "OrxonoxPrereqs.h" 64 64 65 #include "core/Executor.h" 65 66 #include "core/OrxonoxClass.h" 66 #include " tools/TimeFactorListener.h"67 #include "interfaces/TimeFactorListener.h" 67 68 68 69 namespace orxonox
Note: See TracChangeset
for help on using the changeset viewer.