comparison engine/core/video/animation.cpp @ 661:e3140f01749d

* Merged the light branch back into trunk. * Modified the demos so they work with the new loaders and setting.
author helios2000@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 05 Nov 2010 15:21:10 +0000
parents 16c2b3ee59ce
children
comparison
equal deleted inserted replaced
660:b0733d998d0f 661:e3140f01749d
80 } 80 }
81 81
82 bool Animation::isValidIndex(int index) const{ 82 bool Animation::isValidIndex(int index) const{
83 int size = m_frames.size(); 83 int size = m_frames.size();
84 return size > 0 && index >= 0 && index < size; 84 return size > 0 && index >= 0 && index < size;
85 } 85 }
86 86
87 Image* Animation::getFrame(int index) { 87 Image* Animation::getFrame(int index) {
88 if (isValidIndex(index)) { 88 if (isValidIndex(index)) {
89 return m_frames[index].image.get<Image>(); 89 return m_frames[index].image.get<Image>();
90 } else { 90 } else {