Get Unit Misc Data Pointer
Jump to navigation
Jump to search
# ROUTINE: GET UNIT MISC DATA POINTER # Parameters: # r4 = (p_UnitMiscID) Unit misc data ID (to find the unit misc data pointer for) # Returns: # r2 = (Unit misc data pointer) for specified unit misc ID, or null if the specified ID had no corresponding data. 8007a6e4: 3c03800a lui r3,0x800a 8007a6e8: 8c638a54 lw r3,-0x75ac(r3) # miscDataPointer = *0x80098a54; 8007a6ec: 00000000 nop 8007a6f0: 1060000a beq r3,r0,0x8007a71c # if (miscDataPointer == null) 8007a6f4: 00001021 addu r2,r0,r0 # return null; 8007a6f8: 3084ffff andi r4,r4,0xffff # do { 8007a6fc: 90620004 lbu r2,0x0004(r3) # // (miscDataPointer.UnitMiscID) 8007a700: 00000000 nop 8007a704: 10440005 beq r2,r4,0x8007a71c # if (miscDataPointer.UnitMiscID == p_UnitMiscID) 8007a708: 00601021 addu r2,r3,r0 # return miscDataPointer; 8007a70c: 8c630000 lw r3,0x0000(r3) # miscDataPointer = miscDataPointer.previous; 8007a710: 00000000 nop 8007a714: 1460fff9 bne r3,r0,0x8007a6fc # } while (miscDataPointer != null); 8007a718: 00001021 addu r2,r0,r0 # return null; 8007a71c: 03e00008 jr r31 8007a720: 00000000 nop