Changeset 8591 in orxonox.OLD
- Timestamp:
- Jun 19, 2006, 11:03:58 PM (18 years ago)
- Location:
- branches/bsp_model/src/lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.h
r8545 r8591 10 10 11 11 #include "vector.h" 12 13 #include "base_object.h" 12 14 13 15 #include <string> … … 27 29 * a class with metadata describing an MD3 model animation 28 30 */ 29 class MD3AnimationCfg 31 class MD3AnimationCfg : public BaseObject 30 32 { 31 33 -
branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc
r8590 r8591 79 79 void MD3Model::autoAssemblePlayerModel(std::string filename, float scaling) 80 80 { 81 // this->md3Data = new MD3Data(filename, filename, scaling);82 // MD3AnimationCfg cfg("/home/boenzlip/tmp/q3/Downloads/MOH/q3mdl-alien3/models/players/alien3/animation.cfg");81 std::string cfgName(filename + "/animation.cfg"); 82 this->config = (MD3AnimationCfg*)ResourceManager::getInstance()->load(cfgName, MD3_CONFIG, RP_GAME); 83 83 84 84 85 85 //first load the torso 86 86 std::string name(filename + "/upper.md3"); 87 PRINTF(0)("data dir: %s\n", ResourceManager::getInstance()->getFullName(name).c_str());88 89 // this->md3Data = new MD3Data(name, name, scaling);90 87 this->md3Data = (MD3Data*)ResourceManager::getInstance()->load(name, MD3, RP_GAME, name, scaling); 91 88 -
branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h
r8579 r8591 21 21 class MD3Mesh; 22 22 class MD3Tag; 23 class MD3AnimationCfg; 23 24 24 25 struct MD3Normal; … … 65 66 float** tmpMatrix; //!< a temporary matrix 66 67 68 MD3AnimationCfg* config; //!< the config file parsed 67 69 }; 68 70 -
branches/bsp_model/src/lib/util/loading/resource_manager.cc
r8590 r8591 29 29 #include "md2/md2Model.h" 30 30 #include "md3/md3_data.h" 31 #include "md3/md3_animation_cfg.h" 31 32 #endif /* NO_MODEL */ 32 33 #ifndef NO_TEXTURES … … 204 205 else if (!strncmp(fileName.c_str()+(fileName.size()-4), ".md3", 4)) 205 206 tmpType = MD3; 207 else if (!strncmp(fileName.c_str()+(fileName.size()-4), ".cfg", 4)) 208 tmpType = MD3_CONFIG; 206 209 else if (!strcasecmp(fileName.c_str(), "cube") || 207 210 !strcasecmp(fileName.c_str(), "sphere") || … … 406 409 if(File(fullName).isFile()) 407 410 { 408 PRINTF(0)("md3 load\n");409 411 tmpResource->param[0] = param0; 410 412 tmpResource->param[1] = param1; 411 413 tmpResource->pointer = new md3::MD3Data(fullName, tmpResource->param[0].getCString(), tmpResource->param[1].getFloat()); 414 } 415 break; 416 case MD3_CONFIG: 417 if(File(fullName).isFile()) 418 { 419 tmpResource->param[0] = param0; 420 tmpResource->param[1] = param1; 421 tmpResource->pointer = new md3::MD3AnimationCfg(fullName); 412 422 } 413 423 break; … … 640 650 match = true; 641 651 else if ((*resource)->param[0] == ((MultiType)param0).getString() && (*resource)->param[1] == ((MultiType)param1).getFloat()) 652 match = true; 653 break; 654 case MD3_CONFIG: 655 if (param0 == MT_NULL && ((*resource)->param[0] == "")) 656 match = true; 657 else if ((*resource)->param[0] == ((MultiType)param0).getString()) 642 658 match = true; 643 659 break; … … 883 899 "MD2-Data", 884 900 "MD3-Data", 901 "MD3-Config" 885 902 #endif 886 903 #ifndef NO_TEXT -
branches/bsp_model/src/lib/util/loading/resource_manager.h
r8590 r8591 34 34 MD2, //!< loading md2-file 35 35 MD3, //!< loading md3-file 36 MD3_CONFIG, //!< the md3 config file 36 37 #endif /* NO_MODEL */ 37 38 #ifndef NO_TEXT
Note: See TracChangeset
for help on using the changeset viewer.