00123430 - 00123504
Jump to navigation
Jump to search
00123430: 27bdff20 addiu r29,r29,0xff20 00123434: afb400d0 sw r20,0x00d0(r29) 00123438: 0080a021 addu r20,r4,r0 #that's not a stack pointer? ~0x8018ab40? 0012343c: afb200c8 sw r18,0x00c8(r29) 00123440: 00a09021 addu r18,r5,r0 #that is also not a stack pointer? ~0x8018aa98 00123444: afb100c4 sw r17,0x00c4(r29) 00123448: 00c08821 addu r17,r6,r0 # 0012344c: afb000c0 sw r16,0x00c0(r29) 00123450: 00e08021 addu r16,r7,r0 # 00123454: 02402021 addu r4,r18,r0 00123458: 02802821 addu r5,r20,r0 0012345c: afbf00d8 sw r31,0x00d8(r29) 00123460: afb500d4 sw r21,0x00d4(r29) 00123464: 0c048b90 jal 0x00122e40 #Clear 0xe-0xf and 0x14-0x15 from r4 pointer, clear from 0x00 to 0x23 from r5 pointer 00123468: afb300cc sw r19,0x00cc(r29) 0012346c: 00009821 addu r19,r0,r0 #r19 counter = 0 00123470: 27b50040 addiu r21,r29,0x0040 00123474: 02a02021 addu r4,r21,r0 #r4 input = stack + 0x40 (for the everything else difference in bonus) 00123478: 27a50018 addiu r5,r29,0x0018 #r5 input = stack + 0x18 (for HP/MP difference in bonus) 0012347c: 96260000 lhu r6,0x0000(r17) #load new item? 00123480: 96070000 lhu r7,0x0000(r16) #load old item? 00123484: 26100002 addiu r16,r16,0x0002 00123488: afb30010 sw r19,0x0010(r29) 0012348c: 30c603ff andi r6,r6,0x03ff 00123490: 0c048c73 jal 0x001231cc #001231cc - 00123284 Item Preview math (load equipment values, store old vs new to stack) 00123494: 30e703ff andi r7,r7,0x03ff 00123498: 02802021 addu r4,r20,r0 #r4 as store again to same space 0012349c: 02802821 addu r5,r20,r0 #r5 as accumulative equipment stat bonuses 001234a0: 02a03021 addu r6,r21,r0 #r6 input = stack + 0x40 (everything else bonus calculated before) 001234a4: 0c048ca2 jal 0x00123288 #00123288 - 0012342c 001234a8: 2407ffff addiu r7,r0,0xffff #r7 = -1 stat multiplier (instead of subtracting, *add* accumulative bonus and new bonus) 001234ac: 9642000e lhu r2,0x000e(r18) #load accumulative HP difference 001234b0: 97a30026 lhu r3,0x0026(r29) #load HP difference in bonus 001234b4: 00000000 nop 001234b8: 00431021 addu r2,r2,r3 001234bc: a642000e sh r2,0x000e(r18) #store HP difference in bonus 001234c0: 96420014 lhu r2,0x0014(r18) #load accumulative MP difference 001234c4: 97a3002c lhu r3,0x002c(r29) 001234c8: 26730001 addiu r19,r19,0x0001 #increase r19 by 1 001234cc: 00431021 addu r2,r2,r3 001234d0: a6420014 sh r2,0x0014(r18) #store mp difference in bonus 001234d4: 2a620005 slti r2,r19,0x0005 #set if still not done checking all 5 equipment slots 001234d8: 1440ffe6 bne r2,r0,0x00123474 #loop 001234dc: 26310002 addiu r17,r17,0x0002 #check next equipment 001234e0: 8fbf00d8 lw r31,0x00d8(r29) 001234e4: 8fb500d4 lw r21,0x00d4(r29) 001234e8: 8fb400d0 lw r20,0x00d0(r29) 001234ec: 8fb300cc lw r19,0x00cc(r29) 001234f0: 8fb200c8 lw r18,0x00c8(r29) 001234f4: 8fb100c4 lw r17,0x00c4(r29) 001234f8: 8fb000c0 lw r16,0x00c0(r29) 001234fc: 27bd00e0 addiu r29,r29,0x00e0 00123500: 03e00008 jr r31 00123504: 00000000 nop
Return locations: 0011af4c - 0011b550: 0x0011b3cc