Prep for Special Status Flag Enabling

From Final Fantasy Hacktics Wiki
Revision as of 22:17, 11 June 2016 by Emmy (talk | contribs)
Jump to navigation Jump to search

00180fe4: 27bdffd8 addiu r29,r29,0xffd8
00180fe8: afb10014 sw r17,0x0014(r29)
00180fec: 00808821 addu r17,r4,r0		r17 = Unit ID
00180ff0: 001110c0 sll r2,r17,0x03		ID * 8
00180ff4: 00511023 subu r2,r2,r17		ID * 7
00180ff8: 00021180 sll r2,r2,0x06		ID * 448
00180ffc: 3c038019 lui r3,0x8019
00181000: 246308cc addiu r3,r3,0x08cc
00181004: afb20018 sw r18,0x0018(r29)
00181008: 00439021 addu r18,r2,r3		r18 = Unit's Data Pointer
0018100c: afbf0020 sw r31,0x0020(r29)
00181010: afb3001c sw r19,0x001c(r29)
00181014: afb00010 sw r16,0x0010(r29)
00181018: 92430001 lbu r3,0x0001(r18)		Load Unit's ID
0018101c: 340200ff ori r2,r0,0x00ff
00181020: 14620003 bne r3,r2,0x00181030		Branch if Unit Exists
00181024: 00008021 addu r16,r0,r0		Counter = 0
00181028: 08060420 j 0x00181080
0018102c: 2402ffff addiu r2,r0,0xffff		r2 = -1 (fail)
00181030: 34130080 ori r19,r0,0x0080		Current Status = 0x80
00181034: 06010002 bgez r16,0x00181040		Branch if Counter >= 0
00181038: 02001021 addu r2,r16,r0		r2 = Counter
0018103c: 26020007 addiu r2,r16,0x0007
00181040: 000210c3 sra r2,r2,0x03		Counter / 8
00181044: 32030007 andi r3,r16,0x0007
00181048: 02421021 addu r2,r18,r2
0018104c: 90420058 lbu r2,0x0058(r2)		Load Current Statuses
00181050: 00731807 srav r3,r19,r3
00181054: 00431024 and r2,r2,r3
00181058: 10400004 beq r2,r0,0x0018106c		Branch if Status isn't present
0018105c: 26040001 addiu r4,r16,0x0001		r4 = Counter + 1
00181060: 34050001 ori r5,r0,0x0001		r5 = 1 (Status Present)
00181064: 0c01a3a0 jal 0x00068e80		Special Status Flag Enabling?
00181068: 02203021 addu r6,r17,r0		r6 = Unit ID
0018106c: 26100001 addiu r16,r16,0x0001		Counter ++
00181070: 2a020028 slti r2,r16,0x0028
00181074: 1440ffef bne r2,r0,0x00181034		Branch if all statuses haven't been checked
00181078: 00000000 nop
0018107c: 00001021 addu r2,r0,r0		r2 = 0 (success)
00181080: 8fbf0020 lw r31,0x0020(r29)
00181084: 8fb3001c lw r19,0x001c(r29)
00181088: 8fb20018 lw r18,0x0018(r29)
0018108c: 8fb10014 lw r17,0x0014(r29)
00181090: 8fb00010 lw r16,0x0010(r29)
00181094: 27bd0028 addiu r29,r29,0x0028
00181098: 03e00008 jr r31
0018109c: 00000000 nop