Difference between revisions of "Ability animation"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
 
<font face='Courier New'>
 
<font face='Courier New'>
 
   
 
   
  001a15b4: 27bdffd8 addiu r29,r29,0xffd8
+
  001a15b4: 27bdffd8 addiu r29,r29,0xffd8 -0x28
 
  001a15b8: afb20020 sw r18,0x0020(r29)
 
  001a15b8: afb20020 sw r18,0x0020(r29)
 
  001a15bc: 00809021 addu r18,r4,r0 r18 = ability animation flags OR ability element
 
  001a15bc: 00809021 addu r18,r4,r0 r18 = ability animation flags OR ability element
Line 12: Line 12:
 
  001a15d8: a02024c8 sb r0,0x24c8(r1) clear ??
 
  001a15d8: a02024c8 sb r0,0x24c8(r1) clear ??
 
  001a15dc: 10400019 beq r2,r0,0x001a1644 branch if ability is not an ability
 
  001a15dc: 10400019 beq r2,r0,0x001a1644 branch if ability is not an ability
  001a15e0: 00c08821 addu r17,r6,r0 r17 = stack address
+
  001a15e0: 00c08821 addu r17,r6,r0 r17 = current stack + 0x38
 
  001a15e4: 34020189 ori r2,r0,0x0189
 
  001a15e4: 34020189 ori r2,r0,0x0189
 
  001a15e8: 16020011 bne r16,r2,0x001a1630 branch if not a ball ability
 
  001a15e8: 16020011 bne r16,r2,0x001a1630 branch if not a ball ability
Line 68: Line 68:
 
  001a168c: 3c01801c lui r1,0x801c
 
  001a168c: 3c01801c lui r1,0x801c
 
  001a1690: 00220821 addu r1,r1,r2
 
  001a1690: 00220821 addu r1,r1,r2
  001a1694: 902484ac lbu r4,-0x7b54(r1) load pre-cast effect??
+
  001a1694: 902484ac lbu r4,-0x7b54(r1) additional casting effects for effect?
 
  001a1698: 00000000 nop
 
  001a1698: 00000000 nop
  001a169c: 10800007 beq r4,r0,0x001a16bc branch if not
+
  001a169c: 10800007 beq r4,r0,0x001a16bc branch if none
 
  001a16a0: 00122c02 srl r5,r18,0x10 r5 = ability element?
 
  001a16a0: 00122c02 srl r5,r18,0x10 r5 = ability element?
  001a16a4: 0c06b755 jal 0x001add54
+
  001a16a4: 0c06b755 jal 0x001add54 [[Effect Related (0x1add54)]] returns r2 = value at 0x801b9134 (seems to count up to 0x10 every time an effect is shown, and then stops.)
  001a16a8: 02203021 addu r6,r17,r0 r6 = 1ffe70
+
  001a16a8: 02203021 addu r6,r17,r0 r6 = stack pointer
 
  001a16ac: 3c01801c lui r1,0x801c
 
  001a16ac: 3c01801c lui r1,0x801c
  001a16b0: a022bf64 sb r2,-0x409c(r1) store pre-cast animation?
+
  001a16b0: a022bf64 sb r2,-0x409c(r1) store extra particles for animation?
 
  001a16b4: 080685b1 j 0x001a16c4
 
  001a16b4: 080685b1 j 0x001a16c4
 
  001a16b8: 00000000 nop
 
  001a16b8: 00000000 nop
 
  001a16bc: 3c01801c lui r1,0x801c
 
  001a16bc: 3c01801c lui r1,0x801c
  001a16c0: a020bf64 sb r0,-0x409c(r1) store no pre-cast animation
