Difference between revisions of "SEQ & Animation info page"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
Line 54: Line 54:
 
       0xff -> Sets delay to 0, without clearing the graphic trigger, pausing the animation indefinitely. PauseAnimation()  
 
       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($$,##)
+
  if the lead byte is NOT 0xff, then it performs a basic 2 byte command saving Weapon Rotation (plus the height mod &  and the number of frames to hold in this rotation for. 0 wait frames is indefinite, unless sprite data has specified otherwise. LoadRotationWait($$,##)
  for units, the generic 2 byte command loads the same sprite data. Identical command.
+
  for units, the generic 2 byte command loads (input 1)'s frame, and the frame's hardcoded rotation (usually 0) (as opposed to loading its rotation, and the rotation's hardcoded frame).
 
  additional notes:
 
  additional notes:
 
  this command loads the hardcoded number of graphics to load per any given frame/SHP, and loads and displays the graphic on screen based on data somewhere in ram, such as the size of the graphic on the sheet, and where on the sheet the graphic is.
 
  this command loads the hardcoded number of graphics to load per any given frame/SHP, and loads and displays the graphic on screen based on data somewhere in ram, such as the size of the graphic on the sheet, and where on the sheet the graphic is.

Revision as of 10:25, 31 July 2021

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:
     0xbe -> clears some unused data. for no reason.
     0xbf -> jumps to somewhere with no routine recorded on the wiki.
     0xc0 -> some kind of conditional wait command? unsure what the condition is. 3 bytes long.
     0xc1 -> no idea. clears some positional/map data, maybe? 4 bytes long.
     0xc2 -> queues next command immediately. no other known purpose.
     0xc3 -> saves 0 to item display (clears?). 2 bytes long
     0xc4 -> similarly no idea. saves some data related to items. 4 bytes long.
     0xc5 -> saves 1 to item display (item?). 2 bytes long
     0xc6 -> triggers a check for the animation continuing. if post action has completed, repeat last few frames of animation until it is engaged again. unit anim only.
     0xc7, 0xc8, 0xc9, 0xe6, 0xe7, 0xe8, 0xea, 0xf1, 0xf8, 0xfb -> 3 bytes long, no known effect.
     0xca, 0xd7, 0xe3, 0xe4, 0xe9, 0xed -> increments r17 by 1. no other known effect.
     0xcb -> decreases the height of the unit by 2, probably
     0xcc -> decreases the height of the unit by 1, probably
     0xcd -> changes the position of the unit by -2 in either the same or perpendicular direction to facing
     0xce -> changes the position of the unit by -1 in either the same or perpendicular direction to facing
     0xcf -> increases the height of the unit by 2... probably?
     0xd0 -> increases the height of the unit by 1... probably?
     0xd1 -> changes the position of the unit by 2 in either the same or perpendicular direction to facing
     0xd2 -> changes the position of the unit by 1 in either the same or perpendicular direction to facing (no, really, I can't tell, it's too ambiguous)
     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 -> no idea, routine is undocumented.
     0xd5 -> increments loop count by 1 after every animation loop. said animation loop seems to serve no other purpose. maybe debug tool? IncrementLoop()
     0xd6 -> queues a check for the animation continuing. repeats last (input) number of bytes if sheathe check value is not 0. WeaponSheatheCheck2(##)
     0xf0, 0xf1, 0xf3, 0xf4, 0xf5 -> increments r17 by 1. no other known effect.
     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(##)
     0xda -> unused command, ends animation early by deactivating graphic, potentially just unwritten.
     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 -> after any attack, frog attack, sharpshoot, charge, or jump command (hardcoded to ability ID slots), manually set target hurt/block/dodge animation, and weapon element effect data if display data turns up not erroneous? only works as a unit animation command, not a weapon or effect command. PostGenericAttack()
     0xdf -> Sets graphic's Y rotation to 0. SetYRotation0()
     0xe0, 0xe1 -> likely unwritten commands, or used for another purpose. no-op.
     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(####)
     0xeb -> flips horizontal bitflag in sprite data. FlipHorizontal()
     0xec -> flips vertical bitflag in sprite data. FlipVertical()
     0xee -> moves unit in either the same or perpendicular direction to facing by the value of (input). unit only.
     0xef -> moves unit up or down by the value of (input). unit only. MoveUnitUp(##)
     0xf0 -> moves unit in either the perpendicular or same direction to facing by the value of (input). unit only.
     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 -> increments r17 by 3, skipping over a whole command's worth of bytes. other effects are unknown.
     0xf9 -> does something vectory.
     0xfa -> unit animation trigger only, moves the unit in the direction it's facing by (input 1)'s value, moves them up or down by (input 2)'s value, and then something else undocumented, presumably with (input 3)'s value, probably motion in the perpendicular direction. MoveUnit(%%,$$,##)
     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 (plus the height mod &  and the number of frames to hold in this rotation for. 0 wait frames is indefinite, unless sprite data has specified otherwise. LoadRotationWait($$,##)
for units, the generic 2 byte command loads (input 1)'s frame, and the frame's hardcoded rotation (usually 0) (as opposed to loading its rotation, and the rotation's hardcoded frame).
additional notes:
this command loads the hardcoded number of graphics to load per any given frame/SHP, and loads and displays the graphic on screen based on data somewhere in ram, such as the size of the graphic on the sheet, and where on the sheet the graphic is.
   psuedo commands?
   0x$$##       -> LoadRotationWait($$,##)
   0xffd3##     -> WeaponSheatheCheck1(##)
   0xffd4       -> ReturnErrorFinishAnim1()
   0xffd5       -> IncrementLoop()
   0xffd6##     -> WeaponSheatheCheck2(##)
   0xffd8##     -> SaveRotation(##)
   0xffd9####   -> QueueThrowAnimation(####)
   0xffda       -> ReturnErrorFinishAnim2()
   0xffdb       -> ResetWait1()
   0xffdc       -> ReloadAnimation()
   0xffdd##     -> OverrideAnimation(##)
   0xffde       -> PostGenericAttack()
   0xffdf       -> SetYRotation0()
   0xffe2       -> ResetWait2()
   0xffe5####   -> SaveYSpin(####)
   0xffeb       -> FlipHorizontal()
   0xffec       -> FlipVertical()
   0xffef##     -> MoveUnitUp(##)
   0xfff2$$##   -> QueueSpriteAnim($$,##)
   0xfffa%%$$## -> MoveUnit(%%,$$,##)
   0xfffc$$##   -> Wait($$,##)
   0xfffd##     -> HoldWeapon(##)
   0xfffe       -> EndAnimation()
   0xffff       -> PauseAnimation()