Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7123 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Feb 11, 2006, 8:57:26 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: some cleanup before the new tag

  1. BaseObject isA was wrong… every subclass was detected as any other subclass
  2. Classes get unloaded again as they should
  3. some minor fixes (Material* → Material) and some other cleanups
Location:
trunk/src/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/md2Model.cc

    r7114 r7123  
    7777MD2Model::MD2Model(const char* modelFileName, const char* skinFileName, float scale)
    7878{
     79  this->setClassID(CL_MD2_MODEL, "MD2Model");
    7980  /* this creates the data container via ressource manager */
    8081  this->data = (MD2Data*)ResourceManager::getInstance()->load(modelFileName, MD2, RP_GAME, skinFileName, scale);
     
    222223  glCullFace(GL_BACK);
    223224
    224   this->data->material->select();
     225  this->data->material.select();
    225226
    226227  /* draw the triangles */
     
    263264//   this->processLighting();
    264265//   this->interpolate(/*this->verticesList*/);
    265   this->data->material->select();
     266  this->data->material.select();
    266267
    267268  /* draw the triangles */
     
    409410  delete [] this->pTexCoor;
    410411
    411   delete this->material;
    412412}
    413413
     
    518518  strcpy(this->skinFileName, fileName);
    519519
    520   this->material = new Material("md2ModelTest");
    521   this->material->setDiffuseMap(fileName);
    522   this->material->setIllum(3);
    523   this->material->setAmbient(1.0, 1.0, 1.0);
    524 }
     520  this->material.setName("md2ModelMaterial");
     521  this->material.setDiffuseMap(fileName);
     522  this->material.setIllum(3);
     523  this->material.setAmbient(1.0, 1.0, 1.0);
     524}
  • trunk/src/lib/graphics/importer/md2Model.h

    r7114 r7123  
    1919#define _MD2MODEL_H
    2020
     21#include "base_object.h"
     22
    2123#include "model.h"
    22 #include "base_object.h"
    23 #include "stdincl.h"
    24 
     24#include "material.h"
    2525
    2626//! These are the needed defines for the max values when loading .MD2 files
     
    212212  int*               pLightNormals;         //!< pointer to the light normals
    213213
    214   Material*          material;              //!< pointer to the material
     214  Material           material;              //!< pointer to the material
    215215  float              scaleFactor;           //!< the scale factor of the model, (global)
    216216};
  • trunk/src/lib/graphics/importer/model.h

    r6308 r7123  
    5858
    5959  public:
    60     Model();
    6160    virtual ~Model();
    6261
     
    8584    inline unsigned int getTriangleCount() const { return this->pModelInfo.numTriangles; };
    8685
     86  protected:
     87    Model();
     88
    8789
    8890  protected:
  • trunk/src/lib/lang/base_object.cc

    r6815 r7123  
    140140  else if (classID & CL_MASK_SUBSUPER_CLASS)
    141141  {
    142     if (likely(((this->classID & CL_MASK_SUBSUPER_CLASS_IDA) == (this->classID & CL_MASK_SUBSUPER_CLASS_IDA)) &&
     142    if (likely(((this->classID & CL_MASK_SUBSUPER_CLASS_IDA) == (classID & CL_MASK_SUBSUPER_CLASS_IDA)) &&
    143143        this->classID & classID & CL_MASK_SUBSUPER_CLASS_IDB))
    144144      return true;
  • trunk/src/lib/lang/class_list.cc

    r6280 r7123  
    276276    if (object->isA((*cl).classID))
    277277  {
    278     PRINT(0)("=%s=-", (*cl).className);
     278    PRINT(0)("=%s::0x%.8X=-", (*cl).className, (*cl).classID);
    279279  }
    280280}
Note: See TracChangeset for help on using the changeset viewer.