The PR will be big but not today. What I've achieved so far:
- Removed crapload of duplicate code in all effects
- Effects's Draw() receives two more arguments - delta time and time elapsed, and the calculation is done in one common place
- Removed all usage of SDL_Ticks() in effects code
- Checked a couple of effects and they look good!
What's still left to do:
- Individualize delta calculation for effect, so that DrawEffectsOfType can work together with DrawEffects (Right now if you called DrawEffectsOfType and then DrawEffects, all the effects of type other than the first one would not update because the last update is stored in effect list)
- Figure out how freezing effects works and rework it to not be passed as argument but rather a property of CEffectsList
- Test every single effect if it looks, or appears to look correctly
Oh and heads up - you will likely need some small changes for RPG to build again.
____________________________
My website