SEQ & Animation info page

From Final Fantasy Hacktics Wiki
Revision as of 12:02, 26 July 2021 by Talcall (talk | contribs)
Jump to navigation Jump to search

The routine: Load WEP graphic from WEP1 Sheet references this table to load a series of commands (otherwise named 'frame commands') that vary in width depending on various inputs - but they seem mostly independent as commands. This page is an attempt to catalogue their effects. The pointer to these commands is located in SEQ Data, at address 0x800be74c + Weapon animation * 4.


Leading Byte:
0xff -> triggers alternate instructions:
     0xd3 -> triggers a check for the animation continuing. only repeats last (input) number of bytes if animation check is 1, otherwise continues next command. WeaponSheatheCheck1(##)
     0xd4 & 0xda -> unused commands, ends animation early by deactivating graphic, potentially just unwritten.
     0xd5 -> currently unsure. increments some value.
     0xd6 -> queues a check for the animation continuing. repeats last (input) number of bytes if sheathe check value is not 0. WeaponSheatheCheck2(##)
     0xd7, 0xe3, 0xe4, 0xe9, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf3, 0xf4, 0xf5 -> increments r17 by 1. no other known effect. continues next command without considering third byte.
     0xd8 -> saves the value in (input) to weapon rotation byte (misc unit data). SaveRotation(##)
     0xd9 -> jumps directly to Set evade type data, item and throw stone hardcoding, and continues next command from the top. QueueThrowAnim(##)
     0xdb -> Resets frame delay based on SEQ data. ResetWait1()
     0xdc -> Loads last saved animation number and byte pointer from Sprite data, and continues from where it was last saved. ReloadAnimation()
     0xdd -> Saves animation number and byte pointer to Sprite data, then queues the animation in the third byte. OverrideAnimation(##)
     0xde, 0xe0, 0xe1 -> likely unwritten commands, or used for another purpose. no-op.
     0xdf -> clears ? Display data. RefreshDisplay()
     0xe2 -> Resets frame delay based on SEQ data. ResetWait2()
     0xe5 -> 4bytes long (?), saves a new spin on the Y axis into sprite, byte 3 is in the lower byte, and byte 4 is in the upper byte. SaveYSpin(####)
     0xe6, 0xe7, 0xe8, 0xea, 0xf8, 0xfb -> 3 bytes long, no known effect.
     0xeb -> I'm inclined to say this is some kind of direction check? there's an XORI in there and those are hard to think of immediate uses for. they mostly come around in brief periods of inspiration.
     0xec -> same deal here, but the value's changed for the command. instead of xori 0x4, is xori 0x2.
     0xf2 -> resets to 0, and prepares weapon, effect, or unit ($$) graphics for frame 1 of their appropriate animation (##). QueueSpriteAnimation($$,##) 00 - Unit 01 - Weapon 02 - Effect
     0xf6 -> currently unsure. does something really technical with button inputs.
     0xf7, 0xfa -> increments r17 by 3, skipping over a whole command's worth of bytes. other effects are unknown.
     0xf9 -> does something vectory.
     0xfc -> 4 bytes long, seems to be some sort of timed counter. repeats last (input) bytes until (input2) counts down to 0. useful for bows? wait($$,##)
     0xfd -> identical secondary effects to d6, however the effects are guaranteed, and do not need the sheathe check. repeats last few commands of attack animation. HoldWeapon()
     0xfe -> clears graphic trigger and sets delay to 0, ending animation. EndAnimation()
     0xff -> Sets delay to 0, without clearing the graphic trigger, pausing the animation indefinitely. PauseAnimation() 
if the lead byte is NOT 0xff, then it performs a basic 2 byte command saving Weapon Rotation and the number of frames to hold in this rotation for. 0 wait frames is indefinite, unless sprite data has specified otherwise. LoadRotationWait($$,##)
   psuedo commands?
   0x$$##     -> LoadRotationWait($$,##)
   0xffd3##   -> WeaponSheatheCheck1(##)
   0xffd4     -> ReturnErrorFinishAnim1()
   0xffd6##   -> WeaponSheatheCheck2(##)
   0xffd8##   -> SaveRotation(##)
   0xffd9#### -> QueueThrowAnimation(####)
   0xffda     -> ReturnErrorFinishAnim2()
   0xffdb     -> ResetWait1()
   0xffdc     -> ReloadAnimation()
   0xffdd##   -> OverrideAnimation(##)
   0xffdf     -> RefreshDisplay()
   0xffe2     -> ResetWait2()
   0xffe5#### -> SaveYSpin(####)
   0xfff2$$## -> QueueSpriteAnim($$,##)
   0xfffc$$## -> Wait($$,##)
   0xfffd##   -> HoldWeapon()
   0xfffe     -> EndAnimation()
   0xffff     -> PauseAnimation()