Copy Unit Screen Location Data

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
#   ROUTINE: COPY UNIT SCREEN LOCATION DATA
#       Copies unit screen location data to a specified destination buffer.
#       Parameters:
#           r4 = unitMiscID
#           r5 = (destPtr) Destination pointer to copy screen location data into

801330e4: 27bdffe8 addiu r29,r29,-0x0018
801330e8: afb00010 sw r16,0x0010(r29)
801330ec: afbf0014 sw r31,0x0014(r29)
801330f0: 0c023104 jal 0x8008c410                   #   unitScreenLocationPtr = Get Unit Screen Location Data Pointer (unitMiscID);
801330f4: 00a08021 addu r16,r5,r0                   #   destPtr
801330f8: 84430000 lh r3,0x0000(r2)                 #   unitScreenLocation.X
801330fc: 00000000 nop
80133100: ae030000 sw r3,0x0000(r16)                #   destPtr.X = unitScreenLocation.X
80133104: 84430002 lh r3,0x0002(r2)                 #   unitScreenLocation.Z
80133108: 00000000 nop
8013310c: ae030004 sw r3,0x0004(r16)                #   destPtr.Z = unitScreenLocation.Z
80133110: 84420004 lh r2,0x0004(r2)                 #   unitScreenLocation.Y
80133114: 00000000 nop
80133118: ae020008 sw r2,0x0008(r16)                #   destPtr.Y = unitScreenLocation.Y
8013311c: 8fbf0014 lw r31,0x0014(r29)
80133120: 8fb00010 lw r16,0x0010(r29)
80133124: 27bd0018 addiu r29,r29,0x0018
80133128: 03e00008 jr r31
8013312c: 00000000 nop