[Orxonox-commit 5913] r10572 - in code/branches/core7/src/modules: dodgerace invader jump mini4dgame pong tetris towerdefense

landauf at orxonox.net landauf at orxonox.net
Wed Sep 9 13:31:11 CEST 2015


Author: landauf
Date: 2015-09-09 13:31:11 +0200 (Wed, 09 Sep 2015)
New Revision: 10572

Modified:
   code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.cc
   code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.h
   code/branches/core7/src/modules/invader/InvaderCenterPoint.cc
   code/branches/core7/src/modules/invader/InvaderCenterPoint.h
   code/branches/core7/src/modules/jump/JumpCenterpoint.cc
   code/branches/core7/src/modules/jump/JumpCenterpoint.h
   code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.cc
   code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.h
   code/branches/core7/src/modules/pong/PongCenterpoint.cc
   code/branches/core7/src/modules/pong/PongCenterpoint.h
   code/branches/core7/src/modules/tetris/TetrisCenterpoint.cc
   code/branches/core7/src/modules/tetris/TetrisCenterpoint.h
   code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.cc
   code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.h
Log:
removed unnecessary code - setGametype or changedGametype is never called here

Modified: code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.cc
===================================================================
--- code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.cc	2015-09-09 11:31:11 UTC (rev 10572)
@@ -53,14 +53,6 @@
         SUPER(DodgeRaceCenterPoint, XMLPort, xmlelement, mode);
     }
 
-    void DodgeRaceCenterPoint::changedGametype()
-    {
-        SUPER(DodgeRaceCenterPoint, changedGametype);
-
-        // Check, whether it's still DodgeRace.
-        this->checkGametype();
-    }
-
     void DodgeRaceCenterPoint::checkGametype()
     {
         if (this->getGametype() != NULL && this->getGametype()->isA(Class(DodgeRace)))

Modified: code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.h
===================================================================
--- code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.h	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.h	2015-09-09 11:31:11 UTC (rev 10572)
@@ -51,7 +51,6 @@
 
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
 
-            virtual void changedGametype(); //!< Is called when the gametype has changed.
         private:
             void checkGametype();
 

Modified: code/branches/core7/src/modules/invader/InvaderCenterPoint.cc
===================================================================
--- code/branches/core7/src/modules/invader/InvaderCenterPoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/invader/InvaderCenterPoint.cc	2015-09-09 11:31:11 UTC (rev 10572)
@@ -53,14 +53,6 @@
         SUPER(InvaderCenterPoint, XMLPort, xmlelement, mode);
     }
 
-    void InvaderCenterPoint::changedGametype()
-    {
-        SUPER(InvaderCenterPoint, changedGametype);
-
-        // Check, whether it's still Invader.
-        this->checkGametype();
-    }
-
     void InvaderCenterPoint::checkGametype()
     {
         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Invader)))

Modified: code/branches/core7/src/modules/invader/InvaderCenterPoint.h
===================================================================
--- code/branches/core7/src/modules/invader/InvaderCenterPoint.h	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/invader/InvaderCenterPoint.h	2015-09-09 11:31:11 UTC (rev 10572)
@@ -48,7 +48,6 @@
 
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
 
-            virtual void changedGametype(); //!< Is called when the gametype has changed.
         private:
             void checkGametype();
 

Modified: code/branches/core7/src/modules/jump/JumpCenterpoint.cc
===================================================================
--- code/branches/core7/src/modules/jump/JumpCenterpoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/jump/JumpCenterpoint.cc	2015-09-09 11:31:11 UTC (rev 10572)
@@ -79,13 +79,6 @@
         XMLPortParam(JumpCenterpoint, "enemy4Template", setEnemy4Template, getEnemy4Template, xmlelement, mode);
     }
 
