Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 25, 2006, 9:58:58 PM (18 years ago)
Author:
bensch
Message:

some more WorldEntities adapted

Location:
branches/new_class_id/src/world_entities/effects
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/world_entities/effects/billboard.cc

    r9406 r9707  
    2626
    2727
    28 
     28#include "class_id.h"
    2929CREATE_FACTORY(Billboard, CL_BILLBOARD);
    30 
     30NewObjectListDefinitionID(Billboard, CL_BILLBOARD);
    3131
    3232/**
     
    5757void Billboard::init()
    5858{
    59   this->setClassID(CL_BILLBOARD, "Billboard");
     59  this->registerObject(this, Billboard::_objectList);
    6060  this->setName("Billboard");
    6161
     
    124124  glDisable(GL_LIGHTING);
    125125  glDisable(GL_FOG);
    126  
     126
    127127  glPushMatrix();
    128128
     
    130130  //glTranslatef(0,0,0);
    131131  this->material->select();
    132  
     132
    133133  const PNode* camera = State::getCameraNode();  //!< @todo MUST be different
    134134  Vector cameraPos = camera->getAbsCoor();
     
    141141  h.normalize();
    142142  v.normalize();
    143  
     143
    144144  v *= sizeX;
    145145  h *= sizeY;
     
    165165             this->getAbsCoor().z - h.z + v.z);
    166166  glEnd();
    167  
    168  
     167
     168
    169169  glPopMatrix();
    170  
     170
    171171  glPopAttrib();
    172172}
  • branches/new_class_id/src/world_entities/effects/billboard.h

    r8255 r9707  
    1313class Billboard : public WorldEntity
    1414{
     15  NewObjectListDeclaration(Billboard);
    1516  public:
    1617    Billboard(const TiXmlElement* root = NULL);
  • branches/new_class_id/src/world_entities/effects/explosion.cc

    r9406 r9707  
    2121
    2222#include "state.h"
    23 #include "class_list.h"
    2423
    2524#include "box_emitter.h"
     
    2827
    2928
    30 
    31 CREATE_FAST_FACTORY_STATIC(Explosion, CL_EXPLOSION);
    32 
     29#include "class_id.h"
     30CREATE_FAST_FACTORY_STATIC(Explosion);
     31NewObjectListDefinitionID(Explosion, CL_EXPLOSION);
    3332
    3433/**
     
    3736Explosion::Explosion ()
    3837{
    39   this->setClassID(CL_EXPLOSION, "Explosion");
     38  this->registerObject(this, Explosion::_objectList);
    4039  this->toList(OM_DEAD_TICK);
    4140
     
    5958
    6059  /* 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)
    6261     Explosion::explosionParticles = NULL;
    6362}
  • branches/new_class_id/src/world_entities/effects/explosion.h

    r7125 r9707  
    1515class Explosion : public WorldEntity
    1616{
     17  NewObjectListDeclaration(Explosion);
    1718  public:
    1819    static void explode (PNode* position, const Vector& size);
Note: See TracChangeset for help on using the changeset viewer.