Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5982 in orxonox.OLD for trunk/src/util/loading/game_loader.cc


Ignore:
Timestamp:
Dec 8, 2005, 12:22:53 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: Factory-Redesign on the wish of manuel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/loading/game_loader.cc

    r5819 r5982  
    331331    this->currentCampaign->previousLevel();
    332332}
    333 
    334 /**
    335  *  load a StoryEntity
    336  * @param element a XMLElement containing all the needed info
    337 */
    338 BaseObject* GameLoader::fabricate(const TiXmlElement* element)
    339 {
    340   assert( element != NULL);
    341 
    342   if( Factory::getFirst() == NULL)
    343     {
    344       PRINTF(1)("GameLoader does not know any factories, fabricate() failed\n");
    345       return NULL;
    346     }
    347 
    348   if( element->Value() != NULL)
    349     {
    350       PRINTF(4)("Attempting fabrication of a '%s'\n", element->Value());
    351       BaseObject* b = Factory::getFirst()->fabricate( element);
    352       if( b == NULL)
    353         PRINTF(2)("Failed to fabricate a '%s'\n", element->Value());
    354       else
    355         PRINTF(4)("Successfully fabricated a '%s'\n", element->Value());
    356       return b;
    357     }
    358 
    359   PRINTF(2)("Fabricate failed, TiElement did not contain a value\n");
    360 
    361   return NULL;
    362 }
Note: See TracChangeset for help on using the changeset viewer.