Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4258 in orxonox.OLD


Ignore:
Timestamp:
May 22, 2005, 2:50:32 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: world also loadable with the new framework

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelLoader/src/story_entities/world.cc

    r4255 r4258  
    209209
    210210  PRINTF0("Creating a World\n");
    211  
     211
     212  LoadParam<World>(root, "identifier", this, &World::setStoryID).describe("Sets the StoryID of this world");
     213  LoadParam<World>(root, "nextid", this, &World::setNextStoryID).describe("Sets the ID of the next world");
     214  LoadParam<World>(root, "path", this, &World::setPath).describe("The Filename of this World (relative from the data-dir)");
     215
     216
     217  /* 
    212218  // identifier
    213219  string = grabParameter( root, "identifier");
    214220  if( string == NULL || sscanf(string, "%d", &id) != 1)
    215     {
    216       PRINTF0("World is missing a proper 'identifier'\n");
    217       this->setStoryID( -1);
    218     }
     221  {
     222  PRINTF0("World is missing a proper 'identifier'\n");
     223  this->setStoryID( -1);
     224  }
    219225  else setStoryID( id);
    220226
     
    222228  string = grabParameter( root, "nextid");
    223229  if( string == NULL || sscanf(string, "%d", &id) != 1)
    224     {
    225       PRINTF0("World is missing a proper 'nextid'\n");
    226       this->setStoryID( -1);
    227     }
     230  {
     231  PRINTF0("World is missing a proper 'nextid'\n");
     232  this->setStoryID( -1);
     233  }
    228234  else setNextStoryID( id);
    229235 
     
    232238  string = grabParameter( root, "path");
    233239  if( string == NULL)
    234     {
    235       PRINTF0("World is missing a proper 'path'\n");
    236       this->setPath( NULL);
    237     }
     240  {
     241  PRINTF0("World is missing a proper 'path'\n");
     242  this->setPath( NULL);
     243  }
    238244  else
    239     {
    240       name = new char[strlen(string + 2)];
    241       strcpy( name, string);
    242       this->setPath( name);
    243     }
     245  {
     246  name = new char[strlen(string + 2)];
     247  strcpy( name, string);
     248  this->setPath( name);
     249  }
     250  */
    244251}
    245252
Note: See TracChangeset for help on using the changeset viewer.