Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 4, 2015, 9:12:21 PM (9 years ago)
Author:
landauf
Message:

merged branch core7 back to trunk

Location:
code/trunk
Files:
101 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/designtools/ScreenshotManager.cc

    r9667 r10624  
    4545#include "core/config/ConfigValueIncludes.h"
    4646#include "core/GraphicsManager.h"
    47 #include "core/PathConfig.h"
     47#include "core/ConfigurablePaths.h"
    4848#include "core/Resource.h"
    49 #include "core/command/ConsoleCommand.h"
    50 #include "util/ScopedSingletonManager.h"
     49#include "core/command/ConsoleCommandIncludes.h"
     50#include "core/singleton/ScopedSingletonIncludes.h"
    5151#include "util/StringUtils.h"
    5252
     
    6161    SetConsoleCommand("printScreenHD", &ScreenshotManager::makeScreenshot_s);
    6262   
    63     ManageScopedSingleton(ScreenshotManager, ScopeID::Graphics, false);
     63    ManageScopedSingleton(ScreenshotManager, ScopeID::GRAPHICS, false);
     64
     65    RegisterAbstractClass(ScreenshotManager).inheritsFrom<Configurable>();
    6466
    6567    /**
     
    152154        {
    153155            // Save it.
    154             finalImage->save(PathConfig::getInstance().getLogPathString() + "screenshot_" + getTimestamp() + this->fileExtension_);
     156            finalImage->save(ConfigurablePaths::getLogPathString() + "screenshot_" + getTimestamp() + this->fileExtension_);
    155157            delete finalImage;
    156158            orxout(user_info) << "Finished taking " << this->gridSize_*this->windowWidth_ << "x" << this->gridSize_*this->windowHeight_ << " pixel HD screenshot. Storing in log/." << endl;
  • code/trunk/src/modules/designtools/SkyboxGenerator.cc

    r9667 r10624  
    3838#include <OgreCamera.h>
    3939
    40 #include "util/ScopedSingletonManager.h"
    4140#include "core/CoreIncludes.h"
    4241#include "core/config/ConfigValueIncludes.h"
    4342#include "core/GraphicsManager.h"
    44 #include "core/PathConfig.h"
     43#include "core/ConfigurablePaths.h"
    4544#include "core/Resource.h"
    46 #include "core/command/ConsoleCommand.h"
     45#include "core/command/ConsoleCommandIncludes.h"
    4746#include "core/command/CommandExecutor.h"
     47#include "core/singleton/ScopedSingletonIncludes.h"
    4848
    4949#include "controllers/HumanController.h"
     
    6060    SetConsoleCommand("SkyboxGenerator", "createSkybox", &SkyboxGenerator::createSkybox).addShortcut();
    6161
    62     ManageScopedSingleton(SkyboxGenerator, ScopeID::Graphics, false);
     62    ManageScopedSingleton(SkyboxGenerator, ScopeID::GRAPHICS, false);
     63
     64    RegisterAbstractClass(SkyboxGenerator).inheritsFrom<Configurable>().inheritsFrom<Tickable>();
    6365
    6466    /**
     
    173175                this->setupRenderWindow(renderWindow);
    174176                // Add the log path to the standard resource group.
    175                 Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getInstance().getLogPathString(), "FileSystem", Resource::getDefaultResourceGroup());
     177                Ogre::ResourceGroupManager::getSingleton().addResourceLocation(ConfigurablePaths::getLogPathString(), "FileSystem", Resource::getDefaultResourceGroup());
    176178               
    177179                orxout(internal_status) << "Setting up SkyboxGenerator..." << endl;
     
    208210                this->restoreRenderWindow(renderWindow);
    209211                // Remove the log path from the standard resource group.
    210                 Ogre::ResourceGroupManager::getSingleton().removeResourceLocation(PathConfig::getInstance().getLogPathString(), Resource::getDefaultResourceGroup());
     212                Ogre::ResourceGroupManager::getSingleton().removeResourceLocation(ConfigurablePaths::getLogPathString(), Resource::getDefaultResourceGroup());
    211213               
    212214                // Reset the flow parameters for the next skybox generation.
     
    306308    void SkyboxGenerator::saveImage(Ogre::Image* image, const std::string& name) const
    307309    {
    308         image->save(PathConfig::getInstance().getLogPathString()+name);
     310        image->save(ConfigurablePaths::getLogPathString()+name);
    309311        delete image;
    310312        // Loading the resizing, then saving again. This seems stupid, but resizing doesn't seem to work otherwise.
     
    313315        image->load(name, Resource::getDefaultResourceGroup());
    314316        image->resize(this->size_, this->size_);
    315         image->save(PathConfig::getInstance().getLogPathString()+name);
     317        image->save(ConfigurablePaths::getLogPathString()+name);
    316318        delete image;
    317319        ScreenshotManager::getInstance().cleanup(); // Free memory in ScreenshotManager.
  • code/trunk/src/modules/docking/Dock.cc

    r9945 r10624  
    3737#include "core/LuaState.h"
    3838#include "core/GUIManager.h"
    39 #include "core/command/ConsoleCommand.h"
    40 #include "network/NetworkFunction.h"
     39#include "core/command/ConsoleCommandIncludes.h"
     40#include "network/NetworkFunctionIncludes.h"
    4141
    4242#include "infos/HumanPlayer.h"
     
    184184            }
    185185            else
    186                 callStaticNetworkFunction(Dock::showDockingDialog, player->getClientID());
     186                callStaticNetworkFunction(&Dock::showDockingDialog, player->getClientID());
    187187
    188188        }
     
    201201        }
    202202        else
    203             callStaticNetworkFunction(Dock::showDockingDialog, player->getClientID());
     203            callStaticNetworkFunction(&Dock::showDockingDialog, player->getClientID());
    204204
    205205    }
  • code/trunk/src/modules/docking/DockingAnimation.cc

    r9667 r10624  
    3939namespace orxonox
    4040{
    41     RegisterAbstractClass(DockingAnimation).inheritsFrom(Class(BaseObject));
     41    RegisterAbstractClass(DockingAnimation).inheritsFrom<BaseObject>();
    4242
    4343    DockingAnimation::DockingAnimation(Context* context) : BaseObject(context)
  • code/trunk/src/modules/docking/DockingEffect.cc

    r9667 r10624  
    3737namespace orxonox
    3838{
    39     RegisterAbstractClass(DockingEffect).inheritsFrom(Class(BaseObject));
     39    RegisterAbstractClass(DockingEffect).inheritsFrom<BaseObject>();
    4040
    4141    DockingEffect::DockingEffect(Context* context) : BaseObject(context)
  • code/trunk/src/modules/dodgerace/CMakeLists.txt

    r10284 r10624  
    88
    99ORXONOX_ADD_LIBRARY(dodgerace
    10   MODULE
     10  PLUGIN
    1111  FIND_HEADER_FILES
    1212  LINK_LIBRARIES
  • code/trunk/src/modules/dodgerace/DodgeRace.cc

    r10236 r10624  
    3535#include "DodgeRaceShip.h" // Necessary for getPlayer function. Do NOT include this in Header!
    3636#include "DodgeRaceCube.h"
     37#include "core/CoreIncludes.h"
    3738
    3839namespace orxonox
     
    4344    {
    4445        RegisterObject(DodgeRace);
    45         init();
    46         this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
    47         this->center_ = 0;
    48 
    49         this->setHUDTemplate("DodgeRaceHUD");
    50     }
    51 
    52     void DodgeRace::init()
    53     {
     46
    5447        bEndGame = false;
    5548        lives = 1;
     
    6558        //enemySpawnTimer.setTimer(3.5f, true, createExecutor(createFunctor(&DodgeRace::spawnEnemy, this)));
    6659        comboTimer.setTimer(3.0f, true, createExecutor(createFunctor(&DodgeRace::comboControll, this)));
     60        this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
     61        this->center_ = 0;
     62
     63        this->setHUDTemplate("DodgeRaceHUD");
    6764    }
    6865
     
    7471            for (int i = 0; i < 7; i++)
    7572            {
    76                 WeakPtr<BigExplosion> chunk = new BigExplosion(this->center_->getContext());
     73                BigExplosion* chunk = new BigExplosion(this->center_->getContext());
    7774                chunk->setPosition(Vector3(600, 0, 100.f * i - 300));
    7875                chunk->setVelocity(Vector3(1000, 0, 0));  //player->getVelocity()
     
    9087        if (getPlayer() != NULL)
    9188        {
    92             //WeakPtr<DodgeRaceShip> ship = getPlayer();
    93 
    9489            currentPosition = getPlayer()->getWorldPosition().x;
    9590            counter = counter + (currentPosition - lastPosition);
     
    112107                for(int i = 0; i<6; i++)
    113108                {
    114                     WeakPtr<DodgeRaceCube> cube = new DodgeRaceCube(this->center_->getContext());
     109                    DodgeRaceCube* cube = new DodgeRaceCube(this->center_->getContext());
    115110                    cubeList.push_back(cube);
    116111                    switch(pattern)
     
    137132    }
    138133
    139     WeakPtr<DodgeRaceShip> DodgeRace::getPlayer()
     134    DodgeRaceShip* DodgeRace::getPlayer()
    140135    {
    141136        if (player == NULL)
     
    168163    {
    169164        orxout() << "start" << endl;
    170         init();
    171165        for(unsigned int i=0; i< cubeList.size();i++)
    172166        {
     
    199193        /*
    200194        orxout() << "prespawn" << endl;
    201         init();
    202195        for(int i=0; i< cubeList.size();i++)
    203196        {
  • code/trunk/src/modules/dodgerace/DodgeRace.h

    r10236 r10624  
    4444
    4545
    46 #include "core/CoreIncludes.h"
    4746#include "core/EventIncludes.h"
    4847#include "core/command/Executor.h"
     
    6968       public:
    7069            DodgeRace(Context* context);
    71 
    72             void init();
    7370
    7471            virtual void start();
     
    106103            Timer endGameTimer;
    107104
    108             WeakPtr<DodgeRaceShip> getPlayer();
     105            DodgeRaceShip* getPlayer();
    109106            WeakPtr<DodgeRaceShip> player;
    110107            std::vector<DodgeRaceCube*> cubeList;
  • code/trunk/src/modules/dodgerace/DodgeRaceCenterPoint.cc

    r10232 r10624  
    5454    }
    5555
    56     void DodgeRaceCenterPoint::changedGametype()
    57     {
    58         SUPER(DodgeRaceCenterPoint, changedGametype);
    59 
    60         // Check, whether it's still DodgeRace.
    61         this->checkGametype();
    62     }
    63 
    6456    void DodgeRaceCenterPoint::checkGametype()
    6557    {
    6658        if (this->getGametype() != NULL && this->getGametype()->isA(Class(DodgeRace)))
    6759        {
    68             DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype().get());
     60            DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype());
    6961            DodgeRaceGametype->setCenterpoint(this);
    7062        }
  • code/trunk/src/modules/dodgerace/DodgeRaceCenterPoint.h

    r10234 r10624  
    5252            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5353
    54             virtual void changedGametype(); //!< Is called when the gametype has changed.
    5554        private:
    5655            void checkGametype();
  • code/trunk/src/modules/dodgerace/DodgeRaceCube.cc

    r10236 r10624  
    3333#include "DodgeRaceCube.h"
    3434#include "DodgeRace.h"
     35#include "core/CoreIncludes.h"
    3536
    3637namespace orxonox
  • code/trunk/src/modules/dodgerace/DodgeRaceHUDinfo.cc

    r10236 r10624  
    8282        if (this->getOwner() && this->getOwner()->getGametype())
    8383        {
    84             this->DodgeRaceGame = orxonox_cast<DodgeRace*>(this->getOwner()->getGametype().get());
     84            this->DodgeRaceGame = orxonox_cast<DodgeRace*>(this->getOwner()->getGametype());
    8585        }
    8686        else
  • code/trunk/src/modules/dodgerace/DodgeRaceShip.cc

    r10236 r10624  
    3333
    3434#include "DodgeRaceShip.h"
     35#include "core/CoreIncludes.h"
    3536
    3637namespace orxonox
     
    8990
    9091        // Camera
    91         WeakPtr<Camera> camera = this->getCamera();
     92        Camera* camera = this->getCamera();
    9293        if (camera != NULL)
    9394        {
     
    149150    }
    150151
    151     WeakPtr<DodgeRace> DodgeRaceShip::getGame()
     152    DodgeRace* DodgeRaceShip::getGame()
    152153    {
    153154        if (game == NULL)
  • code/trunk/src/modules/dodgerace/DodgeRaceShip.h

    r10284 r10624  
    3838#include "dodgerace/DodgeRacePrereqs.h"
    3939
    40 #include "core/CoreIncludes.h"
    4140#include "core/XMLPort.h"
    4241#include "worldentities/pawns/SpaceShip.h"
     
    7978        private:
    8079            virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
    81             WeakPtr<DodgeRace> getGame();
     80            DodgeRace* getGame();
    8281            WeakPtr<DodgeRace> game;
    8382            WeakPtr<WorldEntity> lastEntity;
  • code/trunk/src/modules/gametypes/CMakeLists.txt

    r9526 r10624  
    1010
    1111ORXONOX_ADD_LIBRARY(gametypes
    12   MODULE
     12  PLUGIN
    1313  FIND_HEADER_FILES
    1414  TOLUA_FILES
  • code/trunk/src/modules/gametypes/OldRaceCheckPoint.cc

    r9667 r10624  
    6161        SUPER(OldRaceCheckPoint, tick, dt);
    6262
    63         OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype().get());
     63        OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
    6464        assert(gametype);
    6565        if (this->getCheckpointIndex() == gametype->getCheckpointsReached())
     
    8282        DistanceTrigger::triggered(bIsTriggered);
    8383
    84         OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype().get());
     84        OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
    8585        if (gametype && this->getCheckpointIndex() == gametype->getCheckpointsReached() && bIsTriggered)
    8686        {
     
    107107        if (this->bTimeLimit_ != 0)
    108108        {
    109             OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype().get());
     109            OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
    110110            if (gametype)
    111111            {
  • code/trunk/src/modules/gametypes/SpaceRaceManager.cc

    r9667 r10624  
    4646    {
    4747        RegisterObject(SpaceRaceManager);
    48         this->race_ = orxonox_cast<SpaceRace*>(this->getGametype().get());
     48        this->race_ = orxonox_cast<SpaceRace*>(this->getGametype());
    4949        assert(race_);
    5050        //amountOfPlayers=(race_->getPlayers()).size();
     
    139139    void SpaceRaceManager::checkpointReached(RaceCheckPoint* newCheckpoint, PlayerInfo* player)
    140140    {
    141         SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
     141        SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype());
    142142        assert(gametype);
    143143        if (!gametype)
  • code/trunk/src/modules/invader/CMakeLists.txt

    r9958 r10624  
    1313
    1414ORXONOX_ADD_LIBRARY(invader
    15   MODULE
     15  PLUGIN
    1616  FIND_HEADER_FILES
    1717  LINK_LIBRARIES
  • code/trunk/src/modules/invader/Invader.cc

    r9961 r10624  
    6262        this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
    6363        this->center_ = 0;
    64         init();
    65         this->setHUDTemplate("InvaderHUD");
    66     }
    67 
    68     void Invader::init()
    69     {
    7064        bEndGame = false;
    7165        lives = 3;
     
    7872        enemySpawnTimer.setTimer(3.5f, true, createExecutor(createFunctor(&Invader::spawnEnemy, this)));
    7973        comboTimer.setTimer(3.0f, true, createExecutor(createFunctor(&Invader::comboControll, this)));
     74        this->setHUDTemplate("InvaderHUD");
    8075    }
    8176
     
    8782            for (int i = 0; i < 7; i++)
    8883            {
    89                 WeakPtr<BigExplosion> chunk = new BigExplosion(this->center_->getContext());
     84                BigExplosion* chunk = new BigExplosion(this->center_->getContext());
    9085                chunk->setPosition(Vector3(600, 0, 100.f * i - 300));
    9186                chunk->setVelocity(Vector3(1000, 0, 0));  //player->getVelocity()
     
    9994    }
    10095
    101     WeakPtr<InvaderShip> Invader::getPlayer()
     96    InvaderShip* Invader::getPlayer()
    10297    {
    10398        if (player == NULL)
     
    116111        for (int i = 0; i < (3*log10(static_cast<double>(level)) + 1); i++)
    117112        {
    118             WeakPtr<InvaderEnemy> newPawn;
     113            InvaderEnemy* newPawn;
    119114            if (rand() % 42/(1 + level*level) == 0)
    120115            {
     
    155150    void Invader::start()
    156151    {
    157         init();
    158152        // Set variable to temporarily force the player to spawn.
    159153        this->bForceSpawn_ = true;
  • code/trunk/src/modules/invader/Invader.h

    r9943 r10624  
    7171            // checks if multiplier should be reset.
    7272            void comboControll();
    73             void init();
    7473            int lives;
    7574            int multiplier;
     
    7877        private:
    7978            void toggleShowLevel(){bShowLevel = !bShowLevel;}
    80             WeakPtr<InvaderShip> getPlayer();
     79            InvaderShip* getPlayer();
    8180            WeakPtr<InvaderCenterPoint> center_;
    8281            WeakPtr<InvaderShip> player;
  • code/trunk/src/modules/invader/InvaderCenterPoint.cc

    r9943 r10624  
    5454    }
    5555
    56     void InvaderCenterPoint::changedGametype()
    57     {
    58         SUPER(InvaderCenterPoint, changedGametype);
    59 
    60         // Check, whether it's still Invader.
    61         this->checkGametype();
    62     }
    63 
    6456    void InvaderCenterPoint::checkGametype()
    6557    {
    6658        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Invader)))
    6759        {
    68             Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype().get());
     60            Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype());
    6961            InvaderGametype->setCenterpoint(this);
    7062        }
  • code/trunk/src/modules/invader/InvaderCenterPoint.h

    r9943 r10624  
    4949            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5050
    51             virtual void changedGametype(); //!< Is called when the gametype has changed.
    5251        private:
    5352            void checkGametype();
  • code/trunk/src/modules/invader/InvaderEnemy.cc

    r9961 r10624  
    6969    }
    7070
    71     WeakPtr<Invader> InvaderEnemy::getGame()
     71    Invader* InvaderEnemy::getGame()
    7272    {
    7373        if (game == NULL)
  • code/trunk/src/modules/invader/InvaderEnemy.h

    r9943 r10624  
    4949            virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
    5050            virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator);
    51             virtual void setPlayer(WeakPtr<InvaderShip> player){this->player = player;}
     51            virtual void setPlayer(InvaderShip* player){this->player = player;}
    5252
    5353            int level;
    5454        protected:
    55             WeakPtr<Invader> getGame();
     55            Invader* getGame();
    5656            WeakPtr<Invader> game;
    5757            WeakPtr<InvaderShip> player;
  • code/trunk/src/modules/invader/InvaderHUDinfo.cc

    r9961 r10624  
    128128        if (this->getOwner() && this->getOwner()->getGametype())
    129129        {
    130             this->InvaderGame = orxonox_cast<Invader*>(this->getOwner()->getGametype().get());
     130            this->InvaderGame = orxonox_cast<Invader*>(this->getOwner()->getGametype());
    131131        }
    132132        else
  • code/trunk/src/modules/invader/InvaderShip.cc

    r9943 r10624  
    9191
    9292        // Camera
    93         WeakPtr<Camera> camera = this->getCamera();
     93        Camera* camera = this->getCamera();
    9494        if (camera != NULL)
    9595        {
     
    142142    {
    143143        // orxout() << "touch!!! " << endl; //<< otherObject << " at " << contactPoint;
    144         WeakPtr<InvaderEnemy> enemy = orxonox_cast<InvaderEnemy*>(otherObject);
    145         WeakPtr<Projectile> shot = orxonox_cast<Projectile*>(otherObject);
     144        InvaderEnemy* enemy = orxonox_cast<InvaderEnemy*>(otherObject);
     145        Projectile* shot = orxonox_cast<Projectile*>(otherObject);
    146146        // ensure that this gets only called once per enemy.
    147147        if (enemy != NULL && lastEnemy != enemy)
     
    171171    }
    172172
    173     WeakPtr<Invader> InvaderShip::getGame()
     173    Invader* InvaderShip::getGame()
    174174    {
    175175        if (game == NULL)
  • code/trunk/src/modules/invader/InvaderShip.h

    r9943 r10624  
    7070            virtual void death();
    7171        private:
    72             WeakPtr<Invader> getGame();
     72            Invader* getGame();
    7373            WeakPtr<Invader> game;
    7474            Camera* camera;
  • code/trunk/src/modules/invader/InvaderWeapon.cc

    r10216 r10624  
    6868        // Create the projectile.projectile
    6969        projectile = new Projectile(this->getContext());
    70         WeakPtr<Model> model = new Model(projectile->getContext());
     70        Model* model = new Model(projectile->getContext());
    7171        model->setMeshSource(mesh_);
    7272        model->setCastShadows(false);
  • code/trunk/src/modules/jump/CMakeLists.txt

    r10284 r10624  
    2424
    2525ORXONOX_ADD_LIBRARY(jump
    26   MODULE
     26  PLUGIN
    2727  FIND_HEADER_FILES
    2828  LINK_LIBRARIES
  • code/trunk/src/modules/jump/JumpCenterpoint.cc

    r10262 r10624  
    8080    }
    8181
    82     void JumpCenterpoint::changedGametype()
    83     {
    84         SUPER(JumpCenterpoint, changedGametype);
    85 
    86         checkGametype();
    87     }
    88 
    8982    void JumpCenterpoint::checkGametype()
    9083    {
    9184        if (getGametype() != NULL && this->getGametype()->isA(Class(Jump)))
    9285        {
    93             Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype().get());
     86            Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype());
    9487            jumpGametype->setCenterpoint(this);
    9588        }
  • code/trunk/src/modules/jump/JumpCenterpoint.h

    r10262 r10624  
    114114            virtual ~JumpCenterpoint() {}
    115115            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a JumpCenterpoint through XML.
    116             virtual void changedGametype();
    117116            void setPlatformStaticTemplate(const std::string& balltemplate)
    118117                { this->platformStaticTemplate_ = balltemplate; }
  • code/trunk/src/modules/jump/JumpEnemy.cc

    r10262 r10624  
    151151        An array (of size 2) of weak pointers, to be set as the new bats.
    152152    */
    153     void JumpEnemy::setFigure(WeakPtr<JumpFigure> newFigure)
     153    void JumpEnemy::setFigure(JumpFigure* newFigure)
    154154    {
    155155        figure_ = newFigure;
  • code/trunk/src/modules/jump/JumpEnemy.h

    r10262 r10624  
    6868
    6969            virtual void setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed);
    70             void setFigure(WeakPtr<JumpFigure> bats);
     70            void setFigure(JumpFigure* newFigure);
    7171            virtual void touchFigure();
    7272            bool dead_;
  • code/trunk/src/modules/jump/JumpItem.cc

    r10262 r10624  
    109109    }
    110110
    111     void JumpItem::setFigure(WeakPtr<JumpFigure> newFigure)
     111    void JumpItem::setFigure(JumpFigure* newFigure)
    112112    {
    113113        figure_ = newFigure;
  • code/trunk/src/modules/jump/JumpItem.h

    r10262 r10624  
    5353            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5454            virtual void setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed);
    55             virtual void setFigure(WeakPtr<JumpFigure> bats);
     55            virtual void setFigure(JumpFigure* newFigure);
    5656            virtual void touchFigure();
    5757
  • code/trunk/src/modules/jump/JumpPlatform.cc

    r10262 r10624  
    125125    }
    126126
    127     void JumpPlatform::setFigure(WeakPtr<JumpFigure> newFigure)
     127    void JumpPlatform::setFigure(JumpFigure* newFigure)
    128128    {
    129129        figure_ = newFigure;
  • code/trunk/src/modules/jump/JumpPlatform.h

    r10262 r10624  
    4949            virtual void tick(float dt);
    5050            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    51             void setFigure(WeakPtr<JumpFigure> bats); //!< Set the bats for the ball.
     51            void setFigure(JumpFigure* newFigure);
    5252            virtual void touchFigure();
    5353
  • code/trunk/src/modules/jump/JumpProjectile.cc

    r10262 r10624  
    8484    }
    8585
    86     void JumpProjectile::setFigure(WeakPtr<JumpFigure> figure)
     86    void JumpProjectile::setFigure(JumpFigure* figure)
    8787    {
    8888        figure_ = figure;
  • code/trunk/src/modules/jump/JumpProjectile.h

    r10262 r10624  
    5656                { return Vector2(this->fieldWidth_, this->fieldHeight_); }
    5757
    58             void setFigure(WeakPtr<JumpFigure> figure);
     58            void setFigure(JumpFigure* figure);
    5959
    6060        protected:
  • code/trunk/src/modules/jump/JumpScore.cc

    r10437 r10624  
    118118        if (this->getOwner() != NULL && this->getOwner()->getGametype())
    119119        {
    120             this->owner_ = orxonox_cast<Jump*>(this->getOwner()->getGametype().get());
     120            this->owner_ = orxonox_cast<Jump*>(this->getOwner()->getGametype());
    121121        }
    122122        else
  • code/trunk/src/modules/mini4dgame/CMakeLists.txt

    r10284 r10624  
    66
    77ORXONOX_ADD_LIBRARY(mini4dgame
    8   MODULE
     8  PLUGIN
    99  FIND_HEADER_FILES
    1010  LINK_LIBRARIES
  • code/trunk/src/modules/mini4dgame/Mini4Dgame.cc

    r10230 r10624  
    4545#include "core/config/ConfigValueIncludes.h"
    4646#include "infos/PlayerInfo.h"
    47 #include "core/command/ConsoleCommand.h"
     47#include "core/command/ConsoleCommandIncludes.h"
    4848
    4949#include "gamestates/GSLevel.h"
  • code/trunk/src/modules/mini4dgame/Mini4DgameBoard.cc

    r10230 r10624  
    901901    /**
    902902    @brief
    903         Is called when the gametype has changed.
    904     */
    905     void Mini4DgameBoard::changedGametype()
    906     {
    907         SUPER(Mini4DgameBoard, changedGametype);
    908 
    909         // Check, whether it's still Mini4Dgame.
    910         this->checkGametype();
    911     }
    912 
    913     /**
    914     @brief
    915903        Checks whether the gametype is Mini4Dgame and if it is, sets its centerpoint.
    916904    */
     
    919907        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Mini4Dgame)))
    920908        {
    921             Mini4Dgame* Mini4DgameGametype = orxonox_cast<Mini4Dgame*>(this->getGametype().get());
     909            Mini4Dgame* Mini4DgameGametype = orxonox_cast<Mini4Dgame*>(this->getGametype());
    922910            Mini4DgameGametype->setGameboard(this);
    923911        }
  • code/trunk/src/modules/mini4dgame/Mini4DgameBoard.h

    r10230 r10624  
    8181            Mini4DgameWinner getWinner();
    8282
    83             void changedGametype();
    8483            void checkGametype();
    8584
  • code/trunk/src/modules/notifications/NotificationDispatcher.cc

    r9667 r10624  
    3737#include "core/EventIncludes.h"
    3838#include "core/XMLPort.h"
    39 #include "network/NetworkFunction.h"
     39#include "network/NetworkFunctionIncludes.h"
    4040#include "network/Host.h"
    4141
     
    118118        if(!GameMode::isStandalone())
    119119        {
    120             callMemberNetworkFunction(NotificationDispatcher, broadcastHelper, this->getObjectID(), NETWORK_PEER_ID_BROADCAST);
     120            callMemberNetworkFunction(&NotificationDispatcher::broadcastHelper, this->getObjectID(), NETWORK_PEER_ID_BROADCAST);
    121121        }
    122122    }
     
    148148        else if(GameMode::isServer())
    149149        {
    150             callMemberNetworkFunction(NotificationDispatcher, dispatch, this->getObjectID(), clientId, clientId);
     150            callMemberNetworkFunction(&NotificationDispatcher::dispatch, this->getObjectID(), clientId, clientId);
    151151        }
    152152    }
  • code/trunk/src/modules/notifications/NotificationManager.cc

    r9667 r10624  
    3737#include "core/CoreIncludes.h"
    3838#include "core/LuaState.h"
    39 #include "util/ScopedSingletonManager.h"
     39#include "core/singleton/ScopedSingletonIncludes.h"
    4040
    4141#include "interfaces/NotificationListener.h"
     
    4747{
    4848
    49     ManageScopedSingleton(NotificationManager, ScopeID::Root, false);
     49    ManageScopedSingleton(NotificationManager, ScopeID::ROOT, false);
     50
     51    RegisterAbstractClass(NotificationManager).inheritsFrom<NotificationListener>();
    5052
    5153    /**
  • code/trunk/src/modules/objects/Planet.cc

    r9675 r10624  
    8585
    8686        SUPER(Planet, tick, dt);
    87     }
    88 
    89     void Planet::init()
    90     {
    9187    }
    9288
  • code/trunk/src/modules/objects/Planet.h

    r9667 r10624  
    5252            virtual ~Planet();
    5353
    54             void init();
    5554            virtual void tick(float dt);
    5655
  • code/trunk/src/modules/objects/Script.cc

    r9667 r10624  
    3737#include "core/XMLPort.h"
    3838#include "network/Host.h"
    39 #include "network/NetworkFunction.h"
     39#include "network/NetworkFunctionIncludes.h"
    4040
    4141#include "PlayerManager.h"
     
    198198                for(std::map<unsigned int, PlayerInfo*>::const_iterator it = clients.begin(); it != clients.end(); it++)
    199199                {
    200                     callStaticNetworkFunction(Script::executeHelper, it->first, this->getCode(), this->getMode(), this->getNeedsGraphics());
     200                    callStaticNetworkFunction(&Script::executeHelper, it->first, this->getCode(), this->getMode(), this->getNeedsGraphics());
    201201                    if(this->times_ != Script::INF) // Decrement the number of remaining executions.
    202202                    {
     
    210210            else
    211211            {
    212                 callStaticNetworkFunction(Script::executeHelper, clientId, this->getCode(), this->getMode(), this->getNeedsGraphics());
     212                callStaticNetworkFunction(&Script::executeHelper, clientId, this->getCode(), this->getMode(), this->getNeedsGraphics());
    213213                if(this->times_ != Script::INF) // Decrement the number of remaining executions.
    214214                    this->remainingExecutions_--;
     
    248248        if(GameMode::isServer() && this->isOnLoad())
    249249        {
    250             callStaticNetworkFunction(Script::executeHelper, clientId, this->getCode(), this->getMode(), this->getNeedsGraphics());
     250            callStaticNetworkFunction(&Script::executeHelper, clientId, this->getCode(), this->getMode(), this->getNeedsGraphics());
    251251        }
    252252    }
  • code/trunk/src/modules/objects/SpaceBoundaries.cc

    r9941 r10624  
    210210        for( std::list<WeakPtr<Pawn> >::iterator current = pawnsIn_.begin(); current != pawnsIn_.end(); current++ )
    211211        {
    212             Pawn* currentPawn = current->get();
     212            Pawn* currentPawn = *current;
    213213            if( currentPawn && currentPawn->getNode() )
    214214            {
  • code/trunk/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.cc

    r10189 r10624  
    4040namespace orxonox
    4141{
    42     RegisterAbstractClass(AbstractRadiusHeightCollisionShape).inheritsFrom(Class(CollisionShape));
     42    RegisterAbstractClass(AbstractRadiusHeightCollisionShape).inheritsFrom<CollisionShape>();
    4343
    4444    /**
  • code/trunk/src/modules/objects/collisionshapes/BoxCollisionShape.cc

    r9667 r10624  
    5858    }
    5959
    60     BoxCollisionShape::~BoxCollisionShape()
    61     {
    62         // TODO: Move to CollisionShape?
    63         if (this->isInitialized())
    64             delete this->collisionShape_;
    65     }
    66 
    6760    void BoxCollisionShape::registerVariables()
    6861    {
  • code/trunk/src/modules/objects/collisionshapes/BoxCollisionShape.h

    r9667 r10624  
    5858        public:
    5959            BoxCollisionShape(Context* context);
    60             virtual ~BoxCollisionShape();
    6160
    6261            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
  • code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.cc

    r10189 r10624  
    5454    }
    5555
    56     ConeCollisionShape::~ConeCollisionShape()
    57     {
    58         if (this->isInitialized())
    59             delete this->collisionShape_;
    60     }
    61 
    6256    /**
    6357    @brief
  • code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.h

    r10189 r10624  
    5656        public:
    5757            ConeCollisionShape(Context* context);
    58             virtual ~ConeCollisionShape();
    5958
    6059        private:
  • code/trunk/src/modules/objects/collisionshapes/CylinderCollisionShape.cc

    r10262 r10624  
    5454    }
    5555
    56     CylinderCollisionShape::~CylinderCollisionShape()
    57     {
    58         if (this->isInitialized())
    59             delete this->collisionShape_;
    60     }
    61 
    6256    /**
    6357    @brief
  • code/trunk/src/modules/objects/collisionshapes/CylinderCollisionShape.h

    r10262 r10624  
    5353        public:
    5454            CylinderCollisionShape(Context* context);
    55             virtual ~CylinderCollisionShape();
    5655
    5756        private:
  • code/trunk/src/modules/objects/collisionshapes/PlaneCollisionShape.cc

    r9667 r10624  
    5959    }
    6060
    61     PlaneCollisionShape::~PlaneCollisionShape()
    62     {
    63         if (this->isInitialized())
    64             delete this->collisionShape_;
    65     }
    66 
    6761    void PlaneCollisionShape::registerVariables()
    6862    {
  • code/trunk/src/modules/objects/collisionshapes/PlaneCollisionShape.h

    r9667 r10624  
    5858        public:
    5959            PlaneCollisionShape(Context* context);
    60             virtual ~PlaneCollisionShape();
    6160
    6261            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
  • code/trunk/src/modules/objects/collisionshapes/SphereCollisionShape.cc

    r9667 r10624  
    5858    }
    5959
    60     SphereCollisionShape::~SphereCollisionShape()
    61     {
    62         if (this->isInitialized())
    63             delete this->collisionShape_;
    64     }
    65 
    6660    void SphereCollisionShape::registerVariables()
    6761    {
  • code/trunk/src/modules/objects/collisionshapes/SphereCollisionShape.h

    r9667 r10624  
    5656        public:
    5757            SphereCollisionShape(Context* context);
    58             virtual ~SphereCollisionShape();
    5958
    6059            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
  • code/trunk/src/modules/objects/triggers/CheckPoint.cc

    r9667 r10624  
    9393        DistanceTrigger::triggered(bIsTriggered);
    9494
    95         Asteroids* gametype = orxonox_cast<Asteroids*>(this->getGametype().get());
     95        Asteroids* gametype = orxonox_cast<Asteroids*>(this->getGametype());
    9696        if (gametype)
    9797        {
  • code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.cc

    r9667 r10624  
    100100
    101101        // Check for objects that were in range but no longer are. Iterate through all objects, that are in range.
    102         for(std::map<WorldEntity*, WeakPtr<WorldEntity>* >::iterator it = this->range_.begin(); it != this->range_.end(); )
     102        for(std::set<WeakPtr<WorldEntity> >::iterator it = this->range_.begin(); it != this->range_.end(); )
    103103        {
    104             WorldEntity* entity = it->second->get();
    105             WorldEntity* key = it->first;
    106             it++; // Incrementing the iterator in advance, since we don't need the current anymore and we potentially are going to delete the current element thus invalidating the iterator.
     104            WorldEntity* entity = *it;
     105
    107106            // If the entity no longer exists.
    108107            if(entity == NULL)
    109108            {
    110                 this->removeFromRange(key);
     109                this->range_.erase(it++);
    111110                continue;
    112111            }
     
    116115            if (distanceVec.length() > this->distance_)
    117116            {
    118                 // If for some reason the entity could not be removed.
    119                 if(!this->removeFromRange(key))
    120                     continue;
     117                this->range_.erase(it++);
    121118
    122119                // If no queue has been created, yet.
     
    129126                state->originator = entity;
    130127                queue->push(state);
     128            }
     129            else
     130            {
     131                ++it;
    131132            }
    132133        }
     
    260261    bool DistanceMultiTrigger::addToRange(WorldEntity* entity)
    261262    {
    262         WeakPtr<WorldEntity>* weakptr = new WeakPtr<WorldEntity>(entity);
    263         std::pair<std::map<WorldEntity*, WeakPtr<WorldEntity>* >::iterator, bool> pair = this->range_.insert(std::pair<WorldEntity*, WeakPtr<WorldEntity>* >(entity, weakptr));
    264 
    265         if(!pair.second)
    266         {
    267             delete weakptr;
    268             return false;
    269         }
    270 
    271         return true;
    272     }
    273 
    274     /**
    275     @brief
    276         Remove a given entity from the set of entities, that currently are in range of the DistanceMultiTrigger.
    277     @param entity
    278         A pointer ot the entity.
    279     @return
    280         Returns true if successful.
    281     */
    282     bool DistanceMultiTrigger::removeFromRange(WorldEntity* entity)
    283     {
    284         WeakPtr<WorldEntity>* weakptr = this->range_.find(entity)->second;
    285         bool erased = this->range_.erase(entity) > 0;
    286         if(erased)
    287             delete weakptr;
    288         return erased;
    289     }
    290 
     263        std::pair<std::set<WeakPtr<WorldEntity> >::iterator, bool> pair = this->range_.insert(entity);
     264        return pair.second;
     265    }
    291266}
  • code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.h

    r9667 r10624  
    140140
    141141            bool addToRange(WorldEntity* entity); // Add a given entity to the entities, that currently are in range of the DistanceMultiTrigger.
    142             bool removeFromRange(WorldEntity* entity); // Remove a given entity from the set of entities, that currently are in range of the DistanceMultiTrigger.
    143142
    144143        private:
     
    154153            ClassTreeMask beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons.
    155154
    156             std::map<WorldEntity*, WeakPtr<WorldEntity>* > range_; //!< The set of entities that currently are in range of the DistanceMultiTrigger.
     155            std::set<WeakPtr<WorldEntity> > range_; //!< The set of entities that currently are in range of the DistanceMultiTrigger.
    157156
    158157    };
  • code/trunk/src/modules/objects/triggers/DistanceTrigger.cc

    r9667 r10624  
    147147    {
    148148        // Check whether there is a cached object, it still exists and whether it is still in range, if so nothing further needs to be done.
    149         if(this->cache_.get() != NULL)
    150         {
    151             if((this->cache_.get()->getWorldPosition() - this->getWorldPosition()).length() < this->distance_)
     149        if(this->cache_ != NULL)
     150        {
     151            if((this->cache_->getWorldPosition() - this->getWorldPosition()).length() < this->distance_)
    152152                return true;
    153153            else
     
    213213               
    214214                // Add the entity to the cache.
    215                 this->cache_ = WeakPtr<WorldEntity>(entity);
     215                this->cache_ = entity;
    216216
    217217                return true;
  • code/trunk/src/modules/objects/triggers/Trigger.cc

    r9667 r10624  
    3838#include "core/GameMode.h"
    3939#include "core/XMLPort.h"
    40 #include "core/command/ConsoleCommand.h"
     40#include "core/command/ConsoleCommandIncludes.h"
    4141
    4242#include "Scene.h"
  • code/trunk/src/modules/overlays/hud/HUDHealthBar.h

    r9667 r10624  
    115115        private:
    116116            WeakPtr<Pawn> owner_;
    117             SmartPtr<OverlayText> textoverlay_;
     117            StrongPtr<OverlayText> textoverlay_;
    118118            bool bUseBarColour_;
    119119            ColourValue textColour_;
  • code/trunk/src/modules/overlays/hud/HUDNavigation.cc

    r10294 r10624  
    4141#include "util/Math.h"
    4242#include "util/Convert.h"
    43 #include "core/command/ConsoleCommand.h"
     43#include "core/command/ConsoleCommandIncludes.h"
    4444#include "core/CoreIncludes.h"
    4545#include "core/XMLPort.h"
  • code/trunk/src/modules/overlays/hud/LastManStandingInfos.cc

    r9667 r10624  
    8787        {
    8888            this->player_ = orxonox_cast<PlayerInfo*>(this->getOwner());
    89             this->lms_ = orxonox_cast<LastManStanding*>(this->getOwner()->getGametype().get());
     89            this->lms_ = orxonox_cast<LastManStanding*>(this->getOwner()->getGametype());
    9090        }
    9191        else
  • code/trunk/src/modules/overlays/hud/LastTeamStandingInfos.cc

    r9667 r10624  
    8787        {
    8888            this->player_ = orxonox_cast<PlayerInfo*>(this->getOwner());
    89             this->lts_ = orxonox_cast<LastTeamStanding*>(this->getOwner()->getGametype().get());
     89            this->lts_ = orxonox_cast<LastTeamStanding*>(this->getOwner()->getGametype());
    9090        }
    9191        else
  • code/trunk/src/modules/overlays/hud/TeamBaseMatchScore.cc

    r9667 r10624  
    118118
    119119        if (this->getOwner() && this->getOwner()->getGametype())
    120             this->owner_ = orxonox_cast<TeamBaseMatch*>(this->getOwner()->getGametype().get());
     120            this->owner_ = orxonox_cast<TeamBaseMatch*>(this->getOwner()->getGametype());
    121121        else
    122122            this->owner_ = 0;
  • code/trunk/src/modules/pickup/CollectiblePickup.cc

    r9667 r10624  
    4040namespace orxonox
    4141{
    42     RegisterAbstractClass(CollectiblePickup).inheritsFrom(Class(Pickupable));
     42    RegisterAbstractClass(CollectiblePickup).inheritsFrom<Pickupable>();
    4343
    4444    /**
  • code/trunk/src/modules/pickup/PickupManager.cc

    r9667 r10624  
    3838#include "core/GUIManager.h"
    3939#include "core/class/Identifier.h"
     40#include "core/singleton/ScopedSingletonIncludes.h"
    4041#include "network/Host.h"
    41 #include "network/NetworkFunction.h"
    42 #include "util/ScopedSingletonManager.h"
     42#include "network/NetworkFunctionIncludes.h"
    4343
    4444#include "infos/PlayerInfo.h"
     
    5151namespace orxonox
    5252{
    53     ManageScopedSingleton(PickupManager, ScopeID::Root, false);
     53    ManageScopedSingleton(PickupManager, ScopeID::ROOT, false);
    5454
    5555    // Initialization of the name of the PickupInventory GUI.
     
    6262    registerStaticNetworkFunction(PickupManager::usePickupNetworked);
    6363
     64    RegisterAbstractClass(PickupManager).inheritsFrom<PickupListener>();
     65
    6466    /**
    6567    @brief
     
    9496
    9597        // Destroying all the WeakPointers that are still there.
    96         for(std::map<uint32_t, WeakPtr<Pickupable>*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
    97             delete it->second;
    9898        this->pickups_.clear();
    9999
     
    212212        else
    213213        {
    214             callStaticNetworkFunction(PickupManager::pickupChangedUsedNetwork, clientId, index, used, pickup->isUsable(), pickup->isUnusable());
     214            callStaticNetworkFunction(&PickupManager::pickupChangedUsedNetwork, clientId, index, used, pickup->isUsable(), pickup->isUnusable());
    215215        }
    216216    }
     
    286286            // Add the Pickupable to the indexes_ and pickups_ lists.
    287287            this->indexes_[pickup] = index;
    288             this->pickups_[index] = new WeakPtr<Pickupable>(pickup);
     288            this->pickups_[index] = pickup;
    289289        }
    290290        else // If it was dropped, it is removed from the required lists.
     
    294294            index = it->second;
    295295
    296             // Remove the Pickupable form the indexes_ and pickups_ list.
    297             WeakPtr<Pickupable>* ptr = this->pickups_[index];
     296            // Remove the Pickupable from the indexes_ and pickups_ list.
    298297            this->indexes_.erase(it);
    299298            this->pickups_.erase(index);
    300             delete ptr;
    301299        }
    302300
     
    316314            if(this->representations_.find(pickup->getRepresentationName()) == this->representations_.end())
    317315            {
    318                 callStaticNetworkFunction(PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->defaultRepresentation_->getObjectID(), pickedUp);
     316                callStaticNetworkFunction(&PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->defaultRepresentation_->getObjectID(), pickedUp);
    319317            }
    320318            else
    321319            {
    322                 callStaticNetworkFunction(PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->representations_[pickup->getRepresentationName()]->getObjectID(), pickedUp);
     320                callStaticNetworkFunction(&PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->representations_[pickup->getRepresentationName()]->getObjectID(), pickedUp);
    323321            }
    324322        }
     
    400398            if(this->pickups_.empty())
    401399                return;
    402             Pickupable* pickupable = this->pickups_.find(pickup)->second->get();
     400            Pickupable* pickupable = this->pickups_.find(pickup)->second;
    403401            if(pickupable != NULL)
    404402                pickupable->drop();
     
    407405        else
    408406        {
    409             callStaticNetworkFunction(PickupManager::dropPickupNetworked, 0, pickup);
     407            callStaticNetworkFunction(&PickupManager::dropPickupNetworked, 0, pickup);
    410408        }
    411409    }
     
    443441            if(this->pickups_.empty())
    444442                return;
    445             Pickupable* pickupable = this->pickups_.find(pickup)->second->get();
     443            Pickupable* pickupable = this->pickups_.find(pickup)->second;
    446444            if(pickupable != NULL)
    447445                pickupable->setUsed(use);
     
    450448        else
    451449        {
    452             callStaticNetworkFunction(PickupManager::usePickupNetworked, 0, pickup, use);
     450            callStaticNetworkFunction(&PickupManager::usePickupNetworked, 0, pickup, use);
    453451        }
    454452    }
  • code/trunk/src/modules/pickup/PickupManager.h

    r9667 r10624  
    161161            std::map<uint32_t, PickupInventoryContainer*>::iterator pickupsIterator_; //!< An iterator pointing to the current Pickupable in pickupsList_.
    162162
    163             std::map<uint32_t, WeakPtr<Pickupable>*> pickups_; //!< Map linking a number identifying a Pickupable to a weak pointer of a Pickupable.
     163            std::map<uint32_t, WeakPtr<Pickupable> > pickups_; //!< Map linking a number identifying a Pickupable to a weak pointer of a Pickupable.
    164164            std::map<Pickupable*, uint32_t> indexes_;//!< Map linking Pickupable to the number identifying it.
    165165
  • code/trunk/src/modules/pickup/PickupSpawner.cc

    r9667 r10624  
    145145        if(GameMode::isMaster() && this->isActive())
    146146        {
    147             WeakPtr<PickupSpawner> spawner = this; // Create a smart pointer to keep the PickupSpawner alive until we iterated through all Pawns (in case a Pawn takes the last pickup)
     147            // TODO: why is this a WeakPtr when the comment says StrongPtr?
     148            WeakPtr<PickupSpawner> spawner = this; // Create a strong pointer to keep the PickupSpawner alive until we iterated through all Pawns (in case a Pawn takes the last pickup)
    148149
    149150            // Remove PickupCarriers from the blocked list if they have exceeded their time.
  • code/trunk/src/modules/pickup/items/ShrinkPickup.cc

    r9667 r10624  
    182182
    183183                // Iterate over all camera positions and inversely move the camera to create a shrinking sensation.
    184                 const std::list< SmartPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
     184                const std::list< StrongPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
    185185                int size = cameraPositions.size();
    186186                for(int index = 0; index < size; index++)
     
    208208
    209209                // Iterate over all camera positions and inversely move the camera to create a shrinking sensation.
    210                 const std::list< SmartPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
     210                const std::list< StrongPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
    211211                int size = cameraPositions.size();
    212212                for(int index = 0; index < size; index++)
     
    263263
    264264                // Iterate over all camera positions and inversely move the camera to create a shrinking sensation.
    265                 const std::list< SmartPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
     265                const std::list< StrongPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
    266266                int size = cameraPositions.size();
    267267                for(int index = 0; index < size; index++)
     
    304304
    305305                // Iterate over all camera positions and inversely move the camera to create a shrinking sensation.
    306                 const std::list< SmartPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
     306                const std::list< StrongPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
    307307                int size = cameraPositions.size();
    308308                for(int index = 0; index < size; index++)
  • code/trunk/src/modules/pong/CMakeLists.txt

    r8729 r10624  
    1212
    1313ORXONOX_ADD_LIBRARY(pong
    14   MODULE
     14  PLUGIN
    1515  FIND_HEADER_FILES
    1616  LINK_LIBRARIES
  • code/trunk/src/modules/pong/PongCenterpoint.cc

    r9667 r10624  
    8080    /**
    8181    @brief
    82         Is called when the gametype has changed.
    83     */
    84     void PongCenterpoint::changedGametype()
    85     {
    86         SUPER(PongCenterpoint, changedGametype);
    87 
    88         // Check, whether it's still Pong.
    89         this->checkGametype();
    90     }
    91 
    92     /**
    93     @brief
    9482        Checks whether the gametype is Pong and if it is, sets its centerpoint.
    9583    */
     
    9886        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Pong)))
    9987        {
    100             Pong* pongGametype = orxonox_cast<Pong*>(this->getGametype().get());
     88            Pong* pongGametype = orxonox_cast<Pong*>(this->getGametype());
    10189            pongGametype->setCenterpoint(this);
    10290        }
  • code/trunk/src/modules/pong/PongCenterpoint.h

    r9667 r10624  
    126126            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a PongCenterpoint through XML.
    127127
    128             virtual void changedGametype(); //!< Is called when the gametype has changed.
    129 
    130128            /**
    131129            @brief Set the template for the ball. (e.g. to attach the model of the ball, but also to attach an EventListener to it to detect, when it hits the boundaries, and e.g. display some ParticleEffets, when it does.)
  • code/trunk/src/modules/pong/PongScore.cc

    r9939 r10624  
    170170
    171171        if (this->getOwner() != NULL && this->getOwner()->getGametype())
    172             this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype().get());
     172            this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype());
    173173        else
    174174            this->owner_ = 0;
  • code/trunk/src/modules/questsystem/Quest.cc

    r9667 r10624  
    4545namespace orxonox
    4646{
    47     RegisterAbstractClass(Quest).inheritsFrom(Class(QuestItem));
     47    RegisterAbstractClass(Quest).inheritsFrom<QuestItem>();
    4848
    4949    /**
  • code/trunk/src/modules/questsystem/QuestEffect.cc

    r9667 r10624  
    3737namespace orxonox
    3838{
    39     RegisterAbstractClass(QuestEffect).inheritsFrom(Class(BaseObject));
     39    RegisterAbstractClass(QuestEffect).inheritsFrom<BaseObject>();
    4040
    4141    /**
  • code/trunk/src/modules/questsystem/QuestManager.cc

    r9667 r10624  
    3636#include "util/Exception.h"
    3737#include "util/OrxAssert.h"
    38 #include "util/ScopedSingletonManager.h"
     38#include "core/singleton/ScopedSingletonIncludes.h"
    3939#include "core/command/ConsoleCommand.h"
    4040#include "core/GUIManager.h"
     
    4949namespace orxonox
    5050{
    51     ManageScopedSingleton(QuestManager, ScopeID::Root, false);
     51    ManageScopedSingleton(QuestManager, ScopeID::ROOT, false);
    5252
    5353    /**
  • code/trunk/src/modules/questsystem/effects/ChangeQuestStatus.cc

    r9667 r10624  
    4242namespace orxonox
    4343{
    44     RegisterAbstractClass(ChangeQuestStatus).inheritsFrom(Class(QuestEffect));
     44    RegisterAbstractClass(ChangeQuestStatus).inheritsFrom<QuestEffect>();
    4545
    4646    /**
  • code/trunk/src/modules/tetris/CMakeLists.txt

    r9348 r10624  
    88
    99ORXONOX_ADD_LIBRARY(tetris
    10   MODULE
     10  PLUGIN
    1111  FIND_HEADER_FILES
    1212  LINK_LIBRARIES
  • code/trunk/src/modules/tetris/Tetris.cc

    r9834 r10624  
    104104        }
    105105
    106         for (std::list<SmartPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
     106        for (std::list<StrongPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
    107107            (*it)->destroy();
    108108        this->stones_.clear();
     
    136136            return false;
    137137
    138         for(std::list<SmartPtr<TetrisStone> >::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
     138        for(std::list<StrongPtr<TetrisStone> >::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
    139139        {
    140140            const Vector3& currentStonePosition = (*it)->getPosition(); //!< Saves the position of the currentStone
     
    192192
    193193        // check for collisions with all stones
    194         for(std::list<SmartPtr<TetrisStone> >::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
     194        for(std::list<StrongPtr<TetrisStone> >::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
    195195        {
    196196            //Vector3 currentStonePosition = rotateVector((*it)->getPosition(), this->activeBrick_->getRotationCount());
     
    469469        {
    470470            stonesPerRow = 0;
    471             for(std::list<SmartPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); )
    472             {
    473                 std::list<SmartPtr<TetrisStone> >::iterator it_temp = it++;
     471            for(std::list<StrongPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); )
     472            {
     473                std::list<StrongPtr<TetrisStone> >::iterator it_temp = it++;
    474474                correctPosition = static_cast<unsigned int>(((*it_temp)->getPosition().y - 5)/this->center_->getStoneSize());
    475475                if(correctPosition == row)
     
    491491    void Tetris::clearRow(unsigned int row)
    492492    {// clear the full row
    493         for(std::list<SmartPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); )
     493        for(std::list<StrongPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); )
    494494        {
    495495            if(static_cast<unsigned int>(((*it)->getPosition().y - 5)/this->center_->getStoneSize()) == row)
     
    502502        }
    503503      // adjust height of stones above the deleted row //TODO: check if this could be a source of a bug.
    504         for(std::list<SmartPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
     504        for(std::list<StrongPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
    505505        {
    506506            if(static_cast<unsigned int>(((*it)->getPosition().y - 5)/this->center_->getStoneSize()) > row)
  • code/trunk/src/modules/tetris/Tetris.h

    r10622 r10624  
    6969
    7070            PlayerInfo* getPlayer(void) const; //!< Get the player.
    71             WeakPtr<TetrisCenterpoint> getCenterpoint(void)
     71            TetrisCenterpoint* getCenterpoint(void)
    7272                { return this->center_; }
    7373
     
    9393
    9494            WeakPtr<TetrisCenterpoint> center_; //!< The playing field.
    95             std::list<SmartPtr<TetrisStone> > stones_; //!< A list of all stones in play.
     95            std::list<StrongPtr<TetrisStone> > stones_; //!< A list of all stones in play.
    9696            WeakPtr<TetrisBrick> activeBrick_;
    9797            WeakPtr<TetrisBrick> futureBrick_;
  • code/trunk/src/modules/tetris/TetrisBrick.cc

    r10262 r10624  
    169169        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
    170170        {
    171             Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype().get());
     171            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype());
    172172            return tetrisGametype;
    173173        }
  • code/trunk/src/modules/tetris/TetrisCenterpoint.cc

    r9667 r10624  
    8080    /**
    8181    @brief
    82         Is called when the gametype has changed.
    83     */
    84     void TetrisCenterpoint::changedGametype()
    85     {
    86         SUPER(TetrisCenterpoint, changedGametype);
    87 
    88         // Check, whether it's still Tetris.
    89         this->checkGametype();
    90     }
    91 
    92     /**
    93     @brief
    9482        Checks whether the gametype is Tetris and if it is, sets its centerpoint.
    9583    */
     
    9886        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
    9987        {
    100             Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype().get());
     88            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype());
    10189            tetrisGametype->setCenterpoint(this);
    10290        }
  • code/trunk/src/modules/tetris/TetrisCenterpoint.h

    r9667 r10624  
    6464            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a TetrisCenterpoint through XML.
    6565
    66             virtual void changedGametype(); //!< Is called when the gametype has changed.
    67            
    6866            /**
    6967            @brief Set the width of the playing field.
  • code/trunk/src/modules/tetris/TetrisScore.cc

    r10262 r10624  
    118118
    119119        if (this->getOwner() != NULL && this->getOwner()->getGametype())
    120             this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype().get());
     120            this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype());
    121121        else
    122122            this->owner_ = 0;
  • code/trunk/src/modules/towerdefense/CMakeLists.txt

    r10622 r10624  
    1111
    1212ORXONOX_ADD_LIBRARY(towerdefense
    13   MODULE
     13  PLUGIN
    1414  FIND_HEADER_FILES
    1515  LINK_LIBRARIES
  • code/trunk/src/modules/towerdefense/TDCoordinate.h

    r10622 r10624  
    22#define _TDCoordinate_H__
    33
    4 #include "core/CoreIncludes.h"
    54#include "TDCoordinate.h"
    65//#include "towerdefense/TowerDefense.h"
     
    1312//Class to save the Coordinates in a class instead of struct
    1413//Convert 2d coordinates to 3d in order to set waypoints
    15     class _TowerDefenseExport TDCoordinate : public OrxonoxClass
     14    class _TowerDefenseExport TDCoordinate
    1615    {
    1716        public:
  • code/trunk/src/modules/towerdefense/TowerDefense.cc

    r10622 r10624  
    8585#include "core/CoreIncludes.h"
    8686/* Part of a temporary hack to allow the player to add towers */
    87 #include "core/command/ConsoleCommand.h"
     87#include "core/command/ConsoleCommandIncludes.h"
    8888#include <cmath>
    8989
  • code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.cc

    r10622 r10624  
    8383    /**
    8484    @brief
    85         Is called when the gametype has changed.
    86     */
    87     void TowerDefenseCenterpoint::changedGametype()
    88     {
    89         SUPER(TowerDefenseCenterpoint, changedGametype);
    90 
    91         // Check, whether it's still TowerDefense.
    92         this->checkGametype();
    93     }
    94 
    95     /**
    96     @brief
    9785        Checks whether the gametype is TowerDefense and if it is, sets its centerpoint.
    9886    */
     
    10290        {
    10391            // Sets the centerpoint of the gametype. The gametype uses this to later spawn in towers, he needs the tower template stored in the center point
    104             TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype().get());
     92            TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype());
    10593            towerDefenseGametype->setCenterpoint(this);
    10694        }
  • code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.h

    r10622 r10624  
    5353
    5454            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    55             virtual void changedGametype();
    5655
    5756            /**
  • code/trunk/src/modules/towerdefense/TowerDefenseEnemy.cc

    r10622 r10624  
    2929        this->setCollisionType(WorldEntity::Dynamic);
    3030        //needed to keep track of the PlayerStats coded in TowerDefense.h
    31         this->td = orxonox_cast<TowerDefense*>(this->getGametype().get());
     31        this->td = orxonox_cast<TowerDefense*>(this->getGametype());
    3232        once_=false;
    3333
     
    5353    }
    5454
    55     WeakPtr<TowerDefense> TowerDefenseEnemy::getGame()
     55    TowerDefense* TowerDefenseEnemy::getGame()
    5656    {
    5757        if (game == NULL)
  • code/trunk/src/modules/towerdefense/TowerDefenseEnemy.h

    r10258 r10624  
    4747
    4848    private:
    49         WeakPtr<TowerDefense> getGame();
     49        TowerDefense* getGame();
    5050        WeakPtr<TowerDefense> game;
    5151        TowerDefense* td;
  • code/trunk/src/modules/towerdefense/TowerDefenseHUDController.cc

    r10258 r10624  
    8080            if (this->getOwner() && this->getOwner()->getGametype())
    8181                    {
    82                         this->td = orxonox_cast<TowerDefense*>(this->getOwner()->getGametype().get());
     82                        this->td = orxonox_cast<TowerDefense*>(this->getOwner()->getGametype());
    8383                    }
    8484                    else
  • code/trunk/src/modules/weapons/projectiles/ParticleProjectile.cc

    r9667 r10624  
    5454            this->particles_->setKeepParticlesInLocalSpace(0);
    5555
    56             this->particles_->getAllEmitters()->setDirection(-WorldEntity::FRONT);
     56            for (unsigned int i = 0; i < this->particles_->getNumEmitters(); ++i)
     57                this->particles_->getEmitter(i)->setDirection(-WorldEntity::FRONT);
    5758        }
    5859        else
Note: See TracChangeset for help on using the changeset viewer.