comparison engine/core/model/structures/layer.cpp @ 181:56ac89189bc4

fixed time handling in fife: - the time scaling method was unreliable when changing the time factors (jumping in the moment of the change) - replaced much calls to SDL_GetTicks with TimerManager::instance()->getTime() - some other time related cleanup
author spq@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 31 Jan 2009 04:15:43 +0000
parents 64e7fe3d4288
children 51cc05d862f2
comparison
equal deleted inserted replaced
180:66bd7f8c541e 181:56ac89189bc4
201 return blockingInstance; 201 return blockingInstance;
202 } 202 }
203 203
204 bool Layer::update() { 204 bool Layer::update() {
205 m_changedinstances.clear(); 205 m_changedinstances.clear();
206 unsigned int curticks = SDL_GetTicks(); 206 std::vector<Instance*>::iterator it = m_instances.begin();
207 std::vector<Instance*>::iterator it = m_instances.begin(); 207 for(; it != m_instances.end(); ++it) {
208 for(; it != m_instances.end(); ++it) { 208 if ((*it)->update() != ICHANGE_NO_CHANGES) {
209 if ((*it)->update(curticks) != ICHANGE_NO_CHANGES) {
210 m_changedinstances.push_back(*it); 209 m_changedinstances.push_back(*it);
211 m_changed = true; 210 m_changed = true;
212 } 211 }
213 } 212 }
214 if (!m_changedinstances.empty()) { 213 if (!m_changedinstances.empty()) {