- Timestamp:
- Mar 29, 2018, 3:30:24 PM (7 years ago)
- Location:
- code/branches/OrxyRoad_FS18/src/modules/orxyroad
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadCenterPoint.cc
r11836 r11838 28 28 29 29 /** 30 @file DodgeRaceCenterPoint.cc31 @brief Implementation of the DodgeRaceCenterPoint class.30 @file OrxyRoadCenterPoint.cc 31 @brief Implementation of the OrxyRoadCenterPoint class. 32 32 */ 33 33 34 #include " DodgeRaceCenterPoint.h"34 #include "OrxyRoadCenterPoint.h" 35 35 36 36 #include "core/CoreIncludes.h" 37 37 38 #include " DodgeRace.h"38 #include "OrxyRoad.h" 39 39 40 40 namespace orxonox 41 41 { 42 RegisterClass( DodgeRaceCenterPoint);42 RegisterClass(OrxyRoadCenterPoint); 43 43 44 DodgeRaceCenterPoint::DodgeRaceCenterPoint(Context* context) : StaticEntity(context)44 OrxyRoadCenterPoint::OrxyRoadCenterPoint(Context* context) : StaticEntity(context) 45 45 { 46 RegisterObject( DodgeRaceCenterPoint);46 RegisterObject(OrxyRoadCenterPoint); 47 47 48 48 this->checkGametype(); 49 49 } 50 50 51 void DodgeRaceCenterPoint::checkGametype()51 void OrxyRoadCenterPoint::checkGametype() 52 52 { 53 if (this->getGametype() != nullptr && this->getGametype()->isA(Class( DodgeRace)))53 if (this->getGametype() != nullptr && this->getGametype()->isA(Class(OrxyRoad))) 54 54 { 55 DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype());56 DodgeRaceGametype->setCenterpoint(this);55 OrxyRoad* OrxyRoadGametype = orxonox_cast<OrxyRoad*>(this->getGametype()); 56 OrxyRoadGametype->setCenterpoint(this); 57 57 } 58 58 } -
code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadCenterPoint.h
r11836 r11838 28 28 29 29 /** 30 @file DodgeRaceCenterPoint.h31 @brief Declaration of the DodgeRaceCenterPoint class.32 @ingroup DodgeRace30 @file OrxyRoadCenterPoint.h 31 @brief Declaration of the OrxyRoadCenterPoint class. 32 @ingroup OrxyRoad 33 33 */ 34 34 35 #ifndef _ DodgeRaceCenterPoint_H__36 #define _ DodgeRaceCenterPoint_H__35 #ifndef _OrxyRoadCenterPoint_H__ 36 #define _OrxyRoadCenterPoint_H__ 37 37 38 #include " dodgerace/DodgeRacePrereqs.h"38 #include "OrxyRoad/OrxyRoadPrereqs.h" 39 39 40 //#include " DodgeRace.h"41 //#include " DodgeRaceHUDinfo.h"40 //#include "OrxyRoad.h" 41 //#include "OrxyRoadHUDinfo.h" 42 42 43 43 #include "worldentities/StaticEntity.h" … … 45 45 namespace orxonox 46 46 { 47 class _ DodgeRaceExport DodgeRaceCenterPoint : public StaticEntity47 class _OrxyRoadExport OrxyRoadCenterPoint : public StaticEntity 48 48 { 49 49 public: 50 DodgeRaceCenterPoint(Context* context); //checks whether the gametype is actually DodgeRace.50 OrxyRoadCenterPoint(Context* context); //checks whether the gametype is actually OrxyRoad. 51 51 52 52 private: … … 56 56 } 57 57 58 #endif /* _ DodgeRaceCenterPoint_H__ */58 #endif /* _OrxyRoadCenterPoint_H__ */ -
code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadCube.cc
r11836 r11838 27 27 28 28 /** 29 @file DodgeRace.cc30 @brief Implementation of the DodgeRaceclass.29 @file OrxyRoad.cc 30 @brief Implementation of the OrxyRoad class. 31 31 */ 32 32 33 #include " DodgeRaceCube.h"34 #include " DodgeRace.h"33 #include "OrxyRoadCube.h" 34 #include "OrxyRoad.h" 35 35 #include "core/CoreIncludes.h" 36 36 37 37 namespace orxonox 38 38 { 39 RegisterClass( DodgeRaceCube);39 RegisterClass(OrxyRoadCube); 40 40 41 DodgeRaceCube::DodgeRaceCube(Context* context) : MovableEntity(context)41 OrxyRoadCube::OrxyRoadCube(Context* context) : MovableEntity(context) 42 42 { 43 RegisterObject( DodgeRaceCube);43 RegisterObject(OrxyRoadCube); 44 44 } 45 45 -
code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadCube.h
r11836 r11838 28 28 29 29 /** 30 @file DodgeRace.h30 @file OrxyRoad.h 31 31 @brief Gametype. 32 @ingroup DodgeRace32 @ingroup OrxyRoad 33 33 */ 34 34 35 #ifndef _ DodgeRaceCube_H__36 #define _ DodgeRaceCube_H__35 #ifndef _OrxyRoadCube_H__ 36 #define _OrxyRoadCube_H__ 37 37 38 #include " dodgerace/DodgeRacePrereqs.h"38 #include "OrxyRoad/OrxyRoadPrereqs.h" 39 39 40 40 #include "worldentities/MovableEntity.h" … … 43 43 namespace orxonox 44 44 { 45 class _ DodgeRaceExport DodgeRaceCube : public MovableEntity45 class _OrxyRoadExport OrxyRoadCube : public MovableEntity 46 46 { 47 47 public: 48 DodgeRaceCube(Context* context);48 OrxyRoadCube(Context* context); 49 49 50 50 private: … … 52 52 } 53 53 54 #endif /* _ DodgeRaceCube_H__ */54 #endif /* _OrxyRoadCube_H__ */ -
code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadHUDinfo.cc
r11836 r11838 25 25 */ 26 26 27 #include " DodgeRaceHUDinfo.h"27 #include "OrxyRoadHUDinfo.h" 28 28 29 29 #include "core/CoreIncludes.h" 30 30 #include "core/XMLPort.h" 31 31 #include "util/Convert.h" 32 //#include " DodgeRace.h"32 //#include "OrxyRoad.h" 33 33 34 34 namespace orxonox 35 35 { 36 RegisterClass( DodgeRaceHUDinfo);36 RegisterClass(OrxyRoadHUDinfo); 37 37 38 DodgeRaceHUDinfo::DodgeRaceHUDinfo(Context* context) : OverlayText(context)38 OrxyRoadHUDinfo::OrxyRoadHUDinfo(Context* context) : OverlayText(context) 39 39 { 40 RegisterObject( DodgeRaceHUDinfo);40 RegisterObject(OrxyRoadHUDinfo); 41 41 42 this-> DodgeRaceGame = nullptr;42 this->OrxyRoadGame = nullptr; 43 43 this->bShowPoints_ = true; 44 44 } 45 45 46 void DodgeRaceHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)46 void OrxyRoadHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode) 47 47 { 48 SUPER( DodgeRaceHUDinfo, XMLPort, xmlelement, mode);48 SUPER(OrxyRoadHUDinfo, XMLPort, xmlelement, mode); 49 49 50 XMLPortParam( DodgeRaceHUDinfo,"showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false);50 XMLPortParam(OrxyRoadHUDinfo,"showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false); 51 51 } 52 52 53 void DodgeRaceHUDinfo::tick(float dt)53 void OrxyRoadHUDinfo::tick(float dt) 54 54 { 55 SUPER( DodgeRaceHUDinfo, tick, dt);55 SUPER(OrxyRoadHUDinfo, tick, dt); 56 56 57 57 58 58 if(this->bShowPoints_) 59 59 { 60 const std::string& points = multi_cast<std::string>(this-> DodgeRaceGame->getPoints());61 if (this-> DodgeRaceGame->lives <= 0)60 const std::string& points = multi_cast<std::string>(this->OrxyRoadGame->getPoints()); 61 if (this->OrxyRoadGame->lives <= 0) 62 62 { 63 63 setTextSize(0.2); … … 76 76 } 77 77 78 void DodgeRaceHUDinfo::changedOwner()78 void OrxyRoadHUDinfo::changedOwner() 79 79 { 80 SUPER( DodgeRaceHUDinfo, changedOwner);80 SUPER(OrxyRoadHUDinfo, changedOwner); 81 81 82 82 if (this->getOwner() && this->getOwner()->getGametype()) 83 83 { 84 this-> DodgeRaceGame = orxonox_cast<DodgeRace*>(this->getOwner()->getGametype());84 this->OrxyRoadGame = orxonox_cast<OrxyRoad*>(this->getOwner()->getGametype()); 85 85 } 86 86 else 87 87 { 88 this-> DodgeRaceGame = nullptr;88 this->OrxyRoadGame = nullptr; 89 89 } 90 90 } -
code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadHUDinfo.h
r11836 r11838 25 25 */ 26 26 27 #ifndef _ DodgeRaceHUDinfo_H__28 #define _ DodgeRaceHUDinfo_H__27 #ifndef _OrxyRoadHUDinfo_H__ 28 #define _OrxyRoadHUDinfo_H__ 29 29 30 //#include " DodgeRaceShip.h"31 #include " DodgeRace.h"32 //#include " DodgeRaceCenterPoint.h"30 //#include "OrxyRoadShip.h" 31 #include "OrxyRoad.h" 32 //#include "OrxyRoadCenterPoint.h" 33 33 34 #include " dodgerace/DodgeRacePrereqs.h"34 #include "OrxyRoad/OrxyRoadPrereqs.h" 35 35 36 36 #include "tools/interfaces/Tickable.h" … … 39 39 namespace orxonox 40 40 { 41 class _ DodgeRaceExport DodgeRaceHUDinfo : public OverlayText, public Tickable41 class _OrxyRoadExport OrxyRoadHUDinfo : public OverlayText, public Tickable 42 42 { 43 43 public: 44 DodgeRaceHUDinfo(Context* context);44 OrxyRoadHUDinfo(Context* context); 45 45 46 46 virtual void tick(float dt) override; … … 55 55 56 56 private: 57 DodgeRace* DodgeRaceGame;57 OrxyRoad* OrxyRoadGame; 58 58 bool bShowPoints_; 59 59 }; 60 60 } 61 #endif /* _ DodgeRaceHUDinfo_H__ */61 #endif /* _OrxyRoadHUDinfo_H__ */ -
code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadPrereqs.h
r11836 r11838 30 30 @file 31 31 @brief 32 Shared library macros, enums, constants and forward declarations for the DodgeRacemodule32 Shared library macros, enums, constants and forward declarations for the OrxyRoad module 33 33 */ 34 34 35 #ifndef _ DodgeRacePrereqs_H__36 #define _ DodgeRacePrereqs_H__35 #ifndef _OrxyRoadPrereqs_H__ 36 #define _OrxyRoadPrereqs_H__ 37 37 38 38 #include "OrxonoxConfig.h" … … 43 43 //----------------------------------------------------------------------- 44 44 45 #if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( DODGERACE_STATIC_BUILD)46 # ifdef DODGERACE_SHARED_BUILD47 # define _ DodgeRaceExport __declspec(dllexport)45 #if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(OrxyRoad_STATIC_BUILD) 46 # ifdef OrxyRoad_SHARED_BUILD 47 # define _OrxyRoadExport __declspec(dllexport) 48 48 # else 49 49 # if defined( __MINGW32__ ) 50 # define _ DodgeRaceExport50 # define _OrxyRoadExport 51 51 # else 52 # define _ DodgeRaceExport __declspec(dllimport)52 # define _OrxyRoadExport __declspec(dllimport) 53 53 # endif 54 54 # endif 55 # define _ DodgeRacePrivate55 # define _OrxyRoadPrivate 56 56 #elif defined (ORXONOX_GCC_VISIBILITY) 57 # define _ DodgeRaceExport __attribute__ ((visibility("default")))58 # define _ DodgeRacePrivate __attribute__ ((visibility("hidden")))57 # define _OrxyRoadExport __attribute__ ((visibility("default"))) 58 # define _OrxyRoadPrivate __attribute__ ((visibility("hidden"))) 59 59 #else 60 # define _ DodgeRaceExport61 # define _ DodgeRacePrivate60 # define _OrxyRoadExport 61 # define _OrxyRoadPrivate 62 62 #endif 63 63 … … 68 68 namespace orxonox 69 69 { 70 class DodgeRace;71 class DodgeRaceCenterPoint;72 class DodgeRaceShip;73 class DodgeRaceCube;74 //class DodgeRaceEnemy;75 //class DodgeRaceEnemyShooter;76 //class DodgeRaceWeapon;77 //class DodgeRaceWeaponEnemy;78 //class DodgeRaceHUDinfo;70 class OrxyRoad; 71 class OrxyRoadCenterPoint; 72 class OrxyRoadShip; 73 class OrxyRoadCube; 74 //class OrxyRoadEnemy; 75 //class OrxyRoadEnemyShooter; 76 //class OrxyRoadWeapon; 77 //class OrxyRoadWeaponEnemy; 78 //class OrxyRoadHUDinfo; 79 79 } 80 80 81 #endif /* _ DodgeRacePrereqs_H__*/81 #endif /* _OrxyRoadPrereqs_H__*/ -
code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadRace.h
r11836 r11838 28 28 29 29 /** 30 @file DodgeRace.h30 @file OrxyRoad.h 31 31 @brief Gametype. 32 @ingroup DodgeRace32 @ingroup OrxyRoad 33 33 */ 34 34 35 #ifndef _ DodgeRace_H__36 #define _ DodgeRace_H__35 #ifndef _OrxyRoad_H__ 36 #define _OrxyRoad_H__ 37 37 38 #include " dodgerace/DodgeRacePrereqs.h"38 #include "OrxyRoad/OrxyRoadPrereqs.h" 39 39 40 #include " DodgeRaceCenterPoint.h" // Necessary for WeakPointer??41 //#include " DodgeRaceShip.h" DO NOT include in Header. Will cause forward declaration issues40 #include "OrxyRoadCenterPoint.h" // Necessary for WeakPointer?? 41 //#include "OrxyRoadShip.h" DO NOT include in Header. Will cause forward declaration issues 42 42 43 //#include " DodgeRaceHUDinfo.h"43 //#include "OrxyRoadHUDinfo.h" 44 44 45 45 … … 63 63 { 64 64 65 class _ DodgeRaceExport DodgeRace: public Deathmatch65 class _OrxyRoadExport OrxyRoad : public Deathmatch 66 66 { 67 67 public: 68 DodgeRace(Context* context);68 OrxyRoad(Context* context); 69 69 70 70 virtual void start() override; … … 82 82 int getMultiplier(){return this->multiplier;} 83 83 84 void setCenterpoint( DodgeRaceCenterPoint* center)84 void setCenterpoint(OrxyRoadCenterPoint* center) 85 85 { this->center_ = center; } 86 86 virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command … … 102 102 Timer endGameTimer; 103 103 104 DodgeRaceShip* getPlayer();104 OrxyRoadShip* getPlayer(); 105 105 WeakPtr<PlayerInfo> playerInfo_; 106 std::vector< DodgeRaceCube*> cubeList;106 std::vector<OrxyRoadCube*> cubeList; 107 107 void toggleShowLevel(){bShowLevel = !bShowLevel;} 108 108 void addPoints(int numPoints); 109 109 110 WeakPtr< DodgeRaceCenterPoint> center_;110 WeakPtr<OrxyRoadCenterPoint> center_; 111 111 int level; 112 112 int point; … … 143 143 } 144 144 145 #endif /* _ DodgeRace_H__ */145 #endif /* _OrxyRoad_H__ */ -
code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadRaceShip.cc
r11836 r11838 28 28 29 29 /** 30 @file DodgeRaceShip.cc31 @brief Implementation of the DodgeRaceShip class.30 @file OrxyRoadShip.cc 31 @brief Implementation of the OrxyRoadShip class. 32 32 */ 33 33 34 #include " DodgeRaceShip.h"34 #include "OrxyRoadShip.h" 35 35 #include "core/CoreIncludes.h" 36 36 37 37 namespace orxonox 38 38 { 39 RegisterClass( DodgeRaceShip);39 RegisterClass(OrxyRoadShip); 40 40 41 DodgeRaceShip::DodgeRaceShip(Context* context) : SpaceShip(context)41 OrxyRoadShip::OrxyRoadShip(Context* context) : SpaceShip(context) 42 42 { 43 RegisterObject( DodgeRaceShip);43 RegisterObject(OrxyRoadShip); 44 44 45 45 speed = 830; … … 53 53 } 54 54 55 void DodgeRaceShip::tick(float dt)55 void OrxyRoadShip::tick(float dt) 56 56 { 57 57 Vector3 pos = getPosition(); … … 115 115 } 116 116 117 SUPER( DodgeRaceShip, tick, dt);117 SUPER(OrxyRoadShip, tick, dt); 118 118 } 119 119 120 void DodgeRaceShip::updateLevel()120 void OrxyRoadShip::updateLevel() 121 121 { 122 122 lastTime = 0; … … 125 125 } 126 126 127 void DodgeRaceShip::moveFrontBack(const Vector2& value)127 void OrxyRoadShip::moveFrontBack(const Vector2& value) 128 128 { 129 129 //lastTimeFront = 0; … … 132 132 } 133 133 134 void DodgeRaceShip::moveRightLeft(const Vector2& value)134 void OrxyRoadShip::moveRightLeft(const Vector2& value) 135 135 { 136 136 lastTimeLeft = 0; 137 137 desiredVelocity.x = value.x * speed; 138 138 } 139 void DodgeRaceShip::boost(bool bBoost)139 void OrxyRoadShip::boost(bool bBoost) 140 140 { 141 141 //getGame()->bEndGame = bBoost; 142 142 } 143 143 144 inline bool DodgeRaceShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)144 inline bool OrxyRoadShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) 145 145 { 146 146 … … 150 150 } 151 151 152 DodgeRace* DodgeRaceShip::getGame()152 OrxyRoad* OrxyRoadShip::getGame() 153 153 { 154 154 if (game == nullptr) 155 155 { 156 for ( DodgeRace* race : ObjectList<DodgeRace>())156 for (OrxyRoad* race : ObjectList<OrxyRoad>()) 157 157 { 158 158 game = race; … … 162 162 } 163 163 164 void DodgeRaceShip::death()164 void OrxyRoadShip::death() 165 165 { 166 166 getGame()->costLife(); -
code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadRaceShip.h
r11836 r11838 28 28 29 29 /** 30 @file DodgeRaceShip.h31 @brief Declaration of the DodgeRaceShip class.30 @file OrxyRoadShip.h 31 @brief Declaration of the OrxyRoadShip class. 32 32 */ 33 33 34 #ifndef _ DodgeRaceShip_H__35 #define _ DodgeRaceShip_H__34 #ifndef _OrxyRoadShip_H__ 35 #define _OrxyRoadShip_H__ 36 36 37 37 38 #include " dodgerace/DodgeRacePrereqs.h"38 #include "OrxyRoad/OrxyRoadPrereqs.h" 39 39 40 40 #include "core/XMLPort.h" … … 42 42 #include "graphics/Camera.h" 43 43 44 #include " DodgeRace.h" // Is necessary for getGame function45 //#include " DodgeRaceCenterPoint.h"44 #include "OrxyRoad.h" // Is necessary for getGame function 45 //#include "OrxyRoadCenterPoint.h" 46 46 47 47 namespace orxonox 48 48 { 49 class _ DodgeRaceExport DodgeRaceShip : public SpaceShip49 class _OrxyRoadExport OrxyRoadShip : public SpaceShip 50 50 { 51 51 public: 52 DodgeRaceShip(Context* context);52 OrxyRoadShip(Context* context); 53 53 54 54 virtual void tick(float dt) override; … … 79 79 80 80 private: 81 DodgeRace* getGame();82 WeakPtr< DodgeRace> game;81 OrxyRoad* getGame(); 82 WeakPtr<OrxyRoad> game; 83 83 WeakPtr<WorldEntity> lastEntity; 84 84 Camera* camera; … … 93 93 } 94 94 95 #endif /* _ DodgeRaceShip_H__ */95 #endif /* _OrxyRoadShip_H__ */
Note: See TracChangeset
for help on using the changeset viewer.