Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7370 in orxonox.OLD for trunk


Ignore:
Timestamp:
Apr 26, 2006, 1:31:01 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: drawLists/tickLists are used, and made some TiXmlElement to const TiXmlElement, also fixed some bugs in the loadWorldEntities-functions from Gameworld and SipleGameMenu

Location:
trunk/src
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/collision_detection/cd_engine.cc

    r6316 r7370  
    106106//}
    107107
    108 void CDEngine::checkCollisions(std::list<WorldEntity*>& list1, std::list<WorldEntity*>& list2)
     108void CDEngine::checkCollisions(ObjectManager::EntityList& list1, ObjectManager::EntityList& list2)
    109109{
    110110  BVTree* tree;
    111   std::list<WorldEntity*>::iterator entity1, entity2, pre1, pre2;
     111  ObjectManager::EntityList::iterator entity1, entity2, pre1, pre2;
    112112  PRINTF(3)("checking for collisions\n");
    113113
     
    195195
    196196
    197 void CDEngine::drawBV(const std::list<WorldEntity*>& drawList ) const
    198 {
    199   std::list<WorldEntity*>::const_iterator entity;
     197void CDEngine::drawBV(const ObjectManager::EntityList& drawList ) const
     198{
     199  ObjectManager::EntityList::const_iterator entity;
    200200  for (entity = drawList.begin(); entity != drawList.end(); entity++)
    201201    if ((*entity)->isVisible())
  • trunk/src/lib/data/data_tank.h

    r6424 r7370  
    2525    virtual ErrorMessage init() {}
    2626    /** loads the data into the DataTank @param root is the xml root parameter for for loadParams() connection */
    27     virtual ErrorMessage loadData(TiXmlElement* root = NULL) {}
     27    virtual ErrorMessage loadData(const TiXmlElement* root = NULL) {}
    2828    /** unloads the data again from the DataTank */
    2929    virtual ErrorMessage unloadData() {}
  • trunk/src/lib/graphics/graphics_engine.cc

    r7319 r7370  
    584584      dynamic_cast<GraphicsEffect*>(*it)->draw();
    585585  }
    586 }
    587 
    588 void GraphicsEngine::draw(const std::list<WorldEntity*>& drawList ) const
    589 {
    590   std::list<WorldEntity*>::const_iterator entity;
    591   for (entity = drawList.begin(); entity != drawList.end(); entity++)
    592     if ((*entity)->isVisible())
    593       (*entity)->draw();
    594586}
    595587
  • trunk/src/lib/graphics/graphics_engine.h

    r7256 r7370  
    6969    void tick(float dt);
    7070    void draw() const;
    71     void draw(const std::list<WorldEntity*>& drawList) const;
    7271    void displayFPS(bool display);
    7372
  • trunk/src/story_entities/campaign_data.cc

    r7193 r7370  
    5656
    5757/**
    58  * loads the Parameters of a Campaign
     58 * @brief loads the Parameters of a Campaign
    5959 * @param root: The XML-element to load from
    6060 */
    6161void CampaignData::loadParams(const TiXmlElement* root)
    6262{
    63   LoadParamXML(root, "WorldList", this, CampaignData, loadData)
     63  LoadParamXML(root, "WorldList", this, CampaignData, loadDataDyn)
    6464      .describe("A List of Worlds to be loaded in this Campaign");
    6565}
     
    6767
    6868/**
    69  * loads a WorldList
     69 * @brief loads a WorldList
    7070 * @param root: the XML-element to load from
    7171 */
    72 void CampaignData::loadData(const TiXmlElement* root)
     72void CampaignData::loadDataDyn(const TiXmlElement* root)
    7373{
    7474  if( root == NULL)
  • trunk/src/story_entities/campaign_data.h

    r6874 r7370  
    1717{
    1818
    19   public:
    20     CampaignData(const TiXmlElement* root);
    21     virtual ~CampaignData();
     19public:
     20  CampaignData(const TiXmlElement* root);
     21  virtual ~CampaignData();
    2222
    23     virtual void loadParams(const TiXmlElement* root);
     23  virtual void loadParams(const TiXmlElement* root);
    2424
    25     void loadData(const TiXmlElement* root);
     25  void addStoryEntity(StoryEntity* se);
    2626
    27     void addStoryEntity(StoryEntity* se);
     27  StoryEntity* getFirstLevel();
     28  StoryEntity* getNextLevel();
     29  StoryEntity* getLevel(int storyID);
    2830
    29     StoryEntity* getFirstLevel();
    30     StoryEntity* getNextLevel();
    31     StoryEntity* getLevel(int storyID);
     31  /** @param storyEntity the current entity to be set */
     32  inline void setCurrentEntity(StoryEntity* storyEntity) { this->currentEntity = storyEntity; }
     33  /** @return the current StoryEntity played*/
     34  inline StoryEntity* getCurrentEntity() { return this->currentEntity; }
    3235
    33     /** @param storyEntity the current entity to be set */
    34     inline void setCurrentEntity(StoryEntity* storyEntity) { this->currentEntity = storyEntity; }
    35     /** @return the current StoryEntity played*/
    36     inline StoryEntity* getCurrentEntity() { return this->currentEntity; }
     36private:
     37  void loadDataDyn(const TiXmlElement* root);
    3738
    38 
    39   private:
    40     StoryEntity*                  currentEntity;                //!< reference to the currently used StoryEntity
    41     std::list<StoryEntity*>       storyEntities;                //!< list of story entities
     39private:
     40  StoryEntity*                  currentEntity;                //!< reference to the currently used StoryEntity
     41  std::list<StoryEntity*>       storyEntities;                //!< list of story entities
    4242};
    4343
  • trunk/src/story_entities/game_world.cc

    r7369 r7370  
    184184{
    185185  PRINTF(3)("GameWorld::~GameWorld() - unloading the current GameWorld\n");
     186  delete this->shell;
    186187
    187188  this->dataTank->unloadData();
    188189
    189   delete this->shell;
    190190  this->shell = NULL;
    191191  delete AnimationPlayer::getInstance();
     
    322322
    323323/**
    324  * ticks a WorldEntity list
     324 * @brief ticks a WorldEntity list
    325325 * @param entityList list of the WorldEntities
    326326 * @param dt time passed since last frame
    327327 */
    328 void GameWorld::tick(std::list<WorldEntity*> entityList, float dt)
    329 {
    330   std::list<WorldEntity*>::iterator entity, next;
     328void GameWorld::tick(ObjectManager::EntityList entityList, float dt)
     329{
     330  ObjectManager::EntityList::iterator entity, next;
    331331  next = entityList.begin();
    332332  while (next != entityList.end())
     
    367367
    368368    // TICK everything
    369     this->tick(this->dataTank->objectManager->getObjectList(OM_DEAD_TICK), this->dtS);
    370     this->tick(this->dataTank->objectManager->getObjectList(OM_ENVIRON), this->dtS);
    371     this->tick(this->dataTank->objectManager->getObjectList(OM_COMMON), this->dtS);
    372     this->tick(this->dataTank->objectManager->getObjectList(OM_GROUP_00), this->dtS);
    373     this->tick(this->dataTank->objectManager->getObjectList(OM_GROUP_00_PROJ), this->dtS);
    374     this->tick(this->dataTank->objectManager->getObjectList(OM_GROUP_01), this->dtS);
    375     this->tick(this->dataTank->objectManager->getObjectList(OM_GROUP_01_PROJ), this->dtS);
     369    for (i = 0; i < this->dataTank->tickLists.size(); ++i)
     370      this->tick(this->dataTank->objectManager->getObjectList(this->dataTank->tickLists[i]), this->dtS);
    376371
    377372    /* update tick the rest */
     
    439434
    440435/**
    441  *  runs through all entities calling their draw() methods
     436 * @brief draws all entities in the list drawList
     437 * @param drawList the List of entities to draw.
     438 */
     439void GameWorld::drawEntityList(const ObjectManager::EntityList& drawList) const
     440{
     441  ObjectManager::EntityList::const_iterator entity;
     442  for (entity = drawList.begin(); entity != drawList.end(); entity++)
     443    if ((*entity)->isVisible())
     444      (*entity)->draw();
     445}
     446
     447/**
     448 * @brief runs through all entities calling their draw() methods
    442449 */
    443450void GameWorld::draw ()
     
    451458
    452459  /* draw all WorldEntiy groups */
    453   engine->draw(State::getObjectManager()->getObjectList(OM_ENVIRON_NOTICK));
    454   engine->draw(State::getObjectManager()->getObjectList(OM_ENVIRON));
    455   engine->draw(State::getObjectManager()->getObjectList(OM_COMMON));
    456   engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_00));
    457   engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_00_PROJ));
    458   engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_01));
    459   engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_01_PROJ));
     460  for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
     461   this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]));
    460462
    461463
     
    463465  {
    464466    CDEngine* engine = CDEngine::getInstance();
    465     engine->drawBV(State::getObjectManager()->getObjectList(OM_ENVIRON_NOTICK));
    466     engine->drawBV(State::getObjectManager()->getObjectList(OM_ENVIRON));
    467     engine->drawBV(State::getObjectManager()->getObjectList(OM_COMMON));
    468     engine->drawBV(State::getObjectManager()->getObjectList(OM_GROUP_00));
    469     engine->drawBV(State::getObjectManager()->getObjectList(OM_GROUP_01));
    470     engine->drawBV(State::getObjectManager()->getObjectList(OM_GROUP_01_PROJ));
     467    for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
     468      engine->drawBV(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]));
    471469  }
    472470
  • trunk/src/story_entities/game_world.h

    r7368 r7370  
    6363    virtual void synchronize();
    6464    virtual void handleInput();
    65     virtual void tick(std::list<WorldEntity*> worldEntity, float dt);
     65    virtual void tick(ObjectManager::EntityList worldEntity, float dt);
    6666    virtual void tick();
    6767    virtual void update();
    6868    virtual void collide();
     69
     70    void drawEntityList(const ObjectManager::EntityList& drawList ) const;
    6971    virtual void draw();
    7072    virtual void display();
  • trunk/src/story_entities/game_world_data.cc

    r7369 r7370  
    114114 * @param root reference to the xml root element
    115115 */
    116 ErrorMessage GameWorldData::loadData(TiXmlElement* root)
     116ErrorMessage GameWorldData::loadData(const TiXmlElement* root)
    117117{
    118118  // load the parameters
     
    145145
    146146/**
    147  * loads the GUI data
     147 * @brief loads the GUI data
    148148 * @param root reference to the xml root element
    149149 */
    150 ErrorMessage GameWorldData::loadGUI(TiXmlElement* root)
    151 {
    152   TiXmlElement* element = root->FirstChildElement("LoadScreen");
     150ErrorMessage GameWorldData::loadGUI(const TiXmlElement* root)
     151{
     152  const TiXmlElement* element = root->FirstChildElement("LoadScreen");
    153153  if( element == NULL)
    154154  {
     
    169169
    170170/**
    171  * unloads the GUI data
     171 * @brief unloads the GUI data
    172172 */
    173173ErrorMessage GameWorldData::unloadGUI()
     
    178178
    179179/**
    180  * loads the world entities from the xml file
     180 * @brief loads the world entities from the xml file
    181181 * @param root reference to the xml root parameter
    182182 */
    183 ErrorMessage GameWorldData::loadWorldEntities(TiXmlElement* root)
    184 {
    185   TiXmlElement* element = root->FirstChildElement("WorldEntities");
     183ErrorMessage GameWorldData::loadWorldEntities(const TiXmlElement* root)
     184{
     185  const TiXmlElement* element = root->FirstChildElement("WorldEntities");
    186186
    187187  if( element == NULL)
     
    201201
    202202      //todo do this more elegant
    203       if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox"))
     203      if( element->Value() == "SkyBox" && created->isA(CL_SKYBOX))
    204204      {
    205205        this->sky = dynamic_cast<WorldEntity*>(created);
    206206        State::setSkyBox(dynamic_cast<SkyBox*>(this->sky));
    207207      }
    208       if( element->Value() != NULL && !strcmp( element->Value(), "Terrain"))
     208      if( element->Value() == "Terrain" && created->isA(CL_TERRAIN))
    209209      {
    210210        this->terrain = dynamic_cast<Terrain*>(created);
     
    223223  Playable* playable;
    224224  const list<BaseObject*>* playableList = ClassList::getList(CL_PLAYABLE);
    225   if (playableList != NULL)
    226   {
     225  if (playableList != NULL && !playableList->empty())
     226  {
     227    /// TODO Make this also loadable
    227228    playable = dynamic_cast<Playable*>(playableList->front());
    228229    this->localPlayer->setPlayable(playable);
    229230  }
     231
     232  // Fill the EntityLists. Tick then Draw:
     233  this->tickLists.push_back(OM_DEAD_TICK);
     234  this->tickLists.push_back(OM_ENVIRON);
     235  this->tickLists.push_back(OM_COMMON);
     236  this->tickLists.push_back(OM_GROUP_00);
     237  this->tickLists.push_back(OM_GROUP_00_PROJ);
     238  this->tickLists.push_back(OM_GROUP_01);
     239  this->tickLists.push_back(OM_GROUP_01_PROJ);
     240
     241  this->drawLists.push_back(OM_ENVIRON_NOTICK);
     242  this->drawLists.push_back(OM_ENVIRON);
     243  this->drawLists.push_back(OM_COMMON);
     244  this->drawLists.push_back(OM_GROUP_00);
     245  this->drawLists.push_back(OM_GROUP_00_PROJ);
     246  this->drawLists.push_back(OM_GROUP_01);
     247  this->drawLists.push_back(OM_GROUP_01_PROJ);
    230248
    231249  /* init the pnode tree */
     
    248266  if (nodeList != NULL)
    249267    while (!nodeList->empty())
    250   {
    251 //    ClassList::debug( 3, CL_PARENT_NODE);
    252 //    PNode::getNullParent()->debugNode(0);
    253 //    printf("%s::%s\n", nodeList->front()->getClassName(), nodeList->front()->getName());
    254     delete nodeList->front();
    255   }
     268    {
     269      //    ClassList::debug( 3, CL_PARENT_NODE);
     270      //    PNode::getNullParent()->debugNode(0);
     271      //    printf("%s::%s\n", nodeList->front()->getClassName(), nodeList->front()->getName());
     272      delete nodeList->front();
     273    }
    256274  /* remove the player object */
    257275  if( this->localPlayer)
     
    271289
    272290  nodeList = ClassList::getList(CL_ELEMENT_2D);
    273     if (nodeList != NULL)
    274        while (!nodeList->empty())
    275          delete nodeList->front();
    276 
    277 
    278 
    279 
    280   // unload the resources !!
     291  if (nodeList != NULL)
     292    while (!nodeList->empty())
     293      delete nodeList->front();
     294
     295  // At this Point all the WorldEntites should be unloaded.
     296  this->tickLists.clear();
     297  this->drawLists.clear();
     298
     299  // unload the resources loaded in this Level !!
    281300  ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL);
    282301
     
    296315
    297316/**
    298  * loads the scene data
     317 * @brief loads the scene data
    299318 * @param root reference to the xml root element
    300319 */
    301 ErrorMessage GameWorldData::loadScene(TiXmlElement* root)
     320ErrorMessage GameWorldData::loadScene(const TiXmlElement* root)
    302321{
    303322  LoadParamXML(root, "LightManager", LightManager::getInstance(), LightManager, loadParams);
  • trunk/src/story_entities/game_world_data.h

    r7369 r7370  
    3535
    3636    virtual ErrorMessage init();
    37     virtual ErrorMessage loadData(TiXmlElement* root);
     37    virtual ErrorMessage loadData(const TiXmlElement* root);
    3838    virtual ErrorMessage unloadData();
    3939
     
    4343
    4444  protected:
    45     virtual ErrorMessage loadGUI(TiXmlElement* root);
    46     virtual ErrorMessage loadWorldEntities(TiXmlElement* root);
    47     virtual ErrorMessage loadScene(TiXmlElement* root);
     45    virtual ErrorMessage loadGUI(const TiXmlElement* root);
     46    virtual ErrorMessage loadWorldEntities(const TiXmlElement* root);
     47    virtual ErrorMessage loadScene(const TiXmlElement* root);
    4848
    4949    virtual ErrorMessage unloadGUI();
     
    6464    GameRules*                    gameRule;       //!< Reference to the game rules of this game
    6565
    66     std::list<OM_LIST>            tickLists;      //!< The Lists in the GameWorld that should be ticked.
    67     std::list<OM_LIST>            drawLists;      //!< The Lists in the GameWorld, that should be drawn.
     66    std::vector<OM_LIST>          tickLists;      //!< The Lists in the GameWorld that should be ticked.
     67    std::vector<OM_LIST>          drawLists;      //!< The Lists in the GameWorld, that should be drawn.
    6868};
    6969
  • trunk/src/story_entities/multi_player_world_data.cc

    r7346 r7370  
    8585 * @param root reference to the xml root element
    8686 */
    87 ErrorMessage MultiPlayerWorldData::loadGUI(TiXmlElement* root)
     87ErrorMessage MultiPlayerWorldData::loadGUI(const TiXmlElement* root)
    8888{
    8989  /* call underlying function */
     
    106106 * @param root reference to the xml root parameter
    107107 */
    108 ErrorMessage MultiPlayerWorldData::loadWorldEntities(TiXmlElement* root)
     108ErrorMessage MultiPlayerWorldData::loadWorldEntities(const TiXmlElement* root)
    109109{
    110110  /* load the spawning points */
    111   TiXmlElement* element = root->FirstChildElement("SpawningPoints");
     111  const TiXmlElement* element = root->FirstChildElement("SpawningPoints");
    112112  if( element == NULL)
    113113  {
     
    244244 * @param root reference to the xml root element
    245245 */
    246 ErrorMessage MultiPlayerWorldData::loadScene(TiXmlElement* root)
     246ErrorMessage MultiPlayerWorldData::loadScene(const TiXmlElement* root)
    247247{
    248248  /* call underlying function */
  • trunk/src/story_entities/multi_player_world_data.h

    r6498 r7370  
    2828
    2929  protected:
    30     virtual ErrorMessage loadGUI(TiXmlElement* root);
    31     virtual ErrorMessage loadWorldEntities(TiXmlElement* root);
    32     virtual ErrorMessage loadScene(TiXmlElement* root);
     30    virtual ErrorMessage loadGUI(const TiXmlElement* root);
     31    virtual ErrorMessage loadWorldEntities(const TiXmlElement* root);
     32    virtual ErrorMessage loadScene(const TiXmlElement* root);
    3333
    3434    virtual ErrorMessage unloadGUI();
  • trunk/src/story_entities/simple_game_menu.cc

    r7324 r7370  
    253253ErrorMessage SimpleGameMenu::unloadData()
    254254{
    255 
    256255  EventHandler::getInstance()->unsubscribe(this, ES_MENU);
    257256
     
    316315
    317316/**
    318  * no collision detection in the menu
     317 * @brief no collision detection in the menu
    319318 */
    320319void SimpleGameMenu::collide()
     
    325324
    326325/**
    327  * animate the scene
     326 * @brief animate the scene
    328327 */
    329328void SimpleGameMenu::animateScene(float dt)
     
    337336
    338337/**
    339  * event dispatcher funciton
     338 * @brief event dispatcher funciton
    340339 * @param event the incoming event
    341340 */
     
    515514 * @param root reference to the xml root element
    516515 */
    517 ErrorMessage SimpleGameMenuData::loadGUI(TiXmlElement* root)
     516ErrorMessage SimpleGameMenuData::loadGUI(const TiXmlElement* root)
    518517{
    519518  /* call underlying function */
     
    536535 * @param root reference to the xml root parameter
    537536 */
    538 ErrorMessage SimpleGameMenuData::loadWorldEntities(TiXmlElement* root)
    539 {
    540   TiXmlElement* element = root->FirstChildElement("WorldEntities");
     537ErrorMessage SimpleGameMenuData::loadWorldEntities(const TiXmlElement* root)
     538{
     539  GameWorldData::loadWorldEntities(root);
     540  /*
     541  const TiXmlElement* element = root->FirstChildElement("WorldEntities");
    541542
    542543  if( element != NULL)
     
    544545    element = element->FirstChildElement();
    545546    PRINTF(4)("Loading WorldEntities\n");
    546     while( element != NULL)
     547    while(element != NULL)
    547548    {
    548549      BaseObject* created = Factory::fabricate(element);
     
    550551        printf("Created a %s: %s\n", created->getClassName(), created->getName());
    551552
    552       if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox"))
     553      if( element->Value() == "SkyBox")
    553554        this->sky = dynamic_cast<WorldEntity*>(created);
    554       if( element->Value() != NULL && !strcmp( element->Value(), "Terrain"))
     555      if( element->Value() == "Terrain")
    555556        this->terrain = dynamic_cast<Terrain*>(created);
    556557      element = element->NextSiblingElement();
    557558    }
     559
    558560    PRINTF(4)("Done loading WorldEntities\n");
    559561  }
    560562
    561   /* init the pnode tree */
     563  // init the pnode tree
    562564  PNode::getNullParent()->init();
     565  */
    563566}
    564567
     
    578581 * @param root reference to the xml root element
    579582 */
    580 ErrorMessage SimpleGameMenuData::loadScene(TiXmlElement* root)
     583ErrorMessage SimpleGameMenuData::loadScene(const TiXmlElement* root)
    581584{
    582585  /* call underlying function */
  • trunk/src/story_entities/simple_game_menu.h

    r7318 r7370  
    106106
    107107  protected:
    108     virtual ErrorMessage loadGUI(TiXmlElement* root);
    109     virtual ErrorMessage loadWorldEntities(TiXmlElement* root);
    110     virtual ErrorMessage loadScene(TiXmlElement* root);
     108    virtual ErrorMessage loadGUI(const TiXmlElement* root);
     109    virtual ErrorMessage loadWorldEntities(const TiXmlElement* root);
     110    virtual ErrorMessage loadScene(const TiXmlElement* root);
    111111
    112112    virtual ErrorMessage unloadGUI();
  • trunk/src/story_entities/single_player_world_data.cc

    r7193 r7370  
    5353 * @param root reference to the xml root element
    5454 */
    55 ErrorMessage SinglePlayerWorldData::loadGUI(TiXmlElement* root)
     55ErrorMessage SinglePlayerWorldData::loadGUI(const TiXmlElement* root)
    5656{
    5757  /* call underlying function */
     
    7474 * @param root reference to the xml root parameter
    7575 */
    76 ErrorMessage SinglePlayerWorldData::loadWorldEntities(TiXmlElement* root)
     76ErrorMessage SinglePlayerWorldData::loadWorldEntities(const TiXmlElement* root)
    7777{
    7878  /* call underlying function */
     
    9595 * @param root reference to the xml root element
    9696 */
    97 ErrorMessage SinglePlayerWorldData::loadScene(TiXmlElement* root)
     97ErrorMessage SinglePlayerWorldData::loadScene(const TiXmlElement* root)
    9898{
    9999  /* call underlying function */
  • trunk/src/story_entities/single_player_world_data.h

    r6424 r7370  
    2626
    2727  protected:
    28     virtual ErrorMessage loadGUI(TiXmlElement* root);
    29     virtual ErrorMessage loadWorldEntities(TiXmlElement* root);
    30     virtual ErrorMessage loadScene(TiXmlElement* root);
     28    virtual ErrorMessage loadGUI(const TiXmlElement* root);
     29    virtual ErrorMessage loadWorldEntities(const TiXmlElement* root);
     30    virtual ErrorMessage loadScene(const TiXmlElement* root);
    3131
    3232    virtual ErrorMessage unloadGUI();
  • trunk/src/util/object_manager.cc

    r7368 r7370  
    133133  //  if (level >= 1)
    134134    {
    135       std::list<WorldEntity*>::const_iterator entity;
     135      ObjectManager::EntityList::const_iterator entity;
    136136      for (entity = this->objectLists[omList].begin(); entity != this->objectLists[omList].end(); entity++)
    137137      {
  • trunk/src/world_entities/environments/water.cc

    r7198 r7370  
    211211void Water::tick(float dt)
    212212{
    213   std::list<WorldEntity*> entityList = State::getObjectManager()->getObjectList(OM_GROUP_01_PROJ);
    214   std::list<WorldEntity*>::iterator entity = entityList.begin();
     213  ObjectManager::EntityList entityList = State::getObjectManager()->getObjectList(OM_GROUP_01_PROJ);
     214  ObjectManager::EntityList::iterator entity = entityList.begin();
    215215  while (entity != entityList.end())
    216216  {
  • trunk/src/world_entities/power_ups/weapon_power_up.cc

    r7221 r7370  
    8888  this->weapon = dynamic_cast<Weapon*>((weaponXML == NULL)
    8989      ? Factory::fabricate(static_cast<ClassID>(this->weapon->getLeafClassID()))
    90       : Factory::fabricate((TiXmlElement*)this->getXmlElem()->FirstChildElement("weapon")));
     90      : Factory::fabricate((const TiXmlElement*)this->getXmlElem()->FirstChildElement("weapon")));
    9191  this->model = this->weapon->getModel(0);
    9292}
  • trunk/src/world_entities/spawning_point.h

    r7357 r7370  
    7070    ClassID                   classID;                        //!< the classid of the entity to spawn
    7171    SpawningPointMode         mode;                           //!< the mode of the spawning point
    72     std::list<WorldEntity*>   queue;                          //!< queue of waiting WorldEntities to be spawned
     72    ObjectManager::EntityList   queue;                          //!< queue of waiting WorldEntities to be spawned
    7373    bool                      bSpawning;                      //!< flag to indicate if this spawning point is active or not
    7474};
  • trunk/src/world_entities/weapons/aim.cc

    r7221 r7370  
    107107void Aim::searchTarget()
    108108{
    109   std::list<WorldEntity*>::iterator entity;
     109  ObjectManager::EntityList::iterator entity;
    110110
    111111  for (entity = State::getObjectManager()->getObjectList(group).begin();
  • trunk/src/world_entities/world_entity.h

    r7221 r7370  
    8282  OM_LIST& getOMListNumber() { return this->objectListNumber; }
    8383  /** @returns a Reference to the Iterator */
    84   std::list<WorldEntity*>::iterator& getEntityIterator() { return this->objectListIterator; }
     84  ObjectManager::EntityList::iterator& getEntityIterator() { return this->objectListIterator; }
    8585
    8686  int       writeState(const byte* data, int length, int sender);
     
    121121
    122122  OM_LIST                           objectListNumber;   //!< The ObjectList from ObjectManager this Entity is in.
    123   std::list<WorldEntity*>::iterator objectListIterator; //!< The iterator position of this Entity in the given list of the ObjectManager.
     123  ObjectManager::EntityList::iterator objectListIterator; //!< The iterator position of this Entity in the given list of the ObjectManager.
    124124
    125125  float                   scaling;
Note: See TracChangeset for help on using the changeset viewer.