Changeset 4157 in orxonox.OLD for orxonox/branches/md2_loader/src/world_entities
- Timestamp:
- May 11, 2005, 12:14:54 AM (20 years ago)
- Location:
- orxonox/branches/md2_loader/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/md2_loader/src/world_entities/test_entity.cc
r4155 r4157 28 28 TestEntity::TestEntity () : WorldEntity() 29 29 { 30 //This is for md2 test purposes only! if this is seen in the trunk: hit me :) 30 this->textureArray = new unsigned int[100]; 31 memset(this->textureArray, 0, 100*sizeof(unsigned int)); 32 31 33 MD2Loader* md2loader = new MD2Loader(); 32 34 this->model = new t3DModel; 33 35 this->md2Model = new MD2Model(); 34 36 35 md2loader->importMD2(model, "../data/models/tris.md2", "test.bmp"); 37 md2loader->importMD2(this->model, "../data/models/tris.md2", "../data/models/tris.pcx"); 38 39 for(int i = 0; i < this->model->numOfMaterials; i++) 40 { 41 if( strlen(this->model->materialList[i].strFile) > 0) 42 { 43 Helper::createTexture(textureArray, this->model->materialList[i].strFile, i); 44 } 45 this->model->materialList[i].texureId = i; 46 } 36 47 } 37 48 -
orxonox/branches/md2_loader/src/world_entities/test_entity.h
r4152 r4157 27 27 t3DModel* model; 28 28 MD2Model* md2Model; 29 30 unsigned int* textureArray; 31 29 32 }; 30 33
Note: See TracChangeset
for help on using the changeset viewer.