Changeset 10243 in orxonox.OLD
- Timestamp:
- Jan 17, 2007, 12:26:26 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
r10242 r10243 30 30 OIFData::OIFData() 31 31 { 32 PRINTF(0)("OIFDATA NEW (default)\n"); 32 33 this->_root = NULL; 33 34 } … … 40 41 OIFData::OIFData(const std::string& fileName) 41 42 { 42 this->_root = NULL; 43 43 PRINTF(0)("OIFDATA NEW\n"); 44 44 this->load(fileName); 45 45 } … … 52 52 void OIFData::load(const std::string& fileName) 53 53 { 54 PRINTF(0)("loading |%s| as oif data\n", fileName.c_str()); 54 this->_root = NULL; 55 55 56 if( fileName.empty()) 56 57 { 57 PRINTF( 0)("No filename specified for object information loading");58 PRINTF(3)("No filename specified for object information loading"); 58 59 return; 59 60 } … … 64 65 { 65 66 // report an error 66 PRINTF( 0)("Could not load XML File %s: %s @ %d:%d\n", fileName.c_str(), XMLDoc.ErrorDesc(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol());67 PRINTF(3)("Could not load XML File %s: %s @ %d:%d\n", fileName.c_str(), XMLDoc.ErrorDesc(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol()); 67 68 return; 68 69 } … … 72 73 assert( this->_root != NULL); 73 74 75 PRINTF(0)("%s\n\n\n", this->_root->Value()); 74 76 if( strcmp( this->_root->Value(), "ObjectInformationFile")) 75 77 { 76 78 // report an error 77 PRINTF( 0)("Specified XML File is not an orxonox object information file (<ObjectInformationFile> element missing)\n");79 PRINTF(3)("Specified XML File is not an orxonox object information file (<ObjectInformationFile> element missing)\n"); 78 80 return; 79 81 } 80 PRINTF(0)("OIF loaded\n");81 82 82 } 83 83 -
branches/mount_points/src/lib/graphics/importer/oif/object_information_file.h
r10241 r10243 26 26 void load(const std::string& fileName); 27 27 28 inline TiXmlElement* root() { return this->_root; }28 inline const TiXmlElement* root() { return this->_root; } 29 29 30 30 -
branches/mount_points/src/lib/graphics/importer/oif/resource_oif.cc
r10242 r10243 29 29 if (ptr) 30 30 { 31 PRINTF( 0)("FOUND OIF: %s\n", fileName.c_str());31 PRINTF(5)("FOUND OIF: %s\n", fileName.c_str()); 32 32 this->acquireData(static_cast<ResourceOIF::OIFResourcePointer*>(ptr)->ptr()); 33 33 } 34 34 else 35 35 { 36 PRINTF( 0)("NOT FOUND OIF: %s\n", fileName.c_str());36 PRINTF(5)("NOT FOUND OIF: %s\n", fileName.c_str()); 37 37 std::string fullName = this->Resource::locateFile(fileName); 38 PRINTF( 0)("trying loading of: %s\n", fullName.c_str());38 PRINTF(5)("trying loading of: %s\n", fullName.c_str()); 39 39 this->load(fullName); 40 40 this->Resource::addResource(new ResourceOIF::OIFResourcePointer(fileName, keepLevel, this->ObjectInformationFile::dataPointer())); -
branches/mount_points/src/world_entities/mount_point.cc
r10240 r10243 79 79 if( element == NULL) 80 80 { 81 PRINTF(1)("Object Information file is missing a proper 'MountPoints' section\n"); 81 PRINTF(1)("I am in section: %s, Object Information file is missing a proper 'MountPoints' section\n", root->Value()); 82 // element = root->FirstChildElement( ); 83 // PRINTF(0)("first child: %s\n", element->Value()); 82 84 } 83 85 else -
branches/mount_points/src/world_entities/world_entity.cc
r10239 r10243 279 279 void WorldEntity::loadMountPoints( Model* model, const std::string& fileName) 280 280 { 281 PRINTF( 4)("loading the oif File: %s\n", fileName.c_str());281 PRINTF(0)("loading the oif File: %s\n", fileName.c_str()); 282 282 283 283 // now load the object information file
Note: See TracChangeset
for help on using the changeset viewer.