Wait Value Event Instruction
Jump to navigation
Jump to search
# ROUTINE: WaitValue event instruction # Parameters: # r4 = (params) Event instruction parameters 8014a3f8: 27bdffe0 addiu r29,r29,-0x0020 8014a3fc: afb00010 sw r16,0x0010(r29) 8014a400: 00808021 addu r16,r4,r0 # paramPtr 8014a404: afbf0018 sw r31,0x0018(r29) 8014a408: 0c05181e jal 0x80146078 # variableID = Load Halfword (paramPtr); 8014a40c: afb10014 sw r17,0x0014(r29) 8014a410: 26040002 addiu r4,r16,0x0002 # paramPtr + 2 8014a414: 00021400 sll r2,r2,0x10 8014a418: 0c05181e jal 0x80146078 # testValue = Load Halfword (paramPtr + 2); 8014a41c: 00028c03 sra r17,r2,0x10 8014a420: 00021400 sll r2,r2,0x10 8014a424: 00028403 sra r16,r2,0x10 # testValue # do { 8014a428: 0c04ed64 jal 0x8013b590 # variableValue = Get Script Variable (value); 8014a42c: 02202021 addu r4,r17,r0 8014a430: 0050102a slt r2,r2,r16 8014a434: 10400005 beq r2,r0,0x8014a44c # if (variableValue >= testValue) 8014a438: 00000000 nop # break; 8014a43c: 0c0532a0 jal 0x8014ca80 # Switch To Next Thread (); 8014a440: 00000000 nop 8014a444: 0805290a j 0x8014a428 8014a448: 00000000 nop # } while (true); // Loop repeats infinitely until break 8014a44c: 8fbf0018 lw r31,0x0018(r29) 8014a450: 8fb10014 lw r17,0x0014(r29) 8014a454: 8fb00010 lw r16,0x0010(r29) 8014a458: 27bd0020 addiu r29,r29,0x0020 8014a45c: 03e00008 jr r31 8014a460: 00000000 nop