Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 7, 2005, 3:54:49 PM (20 years ago)
Author:
chris
Message:

orxonox/branches/levelloader: Merged trunk into branch… still not working though…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelloader/src/story_entities/campaign.cc

    r3557 r3746  
    1818
    1919#include "campaign.h"
     20
     21#include "story_entity.h"
     22
    2023#include "world.h"
    2124#include "camera.h"
    22 #include "story_entity.h"
    2325#include "factory.h"
    2426#include "game_loader.h"
    2527
     28#include "list.h"
     29
    2630using namespace std;
    2731
     
    3034Campaign::Campaign ()
    3135{
    32   this->entities = new ListTemplate<StoryEntity>();
     36  this->entities = new tList<StoryEntity>();
    3337  this->isInit = false;
    3438}
     39
    3540
    3641Campaign::~Campaign () {}
     
    4752        GameLoader* loader = GameLoader::getInstance();
    4853       
    49   this->entities = new ListTemplate<StoryEntity>();
     54  this->entities = new tList<StoryEntity>();
    5055  this->isInit = false;
    5156 
     
    106111    {
    107112      se->displayLoadScreen();
     113      se->preLoad();
    108114      se->load();
    109115      se->init();
     
    232238  if( storyID == WORLD_ID_GAMEEND)
    233239    return NULL;
    234   ListTemplate<StoryEntity>* l;
     240
     241  /*
     242  tList<StoryEntity>* l;
    235243  StoryEntity* entity = NULL;
    236244  l = this->entities->getNext(); 
     
    239247      entity = l->getObject();
    240248      l = l->getNext();
     249
    241250      int id = entity->getStoryID();
    242251      //printf("Campaing::getStoryEntity() - now looping, found entity nr=%i\n", id);
     
    246255          return entity;
    247256        }
    248     }
     257
     258    }
     259  */
     260
     261
     262
     263  StoryEntity* entity = this->entities->enumerate();
     264  while( entity != NULL)
     265    {
     266      int id = entity->getStoryID();
     267      //printf("Campaing::getStoryEntity() - now looping, found entity nr=%i\n", id);
     268      if(id == storyID)
     269        {
     270          //printf("Campaing::getStoryEntity() - yea, this is what we where looking for: %id\n");
     271          return entity;
     272        }
     273      entity = this->entities->nextElement();
     274    }
     275
     276
     277
    249278  return NULL;
    250279}
Note: See TracChangeset for help on using the changeset viewer.