Changeset 10313 in orxonox.OLD for branches/mount_points
- Timestamp:
- Jan 24, 2007, 12:18:01 AM (18 years ago)
- Location:
- branches/mount_points/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mount_points/src/lib/graphics/importer/oif/object_information_file.cc
r10247 r10313 60 60 if( fileName.empty()) 61 61 { 62 PRINTF( 3)("No filename specified for object information loading");62 PRINTF(1)("No filename specified for object information loading"); 63 63 return; 64 64 } … … 69 69 { 70 70 // report an error 71 PRINTF( 3)("Could not load XML File %s: %s @ %d:%d\n", fileName.c_str(), XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());71 PRINTF(1)("Could not load XML File %s: %s @ %d:%d\n", fileName.c_str(), XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol()); 72 72 return; 73 73 } … … 80 80 { 81 81 // report an error 82 PRINTF( 3)("Specified XML File is not an orxonox object information file (<ObjectInformationFile> element missing)\n");82 PRINTF(1)("Specified XML File is not an orxonox object information file (<ObjectInformationFile> element missing)\n"); 83 83 return; 84 84 } -
branches/mount_points/src/world_entities/mount_point.cc
r10312 r10313 19 19 #include "util/loading/factory.h" 20 20 #include "util/loading/load_param.h" 21 #include "util/loading/load_param_xml.h" 22 21 23 22 24 … … 122 124 LoadParam(root, "OrxClass", this, MountPoint, setOrxClass) 123 125 .describe("Sets the class this mount points should host"); 124 } 125 126 127 LoadParamXML(root, "Details", this, MountPoint, loadDetails); 128 } 129 130 131 /** 132 * load the parameters from the world entity 133 * @param root the root element of this xml branche 134 */ 135 void MountPoint::loadDetails(const TiXmlElement* root) 136 { 137 if( this->_mount != NULL) 138 { 139 PRINTF(0)("Got detail informations\n"); 140 this->_mount->loadParams( root); 141 } 142 } 126 143 127 144 -
branches/mount_points/src/world_entities/mount_point.h
r10232 r10313 18 18 void initMountPoint(const TiXmlElement* root); 19 19 void loadParam(const TiXmlElement* root); 20 void loadDetails(const TiXmlElement* root); 20 21 21 22 void setDescription(const std::string& description); -
branches/mount_points/src/world_entities/world_entity.cc
r10312 r10313 145 145 .defaultValues("", 1.0f, 0); 146 146 147 LoadParam(root, "mountpoints", this, WorldEntity, loadMountPoints) 148 .describe("the fileName of the object information file (optional)"); 149 147 150 LoadParam(root, "maxHealth", this, WorldEntity, setHealthMax) 148 151 .describe("The Maximum health that can be loaded onto this entity") … … 216 219 { 217 220 this->buildObbTree(obbTreeDepth); 218 219 // now get the object information file for this model, if any220 std::string oifName = fileName.substr(0, fileName.length() - 4) + ".oif";221 this->loadMountPoints( model, oifName);222 221 } 223 222 } … … 277 276 * @param fileName the name of the file 278 277 */ 279 void WorldEntity::loadMountPoints( Model* model,const std::string& fileName)278 void WorldEntity::loadMountPoints(const std::string& fileName) 280 279 { 281 280 PRINTF(5)("loading the oif File: %s\n", fileName.c_str()); … … 283 282 // now load the object information file 284 283 this->oiFile = new ObjectInformationFile(fileName); 284 285 // get the model to load 286 Model* model = this->getModel(); 285 287 286 288 // extract the mount points -
branches/mount_points/src/world_entities/world_entity.h
r10228 r10313 53 53 Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; }; 54 54 55 void loadMountPoints( Model* model,const std::string& fileName);55 void loadMountPoints(const std::string& fileName); 56 56 inline void loadMD2Texture(const std::string& fileName) { this->md2TextureFileName = fileName; } 57 57
Note: See TracChangeset
for help on using the changeset viewer.