-    void JumpCenterpoint::changedGametype()
-    {
-        SUPER(JumpCenterpoint, changedGametype);
-
-        checkGametype();
-    }
-
     void JumpCenterpoint::checkGametype()
     {
         if (getGametype() != NULL && this->getGametype()->isA(Class(Jump)))

Modified: code/branches/core7/src/modules/jump/JumpCenterpoint.h
===================================================================
--- code/branches/core7/src/modules/jump/JumpCenterpoint.h	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/jump/JumpCenterpoint.h	2015-09-09 11:31:11 UTC (rev 10572)
@@ -113,7 +113,6 @@
             JumpCenterpoint(Context* context); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually Jump.
             virtual ~JumpCenterpoint() {}
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a JumpCenterpoint through XML.
-            virtual void changedGametype();
             void setPlatformStaticTemplate(const std::string& balltemplate)
                 { this->platformStaticTemplate_ = balltemplate; }
             const std::string& getPlatformStaticTemplate() const

Modified: code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.cc
===================================================================
--- code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.cc	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.cc	2015-09-09 11:31:11 UTC (rev 10572)
@@ -900,18 +900,6 @@
 
     /**
     @brief
-        Is called when the gametype has changed.
-    */
-    void Mini4DgameBoard::changedGametype()
-    {
-        SUPER(Mini4DgameBoard, changedGametype);
-
-        // Check, whether it's still Mini4Dgame.
-        this->checkGametype();
-    }
-
-    /**
-    @brief
         Checks whether the gametype is Mini4Dgame and if it is, sets its centerpoint.
     */
     void Mini4DgameBoard::checkGametype()

Modified: code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.h
===================================================================
--- code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.h	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.h	2015-09-09 11:31:11 UTC (rev 10572)
@@ -80,7 +80,6 @@
             void makeMove(const Mini4DgamePosition& move);
             Mini4DgameWinner getWinner();
 
-            void changedGametype();
             void checkGametype();
 
         private:

Modified: code/branches/core7/src/modules/pong/PongCenterpoint.cc
===================================================================
--- code/branches/core7/src/modules/pong/PongCenterpoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/pong/PongCenterpoint.cc	2015-09-09 11:31:11 UTC (rev 10572)
@@ -79,18 +79,6 @@
 
     /**
     @brief
-        Is called when the gametype has changed.
-    */
-    void PongCenterpoint::changedGametype()
-    {
-        SUPER(PongCenterpoint, changedGametype);
-
-        // Check, whether it's still Pong.
-        this->checkGametype();
-    }
-
-    /**
-    @brief
         Checks whether the gametype is Pong and if it is, sets its centerpoint.
     */
     void PongCenterpoint::checkGametype()

Modified: code/branches/core7/src/modules/pong/PongCenterpoint.h
===================================================================
--- code/branches/core7/src/modules/pong/PongCenterpoint.h	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/pong/PongCenterpoint.h	2015-09-09 11:31:11 UTC (rev 10572)
@@ -125,8 +125,6 @@
 
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a PongCenterpoint through XML.
 
-            virtual void changedGametype(); //!< Is called when the gametype has changed.
-
             /**
             @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.)
             @param balltemplate The name of the template to be set.

Modified: code/branches/core7/src/modules/tetris/TetrisCenterpoint.cc
===================================================================
--- code/branches/core7/src/modules/tetris/TetrisCenterpoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/tetris/TetrisCenterpoint.cc	2015-09-09 11:31:11 UTC (rev 10572)
@@ -79,18 +79,6 @@
 
     /**
     @brief
-        Is called when the gametype has changed.
-    */
-    void TetrisCenterpoint::changedGametype()
-    {
-        SUPER(TetrisCenterpoint, changedGametype);
-
-        // Check, whether it's still Tetris.
-        this->checkGametype();
-    }
-
-    /**
-    @brief
         Checks whether the gametype is Tetris and if it is, sets its centerpoint.
     */
     void TetrisCenterpoint::checkGametype()

Modified: code/branches/core7/src/modules/tetris/TetrisCenterpoint.h
===================================================================
--- code/branches/core7/src/modules/tetris/TetrisCenterpoint.h	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/tetris/TetrisCenterpoint.h	2015-09-09 11:31:11 UTC (rev 10572)
@@ -63,8 +63,6 @@
 
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a TetrisCenterpoint through XML.
 
-            virtual void changedGametype(); //!< Is called when the gametype has changed.
-            
             /**
             @brief Set the width of the playing field.
             @param width The width in number of tiles.

Modified: code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.cc
===================================================================
--- code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.cc	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.cc	2015-09-09 11:31:11 UTC (rev 10572)
@@ -83,18 +83,6 @@
 
     /**
     @brief
-        Is called when the gametype has changed.
-    */
-    void TowerDefenseCenterpoint::changedGametype()
-    {
-        SUPER(TowerDefenseCenterpoint, changedGametype);
-
-        // Check, whether it's still TowerDefense.
-        this->checkGametype();
-    }
-
-    /**
-    @brief
         Checks whether the gametype is TowerDefense and if it is, sets its centerpoint.
     */
     void TowerDefenseCenterpoint::checkGametype()

Modified: code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.h
===================================================================
--- code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.h	2015-09-09 11:11:13 UTC (rev 10571)
+++ code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.h	2015-09-09 11:31:11 UTC (rev 10572)
@@ -52,7 +52,6 @@
             virtual ~TowerDefenseCenterpoint() {}
 
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            virtual void changedGametype();
 
             /**
             @brief The width and hight in number of tiles. Default is 15 for both.




More information about the Orxonox-commit mailing list