Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 9, 2008, 4:25:52 AM (16 years ago)
Author:
landauf
Message:

merged core3 back to trunk

Location:
code/trunk
Files:
53 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/CMakeLists.txt

    r1625 r1747  
    77  RadarViewable.cc
    88  Settings.cc
     9  SignalHandler.cc
    910
    1011  overlays/OrxonoxOverlay.cc
  • code/trunk/src/orxonox/GraphicsEngine.cc

    r1625 r1747  
    4747#include "core/CoreIncludes.h"
    4848#include "core/ConfigValueIncludes.h"
    49 #include "core/Debug.h"
     49#include "core/Iterator.h"
    5050#include "core/CommandExecutor.h"
    5151#include "core/ConsoleCommand.h"
     52#include "util/Debug.h"
    5253
    5354#include "overlays/console/InGameConsole.h"
     
    9798    SetConfigValue(ogreLogLevelCritical_, 2).description("Corresponding orxonox debug level for ogre Critical");
    9899
    99     unsigned int old = this->detailLevelParticle_;
    100     SetConfigValue(detailLevelParticle_, 2).description("O: off, 1: low, 2: normal, 3: high");
    101 
    102     if (this->detailLevelParticle_ != old)
    103       for (Iterator<ParticleInterface> it = ObjectList<ParticleInterface>::begin(); it; ++it)
    104         it->detailLevelChanged(this->detailLevelParticle_);
     100    SetConfigValue(detailLevelParticle_, 2).description("O: off, 1: low, 2: normal, 3: high").callback(this, &GraphicsEngine::detailLevelParticleChanged);
     101  }
     102
     103  void GraphicsEngine::detailLevelParticleChanged()
     104  {
     105    for (ObjectList<ParticleInterface>::iterator it = ObjectList<ParticleInterface>::begin(); it; ++it)
     106      it->detailLevelChanged(this->detailLevelParticle_);
    105107  }
    106108
     
    441443  void GraphicsEngine::windowMoved(Ogre::RenderWindow *rw)
    442444  {
    443     for (Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)
     445    for (ObjectList<orxonox::WindowEventListener>::iterator it = ObjectList<orxonox::WindowEventListener>::begin(); it; ++it)
    444446      it->windowMoved();
    445447  }
     
    453455  void GraphicsEngine::windowResized(Ogre::RenderWindow *rw)
    454456  {
    455     for (Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)
     457    for (ObjectList<orxonox::WindowEventListener>::iterator it = ObjectList<orxonox::WindowEventListener>::begin(); it; ++it)
    456458      it->windowResized(this->renderWindow_->getWidth(), this->renderWindow_->getHeight());
    457459  }
     
    463465  void GraphicsEngine::windowFocusChanged(Ogre::RenderWindow *rw)
    464466  {
    465     for (Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)
     467    for (ObjectList<orxonox::WindowEventListener>::iterator it = ObjectList<orxonox::WindowEventListener>::begin(); it; ++it)
    466468      it->windowFocusChanged();
    467469  }
  • code/trunk/src/orxonox/GraphicsEngine.h

    r1625 r1747  
    5656        public:
    5757            void setConfigValues();
     58            void detailLevelParticleChanged();
    5859            bool setup();
    5960            bool declareRessourceLocations();
  • code/trunk/src/orxonox/Main.cc

    r1535 r1747  
    3737
    3838#include "util/OrxonoxPlatform.h"
    39 #include "core/SignalHandler.h"
     39#include "SignalHandler.h"
    4040#include "Orxonox.h"
    4141
  • code/trunk/src/orxonox/Orxonox.cc

    r1735 r1747  
    5454// core
    5555#include "core/ConfigFileManager.h"
     56#include "core/Iterator.h"
    5657#include "core/ConsoleCommand.h"
    57 #include "core/Debug.h"
    5858#include "core/Loader.h"
    5959#include "core/input/InputManager.h"
    6060#include "core/TclBind.h"
    6161#include "core/Core.h"
     62#include "util/Debug.h"
    6263
    6364// audio
     
    8586namespace orxonox
    8687{
    87   SetConsoleCommandShortcut(Orxonox, exit).setKeybindMode(KeybindMode::OnPress);
    88   SetConsoleCommandShortcut(Orxonox, slomo).setAccessLevel(AccessLevel::Offline).setDefaultValue(0, 1.0).setAxisParamIndex(0).setIsAxisRelative(false);
    89   SetConsoleCommandShortcut(Orxonox, setTimeFactor).setAccessLevel(AccessLevel::Offline).setDefaultValue(0, 1.0);
     88  SetConsoleCommandShortcut(Orxonox, exit).keybindMode(KeybindMode::OnPress);
     89  SetConsoleCommandShortcut(Orxonox, slomo).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0).axisParamIndex(0).isAxisRelative(false);
     90  SetConsoleCommandShortcut(Orxonox, setTimeFactor).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0);
    9091
    9192  /**
     
    181182    float change = factor / Orxonox::getSingleton()->getTimeFactor();
    182183    Orxonox::getSingleton()->timefactor_ = factor;
    183     for (Iterator<ParticleInterface> it = ObjectList<ParticleInterface>::begin(); it; ++it)
     184    for (ObjectList<ParticleInterface>::iterator it = ObjectList<ParticleInterface>::begin(); it; ++it)
    184185        it->setSpeedFactor(it->getSpeedFactor() * change);
    185186
     
    197198  {
    198199#ifdef _DEBUG
    199     ConfigFileManager::getSingleton()->setFile(CFT_Settings, "orxonox_d.ini");
     200    ConfigFileManager::getInstance()->setFile(CFT_Settings, "orxonox_d.ini");
    200201#else
    201     ConfigFileManager::getSingleton()->setFile(CFT_Settings, "orxonox.ini");
     202    ConfigFileManager::getInstance()->setFile(CFT_Settings, "orxonox.ini");
    202203#endif
    203204    Factory::createClassHierarchy();
     
    442443
    443444    unsigned long frameCount = 0;
    444    
     445
    445446    // TODO: this would very well fit into a configValue
    446447    const unsigned long refreshTime = 200000;
     
    468469
    469470      // Call those objects that need the real time
    470       for (Iterator<TickableReal> it = ObjectList<TickableReal>::start(); it; ++it)
     471      for (ObjectList<TickableReal>::iterator it = ObjectList<TickableReal>::begin(); it; ++it)
    471472        it->tick(dt);
    472473      // Call the scene objects
    473       for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)
     474      for (ObjectList<Tickable>::iterator it = ObjectList<Tickable>::begin(); it; ++it)
    474475        it->tick(dt * this->timefactor_);
    475476
  • code/trunk/src/orxonox/OrxonoxStableHeaders.h

    r1631 r1747  
    9292
    9393#include "util/Convert.h"
     94#include "util/Debug.h"
    9495#include "util/Math.h"
    9596#include "util/Multitype.h"
    96 #include "util/MultiTypeMath.h"
     97#include "util/OutputBuffer.h"
     98#include "util/OutputHandler.h"
    9799#include "util/Sleep.h"
    98100#include "util/String.h"
     
    104106#include "core/CoreIncludes.h"
    105107#include "core/ConfigValueIncludes.h"
    106 #include "core/Debug.h"
    107 #include "core/OutputBuffer.h"
    108 #include "core/OutputHandler.h"
    109108#include "core/Executor.h"
    110109#include "core/XMLPort.h"
  • code/trunk/src/orxonox/Radar.cc

    r1625 r1747  
    3939#include "core/CoreIncludes.h"
    4040#include "core/ConsoleCommand.h"
     41#include "core/Iterator.h"
    4142#include "RadarListener.h"
    4243
    4344namespace orxonox
    4445{
    45     SetConsoleCommand(Radar, cycleNavigationFocus, true).setAccessLevel(AccessLevel::User);
    46     SetConsoleCommand(Radar, releaseNavigationFocus, true).setAccessLevel(AccessLevel::User);
     46    SetConsoleCommand(Radar, cycleNavigationFocus, true).accessLevel(AccessLevel::User);
     47    SetConsoleCommand(Radar, releaseNavigationFocus, true).accessLevel(AccessLevel::User);
    4748
    4849    Radar* Radar::instance_s = 0;
     
    106107        }
    107108
    108         for (Iterator<RadarListener> itListener = ObjectList<RadarListener>::begin(); itListener; ++itListener)
     109        for (ObjectList<RadarListener>::iterator itListener = ObjectList<RadarListener>::begin(); itListener; ++itListener)
    109110        {
    110111            (*itListener)->radarTick(dt);
    111112
    112             for (Iterator<RadarViewable> itElement = ObjectList<RadarViewable>::begin(); itElement; ++itElement)
     113            for (ObjectList<RadarViewable>::iterator itElement = ObjectList<RadarViewable>::begin(); itElement; ++itElement)
    113114            {
    114115                if ((*itElement) != SpaceShip::getLocalShip() && (*itListener)->getRadarSensitivity() > (*itElement)->getRadarObjectCamouflage())
     
    120121    void Radar::cycleFocus()
    121122    {
    122         if (*(ObjectList<RadarViewable>::begin()) == 0)
     123        if (ObjectList<RadarViewable>::begin() == 0)
    123124        {
    124125            // list is empty
     
    137138            float nextDistance = FLT_MAX;
    138139            float minimumDistance = FLT_MAX;
    139             Iterator<RadarViewable> itFallback = 0;
    140 
    141             for (Iterator<RadarViewable> it = ObjectList<RadarViewable>::begin(); it; ++it)
     140            ObjectList<RadarViewable>::iterator itFallback = 0;
     141
     142            for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it)
    142143            {
    143144                if (*it == SpaceShip::getLocalShip())
     
    181182        // iterate through all Radar Objects
    182183        unsigned int i = 0;
    183         for (Iterator<RadarViewable> it = ObjectList<RadarViewable>::start(); it; ++it, ++i)
     184        for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it, ++i)
    184185        {
    185186            COUT(3) << i++ << ": " << (*it)->getWorldPosition() << std::endl;
  • code/trunk/src/orxonox/Radar.h

    r1625 r1747  
    5555        RadarBase() { }
    5656    };
    57  
     57
    5858    class _OrxonoxExport Radar : public Tickable, private virtual RadarBase
    5959    {
     
    6161        Radar();
    6262        ~Radar();
     63
     64        virtual void tick(float dt);
    6365
    6466        const RadarViewable* getFocus();
     
    7577    private:
    7678        Radar(Radar& instance);
    77         void tick(float dt);
    7879
    7980        void releaseFocus();
     
    8182        void cycleFocus();
    8283
    83         Iterator<RadarViewable> itFocus_;
     84        ObjectListIterator<RadarViewable> itFocus_;
    8485        RadarViewable* focus_;
    8586        std::map<std::string, RadarViewable::Shape> objectTypes_;
    86         int objectTypeCounter_; 
     87        int objectTypeCounter_;
    8788
    8889        static Radar* instance_s;
  • code/trunk/src/orxonox/RadarViewable.cc

    r1625 r1747  
    2929#include "OrxonoxStableHeaders.h"
    3030#include "RadarViewable.h"
    31 #include "core/Debug.h"
     31#include "util/Debug.h"
    3232#include "core/CoreIncludes.h"
    3333#include "objects/WorldEntity.h"
  • code/trunk/src/orxonox/RadarViewable.h

    r1625 r1747  
    3333#include <string>
    3434#include "util/Math.h"
    35 #include "core/Debug.h"
     35#include "util/Debug.h"
    3636#include "core/OrxonoxClass.h"
    3737
  • code/trunk/src/orxonox/Settings.cc

    r1535 r1747  
    6868  void Settings::setConfigValues()
    6969  {
    70     SetConfigValue(dataPath_, "../../Media/").description("Relative path to the game data.");
     70    SetConfigValue(dataPath_, "../../Media/").description("Relative path to the game data.").callback(this, &Settings::dataPathChanged);
     71  }
     72
     73  /**
     74    @brief Callback function if the datapath has changed.
     75  */
     76  void Settings::dataPathChanged()
     77  {
    7178    if (dataPath_ != "" && dataPath_[dataPath_.size() - 1] != '/')
    7279    {
  • code/trunk/src/orxonox/Settings.h

    r1535 r1747  
    4848    public:
    4949      void setConfigValues();
     50      void dataPathChanged();
    5051
    5152      static const std::string& getDataPath();
  • code/trunk/src/orxonox/objects/Ambient.cc

    r1625 r1747  
    3939#include "util/Convert.h"
    4040#include "util/Math.h"
    41 #include "core/Debug.h"
     41#include "util/Debug.h"
    4242#include "core/CoreIncludes.h"
    43 #include "GraphicsEngine.h"
    4443#include "core/XMLPort.h"
    4544#include "core/ConsoleCommand.h"
     45#include "GraphicsEngine.h"
    4646
    4747namespace orxonox
    4848{
    49     SetConsoleCommand(Ambient, setAmbientLightTest, false).setDefaultValues(ColourValue(1, 1, 1, 1)).setAccessLevel(AccessLevel::Offline);
     49    SetConsoleCommandAlias(Ambient, setAmbientLightTest, "setAmbientLight", false).defaultValues(ColourValue(1, 1, 1, 1)).accessLevel(AccessLevel::Offline);
    5050
    5151    CreateFactory(Ambient);
     
    6464    }
    6565
    66     bool Ambient::create(){
    67       GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(ambientLight_);
    68       return Synchronisable::create();
     66    bool Ambient::create()
     67    {
     68        GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(ambientLight_);
     69        return Synchronisable::create();
    6970    }
    70    
    71     void Ambient::registerAllVariables(){
    72       registerVar(&ambientLight_, sizeof(ColourValue), network::DATA);
    73      
     71
     72    void Ambient::registerAllVariables()
     73    {
     74        registerVar(&ambientLight_, sizeof(ColourValue), network::DATA);
    7475    }
    7576
    7677    void Ambient::setAmbientLight(const ColourValue& colour)
    7778    {
    78             GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(colour);
    79       ambientLight_=colour;     
     79        GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(colour);
     80        ambientLight_=colour;
    8081    }
    8182
     
    8889    void Ambient::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    8990    {
    90         BaseObject::XMLPort(xmlelement, mode);
     91        SUPER(Ambient, XMLPort, xmlelement, mode);
    9192
    92         XMLPortParamLoadOnly(Ambient, "colourvalue", setAmbientLight, xmlelement, mode);
     93        XMLPortParam(Ambient, "colourvalue", setAmbientLight, getAmbienetLight, xmlelement, mode);
    9394        create();
    9495    }
  • code/trunk/src/orxonox/objects/Ambient.h

    r1735 r1747  
    4545
    4646            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    47             void setAmbientLight(const ColourValue& colour);
    4847            virtual bool create();
    4948            void registerAllVariables();
     49
     50            void setAmbientLight(const ColourValue& colour);
     51            inline const ColourValue& getAmbienetLight() const
     52                { return this->ambientLight_; }
    5053
    5154            static void setAmbientLightTest(const ColourValue& colour)
  • code/trunk/src/orxonox/objects/Backlight.cc

    r1608 r1747  
    103103    void Backlight::tick(float dt)
    104104    {
    105         WorldEntity::tick(dt);
     105        SUPER(Backlight, tick, dt);
    106106
    107107        if (this->isActive())
     
    147147    void Backlight::changedVisibility()
    148148    {
    149         WorldEntity::changedVisibility();
     149        SUPER(Backlight, changedVisibility);
    150150
    151151        this->billboard_.setVisible(this->isVisible());
  • code/trunk/src/orxonox/objects/BillboardProjectile.cc

    r1559 r1747  
    6363    void BillboardProjectile::changedVisibility()
    6464    {
    65         Projectile::changedVisibility();
     65        SUPER(BillboardProjectile, changedVisibility);
    6666        this->billboard_.setVisible(this->isVisible());
    6767    }
  • code/trunk/src/orxonox/objects/Camera.cc

    r1505 r1747  
    4242#include "util/Convert.h"
    4343#include "util/Math.h"
    44 #include "core/Debug.h"
     44#include "util/Debug.h"
    4545#include "core/CoreIncludes.h"
    4646#include "GraphicsEngine.h"
  • code/trunk/src/orxonox/objects/Model.cc

    r1627 r1747  
    6565    void Model::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    6666    {
    67         WorldEntity::XMLPort(xmlelement, mode);
     67        SUPER(Model, XMLPort, xmlelement, mode);
    6868
    69         XMLPortParamLoadOnly(Model, "mesh", setMesh, xmlelement, mode);
     69        XMLPortParam(Model, "mesh", setMesh, getMesh, xmlelement, mode);
    7070
    7171        Model::create();
    72     }
    73 
    74     void Model::setMesh(const std::string& meshname)
    75     {
    76         this->meshSrc_ = meshname;
    7772    }
    7873
     
    9893    void Model::changedVisibility()
    9994    {
    100         WorldEntity::changedVisibility();
     95        SUPER(Model, changedVisibility);
    10196        if (this->isInitialized())
    10297            this->mesh_.setVisible(this->isVisible());
  • code/trunk/src/orxonox/objects/Model.h

    r1558 r1747  
    4545            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4646            virtual void changedVisibility();
    47             void setMesh(const std::string& meshname);
     47            inline void setMesh(const std::string& meshname)
     48                { this->meshSrc_ = meshname; }
     49            inline const std::string& getMesh() const
     50                { return this->meshSrc_; }
    4851            virtual bool create();
    4952
  • code/trunk/src/orxonox/objects/NPC.cc

    r1625 r1747  
    3131
    3232#include "core/CoreIncludes.h"
     33#include "core/Iterator.h"
    3334
    3435namespace orxonox {
     
    5657    movable_ = movable;
    5758  }
    58  
     59
    5960  void NPC::registerAllVariables(){
    6061    Model::registerAllVariables();
    6162    registerVar(&movable_, sizeof(movable_), network::DATA);
    6263  }
    63  
     64
    6465
    6566  /**
     
    112113    int numberOfNeighbour = 0;  //number of observed neighbours
    113114    float distance = 0;  // distance to the actual element
    114     for(Iterator<WorldEntity> it = ObjectList<WorldEntity>::start(); it; ++it) {  //go through all elements
     115    for(ObjectList<WorldEntity>::iterator it = ObjectList<WorldEntity>::begin(); it; ++it) {  //go through all elements
    115116      distance = getDistance(*it);  //get distance between this and actual
    116117      if ((distance > 0) && (distance < SEPERATIONDISTANCE)) {  //do only if actual is inside detectionradius
     
    139140    //float distance = 0;
    140141    //go through all elements
    141     for(Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) {  //just working with 3 elements at the moment
     142    for(ObjectList<NPC>::iterator it = ObjectList<NPC>::begin(); it; ++it) {  //just working with 3 elements at the moment
    142143      float distance = getDistance(*it);  //get distance between this and actual
    143144      if ((distance > 0) && (distance < ALIGNMENTDISTANCE)) {  //check if actual element is inside detectionradius
     
    159160    //float distance = 0;
    160161    //go through all elements
    161     for(Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) {  //just working with 3 elements at the moment
     162    for(ObjectList<NPC>::iterator it = ObjectList<NPC>::begin(); it; ++it) {  //just working with 3 elements at the moment
    162163      float distance = getDistance(*it);  //get distance between this and actual
    163164      if ((distance > 0) && (distance < COHESIONDISTANCE)) {  //check if actual element is inside detectionradius
  • code/trunk/src/orxonox/objects/NPC.h

    r1625 r1747  
    4848      NPC();
    4949      virtual ~NPC();
    50       void tick(float dt);
     50      virtual void tick(float dt);
    5151      void update();
    5252      void setValues(Vector3 location, Vector3 speed, Vector3 acceleration, bool movable);
  • code/trunk/src/orxonox/objects/ParticleProjectile.cc

    r1563 r1747  
    3232#include "SpaceShip.h"
    3333#include "core/CoreIncludes.h"
     34#include "core/ConfigValueIncludes.h"
    3435
    3536namespace orxonox
     
    5253            this->particles_ = 0;
    5354        }
     55
     56        this->setConfigValues();
    5457    }
    5558
     
    6063    }
    6164
     65    void ParticleProjectile::setConfigValues()
     66    {
     67        SetConfigValue(speed_, 5000.0).description("The speed of a projectile in units per second").callback((Projectile*)this, &ParticleProjectile::speedChanged);
     68    }
     69
    6270    void ParticleProjectile::changedVisibility()
    6371    {
    64         BillboardProjectile::changedVisibility();
     72        SUPER(ParticleProjectile, changedVisibility);
    6573        this->particles_->setEnabled(this->isVisible());
    6674    }
  • code/trunk/src/orxonox/objects/ParticleProjectile.h

    r1558 r1747  
    4444            virtual ~ParticleProjectile();
    4545            virtual void changedVisibility();
     46            void setConfigValues();
    4647
    4748        private:
  • code/trunk/src/orxonox/objects/Projectile.cc

    r1602 r1747  
    3535#include "core/Executor.h"
    3636#include "core/ConfigValueIncludes.h"
     37#include "core/Iterator.h"
    3738#include "tools/ParticleInterface.h"
    3839
     
    4344namespace orxonox
    4445{
    45     float Projectile::speed_ = 5000;
     46    float Projectile::speed_s = 5000;
    4647
    4748    Projectile::Projectile(SpaceShip* owner) : owner_(owner)
     
    7374        SetConfigValue(damage_, 15.0).description("The damage caused by the projectile");
    7475        SetConfigValue(lifetime_, 4.0).description("The time in seconds a projectile stays alive");
    75         SetConfigValue(speed_, 5000.0).description("The speed of a projectile in units per second");
     76        SetConfigValue(speed_, 5000.0).description("The speed of a projectile in units per second").callback(this, &Projectile::speedChanged);
     77    }
    7678
    77         if(this->owner_)
    78           this->setVelocity(this->owner_->getInitialDir() * this->speed_);
     79    void Projectile::speedChanged()
     80    {
     81        Projectile::speed_s = this->speed_;
     82        if (this->owner_)
     83            this->setVelocity(this->owner_->getInitialDir() * this->speed_);
    7984    }
    8085
    8186    void Projectile::tick(float dt)
    8287    {
    83         WorldEntity::tick(dt);
     88        SUPER(Projectile, tick, dt);
    8489
    8590        if (!this->isActive())
     
    8792
    8893        float radius;
    89         for (Iterator<Model> it = ObjectList<Model>::start(); it; ++it)
     94        for (ObjectList<Model>::iterator it = ObjectList<Model>::begin(); it; ++it)
    9095        {
    9196            if ((*it) != this->owner_)
    9297            {
    93                 radius = it->getScale().x * 3.0;
     98                radius = it->getScale3D().x * 3.0;
    9499
    95100                if (this->getPosition().squaredDistance(it->getPosition()) <= (radius*radius))
  • code/trunk/src/orxonox/objects/Projectile.h

    r1552 r1747  
    4242            virtual ~Projectile();
    4343            void setConfigValues();
     44            void speedChanged();
    4445            void destroyObject();
    4546            virtual void tick(float dt);
    4647
    4748            static float getSpeed()
    48                 { return Projectile::speed_; }
     49                { return Projectile::speed_s; }
    4950
    5051        protected:
     
    5556            std::string explosionTemplateName_;
    5657            std::string smokeTemplateName_;
    57             static float speed_;
     58        protected:
     59            static float speed_s;
     60            float speed_;
     61        private:
    5862            float lifetime_;
    5963            float damage_;
  • code/trunk/src/orxonox/objects/RotatingProjectile.cc

    r1558 r1747  
    6565    void RotatingProjectile::setConfigValues()
    6666    {
    67         SetConfigValue(colour_, ColourValue(1.0, 0.0, 0.0));
     67        SetConfigValue(colour_, ColourValue(1.0, 0.0, 0.0)).callback(this, &RotatingProjectile::colourChanged);
     68    }
    6869
    69         this->rotatingBillboard1_.getBillboardSet()->getBillboard(0)->setColour(this->colour_);
    70         this->rotatingBillboard2_.getBillboardSet()->getBillboard(0)->setColour(this->colour_);
     70    void RotatingProjectile::colourChanged()
     71    {
     72        if (this->isInitialized())
     73        {
     74            this->rotatingBillboard1_.getBillboardSet()->getBillboard(0)->setColour(this->colour_);
     75            this->rotatingBillboard2_.getBillboardSet()->getBillboard(0)->setColour(this->colour_);
     76        }
    7177    }
    7278
     
    8187        }
    8288
    83         Projectile::tick(dt);
     89        SUPER(RotatingProjectile, tick, dt);
    8490    }
    8591
    8692    void RotatingProjectile::changedVisibility()
    8793    {
    88         BillboardProjectile::changedVisibility();
     94        SUPER(RotatingProjectile, changedVisibility);
    8995        this->rotatingBillboard1_.setVisible(this->isVisible());
    9096        this->rotatingBillboard2_.setVisible(this->isVisible());
  • code/trunk/src/orxonox/objects/RotatingProjectile.h

    r1558 r1747  
    1414            virtual ~RotatingProjectile();
    1515            void setConfigValues();
     16            void colourChanged();
    1617            virtual void tick(float dt);
    1718            virtual void changedVisibility();
  • code/trunk/src/orxonox/objects/Skybox.cc

    r1558 r1747  
    3737#include "GraphicsEngine.h"
    3838#include "core/CoreIncludes.h"
    39 #include "core/Debug.h"
    4039#include "core/XMLPort.h"
     40#include "util/Debug.h"
    4141
    4242namespace orxonox
     
    5959    }
    6060
    61     void Skybox::setSkyboxSrc(const std::string& src)
    62     {
    63         this->skyboxSrc_ = src;
    64     }
    65 
    6661    /**
    6762        @brief XML loading and saving.
     
    7267    void Skybox::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7368    {
    74         BaseObject::XMLPort(xmlelement, mode);
     69        SUPER(Skybox, XMLPort, xmlelement, mode);
    7570
    76         XMLPortParamLoadOnly(Skybox, "src", setSkyboxSrc, xmlelement, mode);
     71        XMLPortParam(Skybox, "src", setSkyboxSrc, getSkyboxSrc, xmlelement, mode);
    7772        create();
    7873    }
     
    9186    void Skybox::changedVisibility()
    9287    {
    93         BaseObject::changedVisibility();
     88        SUPER(Skybox, changedVisibility);
    9489        GraphicsEngine::getSingleton().getSceneManager()->setSkyBox(this->isVisible(), this->skyboxSrc_);
    9590    }
  • code/trunk/src/orxonox/objects/Skybox.h

    r1558 r1747  
    4949            virtual bool create();
    5050            void registerAllVariables();
    51             void setSkyboxSrc(const std::string &src);
     51
     52            inline void setSkyboxSrc(const std::string &src)
     53                { this->skyboxSrc_ = src; }
     54            inline const std::string& getSkyboxSrc() const
     55                { return this->skyboxSrc_; }
    5256
    5357        private:
  • code/trunk/src/orxonox/objects/SpaceShip.cc

    r1735 r1747  
    3737#include "util/Convert.h"
    3838#include "util/Math.h"
    39 
     39#include "util/Debug.h"
    4040#include "core/CoreIncludes.h"
    4141#include "core/ConfigValueIncludes.h"
    42 #include "core/Debug.h"
     42#include "core/Iterator.h"
     43#include "core/input/InputManager.h"
    4344#include "core/XMLPort.h"
    4445#include "core/ConsoleCommand.h"
    45 #include "network/Host.h"
    46 
    4746#include "tools/ParticleInterface.h"
    48 
    49 #include "GraphicsEngine.h"
     47#include "network/Client.h"
     48#include "Backlight.h"
     49#include "CameraHandler.h"
     50#include "ParticleSpawner.h"
    5051#include "RotatingProjectile.h"
    5152#include "ParticleProjectile.h"
    52 #include "ParticleSpawner.h"
    53 #include "Backlight.h"
    54 #include "CameraHandler.h"
     53#include "GraphicsEngine.h"
    5554
    5655namespace orxonox
    5756{
    58     SetConsoleCommand(SpaceShip, setMaxSpeedTest, false).setAccessLevel(AccessLevel::Debug);
    59     SetConsoleCommand(SpaceShip, whereAmI, true).setAccessLevel(AccessLevel::User);
    60     SetConsoleCommand(SpaceShip, moveLongitudinal, true).setAccessLevel(AccessLevel::User).setDefaultValue(0, 1.0f).setAxisParamIndex(0).setKeybindMode(KeybindMode::OnHold);
    61     SetConsoleCommand(SpaceShip, moveLateral, true).setAccessLevel(AccessLevel::User).setDefaultValue(0, 1.0f).setAxisParamIndex(0).setKeybindMode(KeybindMode::OnHold);
    62     SetConsoleCommand(SpaceShip, moveYaw, true).setAccessLevel(AccessLevel::User).setDefaultValue(0, 1.0f).setAxisParamIndex(0).setKeybindMode(KeybindMode::OnHold);
    63     SetConsoleCommand(SpaceShip, movePitch, true).setAccessLevel(AccessLevel::User).setDefaultValue(0, 1.0f).setAxisParamIndex(0).setKeybindMode(KeybindMode::OnHold);
    64     SetConsoleCommand(SpaceShip, moveRoll, true).setAccessLevel(AccessLevel::User).setDefaultValue(0, 1.0f).setAxisParamIndex(0).setKeybindMode(KeybindMode::OnHold);
    65     SetConsoleCommand(SpaceShip, fire, true).setAccessLevel(AccessLevel::User).setKeybindMode(KeybindMode::OnHold);
    66     SetConsoleCommandGeneric(test1, SpaceShip, createConsoleCommand(createFunctor(&SpaceShip::setMaxSpeedTest), "setMaxSpeed"), false).setAccessLevel(AccessLevel::Debug);
    67     SetConsoleCommandGeneric(test2, SpaceShip, createConsoleCommand(createFunctor(&SpaceShip::setMaxSpeedTest), "setMaxBlubber"), false).setAccessLevel(AccessLevel::Debug);
    68     SetConsoleCommandGeneric(test3, SpaceShip, createConsoleCommand(createFunctor(&SpaceShip::setMaxSpeedTest), "setRofl"), false).setAccessLevel(AccessLevel::Debug);
     57    SetConsoleCommand(SpaceShip, setMaxSpeedTest, false).accessLevel(AccessLevel::Debug);
     58    SetConsoleCommand(SpaceShip, whereAmI, true).accessLevel(AccessLevel::User);
     59    SetConsoleCommand(SpaceShip, moveLongitudinal, true).accessLevel(AccessLevel::User).defaultValue(0, 1.0f).axisParamIndex(0).keybindMode(KeybindMode::OnHold);
     60    SetConsoleCommand(SpaceShip, moveLateral, true).accessLevel(AccessLevel::User).defaultValue(0, 1.0f).axisParamIndex(0).keybindMode(KeybindMode::OnHold);
     61    SetConsoleCommand(SpaceShip, moveYaw, true).accessLevel(AccessLevel::User).defaultValue(0, 1.0f).axisParamIndex(0).keybindMode(KeybindMode::OnHold);
     62    SetConsoleCommand(SpaceShip, movePitch, true).accessLevel(AccessLevel::User).defaultValue(0, 1.0f).axisParamIndex(0).keybindMode(KeybindMode::OnHold);
     63    SetConsoleCommand(SpaceShip, moveRoll, true).accessLevel(AccessLevel::User).defaultValue(0, 1.0f).axisParamIndex(0).keybindMode(KeybindMode::OnHold);
     64    SetConsoleCommand(SpaceShip, fire, true).accessLevel(AccessLevel::User).keybindMode(KeybindMode::OnHold);
     65    SetConsoleCommandAliasMulti(SpaceShip, setMaxSpeedTest, "setMaxSpeed", 1, false).accessLevel(AccessLevel::Debug);
     66    SetConsoleCommandAliasMulti(SpaceShip, setMaxSpeedTest, "setMaxBlubber", 2, false).accessLevel(AccessLevel::Debug);
     67    SetConsoleCommandAliasMulti(SpaceShip, setMaxSpeedTest, "setRofl", 3, false).accessLevel(AccessLevel::Debug);
    6968
    7069    CreateFactory(SpaceShip);
     
    7473
    7574    SpaceShip *SpaceShip::getLocalShip(){
    76       Iterator<SpaceShip> it;
    77       for(it = ObjectList<SpaceShip>::start(); it; ++it){
     75      ObjectList<SpaceShip>::iterator it;
     76      for(it = ObjectList<SpaceShip>::begin(); it; ++it){
    7877        if( (it)->myShip_ )
    7978          return *it;
     
    289288    void SpaceShip::changedVisibility()
    290289    {
    291         Model::changedVisibility();
     290        SUPER(SpaceShip, changedVisibility);
    292291
    293292        this->tt1_->setEnabled(this->isVisible());
     
    306305    void SpaceShip::changedActivity()
    307306    {
    308         Model::changedActivity();
     307        SUPER(SpaceShip, changedActivity);
    309308
    310309        this->tt1_->setEnabled(this->isVisible());
     
    392391    void SpaceShip::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    393392    {
    394         Model::XMLPort(xmlelement, mode);
    395 
    396         XMLPortParamLoadOnly(SpaceShip, "camera", setCamera, xmlelement, mode);
    397         XMLPortParamLoadOnly(SpaceShip, "maxSpeed", setMaxSpeed, xmlelement, mode);
    398         XMLPortParamLoadOnly(SpaceShip, "maxSideAndBackSpeed", setMaxSideAndBackSpeed, xmlelement, mode);
    399         XMLPortParamLoadOnly(SpaceShip, "maxRotation", setMaxRotation, xmlelement, mode);
    400         XMLPortParamLoadOnly(SpaceShip, "transAcc", setTransAcc, xmlelement, mode);
    401         XMLPortParamLoadOnly(SpaceShip, "rotAcc", setRotAcc, xmlelement, mode);
    402         XMLPortParamLoadOnly(SpaceShip, "transDamp", setTransDamp, xmlelement, mode);
    403         XMLPortParamLoadOnly(SpaceShip, "rotDamp", setRotDamp, xmlelement, mode);
     393        SUPER(SpaceShip, XMLPort, xmlelement, mode);
     394
     395        XMLPortParam(SpaceShip, "camera", setCamera, getCamera, xmlelement, mode);
     396        XMLPortParam(SpaceShip, "maxSpeed", setMaxSpeed, getMaxSpeed, xmlelement, mode);
     397        XMLPortParam(SpaceShip, "maxSideAndBackSpeed", setMaxSideAndBackSpeed, getMaxSideAndBackSpeed, xmlelement, mode);
     398        XMLPortParam(SpaceShip, "maxRotation", setMaxRotation, getMaxRotation, xmlelement, mode);
     399        XMLPortParam(SpaceShip, "transAcc", setTransAcc, getTransAcc, xmlelement, mode);
     400        XMLPortParam(SpaceShip, "rotAcc", setRotAcc, getRotAcc, xmlelement, mode);
     401        XMLPortParam(SpaceShip, "transDamp", setTransDamp, getTransDamp, xmlelement, mode);
     402        XMLPortParam(SpaceShip, "rotDamp", setRotDamp, getRotDamp, xmlelement, mode);
    404403
    405404        myShip_=true; //TODO: this is a hack
     
    535534
    536535
    537         WorldEntity::tick(dt);
     536        SUPER(SpaceShip, tick, dt);
    538537
    539538        this->roll(this->mouseXRotation_ * dt);
  • code/trunk/src/orxonox/objects/SpaceShipAI.cc

    r1608 r1747  
    4444namespace orxonox
    4545{
    46     SetConsoleCommand(SpaceShipAI, createEnemy, true).setDefaultValue(0, 1);
    47     SetConsoleCommand(SpaceShipAI, killEnemies, true).setDefaultValue(0, 0);
     46    SetConsoleCommand(SpaceShipAI, createEnemy, true).defaultValue(0, 1);
     47    SetConsoleCommand(SpaceShipAI, killEnemies, true).defaultValue(0, 0);
    4848
    4949    CreateFactory(SpaceShipAI);
     
    7272    SpaceShipAI::~SpaceShipAI()
    7373    {
    74         for (Iterator<SpaceShipAI> it = ObjectList<SpaceShipAI>::begin(); it; ++it)
     74        for (ObjectList<SpaceShipAI>::iterator it = ObjectList<SpaceShipAI>::begin(); it; ++it)
    7575            it->shipDied(this);
    7676    }
     
    7878    void SpaceShipAI::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7979    {
    80         SpaceShip::XMLPort(xmlelement, mode);
     80        SUPER(SpaceShipAI, XMLPort, xmlelement, mode);
    8181
    8282        this->actionTimer_.setTimer(ACTION_INTERVAL, true, this, createExecutor(createFunctor(&SpaceShipAI::action)));
     
    111111    {
    112112        int i = 0;
    113         for (Iterator<SpaceShipAI> it = ObjectList<SpaceShipAI>::begin(); it; )
     113        for (ObjectList<SpaceShipAI>::iterator it = ObjectList<SpaceShipAI>::begin(); it; )
    114114        {
    115115            (it++)->kill();
     
    229229            this->doFire();
    230230
    231         SpaceShip::tick(dt);
     231        SUPER(SpaceShipAI, tick, dt);
    232232    }
    233233
     
    263263        this->forgetTarget();
    264264
    265         for (Iterator<SpaceShip> it = ObjectList<SpaceShip>::begin(); it; ++it)
     265        for (ObjectList<SpaceShip>::iterator it = ObjectList<SpaceShip>::begin(); it; ++it)
    266266        {
    267267            if (it->getTeamNr() != this->getTeamNr())
  • code/trunk/src/orxonox/objects/SpaceShipAI.h

    r1552 r1747  
    4747
    4848            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     49            virtual void tick(float dt);
    4950            static void createEnemy(int num);
    5051            static void killEnemies(int num);
     
    5455
    5556        private:
    56             virtual void tick(float dt);
    5757            virtual ColourValue getProjectileColour() const;
    5858
  • code/trunk/src/orxonox/objects/Tickable.h

    r1535 r1747  
    4545
    4646#include "core/OrxonoxClass.h"
     47#include "core/Super.h"
    4748
    4849namespace orxonox
     
    6162            Tickable();
    6263    };
     64
     65    SUPER_FUNCTION(1, Tickable, tick, true);
    6366
    6467    //! The Tickable interface provides a tick(dt) function, that gets called every frame.
  • code/trunk/src/orxonox/objects/WorldEntity.cc

    r1625 r1747  
    9595    }
    9696
    97 
    9897    void WorldEntity::setYawPitchRoll(const Degree& yaw, const Degree& pitch, const Degree& roll)
    9998    {
     
    111110    void WorldEntity::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    112111    {
    113         BaseObject::XMLPort(xmlelement, mode);
     112        SUPER(WorldEntity, XMLPort, xmlelement, mode);
    114113
    115         XMLPortParam(WorldEntity, "position", setPositionLoader2, getPosition, xmlelement, mode);
    116         XMLPortParamLoadOnly(WorldEntity, "direction", setDirectionLoader, xmlelement, mode);
     114        XMLPortParamExternTemplate(WorldEntity, Ogre::Node, this->node_, "position", setPosition, getPosition, xmlelement, mode, Ogre::Node, const Vector3&);
     115        XMLPortParamLoadOnly(WorldEntity, "direction", setDirectionSimple, xmlelement, mode);
    117116        XMLPortParamLoadOnly(WorldEntity, "yawpitchroll", setYawPitchRoll, xmlelement, mode);
    118         XMLPortParam(WorldEntity, "scale", setTotalScale, getScale, xmlelement, mode);
    119         XMLPortParam(WorldEntity, "rotationAxis", setRotationAxisLoader, getRotationAxis, xmlelement, mode);
     117        XMLPortParam(WorldEntity, "scale", setScale, getScale, xmlelement, mode);
     118        XMLPortParamTemplate(WorldEntity, "rotationAxis", setRotationAxis, getRotationAxis, xmlelement, mode, WorldEntity, const Vector3&);
    120119        XMLPortParam(WorldEntity, "rotationRate", setRotationRate, getRotationRate, xmlelement, mode);
    121120
     
    150149      registerVar( (void*) &(this->getRotationAxis().z), sizeof(this->getRotationAxis().z), network::DATA, 0x3);
    151150      // register scale of node
    152       registerVar( (void*) &(this->getScale().x), sizeof(this->getScale().x), network::DATA, 0x3);
    153       registerVar( (void*) &(this->getScale().y), sizeof(this->getScale().y), network::DATA, 0x3);
    154       registerVar( (void*) &(this->getScale().z), sizeof(this->getScale().z), network::DATA, 0x3);
     151      registerVar( (void*) &(this->getScale3D().x), sizeof(this->getScale3D().x), network::DATA, 0x3);
     152      registerVar( (void*) &(this->getScale3D().y), sizeof(this->getScale3D().y), network::DATA, 0x3);
     153      registerVar( (void*) &(this->getScale3D().z), sizeof(this->getScale3D().z), network::DATA, 0x3);
    155154      //register staticity
    156155      registerVar( (void*) &(this->bStatic_), sizeof(this->bStatic_), network::DATA, 0x3);
  • code/trunk/src/orxonox/objects/WorldEntity.h

    r1625 r1747  
    6565            inline void setPosition(const Vector3& pos)
    6666                { this->node_->setPosition(pos); }
    67             inline void setPositionLoader1(const Vector3& pos)
    68                 { this->node_->setPosition(pos); }
    69             inline void setPositionLoader2(Real x, Real y, Real z)
    70                 { this->node_->setPosition(x, y, z); }
    7167            inline void setPosition(Real x, Real y, Real z)
    7268                { this->node_->setPosition(x, y, z); }
     
    108104            inline void rotate(const Vector3& axis, const Radian& angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
    109105              { this->node_->rotate(axis, angle, relativeTo); }
    110             inline void setDirectionLoader(Real x, Real y, Real z)
     106            inline void setDirectionSimple(Real x, Real y, Real z)
    111107              { this->setDirection(x, y, z); }
    112108            inline void setDirection(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
     
    117113              { this->node_->lookAt(targetPoint, relativeTo, localDirectionVector); }
    118114
    119             inline void setScale(const Vector3& scale)
     115            inline void setScale3D(const Vector3 &scale)
    120116              { this->node_->setScale(scale); }
    121             inline void setScale(Real x, Real y, Real z)
     117            inline void setScale3D(Real x, Real y, Real z)
    122118              { this->node_->setScale(x, y, z); }
    123             inline void setScale(Real scale)
     119            inline const Vector3& getScale3D(void) const
     120              { return this->node_->getScale(); }
     121            inline void setScale(float scale)
    124122              { this->node_->setScale(scale, scale, scale); }
    125             inline void setTotalScale(Real scale)
    126               { this->node_->setScale(scale, scale, scale); }
    127             inline const Vector3& getScale(void) const
    128               { return this->node_->getScale(); }
    129             inline void scale(const Vector3& scale)
     123            inline float getScale() const
     124              { Vector3 scale = this->getScale3D(); return (scale.x == scale.y && scale.x == scale.z) ? scale.x : 1; }
     125            inline void scale3D(const Vector3 &scale)
    130126              { this->node_->scale(scale); }
    131             inline void scale(Real x, Real y, Real z)
     127            inline void scale3D(Real x, Real y, Real z)
    132128              { this->node_->scale(x, y, z); }
    133129            inline void scale(Real scale)
     
    159155                { return this->acceleration_; }
    160156
    161             inline void setRotationAxisLoader(const Vector3& axis)
    162                 { this->rotationAxis_ = axis; rotationAxis_.normalise(); }
    163157            inline void setRotationAxis(const Vector3& axis)
    164                 { this->rotationAxis_ = axis; rotationAxis_.normalise(); }
     158                { this->rotationAxis_ = axis; this->rotationAxis_.normalise(); }
    165159            inline void setRotationAxis(Real x, Real y, Real z)
    166160                { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; rotationAxis_.normalise(); }
  • code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc

    r1633 r1747  
    5151    std::map<std::string, OrxonoxOverlay*> OrxonoxOverlay::overlays_s;
    5252
    53     SetConsoleCommand(OrxonoxOverlay, scaleOverlay, false).setAccessLevel(AccessLevel::User);
    54     SetConsoleCommand(OrxonoxOverlay, scrollOverlay, false).setAccessLevel(AccessLevel::User);
    55     SetConsoleCommand(OrxonoxOverlay, rotateOverlay, false).setAccessLevel(AccessLevel::User);
     53    SetConsoleCommand(OrxonoxOverlay, scaleOverlay, false).accessLevel(AccessLevel::User);
     54    SetConsoleCommand(OrxonoxOverlay, scrollOverlay, false).accessLevel(AccessLevel::User);
     55    SetConsoleCommand(OrxonoxOverlay, rotateOverlay, false).accessLevel(AccessLevel::User);
    5656
    5757    OrxonoxOverlay::OrxonoxOverlay()
     
    8484    @brief
    8585        Loads the OrxonoxOverlay.
    86        
     86
    8787        This has to be called before usage, otherwise strange behaviour is
    8888        guaranteed! (there should be no segfaults however).
     
    9292    void OrxonoxOverlay::XMLPort(Element& xmlElement, XMLPort::Mode mode)
    9393    {
    94         BaseObject::XMLPort(xmlElement, mode);
     94        SUPER(OrxonoxOverlay, XMLPort, xmlElement, mode);
    9595
    9696        if (mode == XMLPort::LoadObject)
     
    267267        if (angle > Ogre::Math::PI * 0.5)
    268268            angle = Ogre::Math::PI - angle;
    269        
     269
    270270        // do some mathematical fiddling for a bounding box
    271271        Vector2 actualSize = size_ * sizeCorrection_;
  • code/trunk/src/orxonox/overlays/OrxonoxOverlay.h

    r1633 r1747  
    150150        static void rotateOverlay(const std::string& name, const Degree& angle);
    151151
     152        virtual void changedVisibility();
     153
    152154    protected:
    153         virtual void changedVisibility();
    154155        virtual void angleChanged();
    155156        virtual void sizeCorrectionChanged();
  • code/trunk/src/orxonox/overlays/OverlayGroup.cc

    r1633 r1747  
    3535#include "OverlayGroup.h"
    3636
    37 #include "core/Debug.h"
     37#include "util/Debug.h"
    3838#include "core/ConsoleCommand.h"
    3939#include "core/CoreIncludes.h"
     40#include "core/Iterator.h"
    4041#include "core/XMLPort.h"
    4142#include "OrxonoxOverlay.h"
     
    4546    CreateFactory(OverlayGroup);
    4647
    47     SetConsoleCommand(OverlayGroup, toggleVisibility, false).setAccessLevel(AccessLevel::User);
    48     SetConsoleCommand(OverlayGroup, scaleGroup, false).setAccessLevel(AccessLevel::User);
    49     SetConsoleCommand(OverlayGroup, scrollGroup, false).setAccessLevel(AccessLevel::User);
     48    SetConsoleCommand(OverlayGroup, toggleVisibility, false).accessLevel(AccessLevel::User);
     49    SetConsoleCommand(OverlayGroup, scaleGroup, false).accessLevel(AccessLevel::User);
     50    SetConsoleCommand(OverlayGroup, scrollGroup, false).accessLevel(AccessLevel::User);
    5051
    5152    OverlayGroup::OverlayGroup()
     
    6263    void OverlayGroup::XMLPort(Element& xmlElement, XMLPort::Mode mode)
    6364    {
    64         BaseObject::XMLPort(xmlElement, mode);
     65        SUPER(OverlayGroup, XMLPort, xmlElement, mode);
    6566
    6667        XMLPortParam(OverlayGroup, "scale",  setScale,  getScale,  xmlElement, mode).defaultValues(Vector2(1.0, 1.0));
     
    135136    /*static*/ void OverlayGroup::toggleVisibility(const std::string& name)
    136137    {
    137         for (Iterator<OverlayGroup> it = ObjectList<OverlayGroup>::begin(); it; ++it)
     138        for (ObjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it)
    138139        {
    139140            if ((*it)->getName() == name)
     
    151152    /*static*/ void OverlayGroup::scaleGroup(const std::string& name, float scale)
    152153    {
    153         for (Iterator<OverlayGroup> it = ObjectList<OverlayGroup>::begin(); it; ++it)
     154        for (ObjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it)
    154155        {
    155156            if ((*it)->getName() == name)
     
    167168    /*static*/ void OverlayGroup::scrollGroup(const std::string& name, const Vector2& scroll)
    168169    {
    169         for (Iterator<OverlayGroup> it = ObjectList<OverlayGroup>::begin(); it; ++it)
     170        for (ObjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it)
    170171        {
    171172            if ((*it)->getName() == name)
  • code/trunk/src/orxonox/overlays/OverlayGroup.h

    r1633 r1747  
    5858        ~OverlayGroup() { }
    5959
    60         void XMLPort(Element& xmlElement, XMLPort::Mode mode);
     60        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
    6161
    6262        static void toggleVisibility(const std::string& name);
    6363        static void scaleGroup(const std::string& name, float scale);
    6464        static void scrollGroup(const std::string& name, const Vector2& scroll);
     65
     66        void changedVisibility();
    6567
    6668    private:
     
    8082        OrxonoxOverlay* getElement(unsigned int index);
    8183
    82         void changedVisibility();
    83 
    8484        std::map<std::string, OrxonoxOverlay*> hudElements_;    //!< Contains all the OrxonoxOverlays of the this group.
    8585        Vector2 scale_;                                         //!< Current scale (independant of the elements).
  • code/trunk/src/orxonox/overlays/OverlayText.cc

    r1632 r1747  
    5757    void OverlayText::XMLPort(Element& xmlElement, XMLPort::Mode mode)
    5858    {
    59         OrxonoxOverlay::XMLPort(xmlElement, mode);
     59        SUPER(OverlayText, XMLPort, xmlElement, mode);
    6060
    6161        if (mode == XMLPort::LoadObject)
  • code/trunk/src/orxonox/overlays/console/InGameConsole.cc

    r1633 r1747  
    4141#include "util/Math.h"
    4242#include "util/Convert.h"
    43 #include "core/Debug.h"
     43#include "util/Debug.h"
    4444#include "core/CoreIncludes.h"
    4545#include "core/ConfigValueIncludes.h"
  • code/trunk/src/orxonox/overlays/console/InGameConsole.h

    r1625 r1747  
    5050            void setConfigValues();
    5151
    52             void tick(float dt);
     52            virtual void tick(float dt);
    5353
    5454            static InGameConsole& getInstance();
  • code/trunk/src/orxonox/overlays/debug/DebugFPSText.h

    r1625 r1747  
    4343        ~DebugFPSText();
    4444
    45     private:
    46         void tick(float dt);
    47 
    48     private:
     45        virtual void tick(float dt);
    4946    };
    5047}
  • code/trunk/src/orxonox/overlays/debug/DebugRTRText.h

    r1625 r1747  
    4343        ~DebugRTRText();
    4444
    45     private:
    46         void tick(float dt);
     45        virtual void tick(float dt);
    4746    };
    4847}
  • code/trunk/src/orxonox/overlays/hud/HUDBar.cc

    r1628 r1747  
    5353    void BarColour::XMLPort(Element& xmlElement, XMLPort::Mode mode)
    5454    {
    55         BaseObject::XMLPort(xmlElement, mode);
     55        SUPER(BarColour, XMLPort, xmlElement, mode);
    5656
    5757        XMLPortParam(BarColour, "colour", setColour, getColour, xmlElement, mode)
     
    7878    void HUDBar::XMLPort(Element& xmlElement, XMLPort::Mode mode)
    7979    {
    80         OrxonoxOverlay::XMLPort(xmlElement, mode);
     80        SUPER(HUDBar, XMLPort, xmlElement, mode);
    8181
    8282        if (mode == XMLPort::LoadObject)
  • code/trunk/src/orxonox/overlays/hud/HUDBar.h

    r1627 r1747  
    4747        ~BarColour() { }
    4848
    49         void XMLPort(Element& xmlElement, XMLPort::Mode mode);
     49        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
    5050
    5151        void setColour(const ColourValue& colour) { this->colour_ = colour; }
  • code/trunk/src/orxonox/overlays/hud/HUDNavigation.cc

    r1628 r1747  
    6969    void HUDNavigation::XMLPort(Element& xmlElement, XMLPort::Mode mode)
    7070    {
    71         OrxonoxOverlay::XMLPort(xmlElement, mode);
     71        SUPER(HUDNavigation, XMLPort, xmlElement, mode);
    7272
    7373        if (mode == XMLPort::LoadObject)
     
    8787                .createOverlayElement("Panel", "HUDNavigation_aimMarker_" + getUniqueNumberStr()));
    8888            aimMarker_->setMaterialName("Orxonox/NavCrosshair");
    89            
     89
    9090            background_->addChild(navMarker_);
    9191            background_->addChild(aimMarker_);
  • code/trunk/src/orxonox/overlays/hud/HUDNavigation.h

    r1627 r1747  
    4444        ~HUDNavigation();
    4545
    46         void XMLPort(Element& xmlElement, XMLPort::Mode mode);
     46        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
     47        virtual void tick(float dt);
    4748
    4849    private:
     
    5051        void angleChanged() { }
    5152        void positionChanged() { }
    52 
    53         void tick(float dt);
    5453
    5554        // XMLPort accessors
  • code/trunk/src/orxonox/overlays/hud/HUDRadar.cc

    r1628 r1747  
    6666    void HUDRadar::XMLPort(Element& xmlElement, XMLPort::Mode mode)
    6767    {
    68         OrxonoxOverlay::XMLPort(xmlElement, mode);
     68        SUPER(HUDRadar, XMLPort, xmlElement, mode);
    6969
    7070        if (mode == XMLPort::LoadObject)
  • code/trunk/src/orxonox/overlays/hud/HUDRadar.h

    r1625 r1747  
    4848        ~HUDRadar();
    4949
    50         void XMLPort(Element& xmlElement, XMLPort::Mode mode);
     50        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
    5151
    5252    private:
  • code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.h

    r1625 r1747  
    4444        ~HUDSpeedBar();
    4545
    46     private:
    47         void tick(float dt);
     46        virtual void tick(float dt);
    4847    };
    4948}
  • code/trunk/src/orxonox/tools/WindowEventListener.cc

    r1625 r1747  
    3838    WindowEventListener::WindowEventListener()
    3939    {
    40         RegisterObject(WindowEventListener);
     40        RegisterRootObject(WindowEventListener);
    4141    }
    4242}
Note: See TracChangeset for help on using the changeset viewer.