Changeset 1747 for code/trunk/src/orxonox
- Timestamp:
- Sep 9, 2008, 4:25:52 AM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 53 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core3 (added) merged: 1573-1574,1583-1586,1591-1594,1596-1597,1603,1606-1607,1610-1611,1655,1658,1676-1679,1681-1685,1687,1716-1723,1725-1729,1736
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/CMakeLists.txt
r1625 r1747 7 7 RadarViewable.cc 8 8 Settings.cc 9 SignalHandler.cc 9 10 10 11 overlays/OrxonoxOverlay.cc -
code/trunk/src/orxonox/GraphicsEngine.cc
r1625 r1747 47 47 #include "core/CoreIncludes.h" 48 48 #include "core/ConfigValueIncludes.h" 49 #include "core/ Debug.h"49 #include "core/Iterator.h" 50 50 #include "core/CommandExecutor.h" 51 51 #include "core/ConsoleCommand.h" 52 #include "util/Debug.h" 52 53 53 54 #include "overlays/console/InGameConsole.h" … … 97 98 SetConfigValue(ogreLogLevelCritical_, 2).description("Corresponding orxonox debug level for ogre Critical"); 98 99 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_); 105 107 } 106 108 … … 441 443 void GraphicsEngine::windowMoved(Ogre::RenderWindow *rw) 442 444 { 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) 444 446 it->windowMoved(); 445 447 } … … 453 455 void GraphicsEngine::windowResized(Ogre::RenderWindow *rw) 454 456 { 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) 456 458 it->windowResized(this->renderWindow_->getWidth(), this->renderWindow_->getHeight()); 457 459 } … … 463 465 void GraphicsEngine::windowFocusChanged(Ogre::RenderWindow *rw) 464 466 { 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) 466 468 it->windowFocusChanged(); 467 469 } -
code/trunk/src/orxonox/GraphicsEngine.h
r1625 r1747 56 56 public: 57 57 void setConfigValues(); 58 void detailLevelParticleChanged(); 58 59 bool setup(); 59 60 bool declareRessourceLocations(); -
code/trunk/src/orxonox/Main.cc
r1535 r1747 37 37 38 38 #include "util/OrxonoxPlatform.h" 39 #include " core/SignalHandler.h"39 #include "SignalHandler.h" 40 40 #include "Orxonox.h" 41 41 -
code/trunk/src/orxonox/Orxonox.cc
r1735 r1747 54 54 // core 55 55 #include "core/ConfigFileManager.h" 56 #include "core/Iterator.h" 56 57 #include "core/ConsoleCommand.h" 57 #include "core/Debug.h"58 58 #include "core/Loader.h" 59 59 #include "core/input/InputManager.h" 60 60 #include "core/TclBind.h" 61 61 #include "core/Core.h" 62 #include "util/Debug.h" 62 63 63 64 // audio … … 85 86 namespace orxonox 86 87 { 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); 90 91 91 92 /** … … 181 182 float change = factor / Orxonox::getSingleton()->getTimeFactor(); 182 183 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) 184 185 it->setSpeedFactor(it->getSpeedFactor() * change); 185 186 … … 197 198 { 198 199 #ifdef _DEBUG 199 ConfigFileManager::get Singleton()->setFile(CFT_Settings, "orxonox_d.ini");200 ConfigFileManager::getInstance()->setFile(CFT_Settings, "orxonox_d.ini"); 200 201 #else 201 ConfigFileManager::get Singleton()->setFile(CFT_Settings, "orxonox.ini");202 ConfigFileManager::getInstance()->setFile(CFT_Settings, "orxonox.ini"); 202 203 #endif 203 204 Factory::createClassHierarchy(); … … 442 443 443 444 unsigned long frameCount = 0; 444 445 445 446 // TODO: this would very well fit into a configValue 446 447 const unsigned long refreshTime = 200000; … … 468 469 469 470 // 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) 471 472 it->tick(dt); 472 473 // 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) 474 475 it->tick(dt * this->timefactor_); 475 476 -
code/trunk/src/orxonox/OrxonoxStableHeaders.h
r1631 r1747 92 92 93 93 #include "util/Convert.h" 94 #include "util/Debug.h" 94 95 #include "util/Math.h" 95 96 #include "util/Multitype.h" 96 #include "util/MultiTypeMath.h" 97 #include "util/OutputBuffer.h" 98 #include "util/OutputHandler.h" 97 99 #include "util/Sleep.h" 98 100 #include "util/String.h" … … 104 106 #include "core/CoreIncludes.h" 105 107 #include "core/ConfigValueIncludes.h" 106 #include "core/Debug.h"107 #include "core/OutputBuffer.h"108 #include "core/OutputHandler.h"109 108 #include "core/Executor.h" 110 109 #include "core/XMLPort.h" -
code/trunk/src/orxonox/Radar.cc
r1625 r1747 39 39 #include "core/CoreIncludes.h" 40 40 #include "core/ConsoleCommand.h" 41 #include "core/Iterator.h" 41 42 #include "RadarListener.h" 42 43 43 44 namespace orxonox 44 45 { 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); 47 48 48 49 Radar* Radar::instance_s = 0; … … 106 107 } 107 108 108 for ( Iterator<RadarListener>itListener = ObjectList<RadarListener>::begin(); itListener; ++itListener)109 for (ObjectList<RadarListener>::iterator itListener = ObjectList<RadarListener>::begin(); itListener; ++itListener) 109 110 { 110 111 (*itListener)->radarTick(dt); 111 112 112 for ( Iterator<RadarViewable>itElement = ObjectList<RadarViewable>::begin(); itElement; ++itElement)113 for (ObjectList<RadarViewable>::iterator itElement = ObjectList<RadarViewable>::begin(); itElement; ++itElement) 113 114 { 114 115 if ((*itElement) != SpaceShip::getLocalShip() && (*itListener)->getRadarSensitivity() > (*itElement)->getRadarObjectCamouflage()) … … 120 121 void Radar::cycleFocus() 121 122 { 122 if ( *(ObjectList<RadarViewable>::begin()) == 0)123 if (ObjectList<RadarViewable>::begin() == 0) 123 124 { 124 125 // list is empty … … 137 138 float nextDistance = FLT_MAX; 138 139 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) 142 143 { 143 144 if (*it == SpaceShip::getLocalShip()) … … 181 182 // iterate through all Radar Objects 182 183 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) 184 185 { 185 186 COUT(3) << i++ << ": " << (*it)->getWorldPosition() << std::endl; -
code/trunk/src/orxonox/Radar.h
r1625 r1747 55 55 RadarBase() { } 56 56 }; 57 57 58 58 class _OrxonoxExport Radar : public Tickable, private virtual RadarBase 59 59 { … … 61 61 Radar(); 62 62 ~Radar(); 63 64 virtual void tick(float dt); 63 65 64 66 const RadarViewable* getFocus(); … … 75 77 private: 76 78 Radar(Radar& instance); 77 void tick(float dt);78 79 79 80 void releaseFocus(); … … 81 82 void cycleFocus(); 82 83 83 Iterator<RadarViewable> itFocus_;84 ObjectListIterator<RadarViewable> itFocus_; 84 85 RadarViewable* focus_; 85 86 std::map<std::string, RadarViewable::Shape> objectTypes_; 86 int objectTypeCounter_; 87 int objectTypeCounter_; 87 88 88 89 static Radar* instance_s; -
code/trunk/src/orxonox/RadarViewable.cc
r1625 r1747 29 29 #include "OrxonoxStableHeaders.h" 30 30 #include "RadarViewable.h" 31 #include " core/Debug.h"31 #include "util/Debug.h" 32 32 #include "core/CoreIncludes.h" 33 33 #include "objects/WorldEntity.h" -
code/trunk/src/orxonox/RadarViewable.h
r1625 r1747 33 33 #include <string> 34 34 #include "util/Math.h" 35 #include " core/Debug.h"35 #include "util/Debug.h" 36 36 #include "core/OrxonoxClass.h" 37 37 -
code/trunk/src/orxonox/Settings.cc
r1535 r1747 68 68 void Settings::setConfigValues() 69 69 { 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 { 71 78 if (dataPath_ != "" && dataPath_[dataPath_.size() - 1] != '/') 72 79 { -
code/trunk/src/orxonox/Settings.h
r1535 r1747 48 48 public: 49 49 void setConfigValues(); 50 void dataPathChanged(); 50 51 51 52 static const std::string& getDataPath(); -
code/trunk/src/orxonox/objects/Ambient.cc
r1625 r1747 39 39 #include "util/Convert.h" 40 40 #include "util/Math.h" 41 #include " core/Debug.h"41 #include "util/Debug.h" 42 42 #include "core/CoreIncludes.h" 43 #include "GraphicsEngine.h"44 43 #include "core/XMLPort.h" 45 44 #include "core/ConsoleCommand.h" 45 #include "GraphicsEngine.h" 46 46 47 47 namespace orxonox 48 48 { 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); 50 50 51 51 CreateFactory(Ambient); … … 64 64 } 65 65 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(); 69 70 } 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); 74 75 } 75 76 76 77 void Ambient::setAmbientLight(const ColourValue& colour) 77 78 { 78 79 ambientLight_=colour;79 GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(colour); 80 ambientLight_=colour; 80 81 } 81 82 … … 88 89 void Ambient::XMLPort(Element& xmlelement, XMLPort::Mode mode) 89 90 { 90 BaseObject::XMLPort(xmlelement, mode);91 SUPER(Ambient, XMLPort, xmlelement, mode); 91 92 92 XMLPortParam LoadOnly(Ambient, "colourvalue", setAmbientLight, xmlelement, mode);93 XMLPortParam(Ambient, "colourvalue", setAmbientLight, getAmbienetLight, xmlelement, mode); 93 94 create(); 94 95 } -
code/trunk/src/orxonox/objects/Ambient.h
r1735 r1747 45 45 46 46 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 47 void setAmbientLight(const ColourValue& colour);48 47 virtual bool create(); 49 48 void registerAllVariables(); 49 50 void setAmbientLight(const ColourValue& colour); 51 inline const ColourValue& getAmbienetLight() const 52 { return this->ambientLight_; } 50 53 51 54 static void setAmbientLightTest(const ColourValue& colour) -
code/trunk/src/orxonox/objects/Backlight.cc
r1608 r1747 103 103 void Backlight::tick(float dt) 104 104 { 105 WorldEntity::tick(dt);105 SUPER(Backlight, tick, dt); 106 106 107 107 if (this->isActive()) … … 147 147 void Backlight::changedVisibility() 148 148 { 149 WorldEntity::changedVisibility();149 SUPER(Backlight, changedVisibility); 150 150 151 151 this->billboard_.setVisible(this->isVisible()); -
code/trunk/src/orxonox/objects/BillboardProjectile.cc
r1559 r1747 63 63 void BillboardProjectile::changedVisibility() 64 64 { 65 Projectile::changedVisibility();65 SUPER(BillboardProjectile, changedVisibility); 66 66 this->billboard_.setVisible(this->isVisible()); 67 67 } -
code/trunk/src/orxonox/objects/Camera.cc
r1505 r1747 42 42 #include "util/Convert.h" 43 43 #include "util/Math.h" 44 #include " core/Debug.h"44 #include "util/Debug.h" 45 45 #include "core/CoreIncludes.h" 46 46 #include "GraphicsEngine.h" -
code/trunk/src/orxonox/objects/Model.cc
r1627 r1747 65 65 void Model::XMLPort(Element& xmlelement, XMLPort::Mode mode) 66 66 { 67 WorldEntity::XMLPort(xmlelement, mode);67 SUPER(Model, XMLPort, xmlelement, mode); 68 68 69 XMLPortParam LoadOnly(Model, "mesh", setMesh, xmlelement, mode);69 XMLPortParam(Model, "mesh", setMesh, getMesh, xmlelement, mode); 70 70 71 71 Model::create(); 72 }73 74 void Model::setMesh(const std::string& meshname)75 {76 this->meshSrc_ = meshname;77 72 } 78 73 … … 98 93 void Model::changedVisibility() 99 94 { 100 WorldEntity::changedVisibility();95 SUPER(Model, changedVisibility); 101 96 if (this->isInitialized()) 102 97 this->mesh_.setVisible(this->isVisible()); -
code/trunk/src/orxonox/objects/Model.h
r1558 r1747 45 45 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 46 46 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_; } 48 51 virtual bool create(); 49 52 -
code/trunk/src/orxonox/objects/NPC.cc
r1625 r1747 31 31 32 32 #include "core/CoreIncludes.h" 33 #include "core/Iterator.h" 33 34 34 35 namespace orxonox { … … 56 57 movable_ = movable; 57 58 } 58 59 59 60 void NPC::registerAllVariables(){ 60 61 Model::registerAllVariables(); 61 62 registerVar(&movable_, sizeof(movable_), network::DATA); 62 63 } 63 64 64 65 65 66 /** … … 112 113 int numberOfNeighbour = 0; //number of observed neighbours 113 114 float distance = 0; // distance to the actual element 114 for( Iterator<WorldEntity> it = ObjectList<WorldEntity>::start(); it; ++it) { //go through all elements115 for(ObjectList<WorldEntity>::iterator it = ObjectList<WorldEntity>::begin(); it; ++it) { //go through all elements 115 116 distance = getDistance(*it); //get distance between this and actual 116 117 if ((distance > 0) && (distance < SEPERATIONDISTANCE)) { //do only if actual is inside detectionradius … … 139 140 //float distance = 0; 140 141 //go through all elements 141 for( Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) { //just working with 3 elements at the moment142 for(ObjectList<NPC>::iterator it = ObjectList<NPC>::begin(); it; ++it) { //just working with 3 elements at the moment 142 143 float distance = getDistance(*it); //get distance between this and actual 143 144 if ((distance > 0) && (distance < ALIGNMENTDISTANCE)) { //check if actual element is inside detectionradius … … 159 160 //float distance = 0; 160 161 //go through all elements 161 for( Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) { //just working with 3 elements at the moment162 for(ObjectList<NPC>::iterator it = ObjectList<NPC>::begin(); it; ++it) { //just working with 3 elements at the moment 162 163 float distance = getDistance(*it); //get distance between this and actual 163 164 if ((distance > 0) && (distance < COHESIONDISTANCE)) { //check if actual element is inside detectionradius -
code/trunk/src/orxonox/objects/NPC.h
r1625 r1747 48 48 NPC(); 49 49 virtual ~NPC(); 50 v oid tick(float dt);50 virtual void tick(float dt); 51 51 void update(); 52 52 void setValues(Vector3 location, Vector3 speed, Vector3 acceleration, bool movable); -
code/trunk/src/orxonox/objects/ParticleProjectile.cc
r1563 r1747 32 32 #include "SpaceShip.h" 33 33 #include "core/CoreIncludes.h" 34 #include "core/ConfigValueIncludes.h" 34 35 35 36 namespace orxonox … … 52 53 this->particles_ = 0; 53 54 } 55 56 this->setConfigValues(); 54 57 } 55 58 … … 60 63 } 61 64 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 62 70 void ParticleProjectile::changedVisibility() 63 71 { 64 BillboardProjectile::changedVisibility();72 SUPER(ParticleProjectile, changedVisibility); 65 73 this->particles_->setEnabled(this->isVisible()); 66 74 } -
code/trunk/src/orxonox/objects/ParticleProjectile.h
r1558 r1747 44 44 virtual ~ParticleProjectile(); 45 45 virtual void changedVisibility(); 46 void setConfigValues(); 46 47 47 48 private: -
code/trunk/src/orxonox/objects/Projectile.cc
r1602 r1747 35 35 #include "core/Executor.h" 36 36 #include "core/ConfigValueIncludes.h" 37 #include "core/Iterator.h" 37 38 #include "tools/ParticleInterface.h" 38 39 … … 43 44 namespace orxonox 44 45 { 45 float Projectile::speed_ = 5000;46 float Projectile::speed_s = 5000; 46 47 47 48 Projectile::Projectile(SpaceShip* owner) : owner_(owner) … … 73 74 SetConfigValue(damage_, 15.0).description("The damage caused by the projectile"); 74 75 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 } 76 78 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_); 79 84 } 80 85 81 86 void Projectile::tick(float dt) 82 87 { 83 WorldEntity::tick(dt);88 SUPER(Projectile, tick, dt); 84 89 85 90 if (!this->isActive()) … … 87 92 88 93 float radius; 89 for ( Iterator<Model> it = ObjectList<Model>::start(); it; ++it)94 for (ObjectList<Model>::iterator it = ObjectList<Model>::begin(); it; ++it) 90 95 { 91 96 if ((*it) != this->owner_) 92 97 { 93 radius = it->getScale ().x * 3.0;98 radius = it->getScale3D().x * 3.0; 94 99 95 100 if (this->getPosition().squaredDistance(it->getPosition()) <= (radius*radius)) -
code/trunk/src/orxonox/objects/Projectile.h
r1552 r1747 42 42 virtual ~Projectile(); 43 43 void setConfigValues(); 44 void speedChanged(); 44 45 void destroyObject(); 45 46 virtual void tick(float dt); 46 47 47 48 static float getSpeed() 48 { return Projectile::speed_ ; }49 { return Projectile::speed_s; } 49 50 50 51 protected: … … 55 56 std::string explosionTemplateName_; 56 57 std::string smokeTemplateName_; 57 static float speed_; 58 protected: 59 static float speed_s; 60 float speed_; 61 private: 58 62 float lifetime_; 59 63 float damage_; -
code/trunk/src/orxonox/objects/RotatingProjectile.cc
r1558 r1747 65 65 void RotatingProjectile::setConfigValues() 66 66 { 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 } 68 69 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 } 71 77 } 72 78 … … 81 87 } 82 88 83 Projectile::tick(dt);89 SUPER(RotatingProjectile, tick, dt); 84 90 } 85 91 86 92 void RotatingProjectile::changedVisibility() 87 93 { 88 BillboardProjectile::changedVisibility();94 SUPER(RotatingProjectile, changedVisibility); 89 95 this->rotatingBillboard1_.setVisible(this->isVisible()); 90 96 this->rotatingBillboard2_.setVisible(this->isVisible()); -
code/trunk/src/orxonox/objects/RotatingProjectile.h
r1558 r1747 14 14 virtual ~RotatingProjectile(); 15 15 void setConfigValues(); 16 void colourChanged(); 16 17 virtual void tick(float dt); 17 18 virtual void changedVisibility(); -
code/trunk/src/orxonox/objects/Skybox.cc
r1558 r1747 37 37 #include "GraphicsEngine.h" 38 38 #include "core/CoreIncludes.h" 39 #include "core/Debug.h"40 39 #include "core/XMLPort.h" 40 #include "util/Debug.h" 41 41 42 42 namespace orxonox … … 59 59 } 60 60 61 void Skybox::setSkyboxSrc(const std::string& src)62 {63 this->skyboxSrc_ = src;64 }65 66 61 /** 67 62 @brief XML loading and saving. … … 72 67 void Skybox::XMLPort(Element& xmlelement, XMLPort::Mode mode) 73 68 { 74 BaseObject::XMLPort(xmlelement, mode);69 SUPER(Skybox, XMLPort, xmlelement, mode); 75 70 76 XMLPortParam LoadOnly(Skybox, "src", setSkyboxSrc, xmlelement, mode);71 XMLPortParam(Skybox, "src", setSkyboxSrc, getSkyboxSrc, xmlelement, mode); 77 72 create(); 78 73 } … … 91 86 void Skybox::changedVisibility() 92 87 { 93 BaseObject::changedVisibility();88 SUPER(Skybox, changedVisibility); 94 89 GraphicsEngine::getSingleton().getSceneManager()->setSkyBox(this->isVisible(), this->skyboxSrc_); 95 90 } -
code/trunk/src/orxonox/objects/Skybox.h
r1558 r1747 49 49 virtual bool create(); 50 50 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_; } 52 56 53 57 private: -
code/trunk/src/orxonox/objects/SpaceShip.cc
r1735 r1747 37 37 #include "util/Convert.h" 38 38 #include "util/Math.h" 39 39 #include "util/Debug.h" 40 40 #include "core/CoreIncludes.h" 41 41 #include "core/ConfigValueIncludes.h" 42 #include "core/Debug.h" 42 #include "core/Iterator.h" 43 #include "core/input/InputManager.h" 43 44 #include "core/XMLPort.h" 44 45 #include "core/ConsoleCommand.h" 45 #include "network/Host.h"46 47 46 #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" 50 51 #include "RotatingProjectile.h" 51 52 #include "ParticleProjectile.h" 52 #include "ParticleSpawner.h" 53 #include "Backlight.h" 54 #include "CameraHandler.h" 53 #include "GraphicsEngine.h" 55 54 56 55 namespace orxonox 57 56 { 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 SetConsoleCommand Generic(test1, SpaceShip, createConsoleCommand(createFunctor(&SpaceShip::setMaxSpeedTest), "setMaxSpeed"), false).setAccessLevel(AccessLevel::Debug);67 SetConsoleCommand Generic(test2, SpaceShip, createConsoleCommand(createFunctor(&SpaceShip::setMaxSpeedTest), "setMaxBlubber"), false).setAccessLevel(AccessLevel::Debug);68 SetConsoleCommand Generic(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); 69 68 70 69 CreateFactory(SpaceShip); … … 74 73 75 74 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){ 78 77 if( (it)->myShip_ ) 79 78 return *it; … … 289 288 void SpaceShip::changedVisibility() 290 289 { 291 Model::changedVisibility();290 SUPER(SpaceShip, changedVisibility); 292 291 293 292 this->tt1_->setEnabled(this->isVisible()); … … 306 305 void SpaceShip::changedActivity() 307 306 { 308 Model::changedActivity();307 SUPER(SpaceShip, changedActivity); 309 308 310 309 this->tt1_->setEnabled(this->isVisible()); … … 392 391 void SpaceShip::XMLPort(Element& xmlelement, XMLPort::Mode mode) 393 392 { 394 Model::XMLPort(xmlelement, mode);395 396 XMLPortParam LoadOnly(SpaceShip, "camera", setCamera, xmlelement, mode);397 XMLPortParam LoadOnly(SpaceShip, "maxSpeed", setMaxSpeed, xmlelement, mode);398 XMLPortParam LoadOnly(SpaceShip, "maxSideAndBackSpeed", setMaxSideAndBackSpeed, xmlelement, mode);399 XMLPortParam LoadOnly(SpaceShip, "maxRotation", setMaxRotation, xmlelement, mode);400 XMLPortParam LoadOnly(SpaceShip, "transAcc", setTransAcc, xmlelement, mode);401 XMLPortParam LoadOnly(SpaceShip, "rotAcc", setRotAcc, xmlelement, mode);402 XMLPortParam LoadOnly(SpaceShip, "transDamp", setTransDamp, xmlelement, mode);403 XMLPortParam LoadOnly(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); 404 403 405 404 myShip_=true; //TODO: this is a hack … … 535 534 536 535 537 WorldEntity::tick(dt);536 SUPER(SpaceShip, tick, dt); 538 537 539 538 this->roll(this->mouseXRotation_ * dt); -
code/trunk/src/orxonox/objects/SpaceShipAI.cc
r1608 r1747 44 44 namespace orxonox 45 45 { 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); 48 48 49 49 CreateFactory(SpaceShipAI); … … 72 72 SpaceShipAI::~SpaceShipAI() 73 73 { 74 for ( Iterator<SpaceShipAI>it = ObjectList<SpaceShipAI>::begin(); it; ++it)74 for (ObjectList<SpaceShipAI>::iterator it = ObjectList<SpaceShipAI>::begin(); it; ++it) 75 75 it->shipDied(this); 76 76 } … … 78 78 void SpaceShipAI::XMLPort(Element& xmlelement, XMLPort::Mode mode) 79 79 { 80 S paceShip::XMLPort(xmlelement, mode);80 SUPER(SpaceShipAI, XMLPort, xmlelement, mode); 81 81 82 82 this->actionTimer_.setTimer(ACTION_INTERVAL, true, this, createExecutor(createFunctor(&SpaceShipAI::action))); … … 111 111 { 112 112 int i = 0; 113 for ( Iterator<SpaceShipAI>it = ObjectList<SpaceShipAI>::begin(); it; )113 for (ObjectList<SpaceShipAI>::iterator it = ObjectList<SpaceShipAI>::begin(); it; ) 114 114 { 115 115 (it++)->kill(); … … 229 229 this->doFire(); 230 230 231 S paceShip::tick(dt);231 SUPER(SpaceShipAI, tick, dt); 232 232 } 233 233 … … 263 263 this->forgetTarget(); 264 264 265 for ( Iterator<SpaceShip>it = ObjectList<SpaceShip>::begin(); it; ++it)265 for (ObjectList<SpaceShip>::iterator it = ObjectList<SpaceShip>::begin(); it; ++it) 266 266 { 267 267 if (it->getTeamNr() != this->getTeamNr()) -
code/trunk/src/orxonox/objects/SpaceShipAI.h
r1552 r1747 47 47 48 48 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 49 virtual void tick(float dt); 49 50 static void createEnemy(int num); 50 51 static void killEnemies(int num); … … 54 55 55 56 private: 56 virtual void tick(float dt);57 57 virtual ColourValue getProjectileColour() const; 58 58 -
code/trunk/src/orxonox/objects/Tickable.h
r1535 r1747 45 45 46 46 #include "core/OrxonoxClass.h" 47 #include "core/Super.h" 47 48 48 49 namespace orxonox … … 61 62 Tickable(); 62 63 }; 64 65 SUPER_FUNCTION(1, Tickable, tick, true); 63 66 64 67 //! The Tickable interface provides a tick(dt) function, that gets called every frame. -
code/trunk/src/orxonox/objects/WorldEntity.cc
r1625 r1747 95 95 } 96 96 97 98 97 void WorldEntity::setYawPitchRoll(const Degree& yaw, const Degree& pitch, const Degree& roll) 99 98 { … … 111 110 void WorldEntity::XMLPort(Element& xmlelement, XMLPort::Mode mode) 112 111 { 113 BaseObject::XMLPort(xmlelement, mode);112 SUPER(WorldEntity, XMLPort, xmlelement, mode); 114 113 115 XMLPortParam (WorldEntity, "position", setPositionLoader2, getPosition, xmlelement, mode);116 XMLPortParamLoadOnly(WorldEntity, "direction", setDirection Loader, 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); 117 116 XMLPortParamLoadOnly(WorldEntity, "yawpitchroll", setYawPitchRoll, xmlelement, mode); 118 XMLPortParam(WorldEntity, "scale", set TotalScale, 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&); 120 119 XMLPortParam(WorldEntity, "rotationRate", setRotationRate, getRotationRate, xmlelement, mode); 121 120 … … 150 149 registerVar( (void*) &(this->getRotationAxis().z), sizeof(this->getRotationAxis().z), network::DATA, 0x3); 151 150 // 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); 155 154 //register staticity 156 155 registerVar( (void*) &(this->bStatic_), sizeof(this->bStatic_), network::DATA, 0x3); -
code/trunk/src/orxonox/objects/WorldEntity.h
r1625 r1747 65 65 inline void setPosition(const Vector3& pos) 66 66 { 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); }71 67 inline void setPosition(Real x, Real y, Real z) 72 68 { this->node_->setPosition(x, y, z); } … … 108 104 inline void rotate(const Vector3& axis, const Radian& angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL) 109 105 { this->node_->rotate(axis, angle, relativeTo); } 110 inline void setDirection Loader(Real x, Real y, Real z)106 inline void setDirectionSimple(Real x, Real y, Real z) 111 107 { this->setDirection(x, y, z); } 112 108 inline void setDirection(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector=Vector3::NEGATIVE_UNIT_Z) … … 117 113 { this->node_->lookAt(targetPoint, relativeTo, localDirectionVector); } 118 114 119 inline void setScale (const Vector3&scale)115 inline void setScale3D(const Vector3 &scale) 120 116 { this->node_->setScale(scale); } 121 inline void setScale (Real x, Real y, Real z)117 inline void setScale3D(Real x, Real y, Real z) 122 118 { 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) 124 122 { 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) 130 126 { this->node_->scale(scale); } 131 inline void scale (Real x, Real y, Real z)127 inline void scale3D(Real x, Real y, Real z) 132 128 { this->node_->scale(x, y, z); } 133 129 inline void scale(Real scale) … … 159 155 { return this->acceleration_; } 160 156 161 inline void setRotationAxisLoader(const Vector3& axis)162 { this->rotationAxis_ = axis; rotationAxis_.normalise(); }163 157 inline void setRotationAxis(const Vector3& axis) 164 { this->rotationAxis_ = axis; rotationAxis_.normalise(); }158 { this->rotationAxis_ = axis; this->rotationAxis_.normalise(); } 165 159 inline void setRotationAxis(Real x, Real y, Real z) 166 160 { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; rotationAxis_.normalise(); } -
code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
r1633 r1747 51 51 std::map<std::string, OrxonoxOverlay*> OrxonoxOverlay::overlays_s; 52 52 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); 56 56 57 57 OrxonoxOverlay::OrxonoxOverlay() … … 84 84 @brief 85 85 Loads the OrxonoxOverlay. 86 86 87 87 This has to be called before usage, otherwise strange behaviour is 88 88 guaranteed! (there should be no segfaults however). … … 92 92 void OrxonoxOverlay::XMLPort(Element& xmlElement, XMLPort::Mode mode) 93 93 { 94 BaseObject::XMLPort(xmlElement, mode);94 SUPER(OrxonoxOverlay, XMLPort, xmlElement, mode); 95 95 96 96 if (mode == XMLPort::LoadObject) … … 267 267 if (angle > Ogre::Math::PI * 0.5) 268 268 angle = Ogre::Math::PI - angle; 269 269 270 270 // do some mathematical fiddling for a bounding box 271 271 Vector2 actualSize = size_ * sizeCorrection_; -
code/trunk/src/orxonox/overlays/OrxonoxOverlay.h
r1633 r1747 150 150 static void rotateOverlay(const std::string& name, const Degree& angle); 151 151 152 virtual void changedVisibility(); 153 152 154 protected: 153 virtual void changedVisibility();154 155 virtual void angleChanged(); 155 156 virtual void sizeCorrectionChanged(); -
code/trunk/src/orxonox/overlays/OverlayGroup.cc
r1633 r1747 35 35 #include "OverlayGroup.h" 36 36 37 #include " core/Debug.h"37 #include "util/Debug.h" 38 38 #include "core/ConsoleCommand.h" 39 39 #include "core/CoreIncludes.h" 40 #include "core/Iterator.h" 40 41 #include "core/XMLPort.h" 41 42 #include "OrxonoxOverlay.h" … … 45 46 CreateFactory(OverlayGroup); 46 47 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); 50 51 51 52 OverlayGroup::OverlayGroup() … … 62 63 void OverlayGroup::XMLPort(Element& xmlElement, XMLPort::Mode mode) 63 64 { 64 BaseObject::XMLPort(xmlElement, mode);65 SUPER(OverlayGroup, XMLPort, xmlElement, mode); 65 66 66 67 XMLPortParam(OverlayGroup, "scale", setScale, getScale, xmlElement, mode).defaultValues(Vector2(1.0, 1.0)); … … 135 136 /*static*/ void OverlayGroup::toggleVisibility(const std::string& name) 136 137 { 137 for ( Iterator<OverlayGroup>it = ObjectList<OverlayGroup>::begin(); it; ++it)138 for (ObjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it) 138 139 { 139 140 if ((*it)->getName() == name) … … 151 152 /*static*/ void OverlayGroup::scaleGroup(const std::string& name, float scale) 152 153 { 153 for ( Iterator<OverlayGroup>it = ObjectList<OverlayGroup>::begin(); it; ++it)154 for (ObjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it) 154 155 { 155 156 if ((*it)->getName() == name) … … 167 168 /*static*/ void OverlayGroup::scrollGroup(const std::string& name, const Vector2& scroll) 168 169 { 169 for ( Iterator<OverlayGroup>it = ObjectList<OverlayGroup>::begin(); it; ++it)170 for (ObjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it) 170 171 { 171 172 if ((*it)->getName() == name) -
code/trunk/src/orxonox/overlays/OverlayGroup.h
r1633 r1747 58 58 ~OverlayGroup() { } 59 59 60 v oid XMLPort(Element& xmlElement, XMLPort::Mode mode);60 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); 61 61 62 62 static void toggleVisibility(const std::string& name); 63 63 static void scaleGroup(const std::string& name, float scale); 64 64 static void scrollGroup(const std::string& name, const Vector2& scroll); 65 66 void changedVisibility(); 65 67 66 68 private: … … 80 82 OrxonoxOverlay* getElement(unsigned int index); 81 83 82 void changedVisibility();83 84 84 std::map<std::string, OrxonoxOverlay*> hudElements_; //!< Contains all the OrxonoxOverlays of the this group. 85 85 Vector2 scale_; //!< Current scale (independant of the elements). -
code/trunk/src/orxonox/overlays/OverlayText.cc
r1632 r1747 57 57 void OverlayText::XMLPort(Element& xmlElement, XMLPort::Mode mode) 58 58 { 59 OrxonoxOverlay::XMLPort(xmlElement, mode);59 SUPER(OverlayText, XMLPort, xmlElement, mode); 60 60 61 61 if (mode == XMLPort::LoadObject) -
code/trunk/src/orxonox/overlays/console/InGameConsole.cc
r1633 r1747 41 41 #include "util/Math.h" 42 42 #include "util/Convert.h" 43 #include " core/Debug.h"43 #include "util/Debug.h" 44 44 #include "core/CoreIncludes.h" 45 45 #include "core/ConfigValueIncludes.h" -
code/trunk/src/orxonox/overlays/console/InGameConsole.h
r1625 r1747 50 50 void setConfigValues(); 51 51 52 v oid tick(float dt);52 virtual void tick(float dt); 53 53 54 54 static InGameConsole& getInstance(); -
code/trunk/src/orxonox/overlays/debug/DebugFPSText.h
r1625 r1747 43 43 ~DebugFPSText(); 44 44 45 private: 46 void tick(float dt); 47 48 private: 45 virtual void tick(float dt); 49 46 }; 50 47 } -
code/trunk/src/orxonox/overlays/debug/DebugRTRText.h
r1625 r1747 43 43 ~DebugRTRText(); 44 44 45 private: 46 void tick(float dt); 45 virtual void tick(float dt); 47 46 }; 48 47 } -
code/trunk/src/orxonox/overlays/hud/HUDBar.cc
r1628 r1747 53 53 void BarColour::XMLPort(Element& xmlElement, XMLPort::Mode mode) 54 54 { 55 BaseObject::XMLPort(xmlElement, mode);55 SUPER(BarColour, XMLPort, xmlElement, mode); 56 56 57 57 XMLPortParam(BarColour, "colour", setColour, getColour, xmlElement, mode) … … 78 78 void HUDBar::XMLPort(Element& xmlElement, XMLPort::Mode mode) 79 79 { 80 OrxonoxOverlay::XMLPort(xmlElement, mode);80 SUPER(HUDBar, XMLPort, xmlElement, mode); 81 81 82 82 if (mode == XMLPort::LoadObject) -
code/trunk/src/orxonox/overlays/hud/HUDBar.h
r1627 r1747 47 47 ~BarColour() { } 48 48 49 v oid XMLPort(Element& xmlElement, XMLPort::Mode mode);49 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); 50 50 51 51 void setColour(const ColourValue& colour) { this->colour_ = colour; } -
code/trunk/src/orxonox/overlays/hud/HUDNavigation.cc
r1628 r1747 69 69 void HUDNavigation::XMLPort(Element& xmlElement, XMLPort::Mode mode) 70 70 { 71 OrxonoxOverlay::XMLPort(xmlElement, mode);71 SUPER(HUDNavigation, XMLPort, xmlElement, mode); 72 72 73 73 if (mode == XMLPort::LoadObject) … … 87 87 .createOverlayElement("Panel", "HUDNavigation_aimMarker_" + getUniqueNumberStr())); 88 88 aimMarker_->setMaterialName("Orxonox/NavCrosshair"); 89 89 90 90 background_->addChild(navMarker_); 91 91 background_->addChild(aimMarker_); -
code/trunk/src/orxonox/overlays/hud/HUDNavigation.h
r1627 r1747 44 44 ~HUDNavigation(); 45 45 46 void XMLPort(Element& xmlElement, XMLPort::Mode mode); 46 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); 47 virtual void tick(float dt); 47 48 48 49 private: … … 50 51 void angleChanged() { } 51 52 void positionChanged() { } 52 53 void tick(float dt);54 53 55 54 // XMLPort accessors -
code/trunk/src/orxonox/overlays/hud/HUDRadar.cc
r1628 r1747 66 66 void HUDRadar::XMLPort(Element& xmlElement, XMLPort::Mode mode) 67 67 { 68 OrxonoxOverlay::XMLPort(xmlElement, mode);68 SUPER(HUDRadar, XMLPort, xmlElement, mode); 69 69 70 70 if (mode == XMLPort::LoadObject) -
code/trunk/src/orxonox/overlays/hud/HUDRadar.h
r1625 r1747 48 48 ~HUDRadar(); 49 49 50 v oid XMLPort(Element& xmlElement, XMLPort::Mode mode);50 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); 51 51 52 52 private: -
code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.h
r1625 r1747 44 44 ~HUDSpeedBar(); 45 45 46 private: 47 void tick(float dt); 46 virtual void tick(float dt); 48 47 }; 49 48 } -
code/trunk/src/orxonox/tools/WindowEventListener.cc
r1625 r1747 38 38 WindowEventListener::WindowEventListener() 39 39 { 40 Register Object(WindowEventListener);40 RegisterRootObject(WindowEventListener); 41 41 } 42 42 }
Note: See TracChangeset
for help on using the changeset viewer.