Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 30, 2005, 4:05:23 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: factory is now registered in Factory, not in Gameloader

File:
1 edited

Legend:

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

    r4729 r4739  
    4343  this->setClassID(CL_GAME_LOADER, "GameLoader");
    4444  this->setName("GameLoader");
    45   first = NULL;
    4645}
    4746
     
    317316}
    318317
    319 
    320 /**
    321    \brief add a Factory to the Factory Q
    322    \param factory a Factory to be registered
    323 */
    324 void GameLoader::registerFactory( Factory* factory)
    325 {
    326         assert( factory != NULL);
    327 
    328         PRINTF(4)("Registered factory for '%s'\n", factory->getName());
    329 
    330         if( first == NULL) first = factory;
    331         else first->registerFactory( factory);
    332 }
    333 
    334 
    335318/**
    336319   \brief load a StoryEntity
     
    341324  assert( element != NULL);
    342325
    343   if( first == NULL)
     326  if( Factory::getFirst() == NULL)
    344327    {
    345328      PRINTF(1)("GameLoader does not know any factories, fabricate() failed\n");
     
    350333    {
    351334      PRINTF(4)("Attempting fabrication of a '%s'\n", element->Value());
    352       BaseObject* b = first->fabricate( element);
     335      BaseObject* b = Factory::getFirst()->fabricate( element);
    353336      if( b == NULL)
    354337        PRINTF(2)("Failed to fabricate a '%s'\n", element->Value());
Note: See TracChangeset for help on using the changeset viewer.