Player Item Quantity decrement
Jump to navigation
Jump to search
0017c954: 908201ba lbu r2,0x01ba(r4) load ENTD flags 0017c958: 00000000 nop 0017c95c: 30420030 andi r2,r2,0x0030 0017c960: 14400012 bne r2,r0,0x0017c9ac branch if unit is enemy unit 0017c964: 30a500ff andi r5,r5,0x00ff r5 = used item ID 0017c968: 3c018006 lui r1,0x8006 0017c96c: 00250821 addu r1,r1,r5 0017c970: 902396e0 lbu r3,-0x6920(r1) load item quantity 0017c974: 00000000 nop 0017c978: 1060000d beq r3,r0,0x0017c9b0 branch if item is empy 0017c97c: 2402ffff addiu r2,r0,0xffff return r2 = -1 0017c980: 10c0000b beq r6,r0,0x0017c9b0 branch if ?? 0017c984: 00001021 addu r2,r0,r0 return r2 = 0 0017c988: 3c028019 lui r2,0x8019 0017c98c: 8c42f5fc lw r2,-0x0a04(r2) load ?? 0017c990: 00000000 nop 0017c994: 14400006 bne r2,r0,0x0017c9b0 branch to end 0017c998: 00001021 addu r2,r0,r0 return r2 = 0 0017c99c: 2462ffff addiu r2,r3,0xffff quantity decrement 0017c9a0: 3c018006 lui r1,0x8006 0017c9a4: 00250821 addu r1,r1,r5 0017c9a8: a02296e0 sb r2,-0x6920(r1) decrement item quantity 0017c9ac: 00001021 addu r2,r0,r0 return r2 = 0 0017c9b0: 03e00008 jr r31 0017c9b4: 00000000 nop