| 156 | Set((float)M->FrameStart(), (float)M->FrameEnd(), M->FPS()); |
| 157 | } |
| 158 | void SAnimParams::Update(float dt, float speed, bool loop) |
| 159 | { |
| 160 | if (!bPlay) |
| 161 | return; |
| 162 | bWrapped = false; |
| 163 | t_current += speed * dt; |
| 164 | if (t_current > max_t) |
| 165 | { |
| 166 | bWrapped = true; |
| 167 | if (loop) |
| 168 | { |
| 169 | float len = max_t - min_t; |
| 170 | float k = float(iFloor((t_current - min_t) / len)); |
| 171 | t_current = t_current - k * len; |
| 172 | } |
| 173 | else |
| 174 | t_current = max_t; |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | //------------------------------------------------------------------------------ |
no outgoing calls
no test coverage detected