Store Thread Function Parameters

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
#   ROUTINE: STORE THREAD FUNCTION PARAMETERS
#       Parameters:
#           r4 = (threadID) Thread ID
#           r5 = (funcParam1) Function parameter 1
#           r6 = (funcParam2) Function parameter 2
#           r7 = (funcParam3) Function parameter 3

8014ca38: 3c028016 lui r2,0x8016
8014ca3c: 8c425f98 lw r2,0x5f98(r2)             #   Thread array base pointer
8014ca40: 00042280 sll r4,r4,0x0a               #   threadID * sizeof(thread)
8014ca44: 00822021 addu r4,r4,r2                #   thread
8014ca48: ac850000 sw r5,0x0000(r4)             #   thread.funcParam1 = funcParam1
8014ca4c: ac860004 sw r6,0x0004(r4)             #   thread.funcParam2 = funcParam2
8014ca50: 03e00008 jr r31
8014ca54: ac870008 sw r7,0x0008(r4)             #   thread.funcParam3 = funcParam3