Changeset 7514 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics/effects/atmospheric_engine.cc
- Timestamp:
- May 3, 2006, 3:02:39 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/atmospheric_engine.cc
r7509 r7514 33 33 { 34 34 this->setClassID(CL_ATMOSPHERIC_ENGINE, "AtmosphericEngine"); 35 // this->bActivated = false;36 35 } 37 36 … … 49 48 AtmosphericEngine::singletonRef = NULL; 50 49 51 this->weatherEffects = ClassList::getList( CL_WEATHER_EFFECT);50 const std::list<BaseObject*>* weatherEffects = ClassList::getList( CL_WEATHER_EFFECT); 52 51 53 if ( this->weatherEffects != NULL)52 if (weatherEffects != NULL) 54 53 { 55 //for (unsigned int i = 0; i < weatherEffects.size(); ++i) 56 while(!this->weatherEffects->empty()) 57 delete this->weatherEffects->front(); 54 while(!weatherEffects->empty()) 55 delete weatherEffects->front(); 58 56 } 59 57 } 60 61 62 58 63 59 /** … … 98 94 99 95 /** 100 * initializes the graphics effect101 */102 //bool AtmosphericEngine::init()103 //{}104 105 106 107 /**108 96 * draws the effect, if needed 109 97 */ 110 98 void AtmosphericEngine::draw() const 111 {} 99 { 100 const std::list<BaseObject*>* weatherEffects = ClassList::getList( CL_WEATHER_EFFECT); 101 102 // draw the weather effects 103 if (weatherEffects != NULL) 104 { 105 std::list<BaseObject*>::const_iterator it; 106 for (it = weatherEffects->begin(); it != weatherEffects->end(); it++) 107 dynamic_cast<WeatherEffect*>(*it)->draw(); 108 } 109 } 112 110 113 111 … … 117 115 */ 118 116 void AtmosphericEngine::tick(float dt) 119 {} 117 { 118 const std::list<BaseObject*>* weatherEffects = ClassList::getList( CL_WEATHER_EFFECT); 119 120 // tick the weather effects 121 if (weatherEffects != NULL) 122 { 123 std::list<BaseObject*>::const_iterator it; 124 for (it = weatherEffects->begin(); it != weatherEffects->end(); it++) 125 dynamic_cast<WeatherEffect*>(*it)->tick(dt); 126 } 127 }
Note: See TracChangeset
for help on using the changeset viewer.