Changeset 8590 in orxonox.OLD for branches/bsp_model
- Timestamp:
- Jun 19, 2006, 10:48:45 PM (18 years ago)
- Location:
- branches/bsp_model/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/md3/md3_data.cc
r8579 r8590 374 374 std::string path1(tex[i].fileName); 375 375 std::string fullPath( path + path1); 376 this->meshes[mesh]->material[i].setDiffuseMap(/*tex[i].fileName*/ /*fullPath.c_str()*/ "maps/ yuri.tga");376 this->meshes[mesh]->material[i].setDiffuseMap(/*tex[i].fileName*/ /*fullPath.c_str()*/ "maps/creatures/gork/gorkup.tga"); 377 377 this->meshes[mesh]->material[i].setAmbient(1, 1, 1); 378 378 } -
branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc
r8581 r8590 27 27 #include "quaternion.h" 28 28 29 #include "loading/resource_manager.h" 30 29 31 #include "debug.h" 30 32 … … 37 39 MD3Model::MD3Model(std::string filename, float scaling) 38 40 { 39 40 41 this->autoAssemblePlayerModel(filename, scaling); 41 42 … … 74 75 /** 75 76 * auto assemples a player model 77 * @param filename is the name to the directory of the modelzzzzzz 76 78 */ 77 79 void MD3Model::autoAssemblePlayerModel(std::string filename, float scaling) 78 80 { 79 this->md3Data = new MD3Data(filename, filename, scaling);81 // this->md3Data = new MD3Data(filename, filename, scaling); 80 82 // MD3AnimationCfg cfg("/home/boenzlip/tmp/q3/Downloads/MOH/q3mdl-alien3/models/players/alien3/animation.cfg"); 83 84 85 //first load the torso 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 this->md3Data = (MD3Data*)ResourceManager::getInstance()->load(name, MD3, RP_GAME, name, scaling); 91 81 92 82 93 -
branches/bsp_model/src/lib/util/loading/resource_manager.cc
r8490 r8590 28 28 #include "primitive_model.h" 29 29 #include "md2/md2Model.h" 30 #include "md3/md3_data.h" 30 31 #endif /* NO_MODEL */ 31 32 #ifndef NO_TEXTURES … … 201 202 else if (!strncmp(fileName.c_str()+(fileName.size()-4), ".md2", 4)) 202 203 tmpType = MD2; 204 else if (!strncmp(fileName.c_str()+(fileName.size()-4), ".md3", 4)) 205 tmpType = MD3; 203 206 else if (!strcasecmp(fileName.c_str(), "cube") || 204 207 !strcasecmp(fileName.c_str(), "sphere") || … … 400 403 } 401 404 break; 405 case MD3: 406 if(File(fullName).isFile()) 407 { 408 PRINTF(0)("md3 load\n"); 409 tmpResource->param[0] = param0; 410 tmpResource->param[1] = param1; 411 tmpResource->pointer = new md3::MD3Data(fullName, tmpResource->param[0].getCString(), tmpResource->param[1].getFloat()); 412 } 413 break; 402 414 #endif /* NO_MODEL */ 403 415 #ifndef NO_TEXT … … 624 636 match = true; 625 637 break; 638 case MD3: 639 if (param0 == MT_NULL && ((*resource)->param[0] == "") && param1 == MT_NULL && ((*resource)->param[0] == 1.0f)) 640 match = true; 641 else if ((*resource)->param[0] == ((MultiType)param0).getString() && (*resource)->param[1] == ((MultiType)param1).getFloat()) 642 match = true; 643 break; 644 626 645 #endif /* NO_MODEL */ 627 646 #ifndef NO_TEXT … … 863 882 "PrimitiveModel", 864 883 "MD2-Data", 884 "MD3-Data", 865 885 #endif 866 886 #ifndef NO_TEXT -
branches/bsp_model/src/lib/util/loading/resource_manager.h
r8330 r8590 33 33 PRIM, //!< loading primitive model 34 34 MD2, //!< loading md2-file 35 MD3, //!< loading md3-file 35 36 #endif /* NO_MODEL */ 36 37 #ifndef NO_TEXT -
branches/bsp_model/src/world_entities/npcs/generic_npc.cc
r8516 r8590 127 127 * @param coordinate: coordinate to go to 128 128 */ 129 bool GenericNPC::walkTo(const Vector& coordinate) 129 bool GenericNPC::walkTo(const Vector& coordinate, float time) 130 { 131 132 return true; 133 } 134 135 136 /** 137 * walt to 138 * @param coordinate: coordinate to go to 139 */ 140 bool GenericNPC::walkTo(float x, float y, float z, float time) 130 141 { 131 142 -
branches/bsp_model/src/world_entities/world_entity.cc
r8511 r8590 204 204 this->buildObbTree(obbTreeDepth); 205 205 } 206 else if(fileName.find(".md3") != std::string::npos)206 else /*if(fileName.find(".md3") != std::string::npos)*/ 207 207 { 208 208 PRINTF(4)("fetching MD3 file: %s\n", fileName.c_str());
Note: See TracChangeset
for help on using the changeset viewer.