Get Second Thread Parameter (WORLD.BIN)
Revision as of 14:18, 1 July 2020 by Glain (talk | contribs) (Created page with " # ROUTINE: GET SECOND THREAD PARAMETER (WORLD.BIN) # This routine is an analog to Get Second Thread Parameter in BATTLE.BIN. # Returns: # r2 =...")
# ROUTINE: GET SECOND THREAD PARAMETER (WORLD.BIN) # This routine is an analog to Get Second Thread Parameter in BATTLE.BIN. # Returns: # r2 = Second parameter of current thread 801000c4: 3c01801d lui r1,0x801d 801000c8: 00200821 addu r1,r1,r0 801000cc: 8c28d170 lw r8,-0x2e90(r1) # threadID 801000d0: 00000000 nop 801000d4: 00084280 sll r8,r8,0x0a # threadID * sizeof(thread) 801000d8: 3c018015 lui r1,0x8015 801000dc: 00200821 addu r1,r1,r0 801000e0: 8c29327c lw r9,0x327c(r1) # threads 801000e4: 00000000 nop 801000e8: 01094020 add r8,r8,r9 # threads[threadID] 801000ec: 8d020004 lw r2,0x0004(r8) # return threads[threadID].funcParam2 801000f0: 03e00008 jr r31 801000f4: 00000000 nop