Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11838 for code


Ignore:
Timestamp:
Mar 29, 2018, 3:30:24 PM (7 years ago)
Author:
jacobsr
Message:

changed interal definition to orxyroad namespace

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  
    2828
    2929/**
    30     @file DodgeRaceCenterPoint.cc
    31     @brief Implementation of the DodgeRaceCenterPoint class.
     30    @file OrxyRoadCenterPoint.cc
     31    @brief Implementation of the OrxyRoadCenterPoint class.
    3232*/
    3333
    34 #include "DodgeRaceCenterPoint.h"
     34#include "OrxyRoadCenterPoint.h"
    3535
    3636#include "core/CoreIncludes.h"
    3737
    38 #include "DodgeRace.h"
     38#include "OrxyRoad.h"
    3939
    4040namespace orxonox
    4141{
    42     RegisterClass(DodgeRaceCenterPoint);
     42    RegisterClass(OrxyRoadCenterPoint);
    4343
    44     DodgeRaceCenterPoint::DodgeRaceCenterPoint(Context* context) : StaticEntity(context)
     44    OrxyRoadCenterPoint::OrxyRoadCenterPoint(Context* context) : StaticEntity(context)
    4545    {
    46         RegisterObject(DodgeRaceCenterPoint);
     46        RegisterObject(OrxyRoadCenterPoint);
    4747
    4848        this->checkGametype();
    4949    }
    5050
    51     void DodgeRaceCenterPoint::checkGametype()
     51    void OrxyRoadCenterPoint::checkGametype()
    5252    {
    53         if (this->getGametype() != nullptr && this->getGametype()->isA(Class(DodgeRace)))
     53        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(OrxyRoad)))
    5454        {
    55             DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype());
    56             DodgeRaceGametype->setCenterpoint(this);
     55            OrxyRoad* OrxyRoadGametype = orxonox_cast<OrxyRoad*>(this->getGametype());
     56            OrxyRoadGametype->setCenterpoint(this);
    5757        }
    5858    }
  • code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadCenterPoint.h

    r11836 r11838  
    2828
    2929/**
    30     @file DodgeRaceCenterPoint.h
    31     @brief Declaration of the DodgeRaceCenterPoint class.
    32     @ingroup DodgeRace
     30    @file OrxyRoadCenterPoint.h
     31    @brief Declaration of the OrxyRoadCenterPoint class.
     32    @ingroup OrxyRoad
    3333*/
    3434
    35 #ifndef _DodgeRaceCenterPoint_H__
    36 #define _DodgeRaceCenterPoint_H__
     35#ifndef _OrxyRoadCenterPoint_H__
     36#define _OrxyRoadCenterPoint_H__
    3737
    38 #include "dodgerace/DodgeRacePrereqs.h"
     38#include "OrxyRoad/OrxyRoadPrereqs.h"
    3939
    40 //#include "DodgeRace.h"
    41 //#include "DodgeRaceHUDinfo.h"
     40//#include "OrxyRoad.h"
     41//#include "OrxyRoadHUDinfo.h"
    4242
    4343#include "worldentities/StaticEntity.h"
     
    4545namespace orxonox
    4646{
    47     class _DodgeRaceExport DodgeRaceCenterPoint : public StaticEntity
     47    class _OrxyRoadExport OrxyRoadCenterPoint : public StaticEntity
    4848    {
    4949        public:
    50             DodgeRaceCenterPoint(Context* context); //checks whether the gametype is actually DodgeRace.
     50            OrxyRoadCenterPoint(Context* context); //checks whether the gametype is actually OrxyRoad.
    5151
    5252        private:
     
    5656}
    5757
    58 #endif /* _DodgeRaceCenterPoint_H__ */
     58#endif /* _OrxyRoadCenterPoint_H__ */
  • code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadCube.cc

    r11836 r11838  
    2727
    2828/**
    29     @file DodgeRace.cc
    30     @brief Implementation of the DodgeRace class.
     29    @file OrxyRoad.cc
     30    @brief Implementation of the OrxyRoad class.
    3131*/
    3232
    33 #include "DodgeRaceCube.h"
    34 #include "DodgeRace.h"
     33#include "OrxyRoadCube.h"
     34#include "OrxyRoad.h"
    3535#include "core/CoreIncludes.h"
    3636
    3737namespace orxonox
    3838{
    39     RegisterClass(DodgeRaceCube);
     39    RegisterClass(OrxyRoadCube);
    4040
    41     DodgeRaceCube::DodgeRaceCube(Context* context) : MovableEntity(context)
     41    OrxyRoadCube::OrxyRoadCube(Context* context) : MovableEntity(context)
    4242    {
    43         RegisterObject(DodgeRaceCube);
     43        RegisterObject(OrxyRoadCube);
    4444    }
    4545
  • code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadCube.h

    r11836 r11838  
    2828
    2929/**
    30     @file DodgeRace.h
     30    @file OrxyRoad.h
    3131    @brief Gametype.
    32     @ingroup DodgeRace
     32    @ingroup OrxyRoad
    3333*/
    3434
    35 #ifndef _DodgeRaceCube_H__
    36 #define _DodgeRaceCube_H__
     35#ifndef _OrxyRoadCube_H__
     36#define _OrxyRoadCube_H__
    3737
    38 #include "dodgerace/DodgeRacePrereqs.h"
     38#include "OrxyRoad/OrxyRoadPrereqs.h"
    3939
    4040#include "worldentities/MovableEntity.h"
     
    4343namespace orxonox
    4444{
    45     class _DodgeRaceExport DodgeRaceCube : public MovableEntity
     45    class _OrxyRoadExport OrxyRoadCube : public MovableEntity
    4646    {
    4747       public:
    48             DodgeRaceCube(Context* context);
     48            OrxyRoadCube(Context* context);
    4949
    5050       private:
     
    5252}
    5353
    54 #endif /* _DodgeRaceCube_H__ */
     54#endif /* _OrxyRoadCube_H__ */
  • code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadHUDinfo.cc

    r11836 r11838  
    2525 */
    2626
    27 #include "DodgeRaceHUDinfo.h"
     27#include "OrxyRoadHUDinfo.h"
    2828
    2929#include "core/CoreIncludes.h"
    3030#include "core/XMLPort.h"
    3131#include "util/Convert.h"
    32 //#include "DodgeRace.h"
     32//#include "OrxyRoad.h"
    3333
    3434namespace orxonox
    3535{
    36     RegisterClass(DodgeRaceHUDinfo);
     36    RegisterClass(OrxyRoadHUDinfo);
    3737
    38     DodgeRaceHUDinfo::DodgeRaceHUDinfo(Context* context) : OverlayText(context)
     38    OrxyRoadHUDinfo::OrxyRoadHUDinfo(Context* context) : OverlayText(context)
    3939    {
    40         RegisterObject(DodgeRaceHUDinfo);
     40        RegisterObject(OrxyRoadHUDinfo);
    4141
    42         this->DodgeRaceGame = nullptr;
     42        this->OrxyRoadGame = nullptr;
    4343        this->bShowPoints_ = true;
    4444    }
    4545
    46     void DodgeRaceHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     46    void OrxyRoadHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    4747    {
    48         SUPER(DodgeRaceHUDinfo, XMLPort, xmlelement, mode);
     48        SUPER(OrxyRoadHUDinfo, XMLPort, xmlelement, mode);
    4949
    50         XMLPortParam(DodgeRaceHUDinfo,"showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false);
     50        XMLPortParam(OrxyRoadHUDinfo,"showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false);
    5151    }
    5252
    53     void DodgeRaceHUDinfo::tick(float dt)
     53    void OrxyRoadHUDinfo::tick(float dt)
    5454    {
    55         SUPER(DodgeRaceHUDinfo, tick, dt);
     55        SUPER(OrxyRoadHUDinfo, tick, dt);
    5656
    5757
    5858        if(this->bShowPoints_)
    5959        {
    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)
    6262            {
    6363                setTextSize(0.2);
     
    7676    }
    7777
    78     void DodgeRaceHUDinfo::changedOwner()
     78    void OrxyRoadHUDinfo::changedOwner()
    7979    {
    80         SUPER(DodgeRaceHUDinfo, changedOwner);
     80        SUPER(OrxyRoadHUDinfo, changedOwner);
    8181
    8282        if (this->getOwner() && this->getOwner()->getGametype())
    8383        {
    84             this->DodgeRaceGame = orxonox_cast<DodgeRace*>(this->getOwner()->getGametype());
     84            this->OrxyRoadGame = orxonox_cast<OrxyRoad*>(this->getOwner()->getGametype());
    8585        }
    8686        else
    8787        {
    88             this->DodgeRaceGame = nullptr;
     88            this->OrxyRoadGame = nullptr;
    8989        }
    9090    }
  • code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadHUDinfo.h

    r11836 r11838  
    2525 */
    2626
    27 #ifndef _DodgeRaceHUDinfo_H__
    28 #define _DodgeRaceHUDinfo_H__
     27#ifndef _OrxyRoadHUDinfo_H__
     28#define _OrxyRoadHUDinfo_H__
    2929
    30 //#include "DodgeRaceShip.h"
    31 #include "DodgeRace.h"
    32 //#include "DodgeRaceCenterPoint.h"
     30//#include "OrxyRoadShip.h"
     31#include "OrxyRoad.h"
     32//#include "OrxyRoadCenterPoint.h"
    3333
    34 #include "dodgerace/DodgeRacePrereqs.h"
     34#include "OrxyRoad/OrxyRoadPrereqs.h"
    3535
    3636#include "tools/interfaces/Tickable.h"
     
    3939namespace orxonox
    4040{
    41     class _DodgeRaceExport DodgeRaceHUDinfo : public OverlayText, public Tickable
     41    class _OrxyRoadExport OrxyRoadHUDinfo : public OverlayText, public Tickable
    4242    {
    4343     public:
    44             DodgeRaceHUDinfo(Context* context);
     44            OrxyRoadHUDinfo(Context* context);
    4545
    4646            virtual void tick(float dt) override;
     
    5555
    5656        private:
    57             DodgeRace* DodgeRaceGame;
     57            OrxyRoad* OrxyRoadGame;
    5858            bool bShowPoints_;
    5959    };
    6060}
    61 #endif /* _DodgeRaceHUDinfo_H__ */
     61#endif /* _OrxyRoadHUDinfo_H__ */
  • code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadPrereqs.h

    r11836 r11838  
    3030@file
    3131@brief
    32     Shared library macros, enums, constants and forward declarations for the DodgeRace module
     32    Shared library macros, enums, constants and forward declarations for the OrxyRoad module
    3333*/
    3434
    35 #ifndef _DodgeRacePrereqs_H__
    36 #define _DodgeRacePrereqs_H__
     35#ifndef _OrxyRoadPrereqs_H__
     36#define _OrxyRoadPrereqs_H__
    3737
    3838#include "OrxonoxConfig.h"
     
    4343//-----------------------------------------------------------------------
    4444
    45 #if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(DODGERACE_STATIC_BUILD)
    46 #  ifdef DODGERACE_SHARED_BUILD
    47 #    define _DodgeRaceExport __declspec(dllexport)
     45#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(OrxyRoad_STATIC_BUILD)
     46#  ifdef OrxyRoad_SHARED_BUILD
     47#    define _OrxyRoadExport __declspec(dllexport)
    4848#  else
    4949#    if defined( __MINGW32__ )
    50 #      define _DodgeRaceExport
     50#      define _OrxyRoadExport
    5151#    else
    52 #      define _DodgeRaceExport __declspec(dllimport)
     52#      define _OrxyRoadExport __declspec(dllimport)
    5353#    endif
    5454#  endif
    55 #  define _DodgeRacePrivate
     55#  define _OrxyRoadPrivate
    5656#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")))
    5959#else
    60 #  define _DodgeRaceExport
    61 #  define _DodgeRacePrivate
     60#  define _OrxyRoadExport
     61#  define _OrxyRoadPrivate
    6262#endif
    6363
     
    6868namespace orxonox
    6969{
    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;
    7979}
    8080
    81 #endif /* _DodgeRacePrereqs_H__*/
     81#endif /* _OrxyRoadPrereqs_H__*/
  • code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadRace.h

    r11836 r11838  
    2828
    2929/**
    30     @file DodgeRace.h
     30    @file OrxyRoad.h
    3131    @brief Gametype.
    32     @ingroup DodgeRace
     32    @ingroup OrxyRoad
    3333*/
    3434
    35 #ifndef _DodgeRace_H__
    36 #define _DodgeRace_H__
     35#ifndef _OrxyRoad_H__
     36#define _OrxyRoad_H__
    3737
    38 #include "dodgerace/DodgeRacePrereqs.h"
     38#include "OrxyRoad/OrxyRoadPrereqs.h"
    3939
    40 #include "DodgeRaceCenterPoint.h" // Necessary for WeakPointer??
    41 //#include "DodgeRaceShip.h"        DO NOT include in Header. Will cause forward declaration issues
     40#include "OrxyRoadCenterPoint.h" // Necessary for WeakPointer??
     41//#include "OrxyRoadShip.h"        DO NOT include in Header. Will cause forward declaration issues
    4242
    43 //#include "DodgeRaceHUDinfo.h"
     43//#include "OrxyRoadHUDinfo.h"
    4444
    4545
     
    6363{
    6464
    65     class _DodgeRaceExport DodgeRace : public Deathmatch
     65    class _OrxyRoadExport OrxyRoad : public Deathmatch
    6666    {
    6767       public:
    68             DodgeRace(Context* context);
     68            OrxyRoad(Context* context);
    6969
    7070            virtual void start() override;
     
    8282            int getMultiplier(){return this->multiplier;}
    8383
    84             void setCenterpoint(DodgeRaceCenterPoint* center)
     84            void setCenterpoint(OrxyRoadCenterPoint* center)
    8585                       { this->center_ = center; }
    8686            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
     
    102102            Timer endGameTimer;
    103103
    104             DodgeRaceShip* getPlayer();
     104            OrxyRoadShip* getPlayer();
    105105            WeakPtr<PlayerInfo> playerInfo_;
    106             std::vector<DodgeRaceCube*> cubeList;
     106            std::vector<OrxyRoadCube*> cubeList;
    107107            void toggleShowLevel(){bShowLevel = !bShowLevel;}
    108108            void addPoints(int numPoints);
    109109
    110             WeakPtr<DodgeRaceCenterPoint> center_;
     110            WeakPtr<OrxyRoadCenterPoint> center_;
    111111            int level;
    112112            int point;
     
    143143}
    144144
    145 #endif /* _DodgeRace_H__ */
     145#endif /* _OrxyRoad_H__ */
  • code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadRaceShip.cc

    r11836 r11838  
    2828
    2929/**
    30     @file DodgeRaceShip.cc
    31     @brief Implementation of the DodgeRaceShip class.
     30    @file OrxyRoadShip.cc
     31    @brief Implementation of the OrxyRoadShip class.
    3232*/
    3333
    34 #include "DodgeRaceShip.h"
     34#include "OrxyRoadShip.h"
    3535#include "core/CoreIncludes.h"
    3636
    3737namespace orxonox
    3838{
    39     RegisterClass(DodgeRaceShip);
     39    RegisterClass(OrxyRoadShip);
    4040
    41     DodgeRaceShip::DodgeRaceShip(Context* context) : SpaceShip(context)
     41    OrxyRoadShip::OrxyRoadShip(Context* context) : SpaceShip(context)
    4242    {
    43         RegisterObject(DodgeRaceShip);
     43        RegisterObject(OrxyRoadShip);
    4444
    4545        speed = 830;
     
    5353    }
    5454
    55     void DodgeRaceShip::tick(float dt)
     55    void OrxyRoadShip::tick(float dt)
    5656    {
    5757        Vector3 pos = getPosition();
     
    115115        }
    116116
    117         SUPER(DodgeRaceShip, tick, dt);
     117        SUPER(OrxyRoadShip, tick, dt);
    118118    }
    119119
    120     void DodgeRaceShip::updateLevel()
     120    void OrxyRoadShip::updateLevel()
    121121    {
    122122        lastTime = 0;
     
    125125    }
    126126
    127     void DodgeRaceShip::moveFrontBack(const Vector2& value)
     127    void OrxyRoadShip::moveFrontBack(const Vector2& value)
    128128    {
    129129        //lastTimeFront = 0;
     
    132132    }
    133133
    134     void DodgeRaceShip::moveRightLeft(const Vector2& value)
     134    void OrxyRoadShip::moveRightLeft(const Vector2& value)
    135135    {
    136136        lastTimeLeft = 0;
    137137        desiredVelocity.x = value.x * speed;
    138138    }
    139     void DodgeRaceShip::boost(bool bBoost)
     139    void OrxyRoadShip::boost(bool bBoost)
    140140    {
    141141        //getGame()->bEndGame = bBoost;
    142142    }
    143143
    144     inline bool DodgeRaceShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
     144    inline bool OrxyRoadShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
    145145    {
    146146
     
    150150    }
    151151
    152     DodgeRace* DodgeRaceShip::getGame()
     152    OrxyRoad* OrxyRoadShip::getGame()
    153153    {
    154154        if (game == nullptr)
    155155        {
    156             for (DodgeRace* race : ObjectList<DodgeRace>())
     156            for (OrxyRoad* race : ObjectList<OrxyRoad>())
    157157            {
    158158                game = race;
     
    162162    }
    163163
    164     void DodgeRaceShip::death()
     164    void OrxyRoadShip::death()
    165165    {
    166166        getGame()->costLife();
  • code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadRaceShip.h

    r11836 r11838  
    2828
    2929/**
    30     @file DodgeRaceShip.h
    31     @brief Declaration of the DodgeRaceShip class.
     30    @file OrxyRoadShip.h
     31    @brief Declaration of the OrxyRoadShip class.
    3232*/
    3333
    34 #ifndef _DodgeRaceShip_H__
    35 #define _DodgeRaceShip_H__
     34#ifndef _OrxyRoadShip_H__
     35#define _OrxyRoadShip_H__
    3636
    3737
    38 #include "dodgerace/DodgeRacePrereqs.h"
     38#include "OrxyRoad/OrxyRoadPrereqs.h"
    3939
    4040#include "core/XMLPort.h"
     
    4242#include "graphics/Camera.h"
    4343
    44 #include "DodgeRace.h" // Is necessary for getGame function
    45 //#include "DodgeRaceCenterPoint.h"
     44#include "OrxyRoad.h" // Is necessary for getGame function
     45//#include "OrxyRoadCenterPoint.h"
    4646
    4747namespace orxonox
    4848{
    49     class _DodgeRaceExport DodgeRaceShip : public SpaceShip
     49    class _OrxyRoadExport OrxyRoadShip : public SpaceShip
    5050    {
    5151        public:
    52             DodgeRaceShip(Context* context);
     52            OrxyRoadShip(Context* context);
    5353
    5454            virtual void tick(float dt) override;
     
    7979
    8080        private:
    81             DodgeRace* getGame();
    82             WeakPtr<DodgeRace> game;
     81            OrxyRoad* getGame();
     82            WeakPtr<OrxyRoad> game;
    8383            WeakPtr<WorldEntity> lastEntity;
    8484            Camera* camera;
     
    9393}
    9494
    95 #endif /* _DodgeRaceShip_H__ */
     95#endif /* _OrxyRoadShip_H__ */
Note: See TracChangeset for help on using the changeset viewer.