øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2032.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index6a4d.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=8.120e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index6a4d.html.zx…%h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿȰ,0<]OKtext/htmlISO-8859-1gzip0|Ö<]ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 23:57:18 GMT0ó°° ®0®P®€§²ð®…%h^Ì<] Spell Animation Control Codes

Author Topic: Spell Animation Control Codes  (Read 1142 times)

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Spell Animation Control Codes
« on: April 26, 2015, 04:45:47 PM »
This is based on the information Zeemis posted at http://www.ff6hacking.com/forums/showthread.php?tid=925.  Note that the addresses are different for the US version of the ROM.

The last bit of this post was a "control code,"  which had very little information.  This is similar (but not exactly the same) to animation details that I worked out on FF5.  It's a set of instructions to process how sprites act during the animation.  I've done a little work on it which I'm presenting here.  I'll probably come back to it from time to time, but I don't want to focus my energy on it.

So this is the code for 00C1, which is the Fire animation:

40 00Animation Speed
90 00Clear Sprite Flag #40, Set XX
EB 58 5D 5E 5D 65 5DBranch Based On Subsprite Number
C9 00Play Sound
80 3BSubcommand 3B (Show Target Mask)
83 99Move Sprite
8B 04While Loop XX Times
00Next frame?
80 3CSubcommand 3C (Clear Target Mask)
8CIterate While Loop
FFEnd Animation
83 79Move Sprite
8B 04While Loop XX Times
00Next frame?
8CIterate While Loop
FFEnd Animation

Running through it with brief notes:
1) First two bytes are animation speed and an unknown byte, higher is slower
2) 90: Handles setting bits #10 and #20 of 6F86,X.  Bit #20 controls transparency effect; clear means on, set means off)
3) EB: Jumps forward based on which subsprite we're on; Fire has three, so three branches
4) C9: Play sound; I believe 00 tells it to use the default
5) 80: Runs a subcommand based on the parameter.  3B masks the target with the spell palette.
6) 83: Moves the spell sprite; #1F is the amount, #E0 is the direction
7) 8B/8C: Does a while loop - loops over the code xx times.  89/8A is the for loop version.  The difference is that the for loop counts what loop we're on, the while loop does not.
8) 00: Not sure; numbers less than #80, like in FF5, seem to indicate frames to display.  I think 00 is short hand for "next frame."  However, it could just be a way of pausing with a while loop.
9) 80 3C: clears the target mask.
10) FF: Signals the end of the animation


Madsiur

  • Tunnel Armor
  • *
  • Posts: 149
  • Gender: Male
  • FF6AE coder
    • View Profile
    • Madsiur's Lair
Re: Spell Animation Control Codes
« Reply #1 on: June 21, 2015, 03:25:25 PM »
Interesting. I'll try to play with this to see if I can make interesting changes...