001231cc - 00123284
Jump to navigation
Jump to search
001231cc: 27bdff08 addiu r29,r29,0xff08 #-0xf8 001231d0: afb300ec sw r19,0x00ec(r29) 001231d4: 00809821 addu r19,r4,r0 # 001231d8: afb400f0 sw r20,0x00f0(r29) 001231dc: 00a0a021 addu r20,r5,r0 #stack pointer (stack + 0x110) 001231e0: 00062400 sll r4,r6,0x10 001231e4: 00042403 sra r4,r4,0x10 #r4 input = Item ID 001231e8: 27a50010 addiu r5,r29,0x0010 #r5 input = stack + 0x10 (HP + MP) 001231ec: afb200e8 sw r18,0x00e8(r29) 001231f0: 27b20060 addiu r18,r29,0x0060 001231f4: afb100e4 sw r17,0x00e4(r29) 001231f8: 8fb10108 lw r17,0x0108(r29) #load hand 001231fc: 02403021 addu r6,r18,r0 #r6 input = stack + 0x60 (everything else) 00123200: afb000e0 sw r16,0x00e0(r29) 00123204: 00e08021 addu r16,r7,r0 #old item? 00123208: afbf00f4 sw r31,0x00f4(r29) 0012320c: 0c048be7 jal 0x00122f9c #Previews? - Item preview stats 00123210: 02203821 addu r7,r17,r0 #r7 input = hand 00123214: 00108400 sll r16,r16,0x10 00123218: 00102403 sra r4,r16,0x10 #r4 input = old(?) item ID 0012321c: 27a50038 addiu r5,r29,0x0038 #r5 input = stack + 0x38 (HP + MP) 00123220: 27b000a0 addiu r16,r29,0x00a0 00123224: 02003021 addu r6,r16,r0 #r6 input = stack + 0xa0 (Everything else) 00123228: 0c048be7 jal 0x00122f9c #Previews? - Item preview stats, again, but with new stack offsets 0012322c: 02203821 addu r7,r17,r0 #r7 input = hand 00123230: 02602021 addu r4,r19,r0 #r4 input = stack pointer + 0x138 00123234: 02402821 addu r5,r18,r0 #r5 input = stack pointer + 0x60 (every other stat except HP and MP bonus from equipment) 00123238: 97a20046 lhu r2,0x0046(r29) #load old HP bonus 0012323c: 97a3001e lhu r3,0x001e(r29) #load new HP bonus 00123240: 02003021 addu r6,r16,r0 #r6 input = stack + 0xa0 (everything else, old equipment 00123244: 00431023 subu r2,r2,r3 #old HP bonus - new HP bonus 00123248: a682000e sh r2,0x000e(r20) #store difference of HP bonus to stack + 0x110 0012324c: 97a2004c lhu r2,0x004c(r29) #load old MP bonus 00123250: 97a30024 lhu r3,0x0024(r29) #load new MP bonus 00123254: 34070001 ori r7,r0,0x0001 #r7 input = 1 00123258: 00431023 subu r2,r2,r3 0012325c: 0c048ca2 jal 0x00123288 #00123288 - 0012342c 00123260: a6820014 sh r2,0x0014(r20) #store difference of MP bonus to stack + 0x110 00123264: 8fbf00f4 lw r31,0x00f4(r29) 00123268: 8fb400f0 lw r20,0x00f0(r29) 0012326c: 8fb300ec lw r19,0x00ec(r29) 00123270: 8fb200e8 lw r18,0x00e8(r29) 00123274: 8fb100e4 lw r17,0x00e4(r29) 00123278: 8fb000e0 lw r16,0x00e0(r29) 0012327c: 27bd00f8 addiu r29,r29,0x00f8 00123280: 03e00008 jr r31 00123284: 00000000 nop
Return Locations: 00123430 - 00123504: 0x00123498