Changeset 4104 in orxonox.OLD for orxonox/trunk/src/story_entities
- Timestamp:
- May 7, 2005, 1:55:44 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r4099 r4104 268 268 ErrorMessage World::load() 269 269 { 270 PRINTF( 0)("> Loading world: '%s'\n", getPath());271 270 PRINTF(3)("> Loading world: '%s'\n", getPath()); 271 TiXmlElement* element; 272 272 GameLoader* loader = GameLoader::getInstance(); 273 273 274 274 if( getPath() == NULL) 275 275 { 276 PRINTF 0("World has no path specified for loading");276 PRINTF(1)("World has no path specified for loading"); 277 277 return (ErrorMessage){213,"Path not specified","World::load()"}; 278 278 } … … 280 280 TiXmlDocument* XMLDoc = new TiXmlDocument( path); 281 281 // load the campaign document 282 if( !XMLDoc->LoadFile()) 283 //this->glmis->step(); 284 282 if( !XMLDoc->LoadFile()) 285 283 { 286 284 // report an error 287 PRINTF 0("Errorloading XML File: %s @ %d:%d\n", XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());285 PRINTF(1)("loading XML File: %s @ %d:%d\n", XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol()); 288 286 delete XMLDoc; 289 287 return (ErrorMessage){213,"XML File parsing error","World::load()"}; … … 297 295 { 298 296 // report an error 299 PRINTF 0("Specified XML File is not an orxonox world data file (WorldDataFile element missing)\n");297 PRINTF(1)("Specified XML File is not an orxonox world data file (WorldDataFile element missing)\n"); 300 298 delete XMLDoc; 301 299 return (ErrorMessage){213,"Path not a WorldDataFile","World::load()"}; … … 308 306 if( string == NULL) 309 307 { 310 PRINTF 0("World is missing a proper 'name'\n");308 PRINTF(2)("World is missing a proper 'name'\n"); 311 309 string = "Unknown"; 312 310 temp = new char[strlen(string + 2)]; … … 320 318 this->worldName = temp; 321 319 } 322 323 320 //////////////// 321 // LOADSCREEN // 322 //////////////// 323 element = root->FirstChildElement("LoadScreen"); 324 if (element == NULL) 325 { 326 PRINTF(2)("no LoadScreen specified, loading default\n"); 327 328 glmis->setBackgroundImage("pictures/load_screen.jpg"); 329 this->glmis->setMaximum(8); 330 this->glmis->draw(); 331 } 332 else 333 { 334 this->glmis->load(element); 335 this->glmis->draw(); 336 } 337 this->glmis->draw(); 324 338 // find WorldEntities 325 TiXmlElement* element = root->FirstChildElement("WorldEntities");339 element = root->FirstChildElement("WorldEntities"); 326 340 327 341 if( element == NULL) 328 342 { 329 PRINTF 0("World is missing 'WorldEntities'\n");343 PRINTF(1)("World is missing 'WorldEntities'\n"); 330 344 } 331 345 else … … 333 347 element = element->FirstChildElement(); 334 348 // load Players/Objects/Whatever 335 PRINTF 0("Loading WorldEntities\n");349 PRINTF(4)("Loading WorldEntities\n"); 336 350 while( element != NULL) 337 351 { … … 345 359 glmis->step(); //! \todo temporary 346 360 } 347 PRINTF 0("Done loading WorldEntities\n");361 PRINTF(4)("Done loading WorldEntities\n"); 348 362 } 349 363 … … 831 845 glmis->setBackgroundImage("pictures/load_screen.jpg"); 832 846 this->glmis->setMaximum(8); 833 this->glmis->draw();847 // this->glmis->draw(); 834 848 835 849 PRINTF(3)("World::displayLoadScreen - end\n");
Note: See TracChangeset
for help on using the changeset viewer.