Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3629 in orxonox.OLD for orxonox/trunk/src/story_entities/world.cc


Ignore:
Timestamp:
Mar 22, 2005, 11:15:54 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: some changes in the storyentity framework: added a preLoad() function, since there is some stuff to be initialized before load(). written some comments to level loading doxygen stuff. now the worldinterface works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r3621 r3629  
    8989{
    9090  this->worldReference = world;
    91   if( world!= NULL)
     91  if( world != NULL)
    9292    {
    9393      this->worldIsInitialized = true;
     
    128128World::World (int worldID)
    129129{
     130  printf(">>>>>>>>>>>>>>>>>WORLD::WORLD called NEW WORLD created\n");
    130131  this->init(NULL, worldID);
    131132}
     
    153154
    154155/**
    155    \brief initializes a new World
     156   \brief initializes the world.
     157
     158   set all stuff here that is world generic and does not use to much memory
     159   because the real init() function StoryEntity::init() will be called
     160   shortly before start of the game. 
     161   since all worlds are initiated/referenced before they will be started.
     162   NO LEVEL LOADING HERE - NEVER!
    156163*/
    157164void World::init(char* name, int worldID)
     
    159166  this->setClassName ("World");
    160167
    161 
    162   this->worldName = name;
     168  this->worldName = "Just a test level";
    163169  this->debugWorldNr = worldID;
    164170  this->entities = new tList<WorldEntity>();
    165 
     171}
     172
     173
     174/**
     175   \brief this is executed before load
     176
     177   since the load function sometimes needs data, that has been init before
     178   the load and after the proceeding storyentity has finished
     179*/
     180ErrorMessage World::preLoad()
     181{
    166182  /* init the world interface */
    167183  WorldInterface* wi = WorldInterface::getInstance();
     
    391407}
    392408
    393 /**
    394    \brief initializes a new World
     409
     410/**
     411   \brief initializes a new World shortly before start
     412
     413   this is the function, that will be loaded shortly before the world is
     414   started
    395415*/
    396416ErrorMessage World::init()
     
    400420  cn->addToWorld(this);
    401421  cn->enable(true);
    402 
    403422}
    404423
Note: See TracChangeset for help on using the changeset viewer.