Another targeting routine

From Final Fantasy Hacktics Wiki
Revision as of 14:48, 8 February 2015 by Choto (talk | contribs) (Created page with "<font face='Courier New'> 0017a6dc: 27bdffc8 addiu r29,r29,0xffc8 0017a6e0: afb10014 sw r17,0x0014(r29) 0017a6e4: 00808821 addu r17,r4,r0 0017a6e8: afb7002c sw r23,0x002...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

0017a6dc: 27bdffc8 addiu r29,r29,0xffc8
0017a6e0: afb10014 sw r17,0x0014(r29)
0017a6e4: 00808821 addu r17,r4,r0
0017a6e8: afb7002c sw r23,0x002c(r29)
0017a6ec: 30b70080 andi r23,r5,0x0080
0017a6f0: afb60028 sw r22,0x0028(r29)
0017a6f4: 30b60040 andi r22,r5,0x0040
0017a6f8: afb3001c sw r19,0x001c(r29)
0017a6fc: 00009821 addu r19,r0,r0
0017a700: afb40020 sw r20,0x0020(r29)
0017a704: 34140001 ori r20,r0,0x0001
0017a708: afbf0030 sw r31,0x0030(r29)
0017a70c: afb50024 sw r21,0x0024(r29)
0017a710: afb20018 sw r18,0x0018(r29)
0017a714: afb00010 sw r16,0x0010(r29)
0017a718: 92350005 lbu r21,0x0005(r17)		load ENTD flags
0017a71c: 92230001 lbu r3,0x0001(r17)		load Unit ID
0017a720: 340200ff ori r2,r0,0x00ff
0017a724: 10620015 beq r3,r2,0x0017a77c		doesn't exist check
0017a728: 02202021 addu r4,r17,r0
0017a72c: 922201ba lbu r2,0x01ba(r17)		load modified ENTD flags
0017a730: 00000000 nop
0017a734: 02a28026 xor r16,r21,r2
0017a738: 0c060428 jal 0x001810a0		map calculation
0017a73c: 02009021 addu r18,r16,r0
0017a740: 00021880 sll r3,r2,0x02
0017a744: 00621821 addu r3,r3,r2
0017a748: 3c028019 lui r2,0x8019
0017a74c: 24422dd8 addiu r2,r2,0x2dd8
0017a750: 12e00005 beq r23,r0,0x0017a768
0017a754: 00621821 addu r3,r3,r2
0017a758: 32020030 andi r2,r16,0x0030		check if current or modified ENTD = 0x30
0017a75c: 14400002 bne r2,r0,0x0017a768		branch if so
0017a760: 00000000 nop
0017a764: a0740001 sb r20,0x0001(r3)
0017a768: 12c00004 beq r22,r0,0x0017a77c	check if randomly/always present?
0017a76c: 32420030 andi r2,r18,0x0030		check if current or modified ENTD = 0x30
0017a770: 10400002 beq r2,r0,0x0017a77c		branch if not
0017a774: 00000000 nop
0017a778: a0740001 sb r20,0x0001(r3)		store ?? = 01 (designates player control?)
0017a77c: 26730001 addiu r19,r19,0x0001
0017a780: 2a620015 slti r2,r19,0x0015
0017a784: 1440ffe5 bne r2,r0,0x0017a71c		check all player units
0017a788: 00000000 nop
0017a78c: 8fbf0030 lw r31,0x0030(r29)
0017a790: 8fb7002c lw r23,0x002c(r29)
0017a794: 8fb60028 lw r22,0x0028(r29)
0017a798: 8fb50024 lw r21,0x0024(r29)
0017a79c: 8fb40020 lw r20,0x0020(r29)
0017a7a0: 8fb3001c lw r19,0x001c(r29)
0017a7a4: 8fb20018 lw r18,0x0018(r29)
0017a7a8: 8fb10014 lw r17,0x0014(r29)
0017a7ac: 8fb00010 lw r16,0x0010(r29)
0017a7b0: 27bd0038 addiu r29,r29,0x0038
0017a7b4: 03e00008 jr r31
0017a7b8: 00000000 nop