Hi all,
I found a fix for bug #1871, but I also found some hacks in there that I
took the opportunity to remove.
Patch #1 leaves the hacks in place, patch #2 removes the hacks:
http://developer.wz2100.net/attachment/ticket/1871/structframes.diff
http://developer.wz2100.net/attachment/ticket/1871/structframes2.diff
This made me wonders whether there are any PIEs with 8 frame animation
(e.g non-teamcolour with 8 frames).
There shouldn't be any, but I checked all the standard pies in the
*/struct/ folder ( just to make sure for patch #2).
If there aren't any PIEs that have 8 non-teamcolour frames, then I
propose we make two functions, one that returns whether a imd has
animations, and another that returns whether it has team colours.
Something like this:
inline BOOL hasTeamColours (const iIMDShape* imd) { return
imd->numFrames == 8; }
inline BOOL hasAnimation (const iIMDShape* imd) { return (imd->numFrames
> 0 && !hasTeamColours(imd)); }
The purpose would be to prevent repetition and clean up the code.
So let me know:
- Whether you know if there aren't any pie files that (ab)use 8
animation frames.
- If you oppose my proposition.
- Whether you have any objections to patch #2 going into trunk (
possibly modified to use functions like those shown above.)
P.S. The comments for getModularScaledGraphicsTime are wrong about the
range returned, this is why imd->numFrames is passed in rather than
numFrames - 1.
-Safety0ff
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev