Changeset 3542 in orxonox.OLD for orxonox/branches/levelloader/src/game_loader.cc
- Timestamp:
- Mar 14, 2005, 9:58:58 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelloader/src/game_loader.cc
r3530 r3542 161 161 if( name == NULL) 162 162 { 163 PRINTF (1)("No filename specified for loading");163 PRINTF0("No filename specified for loading"); 164 164 return NULL; 165 165 } … … 170 170 { 171 171 // report an error 172 PRINTF (1)("Error loading XML File: %s @ %d:%d\n", XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());172 PRINTF0("Error loading XML File: %s @ %d:%d\n", XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol()); 173 173 delete XMLDoc; 174 174 return NULL; … … 176 176 177 177 // check basic validity 178 TiXmlElement* element = XMLDoc->RootElement(); 179 assert( element != NULL); 180 181 element = element->FirstChildElement( "Campaign"); 182 183 if( element == NULL ) 178 TiXmlElement* root = XMLDoc->RootElement(); 179 assert( root != NULL); 180 181 if( strcmp( root->Value(), "Campaign")) 184 182 { 185 183 // report an error 186 PRINTF (1)("Specified XML File is not an orxonox campaign file (Campaign element missing)\n");184 PRINTF0("Specified XML File is not an orxonox campaign file (Campaign element missing)\n"); 187 185 delete XMLDoc; 188 186 return NULL; … … 190 188 191 189 // construct campaign 192 Campaign* c = new Campaign( element);190 Campaign* c = new Campaign( root); 193 191 194 192 // free the XML data … … 272 270 assert( factory != NULL); 273 271 274 printf("Registered factory for '%s'\n", factory->getClassname());272 PRINTF0("Registered factory for '%s'\n", factory->getClassname()); 275 273 276 274 if( first == NULL) first = factory; … … 286 284 if( first == NULL) 287 285 { 288 PRINTF (1)("GameLoader does not know any factories, fabricate() failed\n");286 PRINTF0("GameLoader does not know any factories, fabricate() failed\n"); 289 287 return NULL; 290 288 }
Note: See TracChangeset
for help on using the changeset viewer.