Changeset 6126 in orxonox.OLD for branches/objectmanager
- Timestamp:
- Dec 15, 2005, 10:57:45 AM (19 years ago)
- Location:
- branches/objectmanager/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/objectmanager/src/lib/graphics/graphics_engine.cc
r6011 r6126 19 19 #include "resource_manager.h" 20 20 #include "event_handler.h" 21 22 #include "world_entity.h" 21 23 22 24 #include "render_2d.h" … … 573 575 } 574 576 577 void GraphicsEngine::draw(const std::list<WorldEntity*>& drawList ) const 578 { 579 std::list<WorldEntity*>::const_iterator entity; 580 for (entity = drawList.begin(); entity != drawList.end(); entity++) 581 if ((*entity)->isVisible()) 582 (*entity)->draw(); 583 } 584 585 575 586 /** 576 587 * displays the Frames per second -
branches/objectmanager/src/lib/graphics/graphics_engine.h
r5857 r6126 15 15 #include "glincl.h" 16 16 17 #include <list> 18 17 19 // Forward Declaration 18 20 class Text; 19 21 class IniParser; 20 22 class SubString; 23 class WorldEntity; 21 24 22 25 //! class to handle graphics … … 66 69 void tick(float dt); 67 70 void draw() const; 71 void draw(const std::list<WorldEntity*>& drawList) const; 68 72 void displayFPS(bool display); 69 73 -
branches/objectmanager/src/story_entities/world.cc
r6125 r6126 721 721 this->gameTime += this->dtS; 722 722 723 723 724 tIterator<WorldEntity>* iterator = this->entities->getIterator(); 724 725 WorldEntity* entity = iterator->firstElement(); … … 805 806 void World::draw () 806 807 { 808 GraphicsEngine* engine = GraphicsEngine::getInstance(); 809 engine->draw(State::getObjectManager()->getObjectList(OM_ENVIRON_NOTICK)); 810 engine->draw(State::getObjectManager()->getObjectList(OM_ENVIRON)); 811 engine->draw(State::getObjectManager()->getObjectList(OM_COMMON)); 812 engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_00)); 813 engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_01)); 814 engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_01_PROJ)); 815 816 807 817 /* draw entities */ 808 818 WorldEntity* entity; … … 825 835 PNode::getNullParent()->debugDraw(0); 826 836 827 GraphicsEngine::getInstance()->draw();837 engine->draw(); 828 838 //TextEngine::getInstance()->draw(); 829 839 } -
branches/objectmanager/src/util/object_manager.cc
r6123 r6126 133 133 if (omList != OM_INIT || omList == OM_SIZE) 134 134 { 135 PRINT(0)(" +ObjectManager-LIST: '%s' -size='%d'-----\n", ObjectManager::OMListToString((OM_LIST)omList), this->objectLists[omList].size());135 PRINT(0)(" +ObjectManager-LIST: '%s'==size='%d'==---\n", ObjectManager::OMListToString((OM_LIST)omList), this->objectLists[omList].size()); 136 136 // if (level >= 1) 137 137 { … … 144 144 } 145 145 else 146 PRINTF(2)("Invalid query. for OM_INIT-LIST \n");146 PRINTF(2)("Invalid query. for OM_INIT-LIST or OM_SIZE\n"); 147 147 } 148 148 -
branches/objectmanager/src/world_entities/weapons/guided_missile.cc
r6123 r6126 153 153 if (this->target != NULL && this->target->getParent() != PNode::getNullParent()) 154 154 { 155 printf("========%s::%s\n", target->getParent()->getClassName(), target->getParent()->getName() );156 155 velocity += ((target->getAbsCoor() - this->getAbsCoor()).getNormalized())*agility; 157 156 float speed = velocity.len();
Note: See TracChangeset
for help on using the changeset viewer.