Difference between revisions of "Get Unit's Data Pointer"
Jump to navigation
Jump to search
Line 74: | Line 74: | ||
00149260: | 00149260: | ||
001af7b4: [[List_targeting_data_of_all_valid_units]] | 001af7b4: [[List_targeting_data_of_all_valid_units]] | ||
− | 001b0290: | + | 001b0290: [[Set_and_Validate_Arc_Trajectory]] |
− | 001b02a4: | + | 001b02a4: [[Set_and_Validate_Arc_Trajectory]] |
− | 001b0328: | + | 001b0328: [[Set_and_Validate_Arc_Trajectory]] |
Revision as of 21:11, 30 January 2022
Parameters : r4 = Unit ID Returns r2 = unit data pointer ( 0x801908cc + Unit ID * 0x1c0) r2 = 0x00 if Unit ID is invalid --------------------------------------------------------------------------- 00180afc: 2c820015 sltiu r2,r4,0x0015 00180b00: 10400007 beq r2,r0,0x00180b20 Branch if ID >= 0x15 00180b04: 000410c0 sll r2,r4,0x03 ID * 8 00180b08: 00441023 subu r2,r2,r4 ID * 7 00180b0c: 00021180 sll r2,r2,0x06 ID * 448 00180b10: 3c038019 lui r3,0x8019 00180b14: 246308cc addiu r3,r3,0x08cc 00180b18: 080602c9 j 0x00180b24 00180b1c: 00431021 addu r2,r2,r3 r2 = Unit's Data Pointer 00180b20: 00001021 addu r2,r0,r0 r2 = 0 00180b24: 03e00008 jr r31 00180b28: 00000000 nop
Return locations
Battle.bin 0008d0a0: 0012d96c: 0012da6c: 0012db40: 0012df58: 00133198: 001331d4: 00133268: 00133348: 00133414: 001334dc: 001336e4: 0013377c: 001337b0: 00133ca8: 00133d84: 00134198: 00134268: 001342ec: 00134300: 00135310: 00136214: 00136bf8: 00139298: 0013be4c: 0013c58c: 0013e78c: 0013ee8c: 0013f914: 00141734: 0014179c: 00141a9c: 00141b78: 00142554: 0014259c: 0014286c: 00142ab4: 00144064: 00144070: 00144120: 001441ac: 001441b8: 00144440: 00145790: 00145858: 00147a1c: 00147d30: 00147de0: 00147eb4: 001484b0: 001485c4: 00148910: 00148d70: 00148f20: 00149140: 00149260: 001af7b4: List_targeting_data_of_all_valid_units 001b0290: Set_and_Validate_Arc_Trajectory 001b02a4: Set_and_Validate_Arc_Trajectory 001b0328: Set_and_Validate_Arc_Trajectory