12-07-2021, 02:29 AM
Hi Jaume!
How are you doing?
The "temp.png" animation you use for outlines can't be done with color cycling. Pixel coverage changes between frames. Color cycling only allows changing a given color, but not changing which pixels are transparent and which ones have color coverage. However I encourage you to apply it in other places, it has its uses.
I don't have insight about your game engine, but Tilengine handles the animation of each sprite independently, so you should be able to have the same sequence running on several sprites, each one at its own phase.
Modifying TLN_SetSpriteAnimation() to have the starting frame is easy, the problem here is that adding a new parameter to a public function breaks both API and ABI compatibility -C is very strict about parameters because it doesn't have overloading nor default values for optional parameters-. I should instead add a new function to reassign the current frame so you can "jump" at any time, and this could be an useful addition. This way you would start the animation normally, and then immediatley jump to the desired frame, so the first frame you see is the one where you want to "resume" the animation.
I'll keep you up to date when I add this functionality!
Best regards,
How are you doing?
The "temp.png" animation you use for outlines can't be done with color cycling. Pixel coverage changes between frames. Color cycling only allows changing a given color, but not changing which pixels are transparent and which ones have color coverage. However I encourage you to apply it in other places, it has its uses.
I don't have insight about your game engine, but Tilengine handles the animation of each sprite independently, so you should be able to have the same sequence running on several sprites, each one at its own phase.
Modifying TLN_SetSpriteAnimation() to have the starting frame is easy, the problem here is that adding a new parameter to a public function breaks both API and ABI compatibility -C is very strict about parameters because it doesn't have overloading nor default values for optional parameters-. I should instead add a new function to reassign the current frame so you can "jump" at any time, and this could be an useful addition. This way you would start the animation normally, and then immediatley jump to the desired frame, so the first frame you see is the one where you want to "resume" the animation.
I'll keep you up to date when I add this functionality!
Best regards,