Store Selected Tile Coordinates

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
#   ROUTINE: STORE SELECTED TILE COORDINATES
#   Stores the selected tile coordinates as halfwords (2 byte values) to the specified buffer, in the order [(X Coordinate), (Higher Elevation value), (Y Coordinate)].
#   Parameters:
#       r4 = Destination pointer

0008df10: 3c058009 lui r5,0x8009
0008df14: 8ca561b4 lw r5,0x61b4(r5)             #   [First value to Store] = Selected X Coordinate
0008df18: 3c068009 lui r6,0x8009
0008df1c: 8cc661b8 lw r6,0x61b8(r6)             #   [Second value to Store] = Selected Higher Elevation value
0008df20: 3c078009 lui r7,0x8009
0008df24: 8ce761bc lw r7,0x61bc(r7)             #   [Third value to Store] = Selected Y Coordinate
0008df28: 27bdffe8 addiu r29,r29,-0x0018
0008df2c: afbf0010 sw r31,0x0010(r29)
0008df30: 0c010ac7 jal 0x00042b1c               #   ROUTINE: Store Three Consecutive Halfwords
0008df34: 00000000 nop
0008df38: 8fbf0010 lw r31,0x0010(r29)
0008df3c: 27bd0018 addiu r29,r29,0x0018
0008df40: 03e00008 jr r31
0008df44: 00000000 nop