+
  001a16c0: a020bf64 sb r0,-0x409c(r1) store no effect particles :(
 
  001a16c4: 3c08801c lui r8,0x801c
 
  001a16c4: 3c08801c lui r8,0x801c
 
  001a16c8: 2508ad0c addiu r8,r8,0xad0c 801bad0c
 
  001a16c8: 2508ad0c addiu r8,r8,0xad0c 801bad0c
  001a16cc: 02281025 or r2,r17,r8 1ffe70 OR 1bad0c
+
  001a16cc: 02281025 or r2,r17,r8 stack pointer... OR 0x801bad0c. huh?
  001a16d0: 30420003 andi r2,r2,0x0003
+
  001a16d0: 30420003 andi r2,r2,0x0003 effectively, C && 3. which is 0. all instances of jumping to this routine feature the input r6 being stack + 0x10. if there's an issue with the stack, be persistent I guess.
 
  001a16d4: 3c01801c lui r1,0x801c
 
  001a16d4: 3c01801c lui r1,0x801c
 
  001a16d8: a0209253 sb r0,-0x6dad(r1)
 
  001a16d8: a0209253 sb r0,-0x6dad(r1)
Line 92: Line 92:
 
  001a16ec: 3c01801c lui r1,0x801c
 
  001a16ec: 3c01801c lui r1,0x801c
 
  001a16f0: a0209250 sb r0,-0x6db0(r1)
 
  001a16f0: a0209250 sb r0,-0x6db0(r1)
  001a16f4: 10400017 beq r2,r0,0x001a1754 branch if ?? doesn't have 0x03
+
  001a16f4: 10400017 beq r2,r0,0x001a1754 branch always.
  001a16f8: 02203821 addu r7,r17,r0 r7 = 1ffe70
+
  001a16f8: 02203821 addu r7,r17,r0 r7 = stack + 0x38
 
  001a16fc: 262600c0 addiu r6,r17,0x00c0
 
  001a16fc: 262600c0 addiu r6,r17,0x00c0
  001a1700: 88e20003 lwl r2,0x0003(r7)
+
  001a1700: 88e20003 lwl r2,0x0003(r7) redundant.
 
  001a1704: 98e20000 lwr r2,0x0000(r7)
 
  001a1704: 98e20000 lwr r2,0x0000(r7)
 
  001a1708: 88e30007 lwl r3,0x0007(r7)
 
  001a1708: 88e30007 lwl r3,0x0007(r7)
Line 114: Line 114:
 
  001a1744: 14e6ffee bne r7,r6,0x001a1700
 
  001a1744: 14e6ffee bne r7,r6,0x001a1700
 
  001a1748: 25080010 addiu r8,r8,0x0010
 
  001a1748: 25080010 addiu r8,r8,0x0010
  001a174c: 080685e1 j 0x001a1784
+
  001a174c: 080685e1 j 0x001a1784 redundant ends here.
 
  001a1750: 00000000 nop
 
  001a1750: 00000000 nop
  001a1754: 262600c0 addiu r6,r17,0x00c0 r6 = 1ffe70 + 0xc0
+
  001a1754: 262600c0 addiu r6,r17,0x00c0 r6 = stack + 0xF8
 
  001a1758: 8ce20000 lw r2,0x0000(r7)
 
  001a1758: 8ce20000 lw r2,0x0000(r7)
 
  001a175c: 8ce30004 lw r3,0x0004(r7)
 
  001a175c: 8ce30004 lw r3,0x0004(r7)
Line 125: Line 125:
 
  001a1770: ad040008 sw r4,0x0008(r8)
 
  001a1770: ad040008 sw r4,0x0008(r8)
 
  001a1774: ad05000c sw r5,0x000c(r8)
 
  001a1774: ad05000c sw r5,0x000c(r8)
  001a1778: 24e70010 addiu r7,r7,0x0010
+
  001a1778: 24e70010 addiu r7,r7,0x0010 stack + 0x48
  001a177c: 14e6fff6 bne r7,r6,0x001a1758 stores a bunch of data to 0x1bad0c
+
  001a177c: 14e6fff6 bne r7,r6,0x001a1758 loops until r7 = r6; stores a bunch of stack data to 0x1bad0c
  001a1780: 25080010 addiu r8,r8,0x0010
+
  001a1780: 25080010 addiu r8,r8,0x0010 0x1bad0c + 0x10
 
  001a1784: 88e20003 lwl r2,0x0003(r7)
 
  001a1784: 88e20003 lwl r2,0x0003(r7)
 
  001a1788: 98e20000 lwr r2,0x0000(r7)
 
  001a1788: 98e20000 lwr r2,0x0000(r7)
Line 140: Line 140:
 
  001a17ac: 080685fe j 0x001a17f8 jump to end
 
  001a17ac: 080685fe j 0x001a17f8 jump to end
 
  001a17b0: 00000000 nop
 
  001a17b0: 00000000 nop
  if ability ID < 0
+
  if Effect ID < 0 (so, 0xFFFF)
  001a17b4: 2602ff76 addiu r2,r16,0xff76 ability - 8A
+
  001a17b4: 2602ff76 addiu r2,r16,0xff76 ability - 8A
 
  001a17b8: 2c420008 sltiu r2,r2,0x0008
 
  001a17b8: 2c420008 sltiu r2,r2,0x0008
 
  001a17bc: 10400004 beq r2,r0,0x001a17d0 branch if not a break ability
 
  001a17bc: 10400004 beq r2,r0,0x001a17d0 branch if not a break ability
  001a17c0: 34040012 ori r4,r0,0x0012
+
  001a17c0: 34040012 ori r4,r0,0x0012 Animation ID = 0x12 (shatter effect)
  001a17c4: 00002821 addu r5,r0,r0
+
  001a17c4: 00002821 addu r5,r0,r0 element = 0
 
  001a17c8: 0c06b755 jal 0x001add54
 
  001a17c8: 0c06b755 jal 0x001add54
  001a17cc: 02203021 addu r6,r17,r0
+
  001a17cc: 02203021 addu r6,r17,r0 r6 = stack pointer
  001a17d0: 2602fe6a addiu r2,r16,0xfe6a
+
  001a17d0: 2602fe6a addiu r2,r16,0xfe6a
 
  001a17d4: 2c420008 sltiu r2,r2,0x0008
 
  001a17d4: 2c420008 sltiu r2,r2,0x0008
 
  001a17d8: 14400004 bne r2,r0,0x001a17ec branch if charge ability
 
  001a17d8: 14400004 bne r2,r0,0x001a17ec branch if charge ability
  001a17dc: 34040011 ori r4,r0,0x0011
+
  001a17dc: 34040011 ori r4,r0,0x0011 animation ID = 0x11
 
  001a17e0: 34020092 ori r2,r0,0x0092
 
  001a17e0: 34020092 ori r2,r0,0x0092
  001a17e4: 16020004 bne r16,r2,0x001a17f8 branch if not throw stone
+
  001a17e4: 16020004 bne r16,r2,0x001a17f8 branch if not throw stone
 
  001a17e8: 00000000 nop
 
  001a17e8: 00000000 nop
 
  001a17ec: 00002821 addu r5,r0,r0
 
  001a17ec: 00002821 addu r5,r0,r0
  001a17f0: 0c06b755 jal 0x001add54
+
  001a17f0: 0c06b755 jal 0x001add54 [[Effect Related (0x1add54)]]
 
  001a17f4: 02203021 addu r6,r17,r0
 
  001a17f4: 02203021 addu r6,r17,r0
 
  001a17f8: 8fbf0024 lw r31,0x0024(r29)
 
  001a17f8: 8fbf0024 lw r31,0x0024(r29)

Revision as of 09:31, 22 February 2022

001a15b4: 27bdffd8 addiu r29,r29,0xffd8		-0x28
001a15b8: afb20020 sw r18,0x0020(r29)
001a15bc: 00809021 addu r18,r4,r0			r18 = ability animation flags OR ability element
001a15c0: afb00018 sw r16,0x0018(r29)
001a15c4: 00a08021 addu r16,r5,r0				r16 = ability ID
001a15c8: afb1001c sw r17,0x001c(r29)
001a15cc: 2a020200 slti r2,r16,0x0200			set if ability is an ability?
001a15d0: afbf0024 sw r31,0x0024(r29)
001a15d4: 3c01801c lui r1,0x801c
001a15d8: a02024c8 sb r0,0x24c8(r1)				clear ??
001a15dc: 10400019 beq r2,r0,0x001a1644			branch if ability is not an ability
001a15e0: 00c08821 addu r17,r6,r0				r17 = current stack + 0x38
001a15e4: 34020189 ori r2,r0,0x0189
001a15e8: 16020011 bne r16,r2,0x001a1630		branch if not a ball ability
001a15ec: 00101040 sll r2,r16,0x01				ability ID*2
001a15f0: 0c06b7eb jal 0x001adfac				Get Ninja Ball effect
001a15f4: 00122402 srl r4,r18,0x10				r4 = weapon element flags
									00 = no element
									01 = fire
									02 = water
									03 = earth
									04 = wind
									05 = holy
									06 = dark
									07 = ice
									08 = lightning
001a15f8: 00401821 addu r3,r2,r0				move return value to r3, good on you compiler
001a15fc: 34020001 ori r2,r0,0x0001			check for fire in list
001a1600: 14620003 bne r3,r2,0x001a1610			branch element isn't fire
001a1604: 34020002 ori r2,r0,0x0002			check water from list
001a1608: 08068595 j 0x001a1654					return r2 = 0x10 (fire animation?)
001a160c: 34020010 ori r2,r0,0x0010
001a1610: 14620003 bne r3,r2,0x001a1620			branch element isn't water
001a1614: 34020008 ori r2,r0,0x0008			check lightning from list
001a1618: 08068595 j 0x001a1654					return r2 = 0x18 (water animation?)
001a161c: 34020018 ori r2,r0,0x0018
001a1620: 1462000e bne r3,r2,0x001a165c			branch if element isn't lightning (don't store ability effect. side effect, plays previously saved animation?)
001a1624: 34020014 ori r2,r0,0x0014
001a1628: 08068595 j 0x001a1654					return t2 = 0x14 (lightning animation?)
001a162c: 00000000 nop
if not ball ability
001a1630: 3c01801b lui r1,0x801b
001a1634: 00220821 addu r1,r1,r2
001a1638: 942263f0 lhu r2,0x63f0(r1)			load ability effect
001a163c: 08068595 j 0x001a1654
001a1640: 00000000 nop
if ability ID > 0x200 (Event Effect)
001a1644: 00101040 sll r2,r16,0x01			
001a1648: 3c01801b lui r1,0x801b
001a164c: 00220821 addu r1,r1,r2
001a1650: 9422637c lhu r2,0x637c(r1)			load Event ability ID
001a1654: 3c01801c lui r1,0x801c
001a1658: a42224d0 sh r2,0x24d0(r1)				store Effect ID
001a165c: 3c02801c lui r2,0x801c
001a1660: 844224d0 lh r2,0x24d0(r2)				load Effect ID
001a1664: 00000000 nop
001a1668: 04400052 bltz r2,0x001a17b4			branch if Effect ID is less than zero (FFFF)
001a166c: 00401821 addu r3,r2,r0
001a1670: 306201ff andi r2,r3,0x01ff			remove Item flag?
001a1674: 3c01801c lui r1,0x801c
001a1678: a42224d0 sh r2,0x24d0(r1)				store Effect ID
001a167c: 34020001 ori r2,r0,0x0001
001a1680: 3c01801b lui r1,0x801b
001a1684: ac2263e8 sw r2,0x63e8(r1)				store ?? (Effect loaded?)
001a1688: 3242ffff andi r2,r18,0xffff			r2 = ability animation flags 1
001a168c: 3c01801c lui r1,0x801c			
001a1690: 00220821 addu r1,r1,r2			
001a1694: 902484ac lbu r4,-0x7b54(r1)			additional casting effects for effect?
001a1698: 00000000 nop
001a169c: 10800007 beq r4,r0,0x001a16bc			branch if none
001a16a0: 00122c02 srl r5,r18,0x10			r5 = ability element?
001a16a4: 0c06b755 jal 0x001add54				Effect Related (0x1add54) returns r2 = value at 0x801b9134 (seems to count up to 0x10 every time an effect is shown, and then stops.)
001a16a8: 02203021 addu r6,r17,r0				r6 = stack pointer
001a16ac: 3c01801c lui r1,0x801c
001a16b0: a022bf64 sb r2,-0x409c(r1)			store extra particles for animation?
001a16b4: 080685b1 j 0x001a16c4
001a16b8: 00000000 nop
001a16bc: 3c01801c lui r1,0x801c
001a16c0: a020bf64 sb r0,-0x409c(r1)			store no effect particles :(
001a16c4: 3c08801c lui r8,0x801c
001a16c8: 2508ad0c addiu r8,r8,0xad0c			801bad0c
001a16cc: 02281025 or r2,r17,r8				stack pointer... OR 0x801bad0c. huh?
001a16d0: 30420003 andi r2,r2,0x0003			effectively, C && 3. which is 0. all instances of jumping to this routine feature the input r6 being stack + 0x10. if there's an issue with the stack, be persistent I guess.
001a16d4: 3c01801c lui r1,0x801c
001a16d8: a0209253 sb r0,-0x6dad(r1)
001a16dc: 3c01801c lui r1,0x801c
001a16e0: a0209252 sb r0,-0x6dae(r1)
001a16e4: 3c01801c lui r1,0x801c
001a16e8: a0209251 sb r0,-0x6daf(r1)
001a16ec: 3c01801c lui r1,0x801c
001a16f0: a0209250 sb r0,-0x6db0(r1)
001a16f4: 10400017 beq r2,r0,0x001a1754			branch always.
001a16f8: 02203821 addu r7,r17,r0			r7 = stack + 0x38
001a16fc: 262600c0 addiu r6,r17,0x00c0
001a1700: 88e20003 lwl r2,0x0003(r7)			redundant.
001a1704: 98e20000 lwr r2,0x0000(r7)
001a1708: 88e30007 lwl r3,0x0007(r7)
001a170c: 98e30004 lwr r3,0x0004(r7)
001a1710: 88e4000b lwl r4,0x000b(r7)
001a1714: 98e40008 lwr r4,0x0008(r7)
001a1718: 88e5000f lwl r5,0x000f(r7)
001a171c: 98e5000c lwr r5,0x000c(r7)
001a1720: a9020003 swl r2,0x0003(r8)
001a1724: b9020000 swr r2,0x0000(r8)
001a1728: a9030007 swl r3,0x0007(r8)
001a172c: b9030004 swr r3,0x0004(r8)
001a1730: a904000b swl r4,0x000b(r8)
001a1734: b9040008 swr r4,0x0008(r8)
001a1738: a905000f swl r5,0x000f(r8)
001a173c: b905000c swr r5,0x000c(r8)
001a1740: 24e70010 addiu r7,r7,0x0010
001a1744: 14e6ffee bne r7,r6,0x001a1700
001a1748: 25080010 addiu r8,r8,0x0010
001a174c: 080685e1 j 0x001a1784			redundant ends here.
001a1750: 00000000 nop
001a1754: 262600c0 addiu r6,r17,0x00c0			r6 = stack + 0xF8
001a1758: 8ce20000 lw r2,0x0000(r7)			
001a175c: 8ce30004 lw r3,0x0004(r7)			
001a1760: 8ce40008 lw r4,0x0008(r7)			
001a1764: 8ce5000c lw r5,0x000c(r7)			
001a1768: ad020000 sw r2,0x0000(r8)
001a176c: ad030004 sw r3,0x0004(r8)
001a1770: ad040008 sw r4,0x0008(r8)
001a1774: ad05000c sw r5,0x000c(r8)
001a1778: 24e70010 addiu r7,r7,0x0010			stack + 0x48
001a177c: 14e6fff6 bne r7,r6,0x001a1758		loops until r7 = r6; stores a bunch of stack data to 0x1bad0c
001a1780: 25080010 addiu r8,r8,0x0010			0x1bad0c + 0x10
001a1784: 88e20003 lwl r2,0x0003(r7)
001a1788: 98e20000 lwr r2,0x0000(r7)
001a178c: 88e30007 lwl r3,0x0007(r7)
001a1790: 98e30004 lwr r3,0x0004(r7)
001a1794: a9020003 swl r2,0x0003(r8)
001a1798: b9020000 swr r2,0x0000(r8)
001a179c: a9030007 swl r3,0x0007(r8)
001a17a0: b9030004 swr r3,0x0004(r8)
001a17a4: 3c01801c lui r1,0x801c
001a17a8: ac20c0d4 sw r0,-0x3f2c(r1)
001a17ac: 080685fe j 0x001a17f8				jump to end
001a17b0: 00000000 nop
if Effect ID < 0 (so, 0xFFFF)
001a17b4: 2602ff76 addiu r2,r16,0xff76			ability - 8A
001a17b8: 2c420008 sltiu r2,r2,0x0008
001a17bc: 10400004 beq r2,r0,0x001a17d0		branch if not a break ability
001a17c0: 34040012 ori r4,r0,0x0012			Animation ID = 0x12 (shatter effect)
001a17c4: 00002821 addu r5,r0,r0			element = 0
001a17c8: 0c06b755 jal 0x001add54			
001a17cc: 02203021 addu r6,r17,r0			r6 = stack pointer
001a17d0: 2602fe6a addiu r2,r16,0xfe6a			
001a17d4: 2c420008 sltiu r2,r2,0x0008
001a17d8: 14400004 bne r2,r0,0x001a17ec		branch if charge ability
001a17dc: 34040011 ori r4,r0,0x0011			animation ID = 0x11
001a17e0: 34020092 ori r2,r0,0x0092
001a17e4: 16020004 bne r16,r2,0x001a17f8		branch if not throw stone
001a17e8: 00000000 nop
001a17ec: 00002821 addu r5,r0,r0
001a17f0: 0c06b755 jal 0x001add54			Effect Related (0x1add54)
001a17f4: 02203021 addu r6,r17,r0
001a17f8: 8fbf0024 lw r31,0x0024(r29)
001a17fc: 8fb20020 lw r18,0x0020(r29)
001a1800: 8fb1001c lw r17,0x001c(r29)
001a1804: 8fb00018 lw r16,0x0018(r29)
001a1808: 27bd0028 addiu r29,r29,0x0028
001a180c: 03e00008 jr r31
001a1810: 00000000 nop