Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3608 in orxonox.OLD for orxonox/trunk/src/story_entities/campaign.cc


Ignore:
Timestamp:
Mar 20, 2005, 11:37:26 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: now there is a real speedup in compiling time when dependencies are modified: just realy only includes, what is needed. Byside the speedup, there is more overview! never add an orxonox class to stdincl.h if it doesn't have to be

File:
1 edited

Legend:

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

    r3472 r3608  
    2020#include "world.h"
    2121#include "camera.h"
    22 #include "story_entity.h"
     22//#include "story_entity.h"
     23#include "list.h"
    2324
    2425using namespace std;
     
    2728Campaign::Campaign ()
    2829{
    29   this->entities = new ListTemplate<StoryEntity>();
     30  this->entities = new tList<StoryEntity>();
    3031  this->isInit = false;
    3132}
     
    184185  if( storyID == WORLD_ID_GAMEEND)
    185186    return NULL;
    186   ListTemplate<StoryEntity>* l;
     187
     188  /*
     189  tList<StoryEntity>* l;
    187190  StoryEntity* entity = NULL;
    188191  l = this->entities->getNext(); 
     
    191194      entity = l->getObject();
    192195      l = l->getNext();
     196
    193197      int id = entity->getStoryID();
    194198      //printf("Campaing::getStoryEntity() - now looping, found entity nr=%i\n", id);
     
    198202          return entity;
    199203        }
    200     }
     204
     205    }
     206  */
     207
     208
     209
     210  StoryEntity* entity = this->entities->enumerate();
     211  while( entity != NULL)
     212    {
     213      int id = entity->getStoryID();
     214      //printf("Campaing::getStoryEntity() - now looping, found entity nr=%i\n", id);
     215      if(id == storyID)
     216        {
     217          //printf("Campaing::getStoryEntity() - yea, this is what we where looking for: %id\n");
     218          return entity;
     219        }
     220      entity = this->entities->nextElement();
     221    }
     222
     223
     224
    201225  return NULL;
    202226}
Note: See TracChangeset for help on using the changeset viewer.