Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 2, 2006, 1:30:23 AM (20 years ago)
Author:
patrick
Message:

network: many changes in the StoryEntity and Campaign framework: introduced CampaignData as a container for the data of the Campaign and made some changes in the GameWorlds, which are not yet finished

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/story_entities/game_world.cc

    r6377 r6386  
    278278          BaseObject* created = Factory::fabricate(element);
    279279          if( created != NULL )
    280           {
    281             if(created->isA(CL_WORLD_ENTITY))
    282               this->spawn(dynamic_cast<WorldEntity*>(created));
    283280            printf("Created a %s: %s\n", created->getClassName(), created->getName());
    284           }
    285 
    286           // if we load a 'Player' we use it as localPlayer
    287281
    288282
     
    345339  //music->playback();
    346340
    347   this->releaseLoadScreen();
    348 }
    349 
    350 
    351 /**
    352  *  initializes a new GameWorld shortly before start
    353  *
    354  * this is the function, that will be loaded shortly before the world is
    355  * started
    356 */
    357 ErrorMessage GameWorld::preStart()
    358 {
    359   this->bPause = false;
    360 
    361341  /* update the object position before game start - so there are no wrong coordinates used in the first processing */
    362342  PNode::getNullParent()->updateNode (0.001f);
    363343  PNode::getNullParent()->updateNode (0.001f);
     344
     345  this->releaseLoadScreen();
    364346}
    365347
     
    370352ErrorMessage GameWorld::start()
    371353{
    372   this->bQuitWorld = false;
     354  this->isPaused = false;
     355  this->isRunning = true;
    373356  this->mainLoop();
    374357}
     
    382365{
    383366  PRINTF(3)("GameWorld::stop() - got stop signal\n");
    384   this->bQuitWorld= true;
     367  this->isRunning = false;
    385368}
    386369
     
    408391{
    409392  PRINTF(3)("GameWorld::displayLoadScreen - start\n");
    410 
    411   //GLMenuImageScreen*
    412393  this->glmis = new GLMenuImageScreen();
    413394  this->glmis->setMaximum(8);
    414 
    415395  PRINTF(3)("GameWorld::displayLoadScreen - end\n");
    416396}
     397
    417398
    418399/**
     
    472453{
    473454  Uint32 currentFrame = SDL_GetTicks();
    474   if(!this->bPause)
     455  if( !this->isPaused)
    475456    {
    476457      this->dt = currentFrame - this->lastFrame;
     
    624605  PRINTF(3)("GameWorld::mainLoop() - Entering main loop\n");
    625606
    626   while(!this->bQuitWorld) /* @todo implement pause */
     607  while( this->isRunning) /* @todo implement pause */
    627608  {
    628609    ++this->cycle;
     
    631612      // Process input
    632613    this->handleInput ();
    633     if( this->bQuitWorld)
     614    if( !this->isRunning)
    634615      break;
    635616      // Process time
     
    652633 * @param entity to be added
    653634*/
    654 void GameWorld::spawn(WorldEntity* entity)
    655 {
    656 //   this->entities->add (entity);
    657   entity->postSpawn ();
    658 }
     635// void GameWorld::spawn(WorldEntity* entity)
     636// {
     637// //   this->entities->add (entity);
     638//   entity->postSpawn ();
     639// }
    659640
    660641/**
Note: See TracChangeset for help on using the changeset viewer.