- Timestamp:
- Feb 11, 2006, 8:57:26 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defs/class_id.h
r7110 r7123 242 242 CL_COLLISION = 0x00000711, 243 243 CL_BV_TREE = 0x00701000, 244 CL_BV_TREE_NODE = 0x00 002000,244 CL_BV_TREE_NODE = 0x00702000, 245 245 CL_OBB_TREE = 0x00000714, 246 246 CL_OBB_TREE_NODE = 0x00000715, … … 270 270 271 271 CL_PRIMITIVE_MODEL = 0x00000908, 272 CL_MD2 Model= 0x00000909,272 CL_MD2_MODEL = 0x00000909, 273 273 CL_HEIGHT_MAP = 0x0000090a, 274 274 CL_GRID = 0x0000090b, 275 276 // Particles277 CL_PARTICLE_SYSTEM = 0x00a01000,278 CL_SPRITE_PARTICLES = 0x00002000,279 CL_SPARK_PARTICLES = 0x00004000,280 CL_PNODE_PARTICLES = 0x00008000,281 CL_DOT_PARTICLES = 0x00010000,282 CL_MODEL_PARTICLES = 0x00020000,283 284 CL_PARTICLE_EMITTER = 0x00a02000,285 CL_DOT_EMITTER = 0x00000a21,286 CL_PLANE_EMITTER = 0x00000a22,287 CL_BOX_EMITTER = 0x00000a23,288 CL_SPHERE_EMITTER = 0x00000a24,289 CL_MODEL_EMITTER = 0x00000a25,290 291 275 292 276 CL_MATERIAL = 0x00000810, … … 298 282 CL_LIGHTNING_BOLT = 0x00000851, 299 283 284 // Particles 285 CL_PARTICLE_SYSTEM = 0x00a01000, 286 CL_DOT_PARTICLES = 0x00a02000, 287 CL_SPARK_PARTICLES = 0x00a04000, 288 CL_SPRITE_PARTICLES = 0x00a08000, 289 CL_MODEL_PARTICLES = 0x00a10000, 290 // CL_PNODE_PARTICLES = 0x00a20000, 291 292 293 CL_PARTICLE_EMITTER = 0x00a40000, 294 CL_DOT_EMITTER = 0x00000a21, 295 CL_PLANE_EMITTER = 0x00000a22, 296 CL_BOX_EMITTER = 0x00000a23, 297 CL_SPHERE_EMITTER = 0x00000a24, 298 // CL_MODEL_EMITTER = 0x00000a25, 299 300 300 // Element2D's (range from 0x00000b00 to 0x00000bff) 301 301 /// GL-GUI 302 CL_GLGUI_WIDGET = 0x00b0 0000,303 CL_GLGUI_BUTTON = 0x00b0 1000,302 CL_GLGUI_WIDGET = 0x00b01000, 303 CL_GLGUI_BUTTON = 0x00b02000, 304 304 CL_GLGUI_PUSHBUTTON = 0x00000b03, 305 305 CL_GLGUI_CHECKBUTTON = 0x00000b04, 306 306 CL_GLGUI_RADIOBUTTON = 0x00000b05, 307 CL_GLGUI_CONTAINER = 0x00b0 2000,307 CL_GLGUI_CONTAINER = 0x00b04000, 308 308 CL_GLGUI_BOX = 0x00000b07, 309 309 CL_GLGUI_FRAME = 0x00000b08, -
trunk/src/lib/graphics/importer/md2Model.cc
r7114 r7123 77 77 MD2Model::MD2Model(const char* modelFileName, const char* skinFileName, float scale) 78 78 { 79 this->setClassID(CL_MD2_MODEL, "MD2Model"); 79 80 /* this creates the data container via ressource manager */ 80 81 this->data = (MD2Data*)ResourceManager::getInstance()->load(modelFileName, MD2, RP_GAME, skinFileName, scale); … … 222 223 glCullFace(GL_BACK); 223 224 224 this->data->material ->select();225 this->data->material.select(); 225 226 226 227 /* draw the triangles */ … … 263 264 // this->processLighting(); 264 265 // this->interpolate(/*this->verticesList*/); 265 this->data->material ->select();266 this->data->material.select(); 266 267 267 268 /* draw the triangles */ … … 409 410 delete [] this->pTexCoor; 410 411 411 delete this->material;412 412 } 413 413 … … 518 518 strcpy(this->skinFileName, fileName); 519 519 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 19 19 #define _MD2MODEL_H 20 20 21 #include "base_object.h" 22 21 23 #include "model.h" 22 #include "base_object.h" 23 #include "stdincl.h" 24 24 #include "material.h" 25 25 26 26 //! These are the needed defines for the max values when loading .MD2 files … … 212 212 int* pLightNormals; //!< pointer to the light normals 213 213 214 Material *material; //!< pointer to the material214 Material material; //!< pointer to the material 215 215 float scaleFactor; //!< the scale factor of the model, (global) 216 216 }; -
trunk/src/lib/graphics/importer/model.h
r6308 r7123 58 58 59 59 public: 60 Model();61 60 virtual ~Model(); 62 61 … … 85 84 inline unsigned int getTriangleCount() const { return this->pModelInfo.numTriangles; }; 86 85 86 protected: 87 Model(); 88 87 89 88 90 protected: -
trunk/src/lib/lang/base_object.cc
r6815 r7123 140 140 else if (classID & CL_MASK_SUBSUPER_CLASS) 141 141 { 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)) && 143 143 this->classID & classID & CL_MASK_SUBSUPER_CLASS_IDB)) 144 144 return true; -
trunk/src/lib/lang/class_list.cc
r6280 r7123 276 276 if (object->isA((*cl).classID)) 277 277 { 278 PRINT(0)("=%s =-", (*cl).className);278 PRINT(0)("=%s::0x%.8X=-", (*cl).className, (*cl).classID); 279 279 } 280 280 } -
trunk/src/orxonox.cc
r7067 r7123 120 120 121 121 SDL_QuitSubSystem(SDL_INIT_TIMER); 122 ClassList::debug( );122 ClassList::debug(3); 123 123 124 124 PRINT(3) -
trunk/src/world_entities/skybox.cc
r6863 r7123 27 27 #include "network_game_manager.h" 28 28 #include "converter.h" 29 #include "resource_manager.h" 30 29 31 30 32 using namespace std; … … 107 109 if( this->material[i]) 108 110 delete this->material[i]; 109 //if( this->cubeTexture[i])110 // delete this->cubeTexture[i];111 if( this->cubeTexture[i]) 112 ResourceManager::getInstance()->unload(this->cubeTexture[i]); 111 113 } 112 114 } … … 169 171 this->loadCubeMapTextures(top, bottom, left, right, front, back); 170 172 } 171 172 173 #include "resource_manager.h"174 173 175 174 void SkyBox::loadCubeMapTextures(const char* top, const char* bottom, const char* left, -
trunk/src/world_entities/world_entity.cc
r7085 r7123 190 190 { 191 191 Resource* resource = ResourceManager::getInstance()->locateResourceByPointer(this->models[modelNumber]); 192 // if (resource != NULL) 193 ResourceManager::getInstance()->unload(resource, RP_LEVEL); 194 } 195 else 196 delete this->models[modelNumber]; 192 if (resource != NULL) 193 ResourceManager::getInstance()->unload(resource, RP_LEVEL); 194 else 195 { 196 PRINTF(4)("Forcing model deletion\n"); 197 delete this->models[modelNumber]; 198 } 199 } 197 200 198 201 this->models[modelNumber] = model;
Note: See TracChangeset
for help on using the changeset viewer.