- Timestamp:
- Feb 6, 2006, 2:52:14 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/md2Model.cc
r6645 r7055 75 75 \brief simple constructor initializing all variables 76 76 */ 77 MD2Model::MD2Model(const char* modelFileName, const char* skinFileName )77 MD2Model::MD2Model(const char* modelFileName, const char* skinFileName, float scale) 78 78 { 79 79 /* this creates the data container via ressource manager */ … … 82 82 PRINTF(0)("The model was not found, MD2Model Loader finished abnormaly. Update the data-repos\n"); 83 83 84 this->data->scaleFactor = scaleFactor; 84 85 this->scaleFactor = this->data->scaleFactor; 85 86 -
trunk/src/lib/graphics/importer/md2Model.h
r6222 r7055 178 178 { 179 179 public: 180 MD2Data(const char* modelFileName, const char* skinFileName);180 MD2Data(const char* modelFileName, const char* skinFileName); 181 181 virtual ~MD2Data(); 182 182 … … 212 212 213 213 public: 214 MD2Model(const char* modelFileName, const char* skinFileName = NULL );214 MD2Model(const char* modelFileName, const char* skinFileName = NULL, float scale = 1.0f); 215 215 virtual ~MD2Model(); 216 216 -
trunk/src/world_entities/terrain.cc
r7046 r7055 43 43 { 44 44 this->init(); 45 46 45 47 if( root != NULL) 46 48 this->loadParams(root); 47 48 this->heightMapMaterial = new Material();49 heightMapMaterial->setTransparency(1.0);50 51 heightMapMaterial->setDiffuse(0.4,0.4,0.4);52 heightMapMaterial->setAmbient(0.4,0.4,0.4 );53 heightMapMaterial->setSpecular(0.4,0.4,0.4);54 heightMapMaterial->setShininess(.5);55 heightMapMaterial->setTransparency(1.0);56 49 57 50 // if (this->model != NULL) … … 119 112 120 113 this->heightMap = NULL; 121 this->heightMapMaterial = NULL; 114 115 this->heightMapMaterial = new Material(); 122 116 } 123 117 … … 169 163 void Terrain::loadTexture(const char* textureName) 170 164 { 171 if (this->heightMapMaterial != NULL)172 delete this->heightMapMaterial;173 174 this->heightMapMaterial = new Material();175 176 165 PRINTF(0)("Load texture: %s\n", textureName); 177 166 … … 183 172 184 173 heightMapMaterial->setDiffuseMap(textureName); 185 //heightMapMaterial->setAmbientMap(textureName);186 // heightMapMaterial->setSpecularMap(textureName);174 heightMapMaterial->setAmbientMap(textureName); 175 heightMapMaterial->setSpecularMap(textureName); 187 176 } 188 177 -
trunk/src/world_entities/world_entity.cc
r7015 r7055 163 163 { 164 164 PRINTF(4)("fetching MD2 file: %s\n", fileName); 165 Model* m = new MD2Model(fileName, this->md2TextureFileName );165 Model* m = new MD2Model(fileName, this->md2TextureFileName, this->scaling); 166 166 //this->setModel((Model*)ResourceManager::getInstance()->load(fileName, MD2, RP_CAMPAIGN), 0); 167 167 this->setModel(m, 0);
Note: See TracChangeset
for help on using the changeset viewer.