Set animation for Item abilities

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search

00082a44: 27bdffe0 addiu r29,r29,0xffe0
00082a48: afb10014 sw r17,0x0014(r29)
00082a4c: 00808821 addu r17,r4,r0
00082a50: afb00010 sw r16,0x0010(r29)
00082a54: 00a08021 addu r16,r5,r0
00082a58: afbf0018 sw r31,0x0018(r29)
00082a5c: 9225013a lbu r5,0x013a(r17)			load used item/weapon ID
00082a60: 0c01fd17 jal 0x0007f45c				Store items display data
00082a64: 00000000 nop
00082a68: 12000008 beq r16,r0,0x00082a8c
00082a6c: 00002821 addu r5,r0,r0
00082a70: 9205007c lbu r5,0x007c(r16)			load TX
00082a74: 9223007c lbu r3,0x007c(r17)			load AX
00082a78: 9204007d lbu r4,0x007d(r16)			load TY
00082a7c: 9222007d lbu r2,0x007d(r17)			load AY
00082a80: 00a32823 subu r5,r5,r3				r5 = X distance
00082a84: 08020aa4 j 0x00082a90					
00082a88: 00822023 subu r4,r4,r2				r4 = Y distance
00082a8c: 00002021 addu r4,r0,r0
00082a90: 04a10002 bgez r5,0x00082a9c			branch if valid distance
00082a94: 00000000 nop
00082a98: 00052823 subu r5,r0,r5				make positive?
00082a9c: 04810002 bgez r4,0x00082aa8
00082aa0: 00000000 nop
00082aa4: 00042023 subu r4,r0,r4				make positive?
00082aa8: 1ca00003 bgtz r5,0x00082ab8			branch if positive?
00082aac: 28a20002 slti r2,r5,0x0002			set if X distance < 2
00082ab0: 18800009 blez r4,0x00082ad8
00082ab4: 00000000 nop
00082ab8: 10400003 beq r2,r0,0x00082ac8			branch if X distance > 2
00082abc: 00000000 nop
00082ac0: 10800005 beq r4,r0,0x00082ad8
00082ac4: 00000000 nop
00082ac8: 14a00009 bne r5,r0,0x00082af0			branch if X distance isn't 0
00082acc: 28820002 slti r2,r4,0x0002		
00082ad0: 10400008 beq r2,r0,0x00082af4			branch if Y distance < 2
00082ad4: 3404004c ori r4,r0,0x004c				animation = throw
00082ad8: 34040039 ori r4,r0,0x0039				animation = hold hands up in air
00082adc: 86250070 lh r5,0x0070(r17)			load facing
00082ae0: 0c02065e jal 0x00081978				store animation
00082ae4: 02203021 addu r6,r17,r0
00082ae8: 08020ac1 j 0x00082b04
00082aec: 00000000 nop
00082af0: 3404004c ori r4,r0,0x004c				animation = throw
00082af4: 86250070 lh r5,0x0070(r17)			load facing
00082af8: 02203021 addu r6,r17,r0
00082afc: 0c020662 jal 0x00081988
00082b00: a0c002d0 sb r0,0x02d0(r6)				clear ??
00082b04: 8fbf0018 lw r31,0x0018(r29)
00082b08: 8fb10014 lw r17,0x0014(r29)
00082b0c: 8fb00010 lw r16,0x0010(r29)
00082b10: 27bd0020 addiu r29,r29,0x0020
00082b14: 03e00008 jr r31
00082b18: 00000000 nop