- Timestamp:
- Feb 6, 2006, 5:02:09 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/md2Model.cc
r7058 r7059 77 77 MD2Model::MD2Model(const char* modelFileName, const char* skinFileName, float scale) 78 78 { 79 this->data->scaleFactor = scale;80 this->scaleFactor = this->data->scaleFactor;81 82 79 /* this creates the data container via ressource manager */ 83 this->data = (MD2Data*)ResourceManager::getInstance()->load(modelFileName, MD2, RP_GAME, skinFileName );80 this->data = (MD2Data*)ResourceManager::getInstance()->load(modelFileName, MD2, RP_GAME, skinFileName, scale); 84 81 if( unlikely(this->data == NULL)) 85 82 PRINTF(0)("The model was not found, MD2Model Loader finished abnormaly. Update the data-repos\n"); 83 84 this->scaleFactor = scale; 86 85 87 86 shadeDots = MD2Model::anormsDots[0]; … … 338 337 \brief simple constructor 339 338 */ 340 MD2Data::MD2Data(const char* modelFileName, const char* skinFileName) 341 { 339 MD2Data::MD2Data(const char* modelFileName, const char* skinFileName, float scale) 340 { 341 scale *= 0.1f; 342 342 343 this->pVertices = NULL; 343 344 this->pGLCommands = NULL; … … 351 352 352 353 // this->scaleFactor = 1.0f; 353 this->scaleFactor = 0.1f;354 this->scaleFactor = scale; 354 355 355 356 this->fileName = NULL; -
trunk/src/lib/graphics/importer/md2Model.h
r7055 r7059 178 178 { 179 179 public: 180 MD2Data(const char* modelFileName, const char* skinFileName );180 MD2Data(const char* modelFileName, const char* skinFileName, float scale = 1.0f); 181 181 virtual ~MD2Data(); 182 182 -
trunk/src/util/loading/resource_manager.cc
r6859 r7059 447 447 { 448 448 tmpResource->param[0] = param0; 449 tmpResource->pointer = new MD2Data(fullName, tmpResource->param[0].getString()); 450 // tmpResource->pointer = new MD2Model(fullName, tmpResource->secFileName); 451 449 tmpResource->param[1] = param1; 450 tmpResource->pointer = new MD2Data(fullName, tmpResource->param[0].getString(), tmpResource->param[1].getFloat()); 452 451 } 453 452 break; … … 713 712 break; 714 713 case MD2: 715 if (param0 == MT_NULL) 716 { 717 if ((*resource)->param[0] == "") 714 if (param0 == MT_NULL && ((*resource)->param[0] == "") && param1 == MT_NULL && ((*resource)->param[0] == 1.0f)) 718 715 match = true; 719 } 720 else if ((*resource)->param[0] == ((MultiType)param0).getString()) 716 else if ((*resource)->param[0] == ((MultiType)param0).getString() && (*resource)->param[1] == ((MultiType)param1).getFloat()) 721 717 match = true; 722 718 break;
Note: See TracChangeset
for help on using the changeset viewer.