Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 9, 2013, 9:26:46 PM (11 years ago)
Author:
landauf
Message:

BaseObject now requires a Context instead of a creator (BaseObject*) in its constructor.
Namespace, Level, and Scene inherit from Context

Location:
code/branches/core6/src/orxonox/controllers
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/src/orxonox/controllers/AIController.cc

    r9016 r9629  
    4141    CreateFactory(AIController);
    4242
    43     AIController::AIController(BaseObject* creator) : ArtificialController(creator)
     43    AIController::AIController(Context* context) : ArtificialController(context)
    4444    {
    4545        RegisterObject(AIController);
  • code/branches/core6/src/orxonox/controllers/AIController.h

    r9016 r9629  
    4141    {
    4242        public:
    43             AIController(BaseObject* creator);
     43            AIController(Context* context);
    4444            virtual ~AIController();
    4545
  • code/branches/core6/src/orxonox/controllers/ArtificialController.cc

    r9252 r9629  
    4545    SetConsoleCommand("ArtificialController", "setbotlevel",      &ArtificialController::setAllBotLevel);
    4646
    47     ArtificialController::ArtificialController(BaseObject* creator) : FormationController(creator)
     47    ArtificialController::ArtificialController(Context* context) : FormationController(context)
    4848    {
    4949        RegisterObject(ArtificialController);
  • code/branches/core6/src/orxonox/controllers/ArtificialController.h

    r9252 r9629  
    3939    {
    4040        public:
    41             ArtificialController(BaseObject* creator);
     41            ArtificialController(Context* context);
    4242            virtual ~ArtificialController();
    4343
  • code/branches/core6/src/orxonox/controllers/Controller.cc

    r6417 r9629  
    3535    CreateUnloadableFactory(Controller);
    3636
    37     Controller::Controller(BaseObject* creator) : BaseObject(creator)
     37    Controller::Controller(Context* context) : BaseObject(context)
    3838    {
    3939        RegisterObject(Controller);
  • code/branches/core6/src/orxonox/controllers/Controller.h

    r8706 r9629  
    4242
    4343        public:
    44             Controller(BaseObject* creator);
     44            Controller(Context* context);
    4545            virtual ~Controller();
    4646
  • code/branches/core6/src/orxonox/controllers/DroneController.cc

    r8891 r9629  
    4545    const float DroneController::ACTION_INTERVAL = 1.0f;
    4646
    47     DroneController::DroneController(BaseObject* creator) : ArtificialController(creator)
     47    DroneController::DroneController(Context* context) : ArtificialController(context)
    4848    {
    4949        RegisterObject(DroneController);
  • code/branches/core6/src/orxonox/controllers/DroneController.h

    r9557 r9629  
    5050    {
    5151        public:
    52             DroneController(BaseObject* creator);
     52            DroneController(Context* context);
    5353            virtual ~DroneController();
    5454
  • code/branches/core6/src/orxonox/controllers/FormationController.cc

    r9348 r9629  
    6969    static const float ROTATEFACTOR_FREE = 0.8f;
    7070
    71     FormationController::FormationController(BaseObject* creator) : Controller(creator)
     71    FormationController::FormationController(Context* context) : Controller(context)
    7272    {
    7373        RegisterObject(FormationController);
  • code/branches/core6/src/orxonox/controllers/FormationController.h

    r9567 r9629  
    4646
    4747      public:
    48       FormationController(BaseObject* creator);
     48      FormationController(Context* context);
    4949
    5050      virtual ~FormationController();
  • code/branches/core6/src/orxonox/controllers/HumanController.cc

    r9256 r9629  
    7171    /*static*/ const float HumanController::BOOSTING_TIME = 0.1f;
    7272
    73     HumanController::HumanController(BaseObject* creator) : FormationController(creator)
     73    HumanController::HumanController(Context* context) : FormationController(context)
    7474    {
    7575        RegisterObject(HumanController);
  • code/branches/core6/src/orxonox/controllers/HumanController.h

    r9256 r9629  
    4444    { // tolua_export
    4545        public:
    46             HumanController(BaseObject* creator);
     46            HumanController(Context* context);
    4747            virtual ~HumanController();
    4848
  • code/branches/core6/src/orxonox/controllers/NewHumanController.cc

    r9348 r9629  
    6060    NewHumanController* NewHumanController::localController_s = 0;
    6161
    62     NewHumanController::NewHumanController(BaseObject* creator)
    63         : HumanController(creator)
     62    NewHumanController::NewHumanController(Context* context)
     63        : HumanController(context)
    6464        , crossHairOverlay_(NULL)
    6565        , centerOverlay_(NULL)
     
    9898        if (GameMode::showsGraphics())
    9999        {
    100             crossHairOverlay_ = new OrxonoxOverlay(this);
     100            crossHairOverlay_ = new OrxonoxOverlay(this->getContext());
    101101            crossHairOverlay_->setBackgroundMaterial("Orxonox/Crosshair3");
    102102            crossHairOverlay_->setSize(Vector2(overlaySize_, overlaySize_));
     
    104104            //crossHairOverlay_->setAspectCorrection(true); not working
    105105
    106             centerOverlay_ = new OrxonoxOverlay(this);
     106            centerOverlay_ = new OrxonoxOverlay(this->getContext());
    107107            centerOverlay_->setBackgroundMaterial("Orxonox/CenterOverlay");
    108108            centerOverlay_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
     
    112112            if (showDamageOverlay_)
    113113            {
    114                 damageOverlayTop_ = new OrxonoxOverlay(this);
     114                damageOverlayTop_ = new OrxonoxOverlay(this->getContext());
    115115                damageOverlayTop_->setBackgroundMaterial("Orxonox/DamageOverlayTop");
    116116                damageOverlayTop_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
     
    118118                damageOverlayTop_->hide();
    119119
    120                 damageOverlayRight_ = new OrxonoxOverlay(this);
     120                damageOverlayRight_ = new OrxonoxOverlay(this->getContext());
    121121                damageOverlayRight_->setBackgroundMaterial("Orxonox/DamageOverlayRight");
    122122                damageOverlayRight_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
     
    124124                damageOverlayRight_->hide();
    125125
    126                 damageOverlayBottom_ = new OrxonoxOverlay(this);
     126                damageOverlayBottom_ = new OrxonoxOverlay(this->getContext());
    127127                damageOverlayBottom_->setBackgroundMaterial("Orxonox/DamageOverlayBottom");
    128128                damageOverlayBottom_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
     
    130130                damageOverlayBottom_->hide();
    131131
    132                 damageOverlayLeft_ = new OrxonoxOverlay(this);
     132                damageOverlayLeft_ = new OrxonoxOverlay(this->getContext());
    133133                damageOverlayLeft_->setBackgroundMaterial("Orxonox/DamageOverlayLeft");
    134134                damageOverlayLeft_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
     
    139139            if (showArrows_)
    140140            {
    141                 arrowsOverlay1_ = new OrxonoxOverlay(this);
     141                arrowsOverlay1_ = new OrxonoxOverlay(this->getContext());
    142142                arrowsOverlay1_->setBackgroundMaterial("Orxonox/DirectionArrows1");
    143143                arrowsOverlay1_->setSize(Vector2(0.02727f, 0.36f * arrowsSize_));
     
    146146                arrowsOverlay1_->hide();
    147147
    148                 arrowsOverlay2_ = new OrxonoxOverlay(this);
     148                arrowsOverlay2_ = new OrxonoxOverlay(this->getContext());
    149149                arrowsOverlay2_->setBackgroundMaterial("Orxonox/DirectionArrows2");
    150150                arrowsOverlay2_->setSize(Vector2(0.02727f, 0.59f * arrowsSize_));
     
    153153                arrowsOverlay2_->hide();
    154154
    155                 arrowsOverlay3_ = new OrxonoxOverlay(this);
     155                arrowsOverlay3_ = new OrxonoxOverlay(this->getContext());
    156156                arrowsOverlay3_->setBackgroundMaterial("Orxonox/DirectionArrows3");
    157157                arrowsOverlay3_->setSize(Vector2(0.02727f, 0.77f * arrowsSize_));
     
    160160                arrowsOverlay3_->hide();
    161161
    162                 arrowsOverlay4_ = new OrxonoxOverlay(this);
     162                arrowsOverlay4_ = new OrxonoxOverlay(this->getContext());
    163163                arrowsOverlay4_->setBackgroundMaterial("Orxonox/DirectionArrows4");
    164164                arrowsOverlay4_->setSize(Vector2(0.02727f, arrowsSize_));
  • code/branches/core6/src/orxonox/controllers/NewHumanController.h

    r9016 r9629  
    4242    {
    4343        public:
    44             NewHumanController(BaseObject* creator);
     44            NewHumanController(Context* context);
    4545            virtual ~NewHumanController();
    4646
  • code/branches/core6/src/orxonox/controllers/ScriptController.cc

    r5781 r9629  
    3434    CreateFactory(ScriptController);
    3535
    36     ScriptController::ScriptController(BaseObject* creator) : ArtificialController(creator)
     36    ScriptController::ScriptController(Context* context) : ArtificialController(context)
    3737    {
    3838        RegisterObject(ScriptController);
  • code/branches/core6/src/orxonox/controllers/ScriptController.h

    r5781 r9629  
    3838    {
    3939        public:
    40             ScriptController(BaseObject* creator);
     40            ScriptController(Context* context);
    4141            virtual ~ScriptController() { }
    4242
  • code/branches/core6/src/orxonox/controllers/WaypointController.cc

    r9252 r9629  
    3636    CreateFactory(WaypointController);
    3737
    38     WaypointController::WaypointController(BaseObject* creator) : ArtificialController(creator)
     38    WaypointController::WaypointController(Context* context) : ArtificialController(context)
    3939    {
    4040        RegisterObject(WaypointController);
  • code/branches/core6/src/orxonox/controllers/WaypointController.h

    r9252 r9629  
    4141    {
    4242        public:
    43             WaypointController(BaseObject* creator);
     43            WaypointController(Context* context);
    4444            virtual ~WaypointController();
    4545
  • code/branches/core6/src/orxonox/controllers/WaypointPatrolController.cc

    r9016 r9629  
    3838    CreateFactory(WaypointPatrolController);
    3939
    40     WaypointPatrolController::WaypointPatrolController(BaseObject* creator) : WaypointController(creator)
     40    WaypointPatrolController::WaypointPatrolController(Context* context) : WaypointController(context)
    4141    {
    4242        RegisterObject(WaypointPatrolController);
  • code/branches/core6/src/orxonox/controllers/WaypointPatrolController.h

    r9016 r9629  
    4040    {
    4141        public:
    42             WaypointPatrolController(BaseObject* creator);
     42            WaypointPatrolController(Context* context);
    4343            virtual ~WaypointPatrolController() {}
    4444
Note: See TracChangeset for help on using the changeset viewer.