Changeset 1736
- Timestamp:
- Sep 7, 2008, 5:19:48 PM (16 years ago)
- Location:
- code/branches/core3/src
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core3/src/core/BaseObject.h
r1684 r1736 103 103 }; 104 104 105 SUPER_FUNCTION( 1, BaseObject, XMLPort, false);106 SUPER_FUNCTION( 3, BaseObject, changedActivity, false);107 SUPER_FUNCTION( 4, BaseObject, changedVisibility, false);105 SUPER_FUNCTION(0, BaseObject, XMLPort, false); 106 SUPER_FUNCTION(2, BaseObject, changedActivity, false); 107 SUPER_FUNCTION(3, BaseObject, changedVisibility, false); 108 108 } 109 109 -
code/branches/core3/src/core/Namespace.cc
r1684 r1736 60 60 void Namespace::XMLPort(Element& xmlelement, XMLPort::Mode mode) 61 61 { 62 // BaseObject::XMLPort(xmlelement, mode);63 62 SUPER(Namespace, XMLPort, xmlelement, mode); 64 63 -
code/branches/core3/src/core/Super.h
r1687 r1736 105 105 if (!((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_) \ 106 106 { \ 107 COUT( 0) << "Added SuperFunctionCaller for " << #functionname << ": " << ClassIdentifier<T>::getIdentifier()->getName() << " <- " << ((ClassIdentifier<T>*)(*it))->getName() << std::endl; \107 COUT(5) << "Added SuperFunctionCaller for " << #functionname << ": " << ClassIdentifier<T>::getIdentifier()->getName() << " <- " << ((ClassIdentifier<T>*)(*it))->getName() << std::endl; \ 108 108 ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>; \ 109 109 } \ … … 218 218 219 219 // (1/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- 220 #define SUPER_testfunction(classname, functionname, ...) \221 SUPER_NOARGS(classname, functionname)222 223 220 #define SUPER_XMLPort(classname, functionname, ...) \ 224 221 SUPER_ARGS(classname, functionname, __VA_ARGS__) … … 421 418 422 419 // (2/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- 423 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(0, testfunction, false) 420 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(0, XMLPort, true, Element& xmlelement, XMLPort::Mode mode) 421 (xmlelement, mode) 422 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 423 424 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(1, tick, true, float dt) 425 (dt) 426 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 427 428 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(2, changedActivity, false) 424 429 () 425 430 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 426 431 427 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(1, XMLPort, true, Element& xmlelement, XMLPort::Mode mode) 428 (xmlelement, mode) 429 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 430 431 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(2, tick, true, float dt) 432 (dt) 433 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 434 435 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(3, changedActivity, false) 436 () 437 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 438 439 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(4, changedVisibility, false) 432 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(3, changedVisibility, false) 440 433 () 441 434 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; … … 482 475 483 476 // (3/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- 484 SUPER_INTRUSIVE_DECLARATION(testfunction);485 477 SUPER_INTRUSIVE_DECLARATION(XMLPort); 486 478 SUPER_INTRUSIVE_DECLARATION(tick); -
code/branches/core3/src/orxonox/objects/Ambient.cc
r1684 r1736 89 89 void Ambient::XMLPort(Element& xmlelement, XMLPort::Mode mode) 90 90 { 91 // BaseObject::XMLPort(xmlelement, mode);92 91 SUPER(Ambient, XMLPort, xmlelement, mode); 93 92 -
code/branches/core3/src/orxonox/objects/BillboardProjectile.cc
r1685 r1736 48 48 this->scale(0.5); 49 49 } 50 /*51 std::cout << "a:\n";52 SUPER(BillboardProjectile, testfunction);53 std::cout << "b:\n";54 */55 50 } 56 51 … … 68 63 void BillboardProjectile::changedVisibility() 69 64 { 70 // Projectile::changedVisibility();71 65 SUPER(BillboardProjectile, changedVisibility); 72 66 this->billboard_.setVisible(this->isVisible()); 73 67 } 74 75 void BillboardProjectile::testfunction() { SUPER(BillboardProjectile, testfunction); std::cout << "2 -> " << std::endl; }76 68 } -
code/branches/core3/src/orxonox/objects/BillboardProjectile.h
r1685 r1736 46 46 virtual void setColour(const ColourValue& colour); 47 47 virtual void changedVisibility(); 48 virtual void testfunction();49 48 50 49 private: -
code/branches/core3/src/orxonox/objects/Model.cc
r1684 r1736 66 66 void Model::XMLPort(Element& xmlelement, XMLPort::Mode mode) 67 67 { 68 // WorldEntity::XMLPort(xmlelement, mode);69 68 SUPER(Model, XMLPort, xmlelement, mode); 70 69 … … 73 72 Model::create(); 74 73 } 75 /*76 void Model::tick(float dt)77 {78 float i = dt * rnd(-100, 100);79 float j = dt * rnd(-100, 100);80 float k = dt * rnd(-100, 100);81 74 82 // WorldEntity::tick(dt);83 SUPER(Model, tick, dt);84 85 this->setPosition(this->getPosition().x + i, this->getPosition().y + j, this->getPosition().z + k);86 }87 */88 75 bool Model::create(){ 89 76 if(!WorldEntity::create()) … … 107 94 void Model::changedVisibility() 108 95 { 109 // WorldEntity::changedVisibility();110 96 SUPER(Model, changedVisibility); 111 97 this->mesh_.setVisible(this->isVisible()); -
code/branches/core3/src/orxonox/objects/Model.h
r1684 r1736 44 44 virtual ~Model(); 45 45 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 46 // virtual void tick(float dt);47 46 virtual void changedVisibility(); 48 47 inline void setMesh(const std::string& meshname) -
code/branches/core3/src/orxonox/objects/ParticleProjectile.cc
r1685 r1736 55 55 56 56 this->setConfigValues(); 57 /*58 std::cout << "c:\n";59 SUPER(ParticleProjectile, testfunction);60 std::cout << "d:\n";61 62 std::cout << "e:\n";63 this->testfunction();64 std::cout << "f:\n";65 */66 57 } 67 58 … … 79 70 void ParticleProjectile::changedVisibility() 80 71 { 81 // BillboardProjectile::changedVisibility();82 72 SUPER(ParticleProjectile, changedVisibility); 83 73 this->particles_->setEnabled(this->isVisible()); 84 74 } 85 86 void ParticleProjectile::testfunction() { SUPER(ParticleProjectile, testfunction); std::cout << "3 -> " << std::endl; }87 75 } -
code/branches/core3/src/orxonox/objects/ParticleProjectile.h
r1685 r1736 44 44 virtual ~ParticleProjectile(); 45 45 virtual void changedVisibility(); 46 virtual void testfunction();47 46 void setConfigValues(); 48 47 -
code/branches/core3/src/orxonox/objects/Projectile.cc
r1684 r1736 86 86 void Projectile::tick(float dt) 87 87 { 88 // WorldEntity::tick(dt);89 88 SUPER(Projectile, tick, dt); 90 89 … … 122 121 delete this; 123 122 } 124 125 void Projectile::testfunction() { std::cout << "1 -> " << std::endl; }126 123 } -
code/branches/core3/src/orxonox/objects/Projectile.h
r1685 r1736 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "core/Super.h"35 34 #include "WorldEntity.h" 36 35 #include "tools/Timer.h" … … 46 45 void destroyObject(); 47 46 virtual void tick(float dt); 48 virtual void testfunction();49 47 50 48 static float getSpeed() … … 66 64 Timer<Projectile> destroyTimer_; 67 65 }; 68 69 SUPER_FUNCTION(0, Projectile, testfunction, false);70 66 } 71 67 -
code/branches/core3/src/orxonox/objects/RotatingProjectile.cc
r1684 r1736 87 87 } 88 88 89 Projectile::tick(dt); 90 // SUPER(RotatingProjectile, tick, dt); 89 SUPER(RotatingProjectile, tick, dt); 91 90 } 92 91 93 92 void RotatingProjectile::changedVisibility() 94 93 { 95 // BillboardProjectile::changedVisibility();96 94 SUPER(RotatingProjectile, changedVisibility); 97 95 this->rotatingBillboard1_.setVisible(this->isVisible()); -
code/branches/core3/src/orxonox/objects/Skybox.cc
r1684 r1736 67 67 void Skybox::XMLPort(Element& xmlelement, XMLPort::Mode mode) 68 68 { 69 // BaseObject::XMLPort(xmlelement, mode);70 69 SUPER(Skybox, XMLPort, xmlelement, mode); 71 70 … … 87 86 void Skybox::changedVisibility() 88 87 { 89 // BaseObject::changedVisibility();90 88 SUPER(Skybox, changedVisibility); 91 89 GraphicsEngine::getSingleton().getSceneManager()->setSkyBox(this->isVisible(), this->skyboxSrc_); -
code/branches/core3/src/orxonox/objects/SpaceShip.cc
r1684 r1736 259 259 void SpaceShip::changedVisibility() 260 260 { 261 // Model::changedVisibility();262 261 SUPER(SpaceShip, changedVisibility); 263 262 … … 272 271 void SpaceShip::changedActivity() 273 272 { 274 // Model::changedActivity();275 273 SUPER(SpaceShip, changedActivity); 276 274 … … 347 345 void SpaceShip::XMLPort(Element& xmlelement, XMLPort::Mode mode) 348 346 { 349 // Model::XMLPort(xmlelement, mode);350 347 SUPER(SpaceShip, XMLPort, xmlelement, mode); 351 348 … … 485 482 486 483 487 // WorldEntity::tick(dt);488 484 SUPER(SpaceShip, tick, dt); 489 485 -
code/branches/core3/src/orxonox/objects/SpaceShipAI.cc
r1684 r1736 78 78 void SpaceShipAI::XMLPort(Element& xmlelement, XMLPort::Mode mode) 79 79 { 80 // SpaceShip::XMLPort(xmlelement, mode);81 80 SUPER(SpaceShipAI, XMLPort, xmlelement, mode); 82 81 … … 230 229 this->doFire(); 231 230 232 // SpaceShip::tick(dt);233 231 SUPER(SpaceShipAI, tick, dt); 234 232 } -
code/branches/core3/src/orxonox/objects/Tickable.h
r1684 r1736 63 63 }; 64 64 65 SUPER_FUNCTION( 2, Tickable, tick, true);65 SUPER_FUNCTION(1, Tickable, tick, true); 66 66 67 67 //! The Tickable interface provides a tick(dt) function, that gets called every frame. -
code/branches/core3/src/orxonox/objects/WorldEntity.cc
r1684 r1736 110 110 void WorldEntity::XMLPort(Element& xmlelement, XMLPort::Mode mode) 111 111 { 112 // BaseObject::XMLPort(xmlelement, mode);113 112 SUPER(WorldEntity, XMLPort, xmlelement, mode); 114 113
Note: See TracChangeset
for help on using the changeset viewer.