Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2009, 11:58:01 PM (16 years ago)
Author:
rgrieder
Message:

Merged most of the core4 revisions back to the trunk except for:

  • orxonox_cast
  • all the radical changes in the input library
Location:
code/trunk
Files:
119 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/CMakeLists.txt

    r3204 r3280  
    4242  FIND_HEADER_FILES
    4343  TOLUA_FILES
     44    LevelManager.h
    4445    gui/GUIManager.h
    4546    objects/pickup/BaseItem.h
  • code/trunk/src/orxonox/CameraManager.cc

    r3196 r3280  
    3232#include <OgreCompositorManager.h>
    3333
    34 #include "util/String.h"
     34#include "util/StringUtils.h"
    3535#include "core/GameMode.h"
    3636#include "core/ObjectList.h"
  • code/trunk/src/orxonox/GraphicsManager.cc

    r3196 r3280  
    3838#include <fstream>
    3939#include <boost/filesystem.hpp>
     40#include <boost/shared_ptr.hpp>
    4041
    4142#include <OgreCompositorManager.h>
     
    5354#include "SpecialConfig.h"
    5455#include "util/Exception.h"
    55 #include "util/String.h"
     56#include "util/StringUtils.h"
    5657#include "util/SubString.h"
    5758#include "core/Clock.h"
     
    7071namespace orxonox
    7172{
     73    using boost::shared_ptr;
     74
    7275    class _OrxonoxExport OgreWindowEventListener : public Ogre::WindowEventListener
    7376    {
     
    8992        , renderWindow_(0)
    9093        , viewport_(0)
    91         , ogreWindowEventListener_(0)
     94        , ogreWindowEventListener_(new OgreWindowEventListener())
    9295    {
    9396        RegisterObject(GraphicsManager);
     
    9699        singletonRef_s = this;
    97100
    98         this->loaded_ = false;
    99 
    100101        this->setConfigValues();
    101     }
    102 
    103     void GraphicsManager::initialise()
    104     {
     102
    105103        // Ogre setup procedure
    106104        setupOgre();
    107         // load all the required plugins for Ogre
    108         loadOgrePlugins();
    109         // read resource declaration file
    110         this->declareResources();
    111         // Reads ogre config and creates the render window
    112         this->loadRenderer();
    113 
    114         // TODO: Spread this
    115         this->initialiseResources();
    116 
    117         // add console commands
    118         FunctorMember<GraphicsManager>* functor1 = createFunctor(&GraphicsManager::printScreen);
    119         functor1->setObject(this);
    120         ccPrintScreen_ = createConsoleCommand(functor1, "printScreen");
    121         CommandExecutor::addConsoleCommandShortcut(ccPrintScreen_);
    122 
    123         this->loaded_ = true;
     105
     106        try
     107        {
     108            // load all the required plugins for Ogre
     109            loadOgrePlugins();
     110            // read resource declaration file
     111            this->declareResources();
     112            // Reads ogre config and creates the render window
     113            this->loadRenderer();
     114
     115            // TODO: Spread this
     116            this->initialiseResources();
     117
     118            // add console commands
     119            FunctorMember<GraphicsManager>* functor1 = createFunctor(&GraphicsManager::printScreen);
     120            functor1->setObject(this);
     121            ccPrintScreen_ = createConsoleCommand(functor1, "printScreen");
     122            CommandExecutor::addConsoleCommandShortcut(ccPrintScreen_);
     123        }
     124        catch (...)
     125        {
     126            // clean up
     127            delete this->ogreRoot_;
     128            delete this->ogreLogger_;
     129            delete this->ogreWindowEventListener_;
     130            throw;
     131        }
    124132    }
    125133
     
    130138    GraphicsManager::~GraphicsManager()
    131139    {
    132         if (this->loaded_)
    133         {
    134             delete this->ccPrintScreen_;
    135 
    136             if (this->ogreWindowEventListener_)
    137             {
    138                 // remove our WindowEventListener first to avoid bad calls after the window has been destroyed
    139                 Ogre::WindowEventUtilities::removeWindowEventListener(this->renderWindow_, this->ogreWindowEventListener_);
    140                 delete this->ogreWindowEventListener_;
    141             }
    142 
    143             // destroy render window
    144 //            Ogre::RenderSystem* renderer = this->ogreRoot_->getRenderSystem();
    145 //            renderer->destroyRenderWindow("Orxonox");
    146 
    147             // HACK! This fixes an exit crash
    148             Map::hackDestroyMap();
    149 
    150             // unload all compositors
    151             Ogre::CompositorManager::getSingleton().removeAll();
    152 
    153             // Delete OGRE main control organ
    154             delete this->ogreRoot_;
    155 
    156             // delete the ogre log and the logManager (since we have created it in the first place).
    157             this->ogreLogger_->getDefaultLog()->removeListener(this);
    158             this->ogreLogger_->destroyLog(Ogre::LogManager::getSingleton().getDefaultLog());
    159             delete this->ogreLogger_;
    160         }
     140/*
     141        delete this->ccPrintScreen_;
     142*/
     143
     144        // HACK! This fixes an exit crash
     145        Map::hackDestroyMap();
     146        // unload all compositors (this is only necessary because we don't yet destroy all resources!)
     147        Ogre::CompositorManager::getSingleton().removeAll();
     148
     149        // Delete OGRE main control organ
     150        delete this->ogreRoot_;
     151
     152        // delete the logManager (since we have created it in the first place).
     153        delete this->ogreLogger_;
     154
     155        delete this->ogreWindowEventListener_;
    161156
    162157        assert(singletonRef_s);
     
    194189    void GraphicsManager::update(const Clock& time)
    195190    {
    196         if (this->loaded_)
    197         {
    198             Ogre::FrameEvent evt;
    199             evt.timeSinceLastFrame = time.getDeltaTime();
    200             evt.timeSinceLastEvent = time.getDeltaTime(); // note: same time, but shouldn't matter anyway
    201 
    202             // don't forget to call _fireFrameStarted to OGRE to make sure
    203             // everything goes smoothly
    204             ogreRoot_->_fireFrameStarted(evt);
    205 
    206             // Pump messages in all registered RenderWindows
    207             // This calls the WindowEventListener objects.
    208             Ogre::WindowEventUtilities::messagePump();
    209             // make sure the window stays active even when not focused
    210             // (probably only necessary on windows)
    211             this->renderWindow_->setActive(true);
    212 
    213             // render
    214             ogreRoot_->_updateAllRenderTargets();
    215 
    216             // again, just to be sure OGRE works fine
    217             ogreRoot_->_fireFrameEnded(evt); // note: uses the same time as _fireFrameStarted
    218         }
     191        Ogre::FrameEvent evt;
     192        evt.timeSinceLastFrame = time.getDeltaTime();
     193        evt.timeSinceLastEvent = time.getDeltaTime(); // note: same time, but shouldn't matter anyway
     194
     195        // don't forget to call _fireFrameStarted to OGRE to make sure
     196        // everything goes smoothly
     197        ogreRoot_->_fireFrameStarted(evt);
     198
     199        // Pump messages in all registered RenderWindows
     200        // This calls the WindowEventListener objects.
     201        Ogre::WindowEventUtilities::messagePump();
     202        // make sure the window stays active even when not focused
     203        // (probably only necessary on windows)
     204        this->renderWindow_->setActive(true);
     205
     206        // render
     207        ogreRoot_->_updateAllRenderTargets();
     208
     209        // again, just to be sure OGRE works fine
     210        ogreRoot_->_fireFrameEnded(evt); // note: uses the same time as _fireFrameStarted
    219211    }
    220212
     
    248240        // create a new logManager
    249241        // Ogre::Root will detect that we've already created a Log
    250         ogreLogger_ = new Ogre::LogManager();
     242        std::auto_ptr<Ogre::LogManager> logger(new Ogre::LogManager());
    251243        COUT(4) << "Ogre LogManager created" << std::endl;
    252244
    253245        // create our own log that we can listen to
    254246        Ogre::Log *myLog;
    255         myLog = ogreLogger_->createLog(ogreLogFilepath.string(), true, false, false);
     247        myLog = logger->createLog(ogreLogFilepath.string(), true, false, false);
    256248        COUT(4) << "Ogre Log created" << std::endl;
    257249
     
    272264        // Leave plugins file empty. We're going to do that part manually later
    273265        ogreRoot_ = new Ogre::Root("", ogreConfigFilepath.string(), ogreLogFilepath.string());
     266        // In case that new Root failed the logger gets destroyed because of the std::auto_ptr
     267        ogreLogger_ = logger.release();
    274268
    275269        COUT(3) << "Ogre set up done." << std::endl;
     
    348342        if (!ogreRoot_->restoreConfig())
    349343            if (!ogreRoot_->showConfigDialog())
    350                 ThrowException(InitialisationFailed, "Could not show Ogre configuration dialogue.");
     344                ThrowException(InitialisationFailed, "OGRE graphics configuration dialogue failed.");
    351345
    352346        CCOUT(4) << "Creating render window" << std::endl;
     
    354348        this->renderWindow_ = ogreRoot_->initialise(true, "Orxonox");
    355349
    356         this->ogreWindowEventListener_ = new OgreWindowEventListener();
    357350        Ogre::WindowEventUtilities::addWindowEventListener(this->renderWindow_, ogreWindowEventListener_);
    358351
  • code/trunk/src/orxonox/GraphicsManager.h

    r3196 r3280  
    5757
    5858        void setConfigValues();
    59         void initialise();
    6059
    6160        void update(const Clock& time);
     
    9392
    9493    private:
    95         bool                loaded_;
    96 
    9794        Ogre::Root*         ogreRoot_;                 //!< Ogre's root
    9895        Ogre::LogManager*   ogreLogger_;
    9996        Ogre::RenderWindow* renderWindow_;             //!< the one and only render window
    10097        Ogre::Viewport*     viewport_;                 //!< default full size viewport
    101         OgreWindowEventListener* ogreWindowEventListener_;
     98        OgreWindowEventListener* ogreWindowEventListener_; //!< Pimpl to hide OgreWindowUtilities.h
    10299
    103100        // config values
  • code/trunk/src/orxonox/LevelManager.cc

    r3196 r3280  
    3030
    3131#include <map>
     32
     33#include "core/CommandLine.h"
     34#include "core/ConfigValueIncludes.h"
     35#include "core/CoreIncludes.h"
    3236#include "PlayerManager.h"
    3337#include "objects/Level.h"
     
    3640namespace orxonox
    3741{
     42    SetCommandLineArgument(level, "").shortcut("l").information("Default level file (overrides LevelManager::defaultLevelName_ configValue)");
     43
    3844    LevelManager* LevelManager::singletonRef_s = 0;
    3945
     
    4248        assert(singletonRef_s == 0);
    4349        singletonRef_s = this;
     50
     51        RegisterRootObject(LevelManager);
     52        this->setConfigValues();
     53
     54        // check override
     55        if (!CommandLine::getArgument("level")->hasDefaultValue())
     56        {
     57            ModifyConfigValue(defaultLevelName_, tset, CommandLine::getValue("level").getString());
     58        }
    4459    }
    4560
     
    4863        assert(singletonRef_s != 0);
    4964        singletonRef_s = 0;
     65    }
     66
     67    void LevelManager::setConfigValues()
     68    {
     69        SetConfigValue(defaultLevelName_, "presentation_dm.oxw")
     70            .description("Sets the preselection of the level in the main menu.");
    5071    }
    5172
     
    93114        }
    94115    }
     116
     117    void LevelManager::setDefaultLevel(const std::string& levelName)
     118    {
     119        ModifyConfigValue(defaultLevelName_, set, levelName);
     120    }
     121
     122    const std::string& LevelManager::getDefaultLevel()
     123    {
     124        return defaultLevelName_;
     125    }
    95126}
  • code/trunk/src/orxonox/LevelManager.h

    r3196 r3280  
    3434#include <cassert>
    3535#include <list>
     36#include "core/OrxonoxClass.h"
    3637
     38// tolua_begin
    3739namespace orxonox
    3840{
    3941    class _OrxonoxExport LevelManager
    40     {
     42    // tolua_end
     43        : public OrxonoxClass
     44    { // tolua_export
    4145        public:
    4246            LevelManager();
    4347            virtual ~LevelManager();
     48
     49            void setConfigValues();
    4450
    4551            void requestActivity(Level* level);
     
    4753            Level* getActiveLevel();
    4854
     55            void setDefaultLevel(const std::string& levelName); //tolua_export
     56            const std::string& getDefaultLevel(); //tolua_export
     57
    4958            static LevelManager* getInstancePtr() { return singletonRef_s; }
    50             static LevelManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
     59            static LevelManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; } // tolua_export
    5160
    5261        private:
     
    5766            std::list<Level*> levels_s;
    5867
     68            // config values
     69            std::string defaultLevelName_;
     70
    5971            static LevelManager* singletonRef_s;
    60     };
    61 }
     72    }; // tolua_export
     73} // tolua_export
    6274
    6375#endif /* _LevelManager_H__ */
  • code/trunk/src/orxonox/Main.cc

    r3196 r3280  
    3737
    3838#include "util/Debug.h"
    39 #include "core/Identifier.h"
     39#include "util/Exception.h"
    4040#include "core/Game.h"
    4141
     
    5050#endif
    5151{
     52    using namespace orxonox;
     53
     54    Game* game = 0;
     55    try
    5256    {
    53         orxonox::Game orxonox(argc, argv);
     57        game = new Game(argc, argv);
    5458
    55         orxonox.setStateHierarchy(
     59        game->setStateHierarchy(
    5660        "root"
    5761        " graphics"
     
    6872        );
    6973
    70         orxonox.run();
     74        game->requestState("root");
     75    }
     76    catch (const std::exception& ex)
     77    {
     78        COUT(0) << "Orxonox failed to initialise: " << ex.what() << std::endl;
     79        COUT(0) << "Terminating program." << std::endl;
     80        return 1;
     81    }
     82    catch (...)
     83    {
     84        COUT(0) << "Orxonox failed to initialise: " << std::endl;
     85        COUT(0) << "Terminating program." << std::endl;
     86        return 1;
     87    }
    7188
    72         // destroy the GameStates created pre-mainly
    73         orxonox::Game::destroyStates();
    74     } // orxonox gets destroyed right here!
    75 
    76     // Clean up class hierarchy stuff (identifiers, xmlport, configvalue, consolecommand)
    77     // Needs to be done after Game destructor because of ~OrxonoxClass
    78     orxonox::Identifier::destroyAllIdentifiers();
     89    game->run();
     90    delete game;
    7991
    8092    return 0;
  • code/trunk/src/orxonox/OrxonoxPrereqs.h

    r3196 r3280  
    6565    namespace LODParticle
    6666    {
    67         enum LOD
     67        enum Value
    6868        {
    69             off = 0,
    70             low = 1,
    71             normal = 2,
    72             high = 3
     69            Off = 0,
     70            Low = 1,
     71            Normal = 2,
     72            High = 3
    7373        };
    7474    }
     
    295295{
    296296    class DefaultLogger;
     297    class Logger;
    297298    class LuaScriptModule;
    298299
  • code/trunk/src/orxonox/gamestates/GSClient.cc

    r3196 r3280  
    3838namespace orxonox
    3939{
    40     AddGameState(GSClient, "client");
     40    DeclareGameState(GSClient, "client", false, true);
    4141
    42     SetCommandLineArgument(ip, "127.0.0.1").information("#.#.#.#");
     42    SetCommandLineArgument(ip, "127.0.0.1").information("Sever IP as strin in the form #.#.#.#");
    4343
    44     GSClient::GSClient(const std::string& name)
    45         : GameState(name)
     44    GSClient::GSClient(const GameStateConstrParams& params)
     45        : GameState(params)
    4646        , client_(0)
    4747    {
  • code/trunk/src/orxonox/gamestates/GSClient.h

    r3196 r3280  
    4040    {
    4141    public:
    42         GSClient(const std::string& name);
     42        GSClient(const GameStateConstrParams& params);
    4343        ~GSClient();
    4444
  • code/trunk/src/orxonox/gamestates/GSDedicated.cc

    r3205 r3280  
    5151    const unsigned int MAX_COMMAND_LENGTH = 255;
    5252   
    53     AddGameState(GSDedicated, "dedicated");
     53    DeclareGameState(GSDedicated, "dedicated", false, false);
    5454   
    5555    termios* GSDedicated::originalTerminalSettings_;
    5656
    57     GSDedicated::GSDedicated(const std::string& name)
    58         : GameState(name)
     57    GSDedicated::GSDedicated(const GameStateConstrParams& params)
     58        : GameState(params)
    5959        , server_(0)
    6060        , timeSinceLastUpdate_(0)
  • code/trunk/src/orxonox/gamestates/GSDedicated.h

    r3198 r3280  
    4848    {
    4949    public:
    50         GSDedicated(const std::string& name);
     50        GSDedicated(const GameStateConstrParams& params);
    5151        ~GSDedicated();
    5252
  • code/trunk/src/orxonox/gamestates/GSGraphics.cc

    r3196 r3280  
    5757namespace orxonox
    5858{
    59     AddGameState(GSGraphics, "graphics", false);
    60 
    61     GSGraphics::GSGraphics(const std::string& name, bool countTickTime)
    62         : GameState(name, countTickTime)
     59    DeclareGameState(GSGraphics, "graphics", true, true);
     60
     61    GSGraphics::GSGraphics(const GameStateConstrParams& params)
     62        : GameState(params)
    6363        , inputManager_(0)
    6464        , console_(0)
     
    108108        setConfigValues();
    109109
    110         // initialise graphics manager. Doesn't load the render window yet!
     110        // Load OGRE including the render window
    111111        this->graphicsManager_ = new GraphicsManager();
    112         this->graphicsManager_->initialise();
    113112
    114113        // load debug overlay
     
    198197    void GSGraphics::toggleGUI()
    199198    {
    200             GUIManager::getInstance().executeCode("toggleGUI()");
     199        GUIManager::getInstance().executeCode("toggleGUI()");
    201200    }
    202201
  • code/trunk/src/orxonox/gamestates/GSGraphics.h

    r3196 r3280  
    5252    {
    5353    public:
    54         GSGraphics(const std::string& name, bool countTickTime);
     54        GSGraphics(const GameStateConstrParams& params);
    5555        ~GSGraphics();
    5656        void setConfigValues();
  • code/trunk/src/orxonox/gamestates/GSIOConsole.cc

    r3196 r3280  
    3636namespace orxonox
    3737{
    38     AddGameState(GSIOConsole, "ioConsole");
     38    DeclareGameState(GSIOConsole, "ioConsole", false, false);
    3939
    40     GSIOConsole::GSIOConsole(const std::string& name)
    41         : GameState(name)
     40    GSIOConsole::GSIOConsole(const GameStateConstrParams& params)
     41        : GameState(params)
    4242    {
    4343    }
  • code/trunk/src/orxonox/gamestates/GSIOConsole.h

    r2896 r3280  
    3838    {
    3939    public:
    40         GSIOConsole(const std::string& name);
     40        GSIOConsole(const GameStateConstrParams& params);
    4141        ~GSIOConsole();
    4242
  • code/trunk/src/orxonox/gamestates/GSLevel.cc

    r3196 r3280  
    3434#include "core/input/KeyBinder.h"
    3535#include "core/Clock.h"
    36 #include "core/CommandLine.h"
    3736#include "core/ConsoleCommand.h"
    3837#include "core/ConfigValueIncludes.h"
     
    5655namespace orxonox
    5756{
    58     AddGameState(GSLevel, "level");
    59 
    60     SetCommandLineArgument(level, "").shortcut("l");
     57    DeclareGameState(GSLevel, "level", false, true);
    6158    SetConsoleCommand(GSLevel, showIngameGUI, true);
    6259
    6360    XMLFile* GSLevel::startFile_s = NULL;
    6461
    65     GSLevel::GSLevel(const std::string& name)
    66         : GameState(name)
     62    GSLevel::GSLevel(const GameStateConstrParams& params)
     63        : GameState(params)
    6764        , keyBinder_(0)
    6865        , gameInputState_(0)
     
    7168        , radar_(0)
    7269        , cameraManager_(0)
    73         , levelManager_(0)
    7470    {
    7571        RegisterObject(GSLevel);
     
    120116        if (GameMode::isMaster())
    121117        {
    122             // create the global LevelManager
    123             this->levelManager_ = new LevelManager();
    124 
    125118            this->loadLevel();
    126119        }
     
    202195        }
    203196
    204         if (this->levelManager_)
    205         {
    206             delete this->levelManager_;
    207             this->levelManager_ = 0;
    208         }
    209 
    210197        if (this->playerManager_)
    211198        {
     
    252239        // call the loader
    253240        COUT(0) << "Loading level..." << std::endl;
    254         std::string levelName;
    255         CommandLine::getValue("level", &levelName);
    256         if (levelName == "")
    257             startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + Game::getInstance().getLevel());
    258         else
    259             startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + levelName);
     241        startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + LevelManager::getInstance().getDefaultLevel());
    260242        Loader::open(startFile_s);
    261243    }
  • code/trunk/src/orxonox/gamestates/GSLevel.h

    r3196 r3280  
    4141    {
    4242    public:
    43         GSLevel(const std::string& name);
     43        GSLevel(const GameStateConstrParams& params);
    4444        ~GSLevel();
    4545        void setConfigValues();
     
    6868        Radar*                radar_;                   //!< represents the Radar (not the HUD part)
    6969        CameraManager*        cameraManager_;           //!< camera manager for this level
    70         LevelManager*         levelManager_;            //!< global level manager
    7170        PlayerManager*        playerManager_;           //!< player manager for this level
    7271        QuestManager*         questManager_;
  • code/trunk/src/orxonox/gamestates/GSMainMenu.cc

    r3196 r3280  
    4343namespace orxonox
    4444{
    45     AddGameState(GSMainMenu, "mainMenu");
     45    DeclareGameState(GSMainMenu, "mainMenu", false, true);
    4646
    47     GSMainMenu::GSMainMenu(const std::string& name)
    48         : GameState(name)
     47    GSMainMenu::GSMainMenu(const GameStateConstrParams& params)
     48        : GameState(params)
    4949        , inputState_(0)
    5050    {
     
    6767
    6868        // show main menu
    69         GUIManager::getInstance().showGUI("mainmenu_2");
     69        GUIManager::getInstance().showGUI("mainmenu_3");
    7070        GUIManager::getInstance().setCamera(this->camera_);
    7171        GraphicsManager::getInstance().setCamera(this->camera_);
  • code/trunk/src/orxonox/gamestates/GSMainMenu.h

    r3196 r3280  
    4040    {
    4141    public:
    42         GSMainMenu(const std::string& name);
     42        GSMainMenu(const GameStateConstrParams& params);
    4343        ~GSMainMenu();
    4444
  • code/trunk/src/orxonox/gamestates/GSRoot.cc

    r3196 r3280  
    3737#include "interfaces/TimeFactorListener.h"
    3838#include "interfaces/Tickable.h"
     39#include "LevelManager.h"
    3940
    4041namespace orxonox
    4142{
    42     AddGameState(GSRoot, "root", false);
    43     SetCommandLineSwitch(console);
     43    DeclareGameState(GSRoot, "root", true, false);
     44    SetCommandLineSwitch(console).information("Start in console mode (text IO only)");
    4445    // Shortcuts for easy direct loading
    45     SetCommandLineSwitch(server);
    46     SetCommandLineSwitch(client);
    47     SetCommandLineSwitch(dedicated);
    48     SetCommandLineSwitch(standalone);
    49 
    50     GSRoot::GSRoot(const std::string& name, bool countTickTime)
    51         : GameState(name, countTickTime)
     46    SetCommandLineSwitch(server).information("Start in server mode");
     47    SetCommandLineSwitch(client).information("Start in client mode");
     48    SetCommandLineSwitch(dedicated).information("Start in dedicated server mode");
     49    SetCommandLineSwitch(standalone).information("Start in standalone mode");
     50
     51    GSRoot::GSRoot(const GameStateConstrParams& params)
     52        : GameState(params)
    5253        , timeFactor_(1.0f)
    5354        , bPaused_(false)
     
    8384        }
    8485
     86        // create the global LevelManager
     87        this->levelManager_ = new LevelManager();
     88
    8589        // Load level directly?
    8690        bool loadLevel = false;
     
    129133        }
    130134*/
     135
     136        delete this->levelManager_;
    131137    }
    132138
  • code/trunk/src/orxonox/gamestates/GSRoot.h

    r3196 r3280  
    3838    {
    3939    public:
    40         GSRoot(const std::string& name, bool countTickTime);
     40        GSRoot(const GameStateConstrParams& params);
    4141        ~GSRoot();
    4242
     
    5252
    5353    private:
    54         float                 timeFactor_;       //!< A factor that sets the gamespeed. 1 is normal.
     54        float                 timeFactor_;              //!< A factor that sets the gamespeed. 1 is normal.
    5555        bool                  bPaused_;
    5656        float                 timeFactorPauseBackup_;
     57
     58        LevelManager*         levelManager_;            //!< global level manager
    5759
    5860        // console commands
  • code/trunk/src/orxonox/gamestates/GSServer.cc

    r3196 r3280  
    3737namespace orxonox
    3838{
    39     AddGameState(GSServer, "server");
     39    DeclareGameState(GSServer, "server", false, true);
    4040
    41     SetCommandLineArgument(port, 55556).shortcut("p").information("0-65535");
     41    SetCommandLineArgument(port, 55556).shortcut("p").information("Network communication port to be used 0-65535 (default: 55556)");
    4242
    43     GSServer::GSServer(const std::string& name)
    44         : GameState(name)
     43    GSServer::GSServer(const GameStateConstrParams& params)
     44        : GameState(params)
    4545        , server_(0)
    4646    {
  • code/trunk/src/orxonox/gamestates/GSServer.h

    r3196 r3280  
    4040    {
    4141    public:
    42         GSServer(const std::string& name);
     42        GSServer(const GameStateConstrParams& params);
    4343        ~GSServer();
    4444
  • code/trunk/src/orxonox/gamestates/GSStandalone.cc

    r3196 r3280  
    3434namespace orxonox
    3535{
    36     AddGameState(GSStandalone, "standalone");
     36    DeclareGameState(GSStandalone, "standalone", false, true);
    3737
    38     GSStandalone::GSStandalone(const std::string& name)
    39         : GameState(name)
     38    GSStandalone::GSStandalone(const GameStateConstrParams& params)
     39        : GameState(params)
    4040    {
    4141    }
  • code/trunk/src/orxonox/gamestates/GSStandalone.h

    r2896 r3280  
    3838    {
    3939    public:
    40         GSStandalone(const std::string& name);
     40        GSStandalone(const GameStateConstrParams& params);
    4141        ~GSStandalone();
    4242
  • code/trunk/src/orxonox/gui/GUIManager.cc

    r3196 r3280  
    5353#endif
    5454
     55#include "util/Debug.h"
    5556#include "util/Exception.h"
     57#include "util/OrxAssert.h"
    5658#include "core/Core.h"
    5759#include "core/Clock.h"
     
    6264namespace orxonox
    6365{
     66    class CEGUILogger : public CEGUI::DefaultLogger
     67    {
     68    public:
     69            void logEvent(const CEGUI::String& message, CEGUI::LoggingLevel level = CEGUI::Standard)
     70        {
     71            int orxonoxLevel;
     72            switch (level)
     73            {
     74                case CEGUI::Errors:      orxonoxLevel = 1; break;
     75                case CEGUI::Warnings:    orxonoxLevel = 2; break;
     76                case CEGUI::Standard:    orxonoxLevel = 4; break;
     77                case CEGUI::Informative: orxonoxLevel = 5; break;
     78                case CEGUI::Insane:      orxonoxLevel = 6; break;
     79                default: OrxAssert(false, "CEGUI log level out of range, inpect immediately!");
     80            }
     81            OutputHandler::getOutStream().setOutputLevel(orxonoxLevel)
     82                << "CEGUI: " << message << std::endl;
     83
     84            CEGUI::DefaultLogger::logEvent(message, level);
     85        }
     86    };
     87
    6488    static CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button);
    6589    GUIManager* GUIManager::singletonRef_s = 0;
     
    140164
    141165                // Create our own logger to specify the filepath
    142                 this->ceguiLogger_ = new DefaultLogger();
     166                this->ceguiLogger_ = new CEGUILogger();
    143167                this->ceguiLogger_->setLogFilename(Core::getLogPathString() + "cegui.log");
    144168                // set the log level according to ours (translate by subtracting 1)
  • code/trunk/src/orxonox/gui/GUIManager.h

    r3196 r3280  
    123123        CEGUI::ResourceProvider*    resourceProvider_;  //!< CEGUI's resource provider
    124124        CEGUI::LuaScriptModule*     scriptModule_;      //!< CEGUI's script module to use Lua
    125         CEGUI::DefaultLogger*       ceguiLogger_;       //!< CEGUI's logger to be able to log CEGUI errors in our log
     125        CEGUI::Logger*              ceguiLogger_;       //!< CEGUI's logger to be able to log CEGUI errors in our log
    126126        CEGUI::System*              guiSystem_;         //!< CEGUI's main system
    127127        lua_State*                  luaState_;          //!< Lua state, access point to the Lua engine
  • code/trunk/src/orxonox/interfaces/RadarViewable.cc

    r3196 r3280  
    3333#include <OgreEntity.h>
    3434
    35 #include "util/String.h"
     35#include "util/StringUtils.h"
    3636#include "core/CoreIncludes.h"
    3737#include "tools/DynamicLines.h"
  • code/trunk/src/orxonox/interfaces/TeamColourable.h

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • code/trunk/src/orxonox/objects/GlobalShader.cc

    r3196 r3280  
    6666    void GlobalShader::registerVariables()
    6767    {
    68         registerVariable(this->bVisible_,                                         variableDirection::toclient, new NetworkCallback<GlobalShader>(this, &GlobalShader::changedVisibility));
    69         registerVariable(const_cast<std::string&>(this->shader_.getCompositor()), variableDirection::toclient, new NetworkCallback<Shader>(&this->shader_, &Shader::changedCompositor));
     68        registerVariable(this->bVisible_,                                         VariableDirection::ToClient, new NetworkCallback<GlobalShader>(this, &GlobalShader::changedVisibility));
     69        registerVariable(const_cast<std::string&>(this->shader_.getCompositor()), VariableDirection::ToClient, new NetworkCallback<Shader>(&this->shader_, &Shader::changedCompositor));
    7070    }
    7171
  • code/trunk/src/orxonox/objects/Level.cc

    r3196 r3280  
    8787    void Level::registerVariables()
    8888    {
    89         registerVariable(this->xmlfilename_, variableDirection::toclient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));
    90         registerVariable(this->name_,        variableDirection::toclient, new NetworkCallback<Level>(this, &Level::changedName));
    91         registerVariable(this->description_, variableDirection::toclient);
     89        registerVariable(this->xmlfilename_, VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));
     90        registerVariable(this->name_,        VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::changedName));
     91        registerVariable(this->description_, VariableDirection::ToClient);
    9292    }
    9393
  • code/trunk/src/orxonox/objects/Scene.cc

    r3196 r3280  
    115115    void Scene::registerVariables()
    116116    {
    117         registerVariable(this->skybox_,             variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));
    118         registerVariable(this->ambientLight_,       variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));
    119         registerVariable(this->negativeWorldRange_, variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_negativeWorldRange));
    120         registerVariable(this->positiveWorldRange_, variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_positiveWorldRange));
    121         registerVariable(this->gravity_,            variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_gravity));
    122         registerVariable(this->bHasPhysics_,        variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_hasPhysics));
    123         registerVariable(this->bShadows_,           variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyShadows));
     117        registerVariable(this->skybox_,             VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));
     118        registerVariable(this->ambientLight_,       VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));
     119        registerVariable(this->negativeWorldRange_, VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_negativeWorldRange));
     120        registerVariable(this->positiveWorldRange_, VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_positiveWorldRange));
     121        registerVariable(this->gravity_,            VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_gravity));
     122        registerVariable(this->bHasPhysics_,        VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_hasPhysics));
     123        registerVariable(this->bShadows_,           VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyShadows));
    124124    }
    125125
  • code/trunk/src/orxonox/objects/collisionshapes/BoxCollisionShape.cc

    r3196 r3280  
    5757    void BoxCollisionShape::registerVariables()
    5858    {
    59         registerVariable(this->halfExtents_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     59        registerVariable(this->halfExtents_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
    6060    }
    6161
  • code/trunk/src/orxonox/objects/collisionshapes/CollisionShape.cc

    r3196 r3280  
    7777    void CollisionShape::registerVariables()
    7878    {
    79         registerVariable(this->parentID_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::parentChanged));
     79        registerVariable(this->parentID_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::parentChanged));
    8080    }
    8181
  • code/trunk/src/orxonox/objects/collisionshapes/ConeCollisionShape.cc

    r3196 r3280  
    5757    void ConeCollisionShape::registerVariables()
    5858    {
    59         registerVariable(this->radius_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
    60         registerVariable(this->height_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     59        registerVariable(this->radius_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     60        registerVariable(this->height_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
    6161    }
    6262
  • code/trunk/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc

    r3196 r3280  
    5858    void PlaneCollisionShape::registerVariables()
    5959    {
    60         registerVariable(this->normal_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
    61         registerVariable(this->offset_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     60        registerVariable(this->normal_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     61        registerVariable(this->offset_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
    6262    }
    6363
  • code/trunk/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc

    r3196 r3280  
    5656    void SphereCollisionShape::registerVariables()
    5757    {
    58         registerVariable(this->radius_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     58        registerVariable(this->radius_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
    5959    }
    6060
  • code/trunk/src/orxonox/objects/controllers/ArtificialController.cc

    r3196 r3280  
    208208            switch (base->getState())
    209209            {
    210                 case BaseState::controlTeam1:
     210                case BaseState::ControlTeam1:
    211211                    team1 = 0;
    212212                    break;
    213                 case BaseState::controlTeam2:
     213                case BaseState::ControlTeam2:
    214214                    team1 = 1;
    215215                    break;
    216                 case BaseState::uncontrolled:
     216                case BaseState::Uncontrolled:
    217217                default:
    218218                    team1 = -1;
     
    224224            switch (base->getState())
    225225            {
    226                 case BaseState::controlTeam1:
     226                case BaseState::ControlTeam1:
    227227                    team2 = 0;
    228228                    break;
    229                 case BaseState::controlTeam2:
     229                case BaseState::ControlTeam2:
    230230                    team2 = 1;
    231231                    break;
    232                 case BaseState::uncontrolled:
     232                case BaseState::Uncontrolled:
    233233                default:
    234234                    team2 = -1;
  • code/trunk/src/orxonox/objects/gametypes/Gametype.h

    r3196 r3280  
    4545    namespace PlayerState
    4646    {
    47         enum Enum
     47        enum Value
    4848        {
    4949            Uninitialized,
     
    5757    {
    5858        PlayerInfo* info_;
    59         PlayerState::Enum state_;
     59        PlayerState::Value state_;
    6060        int frags_;
    6161        int killed_;
  • code/trunk/src/orxonox/objects/gametypes/TeamBaseMatch.cc

    r3196 r3280  
    6666                if (teamnr == 0)
    6767                {
    68                     base->setState(BaseState::controlTeam1);
     68                    base->setState(BaseState::ControlTeam1);
    6969                    this->gtinfo_.sendAnnounceMessage("The red team captured a base");
    7070                }
    7171                if (teamnr == 1)
    7272                {
    73                     base->setState(BaseState::controlTeam2);
     73                    base->setState(BaseState::ControlTeam2);
    7474                    this->gtinfo_.sendAnnounceMessage("The blue team captured a base");
    7575                }
     
    107107            switch (base->getState())
    108108            {
    109                 case BaseState::controlTeam1:
     109                case BaseState::ControlTeam1:
    110110                    teamnrbase = 0;
    111111                    break;
    112                 case BaseState::controlTeam2:
     112                case BaseState::ControlTeam2:
    113113                    teamnrbase = 1;
    114114                    break;
    115                 case BaseState::uncontrolled:
     115                case BaseState::Uncontrolled:
    116116                default:
    117117                    teamnrbase = -1;
     
    155155        for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it)
    156156        {
    157             if((*it)->getState() == BaseState::controlTeam1)
     157            if((*it)->getState() == BaseState::ControlTeam1)
    158158            {
    159159                amountControlled++;
    160160            }
    161             if((*it)->getState() == BaseState::controlTeam2)
     161            if((*it)->getState() == BaseState::ControlTeam2)
    162162            {
    163163                amountControlled2++;
     
    241241        for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it)
    242242        {
    243             if ((*it)->getState() == BaseState::controlTeam1 && team == 0)
     243            if ((*it)->getState() == BaseState::ControlTeam1 && team == 0)
    244244                count++;
    245             if ((*it)->getState() == BaseState::controlTeam2 && team == 1)
     245            if ((*it)->getState() == BaseState::ControlTeam2 && team == 1)
    246246                count++;
    247247        }
     
    253253    {
    254254        this->bases_.insert(base);
    255         base->setState(BaseState::uncontrolled);
     255        base->setState(BaseState::Uncontrolled);
    256256    }
    257257
  • code/trunk/src/orxonox/objects/gametypes/UnderAttack.cc

    r3196 r3280  
    173173            if ( gameTime_ <= timesequence_ && gameTime_ > 0)
    174174            {
    175                 std::string message = convertToString(timesequence_) + " seconds left!";
     175                std::string message = multi_cast<std::string>(timesequence_) + " seconds left!";
    176176/*
    177177                COUT(0) << message << std::endl;
  • code/trunk/src/orxonox/objects/infos/GametypeInfo.cc

    r3196 r3280  
    6161    void GametypeInfo::registerVariables()
    6262    {
    63         registerVariable(this->bStarted_,               variableDirection::toclient);
    64         registerVariable(this->bEnded_,                 variableDirection::toclient);
    65         registerVariable(this->startCountdown_,         variableDirection::toclient);
    66         registerVariable(this->bStartCountdownRunning_, variableDirection::toclient);
    67         registerVariable(this->hudtemplate_,            variableDirection::toclient);
     63        registerVariable(this->bStarted_,               VariableDirection::ToClient);
     64        registerVariable(this->bEnded_,                 VariableDirection::ToClient);
     65        registerVariable(this->startCountdown_,         VariableDirection::ToClient);
     66        registerVariable(this->bStartCountdownRunning_, VariableDirection::ToClient);
     67        registerVariable(this->hudtemplate_,            VariableDirection::ToClient);
    6868    }
    6969
  • code/trunk/src/orxonox/objects/infos/HumanPlayer.cc

    r3196 r3280  
    7979    void HumanPlayer::registerVariables()
    8080    {
    81         registerVariable(this->synchronize_nick_, variableDirection::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick));
     81        registerVariable(this->synchronize_nick_, VariableDirection::ToServer, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick));
    8282
    83         registerVariable(this->clientID_,           variableDirection::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));
    84         registerVariable(this->server_initialized_, variableDirection::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_initialized));
    85         registerVariable(this->client_initialized_, variableDirection::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_initialized));
     83        registerVariable(this->clientID_,           VariableDirection::ToClient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));
     84        registerVariable(this->server_initialized_, VariableDirection::ToClient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_initialized));
     85        registerVariable(this->client_initialized_, VariableDirection::ToServer, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_initialized));
    8686    }
    8787
     
    116116
    117117            if (!GameMode::isMaster())
    118                 this->setObjectMode(objectDirection::bidirectional);
     118                this->setObjectMode(ObjectDirection::Bidirectional);
    119119            else
    120120                this->setName(this->nick_);
  • code/trunk/src/orxonox/objects/infos/PlayerInfo.cc

    r3196 r3280  
    7777    void PlayerInfo::registerVariables()
    7878    {
    79         registerVariable(this->name_,                 variableDirection::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));
    80         registerVariable(this->controllableEntityID_, variableDirection::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));
    81         registerVariable(this->bReadyToSpawn_,        variableDirection::toserver);
    82         registerVariable(this->gtinfoID_,             variableDirection::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedgtinfoID));
     79        registerVariable(this->name_,                 VariableDirection::ToClient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));
     80        registerVariable(this->controllableEntityID_, VariableDirection::ToClient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));
     81        registerVariable(this->bReadyToSpawn_,        VariableDirection::ToServer);
     82        registerVariable(this->gtinfoID_,             VariableDirection::ToClient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedgtinfoID));
    8383    }
    8484
  • code/trunk/src/orxonox/objects/items/Engine.cc

    r3196 r3280  
    113113    void Engine::registerVariables()
    114114    {
    115         registerVariable(this->shipID_, variableDirection::toclient, new NetworkCallback<Engine>(this, &Engine::networkcallback_shipID));
    116 
    117         registerVariable(this->speedFactor_, variableDirection::toclient);
    118         registerVariable(this->boostFactor_, variableDirection::toclient);
    119 
    120         registerVariable(this->maxSpeedFront_,     variableDirection::toclient);
    121         registerVariable(this->maxSpeedBack_,      variableDirection::toclient);
    122         registerVariable(this->maxSpeedLeftRight_, variableDirection::toclient);
    123         registerVariable(this->maxSpeedUpDown_,    variableDirection::toclient);
    124 
    125         registerVariable(this->accelerationFront_,     variableDirection::toclient);
    126         registerVariable(this->accelerationBrake_,     variableDirection::toclient);
    127         registerVariable(this->accelerationBack_,      variableDirection::toclient);
    128         registerVariable(this->accelerationLeftRight_, variableDirection::toclient);
    129         registerVariable(this->accelerationUpDown_,    variableDirection::toclient);
     115        registerVariable(this->shipID_, VariableDirection::ToClient, new NetworkCallback<Engine>(this, &Engine::networkcallback_shipID));
     116
     117        registerVariable(this->speedFactor_, VariableDirection::ToClient);
     118        registerVariable(this->boostFactor_, VariableDirection::ToClient);
     119
     120        registerVariable(this->maxSpeedFront_,     VariableDirection::ToClient);
     121        registerVariable(this->maxSpeedBack_,      VariableDirection::ToClient);
     122        registerVariable(this->maxSpeedLeftRight_, VariableDirection::ToClient);
     123        registerVariable(this->maxSpeedUpDown_,    VariableDirection::ToClient);
     124
     125        registerVariable(this->accelerationFront_,     VariableDirection::ToClient);
     126        registerVariable(this->accelerationBrake_,     VariableDirection::ToClient);
     127        registerVariable(this->accelerationBack_,      VariableDirection::ToClient);
     128        registerVariable(this->accelerationLeftRight_, VariableDirection::ToClient);
     129        registerVariable(this->accelerationUpDown_,    VariableDirection::ToClient);
    130130    }
    131131
  • code/trunk/src/orxonox/objects/items/MultiStateEngine.cc

    r3196 r3280  
    8282    void MultiStateEngine::registerVariables()
    8383    {
    84         registerVariable(this->state_, variableDirection::toserver);
     84        registerVariable(this->state_, VariableDirection::ToServer);
    8585    }
    8686
     
    9191            if (this->getShip()->hasLocalController())
    9292            {
    93                 this->setObjectMode(objectDirection::bidirectional);
     93                this->setObjectMode(ObjectDirection::Bidirectional);
    9494
    9595                const Vector3& direction = this->getDirection();
  • code/trunk/src/orxonox/objects/pickup/ModifierPickup.cc

    r3196 r3280  
    8787        if (this->addTo(pawn))
    8888        {
    89             std::map<ModifierType::Enum, float>::iterator it;
     89            std::map<ModifierType::Value, float>::iterator it;
    9090
    9191            for (it = this->additiveModifiers_.begin(); it != this->additiveModifiers_.end(); it++)
     
    124124        if (this->removeFrom(pawn))
    125125        {
    126             std::map<ModifierType::Enum, float>::iterator it;
     126            std::map<ModifierType::Value, float>::iterator it;
    127127
    128128            for (it = this->additiveModifiers_.begin(); it != this->additiveModifiers_.end(); it++)
     
    158158        @return Returns the additive modifier for type (or 0 if not exists).
    159159    */
    160     float ModifierPickup::getAdditiveModifier(ModifierType::Enum type) const
    161     {
    162         std::map<ModifierType::Enum, float>::const_iterator it = this->additiveModifiers_.find(type);
     160    float ModifierPickup::getAdditiveModifier(ModifierType::Value type) const
     161    {
     162        std::map<ModifierType::Value, float>::const_iterator it = this->additiveModifiers_.find(type);
    163163        if (it != this->additiveModifiers_.end())
    164164            return (*it).second;
     
    171171        @return Returns the multiplicative modifier for type (or 1 if not exists).
    172172    */
    173     float ModifierPickup::getMultiplicativeModifier(ModifierType::Enum type) const
    174     {
    175         std::map<ModifierType::Enum, float>::const_iterator it = this->multiplicativeModifiers_.find(type);
     173    float ModifierPickup::getMultiplicativeModifier(ModifierType::Value type) const
     174    {
     175        std::map<ModifierType::Value, float>::const_iterator it = this->multiplicativeModifiers_.find(type);
    176176        if (it != this->multiplicativeModifiers_.end())
    177177            return (*it).second;
     
    184184        @param value The new additive modifier for type.
    185185    */
    186     void ModifierPickup::setAdditiveModifier(ModifierType::Enum type, float value)
     186    void ModifierPickup::setAdditiveModifier(ModifierType::Value type, float value)
    187187    {
    188188        if (this->additiveModifiers_.find(type) == this->additiveModifiers_.end())
    189             this->additiveModifiers_.insert( std::pair<ModifierType::Enum, float>(type, value) );
     189            this->additiveModifiers_.insert( std::pair<ModifierType::Value, float>(type, value) );
    190190        else
    191191            this->additiveModifiers_[type] = value;
     
    196196        @param value The new multiplicative modifier for type.
    197197    */
    198     void ModifierPickup::setMultiplicativeModifier(ModifierType::Enum type, float value)
     198    void ModifierPickup::setMultiplicativeModifier(ModifierType::Value type, float value)
    199199    {
    200200        if (this->multiplicativeModifiers_.find(type) == this->multiplicativeModifiers_.end())
    201             this->multiplicativeModifiers_.insert( std::pair<ModifierType::Enum, float>(type, value) );
     201            this->multiplicativeModifiers_.insert( std::pair<ModifierType::Value, float>(type, value) );
    202202        else
    203203            this->multiplicativeModifiers_[type] = value;
  • code/trunk/src/orxonox/objects/pickup/ModifierPickup.h

    r3196 r3280  
    130130        void timerCallback(Pawn* pawn);     //!< Method called when the timer runs out.
    131131    private:
    132         float getAdditiveModifier(ModifierType::Enum type) const;               //!< Get the additive modifier for a given ModifierType.
    133         float getMultiplicativeModifier(ModifierType::Enum type) const;         //!< Get the multiplicative modifier for a given ModifierType.
    134         void setAdditiveModifier(ModifierType::Enum type, float value);         //!< Set the additive modifier for a given ModifierType.
    135         void setMultiplicativeModifier(ModifierType::Enum type, float value);   //!< Set the multiplicative modifier for a given ModifierType
     132        float getAdditiveModifier(ModifierType::Value type) const;               //!< Get the additive modifier for a given ModifierType.
     133        float getMultiplicativeModifier(ModifierType::Value type) const;         //!< Get the multiplicative modifier for a given ModifierType.
     134        void setAdditiveModifier(ModifierType::Value type, float value);         //!< Set the additive modifier for a given ModifierType.
     135        void setMultiplicativeModifier(ModifierType::Value type, float value);   //!< Set the multiplicative modifier for a given ModifierType
    136136
    137         std::map<ModifierType::Enum, float> additiveModifiers_;                 //!< Map of additive modifiers, indexed by ModifierType.
    138         std::map<ModifierType::Enum, float> multiplicativeModifiers_;           //!< Map of multiplicative modifiers, indexed by ModifierType.
     137        std::map<ModifierType::Value, float> additiveModifiers_;                 //!< Map of additive modifiers, indexed by ModifierType.
     138        std::map<ModifierType::Value, float> multiplicativeModifiers_;           //!< Map of multiplicative modifiers, indexed by ModifierType.
    139139
    140140        float duration_;                                                        //!< Duration of this pickup's effect (0 for unlimited).
  • code/trunk/src/orxonox/objects/pickup/ModifierType.h

    r3196 r3280  
    4444            @brief Gives the available types for modifiers.
    4545        */
    46         enum Enum
     46        enum Value
    4747        {
    4848            Unknown = 0,
  • code/trunk/src/orxonox/objects/pickup/PickupCollection.cc

    r3196 r3280  
    4242{
    4343    typedef std::pair<std::multimap<std::string, BaseItem*>::iterator, std::multimap<std::string, BaseItem*>::iterator> item_range;
    44     typedef std::pair<std::multimap<ModifierType::Enum, float>::iterator, std::multimap<ModifierType::Enum, float>::iterator> modifier_range;
     44    typedef std::pair<std::multimap<ModifierType::Value, float>::iterator, std::multimap<ModifierType::Value, float>::iterator> modifier_range;
    4545
    4646    //! Constructor
     
    200200        @param value Value for the modifier.
    201201    */
    202     void PickupCollection::addAdditiveModifier(ModifierType::Enum type, float value)
    203     {
    204         this->additiveModifiers_.insert( std::pair<ModifierType::Enum, float>(type, value) );
     202    void PickupCollection::addAdditiveModifier(ModifierType::Value type, float value)
     203    {
     204        this->additiveModifiers_.insert( std::pair<ModifierType::Value, float>(type, value) );
    205205    }
    206206    /**
     
    209209        @return Returns the sum of the additive modifiers of the type.
    210210    */
    211     float PickupCollection::getAdditiveModifier(ModifierType::Enum type)
     211    float PickupCollection::getAdditiveModifier(ModifierType::Value type)
    212212    {
    213213        float v = 0.0f;
     
    215215        modifier_range range = this->additiveModifiers_.equal_range(type);
    216216
    217         for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
     217        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
    218218        {
    219219            v += (*it).second;
     
    227227        @param value Value which is to be removed.
    228228    */
    229     void PickupCollection::removeAdditiveModifier(ModifierType::Enum type, float value)
     229    void PickupCollection::removeAdditiveModifier(ModifierType::Value type, float value)
    230230    {
    231231        modifier_range range = this->additiveModifiers_.equal_range(type);
    232         for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
     232        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
    233233        {
    234234            if ((*it).second == value)
     
    244244        @param value Value for the modifier.
    245245    */
    246     void PickupCollection::addMultiplicativeModifier(ModifierType::Enum type, float value)
    247     {
    248         this->multiplicativeModifiers_.insert( std::pair<ModifierType::Enum, float>(type, value) );
     246    void PickupCollection::addMultiplicativeModifier(ModifierType::Value type, float value)
     247    {
     248        this->multiplicativeModifiers_.insert( std::pair<ModifierType::Value, float>(type, value) );
    249249    }
    250250    /**
     
    253253        @return Returns the product of the multiplicative modifiers of the type.
    254254    */
    255     float PickupCollection::getMultiplicativeModifier(ModifierType::Enum type)
     255    float PickupCollection::getMultiplicativeModifier(ModifierType::Value type)
    256256    {
    257257        float v = 1.0f;
    258258
    259259        modifier_range range = this->multiplicativeModifiers_.equal_range(type);
    260         for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
     260        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
    261261        {
    262262            v *= (*it).second;
     
    270270        @param value Value which is to be removed.
    271271    */
    272     void PickupCollection::removeMultiplicativeModifier(ModifierType::Enum type, float value)
     272    void PickupCollection::removeMultiplicativeModifier(ModifierType::Value type, float value)
    273273    {
    274274        modifier_range range = this->multiplicativeModifiers_.equal_range(type);
    275         for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
     275        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
    276276        {
    277277            if ((*it).second == value)
     
    289289        @return Returns the value after being processed.
    290290    */
    291     float PickupCollection::processModifiers(ModifierType::Enum type, float inputValue, bool addBeforeMultiplication)
     291    float PickupCollection::processModifiers(ModifierType::Value type, float inputValue, bool addBeforeMultiplication)
    292292    {
    293293        float outputValue = inputValue;
     
    310310        @return Returns the value after being processed.
    311311    */
    312     Vector3 PickupCollection::processModifiers(ModifierType::Enum type, Vector3 inputValue, bool addBeforeMultiplication)
     312    Vector3 PickupCollection::processModifiers(ModifierType::Value type, Vector3 inputValue, bool addBeforeMultiplication)
    313313    {
    314314        Vector3 outputValue = inputValue;
  • code/trunk/src/orxonox/objects/pickup/PickupCollection.h

    r3196 r3280  
    6767        void useItem(UsableItem* item);                                             //!< Use a usable item.
    6868
    69         void addAdditiveModifier(ModifierType::Enum type, float value);             //!< Add an additive modifier.
    70         void addMultiplicativeModifier(ModifierType::Enum type, float value);       //!< Add a multiplicative modifier.
     69        void addAdditiveModifier(ModifierType::Value type, float value);             //!< Add an additive modifier.
     70        void addMultiplicativeModifier(ModifierType::Value type, float value);       //!< Add a multiplicative modifier.
    7171
    72         float getAdditiveModifier(ModifierType::Enum type);                         //!< Get total additive modifier.
    73         float getMultiplicativeModifier(ModifierType::Enum type);                   //!< Get total multiplicative modifier.
     72        float getAdditiveModifier(ModifierType::Value type);                         //!< Get total additive modifier.
     73        float getMultiplicativeModifier(ModifierType::Value type);                   //!< Get total multiplicative modifier.
    7474
    75         void removeAdditiveModifier(ModifierType::Enum type, float value);          //!< Remove an additive modifier.
    76         void removeMultiplicativeModifier(ModifierType::Enum type, float value);    //!< Remove a multiplicative modifier.
     75        void removeAdditiveModifier(ModifierType::Value type, float value);          //!< Remove an additive modifier.
     76        void removeMultiplicativeModifier(ModifierType::Value type, float value);    //!< Remove a multiplicative modifier.
    7777
    78         float processModifiers(ModifierType::Enum type, float inputValue, bool addBeforeMultiplication = false);        //!< Apply the modifiers to a float.
    79         Vector3 processModifiers(ModifierType::Enum type, Vector3 inputValue, bool addBeforeMultiplication = false);    //!< Apply the modifiers to a Vector3.
     78        float processModifiers(ModifierType::Value type, float inputValue, bool addBeforeMultiplication = false);        //!< Apply the modifiers to a float.
     79        Vector3 processModifiers(ModifierType::Value type, Vector3 inputValue, bool addBeforeMultiplication = false);    //!< Apply the modifiers to a Vector3.
    8080
    8181        /**
     
    113113        bool bBlockRemovals_;   //!< Whether to block direct removals through remove().
    114114
    115         std::multimap<ModifierType::Enum, float> additiveModifiers_;        //!< Contains additive modifiers (indexed by ModifierType).
    116         std::multimap<ModifierType::Enum, float> multiplicativeModifiers_;  //!< Contains multiplicative modifiers (indexed by ModifierType).
     115        std::multimap<ModifierType::Value, float> additiveModifiers_;        //!< Contains additive modifiers (indexed by ModifierType).
     116        std::multimap<ModifierType::Value, float> multiplicativeModifiers_;  //!< Contains multiplicative modifiers (indexed by ModifierType).
    117117
    118118        std::multimap<std::string, BaseItem*> items_;                       //!< Map of items in the collection (indexed by pickupIdentifier of the items).
  • code/trunk/src/orxonox/objects/quest/GlobalQuest.cc

    r3196 r3280  
    147147            return false;
    148148        }
    149         return (this->isInactive(player) && !(this->status_ == questStatus::completed || this->status_ == questStatus::failed));
     149        return (this->isInactive(player) && !(this->status_ == QuestStatus::Completed || this->status_ == QuestStatus::Failed));
    150150    }
    151151
     
    189189        Throws an Exception if player is NULL.
    190190    */
    191     questStatus::Enum GlobalQuest::getStatus(const PlayerInfo* player) const
     191    QuestStatus::Value GlobalQuest::getStatus(const PlayerInfo* player) const
    192192    {
    193193        if(player == NULL) //!< We don't want NULL-Pointers!
     
    203203        }
    204204
    205         return questStatus::inactive;
     205        return QuestStatus::Inactive;
    206206    }
    207207
     
    217217        Returns false if player is NULL.
    218218    */
    219     bool GlobalQuest::setStatus(PlayerInfo* player, const questStatus::Enum & status)
     219    bool GlobalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
    220220    {
    221221        if(player == NULL) //!< We don't want NULL-Pointers!
  • code/trunk/src/orxonox/objects/quest/GlobalQuest.h

    r3196 r3280  
    9797            virtual bool isCompletable(const PlayerInfo* player) const; //!< Checks whether the Quest can be completed.
    9898
    99             virtual questStatus::Enum getStatus(const PlayerInfo* player) const; //!< Returns the status of the Quest for a specific player.
     99            virtual QuestStatus::Value getStatus(const PlayerInfo* player) const; //!< Returns the status of the Quest for a specific player.
    100100           
    101             virtual bool setStatus(PlayerInfo* player, const questStatus::Enum & status); //!< Sets the status for a specific player.
     101            virtual bool setStatus(PlayerInfo* player, const QuestStatus::Value & status); //!< Sets the status for a specific player.
    102102
    103103        private:
    104104            std::set<PlayerInfo*> players_; //!< The set of players which possess this Quest.
    105             questStatus::Enum status_; //!< The status of this Quest.
     105            QuestStatus::Value status_; //!< The status of this Quest.
    106106            std::list<QuestEffect*> rewards_; //!< Reward QuestEffects only invoked on the player completing the Quest.
    107107           
  • code/trunk/src/orxonox/objects/quest/LocalQuest.cc

    r3196 r3280  
    176176        Throws an Exception if player is NULL.
    177177    */
    178     questStatus::Enum LocalQuest::getStatus(const PlayerInfo* player) const
     178    QuestStatus::Value LocalQuest::getStatus(const PlayerInfo* player) const
    179179    {
    180180        if(player == NULL) //!< No player has no defined status.
     
    183183        }
    184184
    185         std::map<const PlayerInfo*, questStatus::Enum>::const_iterator it = this->playerStatus_.find(player);
     185        std::map<const PlayerInfo*, QuestStatus::Value>::const_iterator it = this->playerStatus_.find(player);
    186186        if (it != this->playerStatus_.end()) //!< If there is a player in the map.
    187187        {
     
    189189        }
    190190       
    191         return questStatus::inactive; //!< If the player is not yet in the map, that means the status of the quest form him is 'inactive'.
     191        return QuestStatus::Inactive; //!< If the player is not yet in the map, that means the status of the quest form him is 'inactive'.
    192192    }
    193193
     
    203203        Returns false if player is NULL.
    204204    */
    205     bool LocalQuest::setStatus(PlayerInfo* player, const questStatus::Enum & status)
     205    bool LocalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
    206206    {
    207207        if(player == NULL) //!< We can't set a status for no player.
  • code/trunk/src/orxonox/objects/quest/LocalQuest.h

    r3196 r3280  
    9191            virtual bool isCompletable(const PlayerInfo* player) const; //!< Checks whether the Quest can be completed.
    9292
    93             virtual questStatus::Enum getStatus(const PlayerInfo* player) const; //!< Returns the status of the Quest for a specific player.
    94             virtual bool setStatus(PlayerInfo* player, const questStatus::Enum & status); //!< Sets the status for a specific player.
     93            virtual QuestStatus::Value getStatus(const PlayerInfo* player) const; //!< Returns the status of the Quest for a specific player.
     94            virtual bool setStatus(PlayerInfo* player, const QuestStatus::Value & status); //!< Sets the status for a specific player.
    9595
    9696        private:
    97             std::map<const PlayerInfo*, questStatus::Enum> playerStatus_; //!< List of the status for each player, with the Player-pointer as key.
     97            std::map<const PlayerInfo*, QuestStatus::Value> playerStatus_; //!< List of the status for each player, with the Player-pointer as key.
    9898
    9999    };
  • code/trunk/src/orxonox/objects/quest/Quest.cc

    r3196 r3280  
    302302    bool Quest::isInactive(const PlayerInfo* player) const
    303303    {
    304         return this->getStatus(player) == questStatus::inactive;
     304        return this->getStatus(player) == QuestStatus::Inactive;
    305305    }
    306306
     
    318318    {
    319319
    320         return this->getStatus(player) == questStatus::active;
     320        return this->getStatus(player) == QuestStatus::Active;
    321321    }
    322322
     
    333333    bool Quest::isFailed(const PlayerInfo* player) const
    334334    {
    335         return this->getStatus(player) == questStatus::failed;
     335        return this->getStatus(player) == QuestStatus::Failed;
    336336    }
    337337
     
    348348    bool Quest::isCompleted(const PlayerInfo* player) const
    349349    {
    350         return this->getStatus(player) == questStatus::completed;
     350        return this->getStatus(player) == QuestStatus::Completed;
    351351    }
    352352   
     
    362362    {
    363363        QuestListener::advertiseStatusChange(this->listeners_, "fail"); //!< Tells the QuestListeners, that the status has changed to failed.
    364         this->setStatus(player, questStatus::failed);
     364        this->setStatus(player, QuestStatus::Failed);
    365365       
    366366        COUT(4) << "Quest {" << this->getId() << "} is failed for player: " << player << " ." <<std::endl;
     
    381381    {
    382382        QuestListener::advertiseStatusChange(this->listeners_, "complete"); //!< Tells the QuestListeners, that the status has changed to completed.
    383         this->setStatus(player, questStatus::completed);
     383        this->setStatus(player, QuestStatus::Completed);
    384384       
    385385        COUT(4) << "Quest {" << this->getId() << "} is completed for player: " << player << " ." <<std::endl;
     
    409409        QuestListener::advertiseStatusChange(this->listeners_, "start"); //!< Tells the QuestListeners, that the status has changed to active.
    410410       
    411         this->setStatus(player, questStatus::active);
     411        this->setStatus(player, QuestStatus::Active);
    412412       
    413413        this->getDescription()->sendAddQuestNotification();
  • code/trunk/src/orxonox/objects/quest/Quest.h

    r3196 r3280  
    4343namespace orxonox
    4444{
    45     namespace questStatus
     45    namespace QuestStatus
    4646    {
    47 
    4847        //!Different states of a Quest.
    49         enum Enum
     48        enum Value
    5049        {
    51             inactive,
    52             active,
    53             failed,
    54             completed
     50            Inactive,
     51            Active,
     52            Failed,
     53            Completed
    5554        };
    56 
    5755    }
    5856
     
    133131                { return this->completeEffects_; }
    134132
    135             virtual questStatus::Enum getStatus(const PlayerInfo* player) const = 0; //!< Returns the status of the Quest for a specific player.
    136             virtual bool setStatus(PlayerInfo* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player.
     133            virtual QuestStatus::Value getStatus(const PlayerInfo* player) const = 0; //!< Returns the status of the Quest for a specific player.
     134            virtual bool setStatus(PlayerInfo* player, const QuestStatus::Value & status) = 0; //!< Changes the status for a specific player.
    137135           
    138136        private:
  • code/trunk/src/orxonox/objects/quest/QuestEffectBeacon.cc

    r3196 r3280  
    5353        RegisterObject(QuestEffectBeacon);
    5454       
    55         this->status_ = QuestEffectBeaconStatus::active;
     55        this->status_ = QuestEffectBeaconStatus::Active;
    5656        this->times_ = INFINITE_TIME;
    5757    }
     
    162162        if(activate)
    163163        {
    164         this->status_ = QuestEffectBeaconStatus::active;
    165         return true;
    166         }
    167        
    168         this->status_ = QuestEffectBeaconStatus::inactive;
     164        this->status_ = QuestEffectBeaconStatus::Active;
     165        return true;
     166        }
     167       
     168        this->status_ = QuestEffectBeaconStatus::Inactive;
    169169        return true;
    170170    }
     
    190190        if(this->getTimes() == 0) //!< Set the QuestEffectBeacon to inactive when the number of times it can be executed is reduced to 0.
    191191        {
    192             this->status_ = QuestEffectBeaconStatus::inactive;
     192            this->status_ = QuestEffectBeaconStatus::Inactive;
    193193        }
    194194       
  • code/trunk/src/orxonox/objects/quest/QuestEffectBeacon.h

    r3196 r3280  
    4444    namespace QuestEffectBeaconStatus
    4545    {
    46 
    4746        //! The status of the beacon, can be either active or inactive.
    48         enum Enum
     47        enum Value
    4948        {
    50             inactive,
    51             active
     49            Inactive,
     50            Active
    5251        };
    53 
    5452    }
    5553
     
    9896            */
    9997            inline bool isActive(void)
    100             { return this->status_ == QuestEffectBeaconStatus::active; }
     98            { return this->status_ == QuestEffectBeaconStatus::Active; }
    10199           
    102100            bool setActive(bool activate); //!< Set the status of the QuestEffectBeacon.
     
    117115            std::list<QuestEffect*> effects_; //!< The list of QuestEffects to be invoked on the executing player.
    118116            int times_; //!< Number of times the beacon can be exectued.
    119             QuestEffectBeaconStatus::Enum status_; //!< The status of the QUestEffectBeacon, Can be eighter active or inactive.
     117            QuestEffectBeaconStatus::Value status_; //!< The status of the QUestEffectBeacon, Can be eighter active or inactive.
    120118           
    121119            bool setTimes(const int & n); //!< Set the number of times the QuestEffectBeacon can be executed.
  • code/trunk/src/orxonox/objects/quest/QuestHint.cc

    r3196 r3280  
    9595
    9696        //! Find the player.
    97         std::map<const PlayerInfo*, questHintStatus::Enum>::const_iterator it = this->playerStatus_.find(player);
     97        std::map<const PlayerInfo*, QuestHintStatus::Value>::const_iterator it = this->playerStatus_.find(player);
    9898        if (it != this->playerStatus_.end()) //!< If the player is in the map.
    9999        {
     
    101101        }
    102102       
    103         return questStatus::inactive;
     103        return QuestStatus::Inactive;
    104104    }
    105105
     
    118118            if(!(this->isActive(player)))  //!< If the hint is already active, activation is pointless.
    119119            {
    120                 this->playerStatus_[player] = questHintStatus::active;
     120                this->playerStatus_[player] = QuestHintStatus::Active;
    121121               
    122122                this->getDescription()->sendAddHintNotification();
  • code/trunk/src/orxonox/objects/quest/QuestHint.h

    r3196 r3280  
    4242namespace orxonox
    4343{
    44     namespace questHintStatus
     44    namespace QuestHintStatus
    4545    {
    46 
    4746        //! The state of the hint.
    48         enum Enum
     47        enum Value
    4948        {
    50             inactive,
    51             active
     49            Inactive,
     50            Active
    5251        };
    53 
    5452    }
    5553
     
    9189        private:
    9290            Quest* quest_; //!< The Quest the QuestHint belongs to.
    93             std::map<const PlayerInfo*, questHintStatus::Enum> playerStatus_; //!< List of the states for each player, with the Player-pointer as key.
     91            std::map<const PlayerInfo*, QuestHintStatus::Value> playerStatus_; //!< List of the states for each player, with the Player-pointer as key.
    9492
    9593    };
  • code/trunk/src/orxonox/objects/quest/QuestListener.cc

    r3196 r3280  
    5151        RegisterObject(QuestListener);
    5252       
    53         this->mode_ = questListenerMode::all;
     53        this->mode_ = QuestListenerMode::All;
    5454        this->quest_ = NULL;
    5555    }
     
    132132        if(mode == "all")
    133133        {
    134             this->mode_ = questListenerMode::all;
     134            this->mode_ = QuestListenerMode::All;
    135135        }
    136136        else if(mode == "start")
    137137        {
    138             this->mode_ = questListenerMode::start;
     138            this->mode_ = QuestListenerMode::Start;
    139139        }
    140140        else if(mode == "fail")
    141141        {
    142             this->mode_ = questListenerMode::fail;
     142            this->mode_ = QuestListenerMode::Fail;
    143143        }
    144144        else if(mode == "complete")
    145145        {
    146             this->mode_ = questListenerMode::complete;
     146            this->mode_ = QuestListenerMode::Complete;
    147147        }
    148148        else
    149149        {
    150150            COUT(2) << "QuestListener with invalid mode '" << mode << "' created. Mode set to 'all'." << std::endl;
    151         this->mode_ = questListenerMode::all;
     151        this->mode_ = QuestListenerMode::All;
    152152        return false;
    153153        }
     
    164164    std::string QuestListener::getMode(void)
    165165    {
    166         if(this->mode_ == questListenerMode::all)
     166        if(this->mode_ == QuestListenerMode::All)
    167167        {
    168168            return "all";
    169169        }
    170         else if(this->mode_ == questListenerMode::start)
     170        else if(this->mode_ == QuestListenerMode::Start)
    171171        {
    172172            return "start";
    173173        }
    174         else if(this->mode_ == questListenerMode::fail)
     174        else if(this->mode_ == QuestListenerMode::Fail)
    175175        {
    176176            return "fail";
    177177        }
    178         else if(this->mode_ == questListenerMode::complete)
     178        else if(this->mode_ == QuestListenerMode::Complete)
    179179        {
    180180            return "complete";
  • code/trunk/src/orxonox/objects/quest/QuestListener.h

    r3196 r3280  
    4343namespace orxonox
    4444{
    45     namespace questListenerMode
     45    namespace QuestListenerMode
    4646    {
    47 
    4847        //! The mode of the QuestListener.
    49         enum Enum
     48        enum Value
    5049        {
    51             all,
    52             start,
    53             fail,
    54             complete
     50            All,
     51            Start,
     52            Fail,
     53            Complete
    5554        };
    56 
    5755    }
    5856
     
    9391       
    9492    private:
    95         questListenerMode::Enum mode_; //!< The mode of the QuestListener.
     93        QuestListenerMode::Value mode_; //!< The mode of the QuestListener.
    9694        Quest* quest_; //!< A pointer to the Quest the QuestListener is reacting to.
    9795   
  • code/trunk/src/orxonox/objects/weaponsystem/projectiles/LightningGunProjectile.cc

    r3196 r3280  
    5656        this->materialBase_ = material;   
    5757   
    58         BillboardProjectile::setMaterial(material + convertToString(this->textureIndex_));
     58        BillboardProjectile::setMaterial(material + multi_cast<std::string>(this->textureIndex_));
    5959    }
    6060
  • code/trunk/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.cc

    r3196 r3280  
    4444        if (GameMode::showsGraphics())
    4545        {
    46             this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/shot3_small", LODParticle::normal);
     46            this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/shot3_small", LODParticle::Normal);
    4747            this->attachOgreObject(this->particles_->getParticleSystem());
    4848            this->particles_->setKeepParticlesInLocalSpace(0);
  • code/trunk/src/orxonox/objects/worldentities/Backlight.cc

    r3196 r3280  
    2929#include "Backlight.h"
    3030
     31#include <algorithm>
    3132#include <OgreRibbonTrail.h>
    3233#include <OgreSceneManager.h>
     
    108109    void Backlight::registerVariables()
    109110    {
    110         registerVariable(this->width_,         variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_width));
    111         registerVariable(this->lifetime_,      variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_lifetime));
    112         registerVariable(this->length_,        variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_length));
    113         registerVariable(this->maxelements_,   variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_maxelements));
    114         registerVariable(this->trailmaterial_, variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_trailmaterial));
     111        registerVariable(this->width_,         VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_width));
     112        registerVariable(this->lifetime_,      VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_lifetime));
     113        registerVariable(this->length_,        VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_length));
     114        registerVariable(this->maxelements_,   VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_maxelements));
     115        registerVariable(this->trailmaterial_, VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_trailmaterial));
    115116    }
    116117
     
    175176    void Backlight::stopturnonoff()
    176177    {
    177         this->postprocessingtime_ = max(0.0f, this->lifetime_ - this->turnofftime_);
     178        this->postprocessingtime_ = std::max(0.0f, this->lifetime_ - this->turnofftime_);
    178179
    179180        FadingBillboard::stopturnonoff();
  • code/trunk/src/orxonox/objects/worldentities/BigExplosion.cc

    r3196 r3280  
    5656*/
    5757        this->bStop_ = false;
    58         this->LOD_ = LODParticle::normal;
     58        this->LOD_ = LODParticle::Normal;
    5959
    6060/*      this->stf_ = "setTimeFactor ";
     
    307307    void BigExplosion::registerVariables()
    308308    {
    309         registerVariable((int&)(this->LOD_), variableDirection::toclient, new NetworkCallback<BigExplosion>(this, &BigExplosion::LODchanged));
    310         registerVariable(this->bStop_,       variableDirection::toclient, new NetworkCallback<BigExplosion>(this, &BigExplosion::checkStop));
     309        registerVariable((int&)(this->LOD_), VariableDirection::ToClient, new NetworkCallback<BigExplosion>(this, &BigExplosion::LODchanged));
     310        registerVariable(this->bStop_,       VariableDirection::ToClient, new NetworkCallback<BigExplosion>(this, &BigExplosion::checkStop));
    311311    }
    312312
  • code/trunk/src/orxonox/objects/worldentities/BigExplosion.h

    r3196 r3280  
    4747            void registerVariables();
    4848
    49             inline void setLOD(LODParticle::LOD level)
     49            inline void setLOD(LODParticle::Value level)
    5050                { this->LOD_ = level; this->LODchanged(); }
    51             inline LODParticle::LOD getLOD() const
     51            inline LODParticle::Value getLOD() const
    5252                { return this->LOD_; }
    5353
     
    9898            ParticleInterface*    explosionFire_;
    9999
    100             LODParticle::LOD      LOD_;
     100            LODParticle::Value      LOD_;
    101101            Timer<BigExplosion> destroyTimer_;
    102102    };
  • code/trunk/src/orxonox/objects/worldentities/Billboard.cc

    r3196 r3280  
    6969    void Billboard::registerVariables()
    7070    {
    71         registerVariable(this->material_, variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
    72         registerVariable(this->colour_,   variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));
    73 //        registerVariable(this->rotation_, variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation));
     71        registerVariable(this->material_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
     72        registerVariable(this->colour_,   VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));
     73//        registerVariable(this->rotation_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation));
    7474    }
    7575
  • code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.cc

    r3196 r3280  
    6666    void BlinkingBillboard::registerVariables()
    6767    {
    68 //        registerVariable(this->amplitude_, variableDirection::toclient);
    69 //        registerVariable(this->frequency_, variableDirection::toclient);
    70 //        registerVariable(this->phase_,     variableDirection::toclient);
     68//        registerVariable(this->amplitude_, VariableDirection::ToClient);
     69//        registerVariable(this->frequency_, VariableDirection::ToClient);
     70//        registerVariable(this->phase_,     VariableDirection::ToClient);
    7171    }
    7272
  • code/trunk/src/orxonox/objects/worldentities/Camera.cc

    r3196 r3280  
    2929#include "Camera.h"
    3030
     31#include <algorithm>
    3132#include <OgreCamera.h>
    3233#include <OgreSceneManager.h>
     
    3435
    3536#include "util/Exception.h"
    36 #include "util/String.h"
     37#include "util/StringUtils.h"
    3738#include "core/CoreIncludes.h"
    3839#include "core/ConfigValueIncludes.h"
     
    104105        {
    105106            // this stuff here may need some adjustments
    106             float coeff = min(1.0f, 15.0f * dt);
     107            float coeff = std::min(1.0f, 15.0f * dt);
    107108
    108109            Vector3 offset = this->getWorldPosition() - this->cameraNode_->_getDerivedPosition();
  • code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc

    r3196 r3280  
    7979
    8080        this->setConfigValues();
    81         this->setPriority( priority::very_high );
     81        this->setPriority( Priority::VeryHigh );
    8282        this->registerVariables();
    8383    }
     
    238238            {
    239239                this->client_overwrite_ = this->server_overwrite_;
    240                 this->setObjectMode(objectDirection::bidirectional);
     240                this->setObjectMode(ObjectDirection::Bidirectional);
    241241            }
    242242        }
     
    254254        this->bHasLocalController_ = false;
    255255        this->bHasHumanController_ = false;
    256         this->setObjectMode(objectDirection::toclient);
     256        this->setObjectMode(ObjectDirection::ToClient);
    257257
    258258        this->changedPlayer();
     
    368368    void ControllableEntity::registerVariables()
    369369    {
    370         registerVariable(this->cameraPositionTemplate_,  variableDirection::toclient);
    371         registerVariable(this->hudtemplate_,             variableDirection::toclient);
    372 
    373         registerVariable(this->server_position_,         variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
    374         registerVariable(this->server_linear_velocity_,  variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerLinearVelocity));
    375         registerVariable(this->server_orientation_,      variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
    376         registerVariable(this->server_angular_velocity_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerAngularVelocity));
    377 
    378         registerVariable(this->server_overwrite_,        variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
    379         registerVariable(this->client_overwrite_,        variableDirection::toserver);
    380 
    381         registerVariable(this->client_position_,         variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
    382         registerVariable(this->client_linear_velocity_,  variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientLinearVelocity));
    383         registerVariable(this->client_orientation_,      variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
    384         registerVariable(this->client_angular_velocity_, variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientAngularVelocity));
     370        registerVariable(this->cameraPositionTemplate_,  VariableDirection::ToClient);
     371        registerVariable(this->hudtemplate_,             VariableDirection::ToClient);
     372
     373        registerVariable(this->server_position_,         VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
     374        registerVariable(this->server_linear_velocity_,  VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerLinearVelocity));
     375        registerVariable(this->server_orientation_,      VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
     376        registerVariable(this->server_angular_velocity_, VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerAngularVelocity));
     377
     378        registerVariable(this->server_overwrite_,        VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
     379        registerVariable(this->client_overwrite_,        VariableDirection::ToServer);
     380
     381        registerVariable(this->client_position_,         VariableDirection::ToServer, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
     382        registerVariable(this->client_linear_velocity_,  VariableDirection::ToServer, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientLinearVelocity));
     383        registerVariable(this->client_orientation_,      VariableDirection::ToServer, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
     384        registerVariable(this->client_angular_velocity_, VariableDirection::ToServer, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientAngularVelocity));
    385385       
    386386
    387         registerVariable(this->playerID_,                variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
     387        registerVariable(this->playerID_,                VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
    388388    }
    389389
  • code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.cc

    r3196 r3280  
    4848
    4949        this->bStop_ = false;
    50         this->LOD_ = LODParticle::normal;
     50        this->LOD_ = LODParticle::Normal;
    5151
    5252        if ( GameMode::showsGraphics() )
     
    104104    void ExplosionChunk::registerVariables()
    105105    {
    106         registerVariable((int&)(this->LOD_), variableDirection::toclient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::LODchanged));
    107         registerVariable(this->bStop_,       variableDirection::toclient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::checkStop));
     106        registerVariable((int&)(this->LOD_), VariableDirection::ToClient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::LODchanged));
     107        registerVariable(this->bStop_,       VariableDirection::ToClient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::checkStop));
    108108    }
    109109
  • code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.h

    r3196 r3280  
    4646            void registerVariables();
    4747
    48             inline void setLOD(LODParticle::LOD level)
     48            inline void setLOD(LODParticle::Value level)
    4949                { this->LOD_ = level; this->LODchanged(); }
    50             inline LODParticle::LOD getLOD() const
     50            inline LODParticle::Value getLOD() const
    5151                { return this->LOD_; }
    5252
     
    6060            ParticleInterface*    fire_;
    6161            ParticleInterface*    smoke_;
    62             LODParticle::LOD      LOD_;
     62            LODParticle::Value      LOD_;
    6363            Timer<ExplosionChunk> destroyTimer_;
    6464    };
  • code/trunk/src/orxonox/objects/worldentities/FadingBillboard.cc

    r3196 r3280  
    6464    void FadingBillboard::registerVariables()
    6565    {
    66         registerVariable(this->turnontime_,  variableDirection::toclient);
    67         registerVariable(this->turnofftime_, variableDirection::toclient);
     66        registerVariable(this->turnontime_,  VariableDirection::ToClient);
     67        registerVariable(this->turnofftime_, VariableDirection::ToClient);
    6868    }
    6969
  • code/trunk/src/orxonox/objects/worldentities/Light.cc

    r3205 r3280  
    3333#include <boost/static_assert.hpp>
    3434
    35 #include "util/String.h"
     35#include "util/StringUtils.h"
    3636#include "util/Exception.h"
    3737#include "core/CoreIncludes.h"
     
    4545
    4646    // 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);
     47    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_POINT       == (int)Light::Point);
     48    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::Directional);
     49    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::Spotlight);
    5050
    5151    Light::Light(BaseObject* creator) : StaticEntity(creator)
     
    5656        this->diffuse_ = ColourValue::White;
    5757        this->specular_ = ColourValue::White;
    58         this->type_ = Light::LT_POINT;
     58        this->type_ = Light::Point;
    5959        this->attenuation_ = Vector4(100000, 1, 0, 0);
    6060        this->spotlightRange_ = Vector3(40.0f, 30.0f, 1.0f);
     
    106106    void Light::registerVariables()
    107107    {
    108         registerVariable((int&)this->type_,     variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateType));
    109         registerVariable(this->diffuse_,        variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateDiffuseColour));
    110         registerVariable(this->specular_,       variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateSpecularColour));
    111         registerVariable(this->attenuation_,    variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateAttenuation));
    112         registerVariable(this->spotlightRange_, variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateSpotlightRange));
     108        registerVariable((int&)this->type_,     VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateType));
     109        registerVariable(this->diffuse_,        VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateDiffuseColour));
     110        registerVariable(this->specular_,       VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateSpecularColour));
     111        registerVariable(this->attenuation_,    VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateAttenuation));
     112        registerVariable(this->spotlightRange_, VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateSpotlightRange));
    113113    }
    114114
     
    127127    void Light::updateAttenuation()
    128128    {
    129         if (this->light_ && this->type_ != Light::LT_DIRECTIONAL)
     129        if (this->light_ && this->type_ != Light::Directional)
    130130            this->light_->setAttenuation(this->attenuation_.x, this->attenuation_.y, this->attenuation_.z, this->attenuation_.w);
    131131    }
     
    133133    void Light::updateSpotlightRange()
    134134    {
    135         if (this->light_ && this->type_ == Light::LT_SPOTLIGHT)
     135        if (this->light_ && this->type_ == Light::Spotlight)
    136136            this->light_->setSpotlightRange(Degree(this->spotlightRange_.x), Degree(this->spotlightRange_.y), this->spotlightRange_.z);
    137137    }
     
    140140    {
    141141        if (type == "point")
    142             this->setType(Light::LT_POINT);
     142            this->setType(Light::Point);
    143143        else if (type == "directional")
    144             this->setType(Light::LT_DIRECTIONAL);
     144            this->setType(Light::Directional);
    145145        else if (type == "spotlight")
    146             this->setType(Light::LT_SPOTLIGHT);
     146            this->setType(Light::Spotlight);
    147147        else
    148             this->setType(Light::LT_POINT);
     148            this->setType(Light::Point);
    149149    }
    150150
     
    153153        switch (this->type_)
    154154        {
    155             case Light::LT_DIRECTIONAL:
     155            case Light::Directional:
    156156                return "directional";
    157             case Light::LT_SPOTLIGHT:
     157            case Light::Spotlight:
    158158                return "spotlight";
    159             case Light::LT_POINT:
     159            case Light::Point:
    160160            default:
    161161                return "point";
     
    169169            this->light_->setType(static_cast<Ogre::Light::LightTypes>(this->type_));
    170170
    171             if (this->type_ != Light::LT_DIRECTIONAL)
     171            if (this->type_ != Light::Directional)
    172172                this->updateAttenuation();
    173             if (this->type_ == Light::LT_SPOTLIGHT)
     173            if (this->type_ == Light::Spotlight)
    174174                this->updateSpotlightRange();
    175175        }
  • code/trunk/src/orxonox/objects/worldentities/Light.h

    r3196 r3280  
    4545            {
    4646                /// Point light sources give off light equally in all directions, so require only position not direction
    47                 LT_POINT,
     47                Point,
    4848                /// Directional lights simulate parallel light beams from a distant source, hence have direction but no position
    49                 LT_DIRECTIONAL,
     49                Directional,
    5050                /// Spotlights simulate a cone of light from a source so require position and direction, plus extra values for falloff
    51                 LT_SPOTLIGHT
     51                Spotlight
    5252            };
    5353
  • code/trunk/src/orxonox/objects/worldentities/Model.cc

    r3196 r3280  
    6565    void Model::registerVariables()
    6666    {
    67         registerVariable(this->meshSrc_,    variableDirection::toclient, new NetworkCallback<Model>(this, &Model::changedMesh));
    68         registerVariable(this->bCastShadows_, variableDirection::toclient, new NetworkCallback<Model>(this, &Model::changedShadows));
     67        registerVariable(this->meshSrc_,    VariableDirection::ToClient, new NetworkCallback<Model>(this, &Model::changedMesh));
     68        registerVariable(this->bCastShadows_, VariableDirection::ToClient, new NetworkCallback<Model>(this, &Model::changedShadows));
    6969    }
    7070
  • code/trunk/src/orxonox/objects/worldentities/MovableEntity.cc

    r3196 r3280  
    5252        this->continuousResynchroTimer_ = 0;
    5353
    54         this->setPriority(priority::low);
     54        this->setPriority(Priority::Low);
    5555
    5656        this->registerVariables();
     
    8989    void MovableEntity::registerVariables()
    9090    {
    91         registerVariable(this->linearVelocity_,        variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processLinearVelocity));
    92         registerVariable(this->angularVelocity_,       variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processAngularVelocity));
     91        registerVariable(this->linearVelocity_,        VariableDirection::ToClient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processLinearVelocity));
     92        registerVariable(this->angularVelocity_,       VariableDirection::ToClient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processAngularVelocity));
    9393
    94         registerVariable(this->overwrite_position_,    variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));
    95         registerVariable(this->overwrite_orientation_, variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));
     94        registerVariable(this->overwrite_position_,    VariableDirection::ToClient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));
     95        registerVariable(this->overwrite_orientation_, VariableDirection::ToClient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));
    9696    }
    9797
  • code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.cc

    r3196 r3280  
    5353
    5454        this->particles_ = 0;
    55         this->LOD_ = LODParticle::normal;
     55        this->LOD_ = LODParticle::Normal;
    5656
    5757        this->registerVariables();
     
    7171        SUPER(ParticleEmitter, XMLPort, xmlelement, mode);
    7272
    73         XMLPortParam(ParticleEmitter, "lod",    setLODxml, getLODxml, xmlelement, mode).defaultValues(LODParticle::normal);
     73        XMLPortParam(ParticleEmitter, "lod",    setLODxml, getLODxml, xmlelement, mode).defaultValues(LODParticle::Normal);
    7474        XMLPortParam(ParticleEmitter, "source", setSource, getSource, xmlelement, mode);
    7575    }
     
    7777    void ParticleEmitter::registerVariables()
    7878    {
    79         registerVariable(this->source_, variableDirection::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));
    80         registerVariable((int&)(this->LOD_),    variableDirection::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));
     79        registerVariable(this->source_, VariableDirection::ToClient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));
     80        registerVariable((int&)(this->LOD_),    VariableDirection::ToClient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));
    8181    }
    8282
  • code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.h

    r3196 r3280  
    5757                { return this->source_; }
    5858
    59             inline void setLOD(LODParticle::LOD level)
     59            inline void setLOD(LODParticle::Value level)
    6060                { this->LOD_ = level; this->LODchanged(); }
    61             inline LODParticle::LOD getLOD() const
     61            inline LODParticle::Value getLOD() const
    6262                { return this->LOD_; }
    6363
    6464        protected:
    6565            inline void setLODxml(unsigned int level)
    66                 { this->LOD_ = (LODParticle::LOD)level; this->LODchanged(); }
     66                { this->LOD_ = (LODParticle::Value)level; this->LODchanged(); }
    6767            inline unsigned int getLODxml() const
    6868                { return (unsigned int)this->LOD_; }
     
    7373            ParticleInterface* particles_;
    7474            std::string        source_;
    75             LODParticle::LOD   LOD_;
     75            LODParticle::Value   LOD_;
    7676    };
    7777}
  • code/trunk/src/orxonox/objects/worldentities/Planet.cc

    r3196 r3280  
    157157    void Planet::registerVariables()
    158158    {
    159         registerVariable(this->atmosphere_, variableDirection::toclient);
    160         registerVariable(this->meshSrc_, variableDirection::toclient, new NetworkCallback<Planet>(this, &Planet::changedMesh));
    161         registerVariable(this->bCastShadows_, variableDirection::toclient, new NetworkCallback<Planet>(this, &Planet::changedShadows));
    162         registerVariable(this->atmosphereSize, variableDirection::toclient);
    163         registerVariable(this->imageSize, variableDirection::toclient);
     159        registerVariable(this->atmosphere_, VariableDirection::ToClient);
     160        registerVariable(this->meshSrc_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedMesh));
     161        registerVariable(this->bCastShadows_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedShadows));
     162        registerVariable(this->atmosphereSize, VariableDirection::ToClient);
     163        registerVariable(this->imageSize, VariableDirection::ToClient);
    164164    }
    165165
  • code/trunk/src/orxonox/objects/worldentities/PongBall.cc

    r3196 r3280  
    7272        registerVariable( this->relMercyOffset_ );
    7373        registerVariable( this->batID_[0] );
    74         registerVariable( this->batID_[1], variableDirection::toclient, new NetworkCallback<PongBall>( this, &PongBall::applyBats) );
     74        registerVariable( this->batID_[1], VariableDirection::ToClient, new NetworkCallback<PongBall>( this, &PongBall::applyBats) );
    7575    }
    7676
  • code/trunk/src/orxonox/objects/worldentities/StaticEntity.cc

    r3196 r3280  
    4343        RegisterObject(StaticEntity);
    4444       
    45         this->setPriority(priority::very_low);
     45        this->setPriority(Priority::VeryLow);
    4646
    4747        this->registerVariables();
     
    5454    void StaticEntity::registerVariables()
    5555    {
    56         registerVariable(this->getPosition(),    variableDirection::toclient, new NetworkCallback<StaticEntity>(this, &StaticEntity::positionChanged));
    57         registerVariable(this->getOrientation(), variableDirection::toclient, new NetworkCallback<StaticEntity>(this, &StaticEntity::orientationChanged));
     56        registerVariable(this->getPosition(),    VariableDirection::ToClient, new NetworkCallback<StaticEntity>(this, &StaticEntity::positionChanged));
     57        registerVariable(this->getOrientation(), VariableDirection::ToClient, new NetworkCallback<StaticEntity>(this, &StaticEntity::orientationChanged));
    5858    }
    5959
  • code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc

    r3196 r3280  
    175175    void WorldEntity::registerVariables()
    176176    {
    177         registerVariable(this->mainStateName_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedMainState));
    178 
    179         registerVariable(this->bActive_,        variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
    180         registerVariable(this->bVisible_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
    181 
    182         registerVariable(this->getScale3D(),    variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::scaleChanged));
     177        registerVariable(this->mainStateName_,  VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedMainState));
     178
     179        registerVariable(this->bActive_,        VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
     180        registerVariable(this->bVisible_,       VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
     181
     182        registerVariable(this->getScale3D(),    VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::scaleChanged));
    183183
    184184        // Physics stuff
    185         registerVariable(this->mass_,           variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::massChanged));
    186         registerVariable(this->restitution_,    variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::restitutionChanged));
    187         registerVariable(this->angularFactor_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularFactorChanged));
    188         registerVariable(this->linearDamping_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::linearDampingChanged));
    189         registerVariable(this->angularDamping_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularDampingChanged));
    190         registerVariable(this->friction_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::frictionChanged));
     185        registerVariable(this->mass_,           VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::massChanged));
     186        registerVariable(this->restitution_,    VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::restitutionChanged));
     187        registerVariable(this->angularFactor_,  VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularFactorChanged));
     188        registerVariable(this->linearDamping_,  VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::linearDampingChanged));
     189        registerVariable(this->angularDamping_, VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularDampingChanged));
     190        registerVariable(this->friction_,       VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::frictionChanged));
    191191        registerVariable(this->bCollisionCallbackActive_,
    192                                                 variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionCallbackActivityChanged));
     192                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionCallbackActivityChanged));
    193193        registerVariable(this->bCollisionResponseActive_,
    194                                                 variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionResponseActivityChanged));
     194                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionResponseActivityChanged));
    195195        registerVariable((int&)this->collisionTypeSynchronised_,
    196                                                 variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionTypeChanged));
     196                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionTypeChanged));
    197197        registerVariable(this->bPhysicsActiveSynchronised_,
    198                                                 variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::physicsActivityChanged));
     198                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::physicsActivityChanged));
    199199
    200200        // Attach to parent if necessary
    201         registerVariable(this->parentID_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::networkcallback_parentChanged));
     201        registerVariable(this->parentID_,       VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::networkcallback_parentChanged));
    202202    }
    203203
  • code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r3214 r3280  
    2828
    2929#include "Pawn.h"
     30
     31#include <algorithm>
    3032
    3133#include "core/CoreIncludes.h"
     
    117119    void Pawn::registerVariables()
    118120    {
    119         registerVariable(this->bAlive_,        variableDirection::toclient);
    120         registerVariable(this->health_,        variableDirection::toclient);
    121         registerVariable(this->initialHealth_, variableDirection::toclient);
    122         registerVariable(this->bReload_,       variableDirection::toserver);
     121        registerVariable(this->bAlive_,        VariableDirection::ToClient);
     122        registerVariable(this->health_,        VariableDirection::ToClient);
     123        registerVariable(this->initialHealth_, VariableDirection::ToClient);
     124        registerVariable(this->bReload_,       VariableDirection::ToServer);
    123125    }
    124126
     
    152154    void Pawn::setHealth(float health)
    153155    {
    154         this->health_ = min(health, this->maxHealth_);
     156        this->health_ = std::min(health, this->maxHealth_);
    155157    }
    156158
  • code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc

    r3196 r3280  
    9090    void SpaceShip::registerVariables()
    9191    {
    92         registerVariable(this->primaryThrust_,  variableDirection::toclient);
    93         registerVariable(this->auxilaryThrust_, variableDirection::toclient);
    94         registerVariable(this->rotationThrust_, variableDirection::toclient);
     92        registerVariable(this->primaryThrust_,  VariableDirection::ToClient);
     93        registerVariable(this->auxilaryThrust_, VariableDirection::ToClient);
     94        registerVariable(this->rotationThrust_, VariableDirection::ToClient);
    9595    }
    9696
  • code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc

    r3196 r3280  
    9393    void Spectator::registerVariables()
    9494    {
    95         registerVariable(this->bGreetingFlareVisible_, variableDirection::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
    96         registerVariable(this->bGreeting_,             variableDirection::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
     95        registerVariable(this->bGreetingFlareVisible_, VariableDirection::ToClient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
     96        registerVariable(this->bGreeting_,             VariableDirection::ToServer, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
    9797    }
    9898
     
    145145        ControllableEntity::setPlayer(player);
    146146
    147 //        this->setObjectMode(objectDirection::toclient);
     147//        this->setObjectMode(ObjectDirection::ToClient);
    148148    }
    149149
  • code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc

    r3196 r3280  
    4343        RegisterObject(TeamBaseMatchBase);
    4444
    45         this->state_ = BaseState::uncontrolled;
     45        this->state_ = BaseState::Uncontrolled;
    4646
    4747        TeamBaseMatch* gametype = dynamic_cast<TeamBaseMatch*>(this->getGametype());
     
    6666        switch (this->state_)
    6767        {
    68             case BaseState::controlTeam1:
     68            case BaseState::ControlTeam1:
    6969                colour = gametype->getTeamColour(0);
    7070                break;
    71             case BaseState::controlTeam2:
     71            case BaseState::ControlTeam2:
    7272                colour = gametype->getTeamColour(1);
    7373                break;
    74             case BaseState::uncontrolled:
     74            case BaseState::Uncontrolled:
    7575            default:
    7676                colour = ColourValue(0.5, 0.5, 0.5, 1.0);
  • code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h

    r3196 r3280  
    3838    namespace BaseState
    3939    {
    40         enum Enum
     40        enum Value
    4141        {
    42             uncontrolled,
    43             controlTeam1,
    44             controlTeam2,
     42            Uncontrolled,
     43            ControlTeam1,
     44            ControlTeam2,
    4545        };
    4646    }
     
    5858
    5959            // Set the state of a base to whatever the argument of the function is
    60             void setState(BaseState::Enum state)
     60            void setState(BaseState::Value state)
    6161            {
    6262                this->state_ = state;
     
    6666
    6767            // Get the state of a base as a return value
    68             BaseState::Enum getState() const
     68            BaseState::Value getState() const
    6969            {
    7070                return this->state_;
     
    7575            void changeTeamColour();
    7676
    77             BaseState::Enum state_;
     77            BaseState::Value state_;
    7878    };
    7979}
  • code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc

    r3196 r3280  
    141141  }
    142142
    143   bool DistanceTrigger::isTriggered(TriggerMode mode)
     143  bool DistanceTrigger::isTriggered(TriggerMode::Value mode)
    144144  {
    145145    if (Trigger::isTriggered(mode))
  • code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h

    r3196 r3280  
    5959
    6060    protected:
    61       virtual bool isTriggered(TriggerMode mode);
     61      virtual bool isTriggered(TriggerMode::Value mode);
    6262      virtual void notifyMaskUpdate() {}
    6363
  • code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.cc

    r3196 r3280  
    5454    }
    5555
    56     bool EventTrigger::isTriggered(TriggerMode mode)
     56    bool EventTrigger::isTriggered(TriggerMode::Value mode)
    5757    {
    5858        if (Trigger::isTriggered(mode))
  • code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.h

    r3196 r3280  
    4747
    4848        protected:
    49             virtual bool isTriggered(TriggerMode mode);
     49            virtual bool isTriggered(TriggerMode::Value mode);
    5050
    5151        private:
  • code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h

    r3196 r3280  
    7070           
    7171    protected:
    72         virtual bool isTriggered(TriggerMode mode) = 0;
     72        virtual bool isTriggered(TriggerMode::Value mode) = 0;
    7373       
    7474        /**
  • code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc

    r3196 r3280  
    4646    RegisterObject(Trigger);
    4747
    48     this->mode_ = TM_EventTriggerAND;
     48    this->mode_ = TriggerMode::EventTriggerAND;
    4949
    5050    this->bFirstTick_ = true;
     
    163163  }
    164164
    165   bool Trigger::isTriggered(TriggerMode mode)
     165  bool Trigger::isTriggered(TriggerMode::Value mode)
    166166  {
    167167//    if (this->bUpdating_)
     
    175175      switch (mode)
    176176      {
    177         case TM_EventTriggerAND:
     177        case TriggerMode::EventTriggerAND:
    178178          returnval = checkAnd();
    179179          break;
    180         case TM_EventTriggerOR:
     180        case TriggerMode::EventTriggerOR:
    181181          returnval = checkOr();
    182182          break;
    183         case TM_EventTriggerXOR:
     183        case TriggerMode::EventTriggerXOR:
    184184          returnval = checkXor();
    185185          break;
     
    270270  {
    271271    if (modeName == "and")
    272       this->setMode(TM_EventTriggerAND);
     272      this->setMode(TriggerMode::EventTriggerAND);
    273273    else if (modeName == "or")
    274       this->setMode(TM_EventTriggerOR);
     274      this->setMode(TriggerMode::EventTriggerOR);
    275275    else if (modeName == "xor")
    276       this->setMode(TM_EventTriggerXOR);
     276      this->setMode(TriggerMode::EventTriggerXOR);
    277277  }
    278278
    279279  std::string Trigger::getModeString() const
    280280  {
    281     if (this->mode_ == TM_EventTriggerAND)
     281    if (this->mode_ == TriggerMode::EventTriggerAND)
    282282      return std::string("and");
    283     else if (this->mode_ == TM_EventTriggerOR)
     283    else if (this->mode_ == TriggerMode::EventTriggerOR)
    284284      return std::string("or");
    285     else if (this->mode_ == TM_EventTriggerXOR)
     285    else if (this->mode_ == TriggerMode::EventTriggerXOR)
    286286      return std::string("xor");
    287287    else
  • code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.h

    r3196 r3280  
    4141namespace orxonox
    4242{
    43   enum TriggerMode
     43  namespace TriggerMode
    4444  {
    45     TM_EventTriggerAND,
    46     TM_EventTriggerOR,
    47     TM_EventTriggerXOR,
    48   };
     45    enum Value
     46    {
     47      EventTriggerAND,
     48      EventTriggerOR,
     49      EventTriggerXOR,
     50    };
     51  }
    4952
    5053  class _OrxonoxExport Trigger : public StaticEntity, public Tickable
     
    6467
    6568      void setMode(const std::string& modeName);
    66       inline void setMode(TriggerMode mode)
     69      inline void setMode(TriggerMode::Value mode)
    6770        { this->mode_ = mode; }
    68       inline TriggerMode getMode() const
     71      inline TriggerMode::Value getMode() const
    6972        { return mode_; }
    7073
     
    103106    protected:
    104107      inline bool isTriggered() { return this->isTriggered(this->mode_); }
    105       virtual bool isTriggered(TriggerMode mode);
     108      virtual bool isTriggered(TriggerMode::Value mode);
    106109      virtual void triggered(bool bIsTriggered);
    107110
     
    118121      bool bFirstTick_;
    119122
    120       TriggerMode mode_;
     123      TriggerMode::Value mode_;
    121124      bool bInvertMode_;
    122125      bool bSwitch_;
  • code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc

    r3196 r3280  
    4242#include "util/Convert.h"
    4343#include "util/Exception.h"
    44 #include "util/String.h"
     44#include "util/StringUtils.h"
    4545#include "core/GameMode.h"
    4646#include "core/CoreIncludes.h"
     
    7272        // create the Ogre::Overlay
    7373        overlay_ = Ogre::OverlayManager::getSingleton().create("OrxonoxOverlay_overlay_"
    74             + convertToString(hudOverlayCounter_s++));
     74            + multi_cast<std::string>(hudOverlayCounter_s++));
    7575
    7676        // create background panel (can be used to show any picture)
    7777        this->background_ = static_cast<Ogre::PanelOverlayElement*>(
    7878            Ogre::OverlayManager::getSingleton().createOverlayElement("Panel",
    79             "OrxonoxOverlay_background_" + convertToString(hudOverlayCounter_s++)));
     79            "OrxonoxOverlay_background_" + multi_cast<std::string>(hudOverlayCounter_s++)));
    8080        this->overlay_->add2D(this->background_);
    8181
  • code/trunk/src/orxonox/overlays/OverlayText.cc

    r3196 r3280  
    3434#include <boost/static_assert.hpp>
    3535
    36 #include "util/String.h"
     36#include "util/StringUtils.h"
    3737#include "core/CoreIncludes.h"
    3838#include "core/XMLPort.h"
  • code/trunk/src/orxonox/overlays/console/InGameConsole.cc

    r3196 r3280  
    3030#include "InGameConsole.h"
    3131
     32#include <algorithm>
    3233#include <string>
    3334#include <OgreOverlay.h>
     
    219220        for (int i = 0; i < LINES; i++)
    220221        {
    221             this->consoleOverlayTextAreas_[i] = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "InGameConsoleTextArea" + convertToString(i)));
     222            this->consoleOverlayTextAreas_[i] = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "InGameConsoleTextArea" + multi_cast<std::string>(i)));
    222223            this->consoleOverlayTextAreas_[i]->setMetricsMode(Ogre::GMM_PIXELS);
    223224            this->consoleOverlayTextAreas_[i]->setFontName("MonofurConsole");
     
    425426
    426427        if (LINES > 0)
    427             this->maxCharsPerLine_ = max((unsigned int)10, (unsigned int) ((float)this->desiredTextWidth_ / CHAR_WIDTH));
     428            this->maxCharsPerLine_ = std::max((unsigned int)10, (unsigned int) ((float)this->desiredTextWidth_ / CHAR_WIDTH));
    428429        else
    429430            this->maxCharsPerLine_ = 10;
  • code/trunk/src/orxonox/overlays/hud/GametypeStatus.cc

    r3196 r3280  
    7070            {
    7171                if (gtinfo->isStartCountdownRunning())
    72                     this->setCaption(convertToString((int)ceil(gtinfo->getStartCountdown())));
     72                    this->setCaption(multi_cast<std::string>((int)ceil(gtinfo->getStartCountdown())));
    7373                else if (ce->isA(Class(Spectator)))
    7474                    this->setCaption("Press [Fire] to respawn");
  • code/trunk/src/orxonox/overlays/hud/HUDBar.cc

    r3196 r3280  
    3838
    3939#include "util/Convert.h"
    40 #include "util/String.h"
     40#include "util/StringUtils.h"
    4141#include "core/CoreIncludes.h"
    4242#include "core/XMLPort.h"
     
    7272
    7373        // create new material
    74         std::string materialname = "barmaterial" + getConvertedValue<unsigned int, std::string>(materialcount_s++);
     74        std::string materialname = "barmaterial" + multi_cast<std::string>(materialcount_s++);
    7575        Ogre::MaterialPtr material = (Ogre::MaterialPtr)Ogre::MaterialManager::getSingleton().create(materialname, "General");
    7676        material->getTechnique(0)->getPass(0)->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
  • code/trunk/src/orxonox/overlays/hud/HUDHealthBar.cc

    r3196 r3280  
    8383        {
    8484            this->setValue(this->owner_->getHealth() / this->owner_->getInitialHealth());
    85             this->textoverlay_->setCaption(convertToString((int)this->owner_->getHealth()));
     85            this->textoverlay_->setCaption(multi_cast<std::string>((int)this->owner_->getHealth()));
    8686        }
    8787
  • code/trunk/src/orxonox/overlays/hud/HUDNavigation.cc

    r3196 r3280  
    3535
    3636#include "util/Math.h"
    37 #include "util/String.h"
     37#include "util/StringUtils.h"
    3838#include "util/Convert.h"
    3939#include "core/CoreIncludes.h"
     
    142142        // set text
    143143        int dist = (int) getDist2Focus();
    144         navText_->setCaption(convertToString(dist));
    145         float textLength = convertToString(dist).size() * navText_->getCharHeight() * 0.3;
     144        navText_->setCaption(multi_cast<std::string>(dist));
     145        float textLength = multi_cast<std::string>(dist).size() * navText_->getCharHeight() * 0.3;
    146146
    147147/*
  • code/trunk/src/orxonox/overlays/hud/HUDRadar.cc

    r3196 r3280  
    3434
    3535#include "util/Math.h"
    36 #include "util/String.h"
     36#include "util/StringUtils.h"
    3737#include "core/CoreIncludes.h"
    3838#include "core/XMLPort.h"
  • code/trunk/src/orxonox/overlays/hud/HUDTimer.cc

    r3196 r3280  
    5959            if (gametype->getTimerIsActive())
    6060            {
    61                 this->setCaption(convertToString((int)gametype->getTime() + 1));
     61                this->setCaption(multi_cast<std::string>((int)gametype->getTime() + 1));
    6262            }
    6363        }
  • code/trunk/src/orxonox/overlays/hud/PongScore.cc

    r3196 r3280  
    8383            {
    8484                name1 = player1->getName();
    85                 score1 = convertToString(this->owner_->getScore(player1));
     85                score1 = multi_cast<std::string>(this->owner_->getScore(player1));
    8686            }
    8787
     
    8989            {
    9090                name2 = player2->getName();
    91                 score2 = convertToString(this->owner_->getScore(player2));
     91                score2 = multi_cast<std::string>(this->owner_->getScore(player2));
    9292            }
    9393
  • code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.cc

    r3196 r3280  
    7171        if (this->owner_)
    7272        {
    73             std::string bases1 = "(" + convertToString(this->owner_->getTeamBases(0)) + ")";
    74             std::string bases2 = "(" + convertToString(this->owner_->getTeamBases(1)) + ")";
     73            std::string bases1 = "(" + multi_cast<std::string>(this->owner_->getTeamBases(0)) + ")";
     74            std::string bases2 = "(" + multi_cast<std::string>(this->owner_->getTeamBases(1)) + ")";
    7575
    76             std::string score1 = convertToString(this->owner_->getTeamPoints(0));
    77             std::string score2 = convertToString(this->owner_->getTeamPoints(1));
     76            std::string score1 = multi_cast<std::string>(this->owner_->getTeamPoints(0));
     77            std::string score2 = multi_cast<std::string>(this->owner_->getTeamPoints(1));
    7878
    7979            std::string output1;
  • code/trunk/src/orxonox/overlays/stats/CreateLines.cc

    r3196 r3280  
    9999    //    while (textColumns_.size() < numberOfColumns)
    100100    //    {
    101     //        Ogre::TextAreaOverlayElement* tempTextArea = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "StatsLineTextArea" + getName() + convertToString(lineIndex) + convertToString(colIndex)));
     101    //        Ogre::TextAreaOverlayElement* tempTextArea = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "StatsLineTextArea" + getName() + multi_cast<std::string>(lineIndex) + multi_cast<std::string>(colIndex)));
    102102    //        textColumns_.push_back(tempTextArea);
    103103    //        this->background_->addChild(tempTextArea);
  • code/trunk/src/orxonox/overlays/stats/Stats.cc

    r3196 r3280  
    3333#include <OgreBorderPanelOverlayElement.h>
    3434
    35 #include "util/String.h"
     35#include "util/StringUtils.h"
    3636#include "core/CoreIncludes.h"
    3737#include "core/ConfigValueIncludes.h"
  • code/trunk/src/orxonox/sound/SoundManager.cc

    r3196 r3280  
    3939{
    4040    SoundManager* SoundManager::singletonRef_s = NULL;
    41     ALCdevice* SoundManager::device_s = NULL;
    4241
    4342    /**
     
    4948        singletonRef_s = this;
    5049
     50        this->device_ = NULL;
    5151        this->soundavailable_ = true;
    5252        if(!alutInitWithoutContext(NULL,NULL))
     
    5757        else
    5858        {
    59             if(SoundManager::device_s == NULL)
    60             {
    61                 COUT(3) << "Sound: OpenAL: Open sound device..." << std::endl;
    62                 SoundManager::device_s = alcOpenDevice(NULL);
    63             }
     59            assert(this->device_ == NULL);
     60            COUT(3) << "Sound: OpenAL: Open sound device..." << std::endl;
     61            this->device_ = alcOpenDevice(NULL);
    6462
    65             if(SoundManager::device_s == NULL)
     63            if(this->device_ == NULL)
    6664            {
    6765                COUT(2) << "Sound: OpenAL: Could not open sound device" << std::endl;
     
    7169            {
    7270                COUT(3) << "Sound: OpenAL: Sound device opened" << std::endl;
    73                 this->context_ = alcCreateContext(SoundManager::device_s, NULL);
     71                this->context_ = alcCreateContext(this->device_, NULL);
    7472                if(this->context_ == NULL)
    7573                {
     
    9997
    10098        alcDestroyContext(this->context_);
    101         alcCloseDevice(SoundManager::device_s);
     99        alcCloseDevice(this->device_);
    102100        alutExit();
    103101    }
  • code/trunk/src/orxonox/sound/SoundManager.h

    r3196 r3280  
    5555
    5656    private:
    57         static ALCdevice* device_s;
     57        ALCdevice* device_;
    5858        ALCcontext* context_;
    5959        std::list<SoundBase*> soundlist_;
  • code/trunk/src/orxonox/tools/BillboardSet.cc

    r3196 r3280  
    3838#include "util/Convert.h"
    3939#include "util/Math.h"
    40 #include "util/String.h"
     40#include "util/StringUtils.h"
    4141#include "core/GameMode.h"
    4242
     
    7474            if (GameMode::showsGraphics())
    7575            {
    76                 this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + convertToString(BillboardSet::billboardSetCounter_s++), count);
     76                this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + multi_cast<std::string>(BillboardSet::billboardSetCounter_s++), count);
    7777                this->billboardSet_->createBillboard(position);
    7878                this->billboardSet_->setMaterialName(file);
     
    9797            if (GameMode::showsGraphics())
    9898            {
    99                 this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + convertToString(BillboardSet::billboardSetCounter_s++), count);
     99                this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + multi_cast<std::string>(BillboardSet::billboardSetCounter_s++), count);
    100100                this->billboardSet_->createBillboard(position, colour);
    101101                this->billboardSet_->setMaterialName(file);
  • code/trunk/src/orxonox/tools/Mesh.cc

    r3196 r3280  
    3636
    3737#include "util/Convert.h"
    38 #include "util/String.h"
     38#include "util/StringUtils.h"
    3939#include "core/GameMode.h"
    4040
     
    6868            try
    6969            {
    70                 this->entity_ = this->scenemanager_->createEntity("Mesh" + convertToString(Mesh::meshCounter_s++), meshsource);
     70                this->entity_ = this->scenemanager_->createEntity("Mesh" + multi_cast<std::string>(Mesh::meshCounter_s++), meshsource);
    7171                this->entity_->setCastShadows(this->bCastShadows_);
    7272
  • code/trunk/src/orxonox/tools/ParticleInterface.cc

    r3196 r3280  
    5151    ParticleInterface* ParticleInterface::currentParticleInterface_s = 0;
    5252
    53     ParticleInterface::ParticleInterface(Ogre::SceneManager* scenemanager, const std::string& templateName, LODParticle::LOD detaillevel)
     53    ParticleInterface::ParticleInterface(Ogre::SceneManager* scenemanager, const std::string& templateName, LODParticle::Value detaillevel)
    5454    {
    5555        RegisterObject(ParticleInterface);
     
    6969            try
    7070            {
    71                 this->particleSystem_ = this->scenemanager_->createParticleSystem("particles" + getConvertedValue<unsigned int, std::string>(ParticleInterface::counter_s++), templateName);
     71                this->particleSystem_ = this->scenemanager_->createParticleSystem("particles" + multi_cast<std::string>(ParticleInterface::counter_s++), templateName);
    7272                this->setSpeedFactor(1.0f);
    7373            }
  • code/trunk/src/orxonox/tools/ParticleInterface.h

    r3196 r3280  
    4545    {
    4646        public:
    47             ParticleInterface(Ogre::SceneManager* scenemanager, const std::string& templateName, LODParticle::LOD detaillevel);
     47            ParticleInterface(Ogre::SceneManager* scenemanager, const std::string& templateName, LODParticle::Value detaillevel);
    4848            virtual ~ParticleInterface();
    4949
  • code/trunk/src/orxonox/tools/TextureGenerator.cc

    r3196 r3280  
    7272        if (it == colourMap.end())
    7373        {
    74             std::string materialName = textureName + "_Material_" + convertToString(materialCount_s++);
     74            std::string materialName = textureName + "_Material_" + multi_cast<std::string>(materialCount_s++);
    7575            Ogre::MaterialPtr material = (Ogre::MaterialPtr)Ogre::MaterialManager::getSingleton().create(materialName, "General");
    7676            material->getTechnique(0)->getPass(0)->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
Note: See TracChangeset for help on using the changeset viewer.