Store Thread Parameters (0x14ca58)

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
#   ROUTINE: STORE THREAD PARAMETERS (0x14ca58)
#       Parameters:
#           r4 =            (threadID) Thread ID
#           r5 =            (funcParam1) Function parameter 1
#           r6 =            (funcParam2) Function parameter 2
#           r7 =            (funcParam3) Function parameter 3
#           *(sp + 16) =    (p5) Data to store at thread.0x0c

8014ca58: 00042280 sll r4,r4,0x0a                   #   threadID * sizeof(thread)
8014ca5c: 3c028016 lui r2,0x8016
8014ca60: 8c425f98 lw r2,0x5f98(r2)                 #   Thread array base pointer  
8014ca64: 8fa30010 lw r3,0x0010(r29)                #   p5
8014ca68: 00822021 addu r4,r4,r2                    #   thread
8014ca6c: ac850000 sw r5,0x0000(r4)                 #   thread.funcParam1 = funcParam1
8014ca70: ac860004 sw r6,0x0004(r4)                 #   thread.funcParam2 = funcParam2
8014ca74: ac870008 sw r7,0x0008(r4)                 #   thread.funcParam3 = funcParam3
8014ca78: 03e00008 jr r31
8014ca7c: ac83000c sw r3,0x000c(r4)                 #   thread.0x0c = p5