| 200 | } |
| 201 | |
| 202 | void AnimationInfo::processAnimation(bool reverseAnimation /*= false*/) |
| 203 | { |
| 204 | tickCounterOfCurrentFrame++; |
| 205 | ticksSinceSequenceStarted_ += baseValueFraction; |
| 206 | if (tickCounterOfCurrentFrame >= ticksPerFrame) { |
| 207 | tickCounterOfCurrentFrame = 0; |
| 208 | if (reverseAnimation) { |
| 209 | --currentFrame; |
| 210 | if (currentFrame == -1) { |
| 211 | currentFrame = numberOfFrames - 1; |
| 212 | ticksSinceSequenceStarted_ = 0; |
| 213 | } |
| 214 | } else { |
| 215 | ++currentFrame; |
| 216 | if (currentFrame >= numberOfFrames) { |
| 217 | currentFrame = 0; |
| 218 | ticksSinceSequenceStarted_ = 0; |
| 219 | } |
| 220 | } |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | uint8_t AnimationInfo::getProgressToNextGameTick() const |
| 225 | { |
no outgoing calls