Check if Unit Leveled UP
Jump to navigation
Jump to search
Check if Unit Leveled UP 0005d880: 27bdffe0 addiu r29,r29,0xffe0 0005d884: afb00010 sw r16,0x0010(r29) 0005d888: 00808021 addu r16,r4,r0 r16 = Unit's Data Pointer 0005d88c: afbf0018 sw r31,0x0018(r29) 0005d890: afb10014 sw r17,0x0014(r29) 0005d894: 92020021 lbu r2,0x0021(r16) Load Unit's Exp 0005d898: 00000000 nop 0005d89c: 2c420064 sltiu r2,r2,0x0064 0005d8a0: 14400010 bne r2,r0,0x0005d8e4 Branch if Exp < 100 0005d8a4: 00001021 addu r2,r0,r0 Exp = 0 0005d8a8: 92110022 lbu r17,0x0022(r16) Load Unit's Level 0005d8ac: 00000000 nop 0005d8b0: 2e220063 sltiu r2,r17,0x0063 0005d8b4: 10400008 beq r2,r0,0x0005d8d8 Branch if Level < 99 0005d8b8: 02002021 addu r4,r16,r0 r4 = Unit's Data Pointer 0005d8bc: 0c017684 jal 0x0005da10 Level UP section 0005d8c0: 00002821 addu r5,r0,r0 r5 = 0 (Level Down Flag = False) 0005d8c4: 34020001 ori r2,r0,0x0001 r2 = 1 (Leveled up) 0005d8c8: 26230001 addiu r3,r17,0x0001 Level += 1 0005d8cc: a2000021 sb r0,0x0021(r16) Store Exp = 0 0005d8d0: 08017639 j 0x0005d8e4 0005d8d4: a2030022 sb r3,0x0022(r16) Store new Level 0005d8d8: 34020063 ori r2,r0,0x0063 r2 = 99 0005d8dc: a2020021 sb r2,0x0021(r16) Store Level = 99 0005d8e0: 00001021 addu r2,r0,r0 r2 = 0 (no level up) 0005d8e4: 8fbf0018 lw r31,0x0018(r29) 0005d8e8: 8fb10014 lw r17,0x0014(r29) 0005d8ec: 8fb00010 lw r16,0x0010(r29) 0005d8f0: 27bd0020 addiu r29,r29,0x0020 0005d8f4: 03e00008 jr r31 0005d8f8: 00000000 nop
Return Locations
0017e8c4: Gained JP Up Section 0018eba0: 0018eb50