Animations made easier

I have made some progress again on the animation macros I wrote about last week. As I have never written programs in assembler code before, it is quite a nice challenge to learn how to use conditions and loops in those macros (but it is also fun of course).

I have already defined a command that generates all the tables needed to interpolate the frame number from the tick18 counter. Instead of loads of code in your ASM file, that are hard to understand, there is now simple one call to the new macro. When compiling the MDL object, the macro will take care of the creation of the proper tables. There is a similar macro that takes care of the calls to the commands that perform the actual interpolation.

Both these macros have been constructed so that they use a local variable base to store the frame number. This means the animation does no longer depend on the user variables. This is an approach I have been using in CAT for some time already and I prefer it a lot over the default MakeMDL approach. Both the macros also take a few arguments, one of them is the number of frames in the animation. If you set this value to more than 1024 frames, the changes I described on the forum some time ago will be added to your code and you should be able to make longer animations.

So with all this, I hope that tweaking animations will become easier until there is a nice tool to do it for you. It should also help more people to explore animations with over 1024 frames. At the moment I am still finishing and testing these macros myself, once they are ready you can be sure I will release them (with a little bit of documentation on how to use them).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.