Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/dodgerace/DodgeRace.cc

    r11052 r11071  
    5959        comboTimer.setTimer(3.0f, true, createExecutor(createFunctor(&DodgeRace::comboControll, this)));
    6060        this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
    61         this->center_ = 0;
     61        this->center_ = nullptr;
    6262
    6363        this->setHUDTemplate("DodgeRaceHUD");
     
    6767    {
    6868        level++;
    69         if (getPlayer() != NULL)
     69        if (getPlayer() != nullptr)
    7070        {
    7171            for (int i = 0; i < 7; i++)
     
    8989    void DodgeRace::tick(float dt)
    9090    {
    91         if (getPlayer() != NULL)
     91        if (getPlayer() != nullptr)
    9292        {
    9393            currentPosition = getPlayer()->getWorldPosition().x;
     
    138138    DodgeRaceShip* DodgeRace::getPlayer()
    139139    {
    140         if (player == NULL)
    141         {
    142             for (ObjectList<DodgeRaceShip>::iterator it = ObjectList<DodgeRaceShip>::begin(); it != ObjectList<DodgeRaceShip>::end(); ++it)
    143             {
    144                 player = *it;
     140        if (player == nullptr)
     141        {
     142            for (DodgeRaceShip* ship : ObjectList<DodgeRaceShip>())
     143            {
     144                player = ship;
    145145            }
    146146        }
     
    177177        this->bForceSpawn_ = false;
    178178
    179         if (this->center_ == NULL)  // abandon mission!
     179        if (this->center_ == nullptr)  // abandon mission!
    180180        {
    181181            orxout(internal_error) << "DodgeRace: No Centerpoint specified." << endl;
  • code/trunk/src/modules/dodgerace/DodgeRace.h

    r11052 r11071  
    6868            DodgeRace(Context* context);
    6969
    70             virtual void start();
    71             virtual void end();
     70            virtual void start() override;
     71            virtual void end() override;
    7272
    73             virtual void tick(float dt);
     73            virtual void tick(float dt) override;
    7474
    75             virtual void playerPreSpawn(PlayerInfo* player);
     75            virtual void playerPreSpawn(PlayerInfo* player) override;
    7676
    7777            void levelUp();
     
    8484            void setCenterpoint(DodgeRaceCenterPoint* center)
    8585                       { this->center_ = center; }
    86             virtual void addBots(unsigned int amount){} //<! overwrite function in order to bypass the addbots command
     86            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
    8787
    8888            // checks if multiplier should be reset.
  • code/trunk/src/modules/dodgerace/DodgeRaceCenterPoint.cc

    r10624 r11071  
    4949    }
    5050
    51     void DodgeRaceCenterPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    52     {
    53         SUPER(DodgeRaceCenterPoint, XMLPort, xmlelement, mode);
    54     }
    55 
    5651    void DodgeRaceCenterPoint::checkGametype()
    5752    {
    58         if (this->getGametype() != NULL && this->getGametype()->isA(Class(DodgeRace)))
     53        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(DodgeRace)))
    5954        {
    6055            DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype());
  • code/trunk/src/modules/dodgerace/DodgeRaceCenterPoint.h

    r10624 r11071  
    5050            DodgeRaceCenterPoint(Context* context); //checks whether the gametype is actually DodgeRace.
    5151
    52             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    53 
    5452        private:
    5553            void checkGametype();
  • code/trunk/src/modules/dodgerace/DodgeRaceHUDinfo.cc

    r10624 r11071  
    4040        RegisterObject(DodgeRaceHUDinfo);
    4141
    42         this->DodgeRaceGame = 0;
     42        this->DodgeRaceGame = nullptr;
    4343        this->bShowPoints_ = true;
    4444    }
     
    8686        else
    8787        {
    88             this->DodgeRaceGame = 0;
     88            this->DodgeRaceGame = nullptr;
    8989        }
    9090    }
  • code/trunk/src/modules/dodgerace/DodgeRaceHUDinfo.h

    r10234 r11071  
    4444            DodgeRaceHUDinfo(Context* context);
    4545
    46             virtual void tick(float dt);
    47             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    48             virtual void changedOwner();
     46            virtual void tick(float dt) override;
     47            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     48            virtual void changedOwner() override;
    4949
    5050            inline void setShowPoints(bool value)
  • code/trunk/src/modules/dodgerace/DodgeRaceShip.cc

    r10624 r11071  
    9191        // Camera
    9292        Camera* camera = this->getCamera();
    93         if (camera != NULL)
     93        if (camera != nullptr)
    9494        {
    9595            // camera->setPosition(Vector3(-pos.z, -posforeward, 0));
     
    142142    }
    143143
    144     inline bool DodgeRaceShip::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
     144    inline bool DodgeRaceShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
    145145    {
    146146
     
    152152    DodgeRace* DodgeRaceShip::getGame()
    153153    {
    154         if (game == NULL)
     154        if (game == nullptr)
    155155        {
    156             for (ObjectList<DodgeRace>::iterator it = ObjectList<DodgeRace>::begin(); it != ObjectList<DodgeRace>::end(); ++it)
     156            for (DodgeRace* race : ObjectList<DodgeRace>())
    157157            {
    158                 game = *it;
     158                game = race;
    159159            }
    160160        }
  • code/trunk/src/modules/dodgerace/DodgeRaceShip.h

    r10624 r11071  
    5252            DodgeRaceShip(Context* context);
    5353
    54             virtual void tick(float dt);
     54            virtual void tick(float dt) override;
    5555
    5656            // overwrite for 2d movement
    57             virtual void moveFrontBack(const Vector2& value);
    58             virtual void moveRightLeft(const Vector2& value);
     57            virtual void moveFrontBack(const Vector2& value) override;
     58            virtual void moveRightLeft(const Vector2& value) override;
    5959
    6060            // Starts or stops fireing
    61             virtual void boost(bool bBoost);
     61            virtual void boost(bool bBoost) override;
    6262
    6363            //no rotation!
    64             virtual void rotateYaw(const Vector2& value){};
    65             virtual void rotatePitch(const Vector2& value){};
     64            virtual void rotateYaw(const Vector2& value) override{};
     65            virtual void rotatePitch(const Vector2& value) override{};
    6666
    6767            //return to main menu if game has ended.
    68             virtual void rotateRoll(const Vector2& value){if (getGame()) if (getGame()->bEndGame) getGame()->end();};
     68            virtual void rotateRoll(const Vector2& value) override{if (getGame()) if (getGame()->bEndGame) getGame()->end();};
    6969
    7070            virtual void updateLevel();
     71
     72            virtual inline bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
    7173
    7274            float speed, damping, posforeward;
     
    7476
    7577        protected:
    76             virtual void death();
     78            virtual void death() override;
    7779
    7880        private:
    79             virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
    8081            DodgeRace* getGame();
    8182            WeakPtr<DodgeRace> game;
Note: See TracChangeset for help on using the changeset viewer.