Find Current Misc Unit Data Pointer (external ID)

From Final Fantasy Hacktics Wiki
Revision as of 21:01, 9 December 2021 by Orkney (talk | contribs) (Notes Formatting, return location)
Jump to navigation Jump to search
Find Current Misc Unit Data Pointer (external ID)?    - Seems to do the same thing that Get_unit_misc_data_that_matches_r4_ID (different way same result...)
---------------------------------------------------
Parameter : r4 = Unit ID
Return : r2 = Unit misc. data pointer
         r2 = 0x00 if not found/invalid ID
---------------------------------------------------
0007a6e4: 3c03800a lui r3,0x800a            |
0007a6e8: 8c638a54 lw r3,-0x75ac(r3)        |r3 =  Pointer to Last Unit's Misc Data?
0007a6ec: 00000000 nop                      |
0007a6f0: 1060000a beq r3,r0,0x0007a71c     #If pointer is valid /Else branch to END (r2 = 0x00)
0007a6f4: 00001021 addu r2,r0,r0            |r2 = 0x00
0007a6f8: 3084ffff andi r4,r4,0xffff             |r4 = Unit ID?
0007a6fc: 90620004 lbu r2,0x0004(r3)             @LOOP (throught unit ID) r2 = Unit misc data unit ID
0007a700: 00000000 nop                           |
0007a704: 10440005 beq r2,r4,0x0007a71c              #If unit is not the seeked unit /Else branch to End (r2 = Unit misc data pointer)
0007a708: 00601021 addu r2,r3,r0                     |r2 = Misc Unit Data Pointer?
0007a70c: 8c630000 lw r3,0x0000(r3)                      |r3 = previous Misc Unit Data Pointer?
0007a710: 00000000 nop                                   |
0007a714: 1460fff9 bne r3,r0,0x0007a6fc          Λ  Loop while it's not the first unit Unit misc data 0x00 = 0x00 when first unit
0007a718: 00001021 addu r2,r0,r0                 |r2 = 0x00
0007a71c: 03e00008 jr r31                   >>END
0007a720: 00000000 nop                      |
0008dc6c: 03e00008 jr r31                   >>'''END'''
0008dc70: 00000000 nop                      

Return location

Battle bin
0006864c:
00068b68:
00068be4:
00068cdc:
00068ce8:
00068e40:
00069280:
000692e8:
0006a1a8:
0006a4cc:
0006b8d4:
0006bc68:
0006bd80:
000707dc:
00070bc8:
00071b0c:
00072358:
000724b4:
000728d4:
000729b0:
00072aa0:
00073834:
000746d8:
0007508c:
0007544c:
00075f44:
00075f78:
00075fbc:
00076090:
000763b8:
00076598:
000765e8:
00077b9c:
0007a7c8:
0007d0c4: 0007d0a0_-_0007d0d0
000824c0:
00082dac:
00082e7c:
000860a8:
00086258:
000868a4:
00089498:
0008be14:
0008be3c:
0008be64:
0008be94:
0008bf2c:
0008bfa4:
0008c00c:
0008c0bc:
0008c134:
0008c19c:
0008c278:
0008c2b4:
0008c420:
0008c698:
0008c7ec:
0008c8fc:
0008c908:
0008c958:
0008c9dc:
0008ca58:
0008caa0:
0008cbc4:
0008cbe8:
0008cc24:
0008cc60:
0008cc90:
0008ccbc:
0008ccf8:
0008cd34:
0008cd68:
0008cda4:
0008cde0:
0008cf0c:
0008cf54:
0008cfc0:
0008d148:
0008d19c:
0008d238:
0008d738:
0008da14:
0008db6c:
0008dc84:
0008df88:
0008dff0:
0008e2d8:
00093210: