Changeset 9707 in orxonox.OLD for branches/new_class_id/src
- Timestamp:
- Aug 25, 2006, 9:58:58 PM (18 years ago)
- Location:
- branches/new_class_id/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/util/fast_factory.h
r9703 r9707 38 38 * static FastFactory* fastFactory; 39 39 */ 40 #define CREATE_FAST_FACTORY_STATIC(CLASS_NAME , CLASS_ID) \41 FastFactory* CLASS_NAME::fastFactory = tFastFactory<CLASS_NAME>::getFastFactory(CLASS_ ID, #CLASS_NAME)40 #define CREATE_FAST_FACTORY_STATIC(CLASS_NAME) \ 41 FastFactory* CLASS_NAME::fastFactory = tFastFactory<CLASS_NAME>::getFastFactory(CLASS_NAME::classID(), #CLASS_NAME) 42 42 43 43 //! A struct, that holds Lists of Objects of a certain type. -
branches/new_class_id/src/world_entities/effects/billboard.cc
r9406 r9707 26 26 27 27 28 28 #include "class_id.h" 29 29 CREATE_FACTORY(Billboard, CL_BILLBOARD); 30 30 NewObjectListDefinitionID(Billboard, CL_BILLBOARD); 31 31 32 32 /** … … 57 57 void Billboard::init() 58 58 { 59 this-> setClassID(CL_BILLBOARD, "Billboard");59 this->registerObject(this, Billboard::_objectList); 60 60 this->setName("Billboard"); 61 61 … … 124 124 glDisable(GL_LIGHTING); 125 125 glDisable(GL_FOG); 126 126 127 127 glPushMatrix(); 128 128 … … 130 130 //glTranslatef(0,0,0); 131 131 this->material->select(); 132 132 133 133 const PNode* camera = State::getCameraNode(); //!< @todo MUST be different 134 134 Vector cameraPos = camera->getAbsCoor(); … … 141 141 h.normalize(); 142 142 v.normalize(); 143 143 144 144 v *= sizeX; 145 145 h *= sizeY; … … 165 165 this->getAbsCoor().z - h.z + v.z); 166 166 glEnd(); 167 168 167 168 169 169 glPopMatrix(); 170 170 171 171 glPopAttrib(); 172 172 } -
branches/new_class_id/src/world_entities/effects/billboard.h
r8255 r9707 13 13 class Billboard : public WorldEntity 14 14 { 15 NewObjectListDeclaration(Billboard); 15 16 public: 16 17 Billboard(const TiXmlElement* root = NULL); -
branches/new_class_id/src/world_entities/effects/explosion.cc
r9406 r9707 21 21 22 22 #include "state.h" 23 #include "class_list.h"24 23 25 24 #include "box_emitter.h" … … 28 27 29 28 30 31 CREATE_FAST_FACTORY_STATIC(Explosion , CL_EXPLOSION);32 29 #include "class_id.h" 30 CREATE_FAST_FACTORY_STATIC(Explosion); 31 NewObjectListDefinitionID(Explosion, CL_EXPLOSION); 33 32 34 33 /** … … 37 36 Explosion::Explosion () 38 37 { 39 this-> setClassID(CL_EXPLOSION, "Explosion");38 this->registerObject(this, Explosion::_objectList); 40 39 this->toList(OM_DEAD_TICK); 41 40 … … 59 58 60 59 /* this is normaly done by World.cc by deleting the ParticleEngine */ 61 if (Explosion::explosionParticles != NULL && ClassList::getList(CL_EXPLOSION)->size() <= 1)60 if (Explosion::explosionParticles != NULL && Explosion::objectList().size() <= 1) 62 61 Explosion::explosionParticles = NULL; 63 62 } -
branches/new_class_id/src/world_entities/effects/explosion.h
r7125 r9707 15 15 class Explosion : public WorldEntity 16 16 { 17 NewObjectListDeclaration(Explosion); 17 18 public: 18 19 static void explode (PNode* position, const Vector& size); -
branches/new_class_id/src/world_entities/npcs/ground_turret.cc
r9656 r9707 28 28 29 29 #include "effects/explosion.h" 30 30 31 31 32 CREATE_FACTORY(GroundTurret, CL_GROUND_TURRET); -
branches/new_class_id/src/world_entities/npcs/npc_test.cc
r9235 r9707 30 30 #include "effects/explosion.h" 31 31 32 #include "class_id.h" 32 33 CREATE_FACTORY(NPC2, CL_NPC_TEST2); 33 34 NewObjectListDefinitionID(NPC2, CL_NPC_TEST2); 34 35 35 36 NPC2::NPC2(const TiXmlElement* root) 36 37 : NPC(NULL) 37 38 { 38 this-> setClassID(CL_NPC_TEST2, "NPC2");39 this->registerObject(this, NPC2::_objectList); 39 40 40 41 if ((float)rand()/RAND_MAX > .5f) -
branches/new_class_id/src/world_entities/npcs/npc_test.h
r9235 r9707 9 9 10 10 class NPC2 : public NPC { 11 NewObjectListDeclaration(NPC2); 11 12 12 13 public:
Note: See TracChangeset
for help on using the changeset viewer.