Status infliction/removal

From Final Fantasy Hacktics Wiki
Revision as of 03:22, 25 September 2021 by Pride (talk | contribs)
Jump to navigation Jump to search
status infliction/removal?
0005e7a8: 27bdffd8 addiu r29,r29,0xffd8
0005e7ac: afb20018 sw r18,0x0018(r29)
0005e7b0: 00809021 addu r18,r4,r0		r18 = Unit's Data Pointer
0005e7b4: 30a300ff andi r3,r5,0x00ff		r3 = Status ID?
0005e7b8: 340200ff ori r2,r0,0x00ff		r2 = FF
0005e7bc: afbf0024 sw r31,0x0024(r29)
0005e7c0: afb40020 sw r20,0x0020(r29)
0005e7c4: afb3001c sw r19,0x001c(r29)
0005e7c8: afb10014 sw r17,0x0014(r29)
0005e7cc: afb00010 sw r16,0x0010(r29)
0005e7d0: 92540058 lbu r20,0x0058(r18)		Load Unit's Current Statuses set 1
0005e7d4: 9253018a lbu r19,0x018a(r18)		Load Unit's Unit ID
0005e7d8: 1462 0005 bne r3,r2,0x 0005e7f0		Branch if Status ID? != FF
0005e7dc: 2c620009 sltiu r2,r3,0x0009
0005e7e0: 32820001 andi r2,r20,0x0001		Performing Flag
0005e7e4: 000228c0 sll r5,r2,0x03		Flag * 8 (0 or 8 here)
0005e7e8: 30a300ff andi r3,r5,0x00ff		(prevent branching)
0005e7ec: 2c620009 sltiu r2,r3,0x0009
0005e7f0: 10400016 beq r2,r0,0x 0005e84c		Branch if Status ID? >= 9
0005e7f4: 00031080 sll r2,r3,0x02		ID * 4 (0-0x20)
0005e7f8: 3c018006 lui r1,0x8006
0005e7fc: 00220821 addu r1,r1,r2
0005e800: 8c229830 lw r2,-0x67d0(r1)		Load Code Pointer for Below
0005e804: 00000000 nop
0005e808: 00400008 jr r2
0005e80c: 00000000 nop
  • Normal Action*
0005e810: 00008821 addu r17,r0,r0		r17 = 0 (None)
0005e814: 08017a12 j 0x 0005e848
0005e818: 340200ff ori r2,r0,0x00ff		CT = FF
  • Charging*
0005e81c: 08017a13 j 0x 0005e84c
0005e820: 34110008 ori r17,r0,0x0008		r17 = 8 (Charging)
  • Jump*
0005e824: 08017a13 j 0x 0005e84c
0005e828: 34110004 ori r17,r0,0x0004		r17 = 4 (Jump)
  • Defending*
0005e82c: 34110002 ori r17,r0,0x0002		r17 = 2 (Defending)
0005e830: 08017a12 j 0x 0005e848
0005e834: 340200ff ori r2,r0,0x00ff		CT = FF
  • Performing*
0005e838: 0c0179de jal 0x 0005e778		Transfer Last Ability Used CT
0005e83c: 02402021 addu r4,r18,r0		r4 = Unit's Data Pointer
0005e840: 9242018b lbu r2,0x018b(r18)		Load Unit's Last Ability CT
0005e844: 34110001 ori r17,r0,0x0001		r17 = 1 (Performing)
0005e848: a242015d sb r2,0x015d(r18)		Store Unit's Ability CT
  • Default*
0005e84c: 3a30000f xori r16,r17,0x000f		r16 = 0xF with r17 Disabled
0005e850: 02402021 addu r4,r18,r0		r4 = Unit's Data Pointer
0005e854: 00002821 addu r5,r0,r0		r5 = 0 (Status Set 1)
0005e858: 322600ff andi r6,r17,0x00ff		r6 = Statuses to Enable
0005e85c: 0c0179b3 jal 0x 0005e6cc		Inflicted_Status_Changes
0005e860: 00003821 addu r7,r0,r0		r7 = 0 (Enable Statuses)
0005e864: 02402021 addu r4,r18,r0		r4 = Unit's Data Pointer
0005e868: 00002821 addu r5,r0,r0		r5 = 0 (Status Set 1)
0005e86c: 320600ff andi r6,r16,0x00ff		r6 = Statuses to Disable
0005e870: 0c0179b3 jal 0x 0005e6cc		Inflicted_Status_Changes
0005e874: 34070001 ori r7,r0,0x0001		r7 = 1 (Disable Statuses)
0005e878: 34110008 ori r17,r0,0x0008		Status Check = 8
0005e87c: 92420058 lbu r2,0x0058(r18)		Load Unit's Current Statuses
0005e880: 3410 0005 ori r16,r0,0x 0005		Counter = 5
0005e884: 02821026 xor r2,r20,r2
0005e888: 00409021 addu r18,r2,r0		r18 = Statuses that were removed
0005e88c: 02511024 and r2,r18,r17
0005e890: 10400008 beq r2,r0,0x 0005e8b4		Branch if the status wasn't removed
0005e894: 02911024 and r2,r20,r17
0005e898: 10400003 beq r2,r0,0x 0005e8a8		Branch if the original statuses didn't have the status
0005e89c: 02002021 addu r4,r16,r0		r4 = Counter
0005e8a0: 08017a2b j 0x 0005e8ac
0005e8a4: 00002821 addu r5,r0,r0		r5 = 0 (Status Removed)
0005e8a8: 34050001 ori r5,r0,0x0001		r5 = 1 (Status added)
0005e8ac: 0c063a6f jal 0x0018e9bc		Determine_if_Status_Flags_can_be_Enabled - Status Change Updating (duplicated ?)
0005e8b0: 02603021 addu r6,r19,r0		r6 = Unit's ID
0005e8b4: 26100001 addiu r16,r16,0x0001		Counter ++
0005e8b8: 2a020009 slti r2,r16,0x0009
0005e8bc: 1440fff3 bne r2,r0,0x 0005e88c		Branch if Counter < 9
0005e8c0: 00118842 srl r17,r17,0x01		Move to next status check
0005e8c4: 8fbf0024 lw r31,0x0024(r29)
0005e8c8: 8fb40020 lw r20,0x0020(r29)
0005e8cc: 8fb3001c lw r19,0x001c(r29)
0005e8d0: 8fb20018 lw r18,0x0018(r29)
0005e8d4: 8fb10014 lw r17,0x0014(r29)
0005e8d8: 8fb00010 lw r16,0x0010(r29)
0005e8dc: 27bd0028 addiu r29,r29,0x0028
0005e8e0: 03e00008 jr r31
0005e8e4: 00000000 nop

Return Locations

BATTLE.BIN
0017c784
0017c8cc
0017da64
00180218
00183de8
00183e20
Could be moved exclusively to BATTLE.BIN