Difference between revisions of "Item Previews"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Choto moved page Item Previews to Previews?)
 
(Put the data back on this page due to weird shenanigans and also THE FUCKING QUESTION MARKS)
Tag: Removed redirect
 
Line 1: Line 1:
#REDIRECT [[Previews?]]
+
00122f9c: 27bdffd8 addiu r29,r29,0xffd8
 +
00122fa0: afb00010 sw r16,0x0010(r29)
 +
00122fa4: 00808021 addu r16,r4,r0
 +
00122fa8: afb20018 sw r18,0x0018(r29)
 +
00122fac: 00a09021 addu r18,r5,r0 #r5 is a stack pointer (for HP/MP bonus)
 +
00122fb0: afb10014 sw r17,0x0014(r29)
 +
00122fb4: 00c08821 addu r17,r6,r0 #r6 is a stack pointer (for everything else)
 +
00122fb8: afb3001c sw r19,0x001c(r29)
 +
00122fbc: 00e09821 addu r19,r7,r0 #r7 is current hand (if changing weapons)
 +
00122fc0: 02402021 addu r4,r18,r0
 +
00122fc4: afbf0020 sw r31,0x0020(r29)
 +
00122fc8: 0c048b90 jal 0x00122e40 #clear a bunch of stack space (enough space for armour HP/MP bonus for r4 stack pointer, and then everything else in r5 stack pointer.)
 +
00122fcc: 02202821 addu r5,r17,r0
 +
00122fd0: 321003ff andi r16,r16,0x03ff
 +
00122fd4: 2602ffff addiu r2,r16,0xffff #r2 = equip - 1
 +
00122fd8: 2c4200fd sltiu r2,r2,0x00fd #set if valid
 +
00122fdc: 10400073 beq r2,r0,0x001231ac #branch if invalid item (not 0x1 - 0xfd (dagger to phoenix down))
 +
00122fe0: 00101040 sll r2,r16,0x01
 +
00122fe4: 00501021 addu r2,r2,r16
 +
00122fe8: 00021880 sll r3,r2,0x02 #Item ID * 0xc
 +
00122fec: 3c018006 lui r1,0x8006
 +
00122ff0: 00230821 addu r1,r1,r3
 +
00122ff4: 90242ebf lbu r4,0x2ebf(r1) #load item attribute ID
 +
00122ff8: 2a020080 slti r2,r16,0x0080 #set if equipment is a weapon
 +
00122ffc: 10400014 beq r2,r0,0x00123050 #branch if shield, armour, or accessory
 +
00123000: 2a020090 slti r2,r16,0x0090 #hence, set if a shield
 +
00123004: 3c018006 lui r1,0x8006
 +
00123008: 00230821 addu r1,r1,r3
 +
0012300c: 90222ebc lbu r2,0x2ebc(r1) #second table ID
 +
00123010: 00000000 nop
 +
00123014: 000210c0 sll r2,r2,0x03
 +
00123018: 3c018006 lui r1,0x8006
 +
0012301c: 00220821 addu r1,r1,r2
 +
00123020: 90233abc lbu r3,0x3abc(r1) #load weapon power
 +
00123024: 3c018006 lui r1,0x8006
 +
00123028: 00220821 addu r1,r1,r2
 +
0012302c: 90223abd lbu r2,0x3abd(r1) #load wp-ev%
 +
00123030: 12600004 beq r19,r0,0x00123044 #branch if hand? is 0
 +
00123034: 00000000 nop
 +
00123038: a6230008 sh r3,0x0008(r17)
 +
0012303c: 08048c4e j 0x00123138
 +
00123040: a622000c sh r2,0x000c(r17) #store WP and wp-ev% to stack
 +
00123044: a6230006 sh r3,0x0006(r17)
 +
00123048: 08048c4e j 0x00123138
 +
0012304c: a622000a sh r2,0x000a(r17)
 +
00123050: 10400015 beq r2,r0,0x001230a8 #branch if not a shield
 +
00123054: 2a0200d0 slti r2,r16,0x00d0 #hence set if a piece of armour/helmet
 +
00123058: 3c018006 lui r1,0x8006
 +
0012305c: 00230821 addu r1,r1,r3
 +
00123060: 90222ebc lbu r2,0x2ebc(r1) #load second table ID
 +
00123064: 00000000 nop
 +
00123068: 00021040 sll r2,r2,0x01
 +
0012306c: 3c018006 lui r1,0x8006
 +
00123070: 00220821 addu r1,r1,r2
 +
00123074: 90223eb8 lbu r2,0x3eb8(r1) #load shield P-ev%
 +
00123078: 00000000 nop
 +
0012307c: a6220016 sh r2,0x0016(r17) #store P-ev% to stack address
 +
00123080: 3c018006 lui r1,0x8006
 +
00123084: 00230821 addu r1,r1,r3
 +
00123088: 90222ebc lbu r2,0x2ebc(r1) #load second table ID again
 +
0012308c: 00000000 nop
 +
00123090: 00021040 sll r2,r2,0x01
 +
00123094: 3c018006 lui r1,0x8006
 +
00123098: 00220821 addu r1,r1,r2
 +
0012309c: 90223eb9 lbu r2,0x3eb9(r1) #load shield M-ev%
 +
001230a0: 08048c4e j 0x00123138
 +
001230a4: a6220020 sh r2,0x0020(r17) #store M-ev% to stack address
 +
001230a8: 1040000c beq r2,r0,0x001230dc #branch if not helmet/armour
 +
001230ac: 2602ff70 addiu r2,r16,0xff70
 +
001230b0: 00021040 sll r2,r2,0x01
 +
001230b4: 3c018006 lui r1,0x8006
 +
001230b8: 00220821 addu r1,r1,r2
 +
001230bc: 90233ed8 lbu r3,0x3ed8(r1) #load HP bonus
 +
001230c0: 00000000 nop
 +
001230c4: a643000e sh r3,0x000e(r18) #store HP bonus to stack address
 +
001230c8: 3c018006 lui r1,0x8006
 +
001230cc: 00220821 addu r1,r1,r2
 +
001230d0: 90223ed9 lbu r2,0x3ed9(r1) #MP bonus
 +
001230d4: 08048c4e j 0x00123138
 +
001230d8: a6420014 sh r2,0x0014(r18) #store MP bonus to stack address
 +
001230dc: 2a0200f0 slti r2,r16,0x00f0 #set if an accessory
 +
001230e0: 10400016 beq r2,r0,0x0012313c #branch if not an accessory
 +
001230e4: 00041040 sll r2,r4,0x01
 +
001230e8: 3c018006 lui r1,0x8006
 +
001230ec: 00230821 addu r1,r1,r3
 +
001230f0: 90222ebc lbu r2,0x2ebc(r1) #second table ID
 +
001230f4: 00000000 nop
 +
001230f8: 00021040 sll r2,r2,0x01
 +
001230fc: 3c018006 lui r1,0x8006
 +
00123100: 00220821 addu r1,r1,r2
 +
00123104: 90223f58 lbu r2,0x3f58(r1) #load accessory P-ev%
 +
00123108: 00000000 nop
 +
0012310c: a6220018 sh r2,0x0018(r17) #store accessory P-ev% to stack
 +
00123110: 3c018006 lui r1,0x8006
 +
00123114: 00230821 addu r1,r1,r3
 +
00123118: 90222ebc lbu r2,0x2ebc(r1) #Load second table ID again
 +
0012311c: 00000000 nop
 +
00123120: 00021040 sll r2,r2,0x01
 +
00123124: 3c018006 lui r1,0x8006
 +
00123128: 00220821 addu r1,r1,r2
 +
0012312c: 90223f59 lbu r2,0x3f59(r1) #load accessory M-ev%
 +
00123130: 00000000 nop
 +
00123134: a6220022 sh r2,0x0022(r17) #store accessory M-ev% to stack
 +
 +
Return here:
 +
00123138: 00041040 sll r2,r4,0x01
 +
0012313c: 00441021 addu r2,r2,r4
 +
00123140: 000210c0 sll r2,r2,0x03
 +
00123144: 00441021 addu r2,r2,r4 #attribute ID * 0x19
 +
00123148: 3c018006 lui r1,0x8006
 +
0012314c: 00220821 addu r1,r1,r2
 +
00123150: 902342c7 lbu r3,0x42c7(r1) #load attribute's Move
 +
00123154: 00000000 nop
 +
00123158: a6230000 sh r3,0x0000(r17) #store attribute's move
 +
0012315c: 3c018006 lui r1,0x8006
 +
00123160: 00220821 addu r1,r1,r2
 +
00123164: 902342c6 lbu r3,0x42c6(r1) #load attribute's speed
 +
00123168: 00000000 nop
 +
0012316c: a6230002 sh r3,0x0002(r17) #store attribute's speed
 +
00123170: 3c018006 lui r1,0x8006
 +
00123174: 00220821 addu r1,r1,r2
 +
00123178: 902342c8 lbu r3,0x42c8(r1) #load attribute's jump
 +
0012317c: 00000000 nop
 +
00123180: a6230004 sh r3,0x0004(r17) #you'll never guess what it does with jump
 +
00123184: 3c018006 lui r1,0x8006
 +
00123188: 00220821 addu r1,r1,r2
 +
0012318c: 902342c4 lbu r3,0x42c4(r1) #load attribute's PA
 +
00123190: 00000000 nop
 +
00123194: a6230012 sh r3,0x0012(r17) #store attribute's PA
 +
00123198: 3c018006 lui r1,0x8006
 +
0012319c: 00220821 addu r1,r1,r2
 +
001231a0: 902242c5 lbu r2,0x42c5(r1) #load attribute's MA
 +
001231a4: 00000000 nop
 +
001231a8: a622001c sh r2,0x001c(r17) #store attribute's MA
 +
001231ac: 8fbf0020 lw r31,0x0020(r29)
 +
001231b0: 8fb3001c lw r19,0x001c(r29)
 +
001231b4: 8fb20018 lw r18,0x0018(r29)
 +
001231b8: 8fb10014 lw r17,0x0014(r29)
 +
001231bc: 8fb00010 lw r16,0x0010(r29)
 +
001231c0: 27bd0028 addiu r29,r29,0x0028
 +
001231c4: 03e00008 jr r31
 +
001231c8: 00000000 nop
 +
 
 +
Return Locations:
 +
[[001231cc - 00123284]]: 0x00123214, 0x00123230

Latest revision as of 05:18, 1 March 2025

00122f9c: 27bdffd8 addiu r29,r29,0xffd8
00122fa0: afb00010 sw r16,0x0010(r29)
00122fa4: 00808021 addu r16,r4,r0
00122fa8: afb20018 sw r18,0x0018(r29)
00122fac: 00a09021 addu r18,r5,r0			#r5 is a stack pointer (for HP/MP bonus)
00122fb0: afb10014 sw r17,0x0014(r29)
00122fb4: 00c08821 addu r17,r6,r0			#r6 is a stack pointer (for everything else)
00122fb8: afb3001c sw r19,0x001c(r29)
00122fbc: 00e09821 addu r19,r7,r0			#r7 is current hand (if changing weapons)
00122fc0: 02402021 addu r4,r18,r0
00122fc4: afbf0020 sw r31,0x0020(r29)
00122fc8: 0c048b90 jal 0x00122e40			#clear a bunch of stack space (enough space for armour HP/MP bonus for r4 stack pointer, and then everything else in r5 stack pointer.)
00122fcc: 02202821 addu r5,r17,r0
00122fd0: 321003ff andi r16,r16,0x03ff
00122fd4: 2602ffff addiu r2,r16,0xffff			#r2 = equip - 1
00122fd8: 2c4200fd sltiu r2,r2,0x00fd			#set if valid
00122fdc: 10400073 beq r2,r0,0x001231ac		#branch if invalid item (not 0x1 - 0xfd (dagger to phoenix down))
00122fe0: 00101040 sll r2,r16,0x01
00122fe4: 00501021 addu r2,r2,r16
00122fe8: 00021880 sll r3,r2,0x02			#Item ID * 0xc
00122fec: 3c018006 lui r1,0x8006
00122ff0: 00230821 addu r1,r1,r3
00122ff4: 90242ebf lbu r4,0x2ebf(r1)			#load item attribute ID
00122ff8: 2a020080 slti r2,r16,0x0080			#set if equipment is a weapon
00122ffc: 10400014 beq r2,r0,0x00123050		#branch if shield, armour, or accessory
00123000: 2a020090 slti r2,r16,0x0090			#hence, set if a shield
00123004: 3c018006 lui r1,0x8006
00123008: 00230821 addu r1,r1,r3
0012300c: 90222ebc lbu r2,0x2ebc(r1)			#second table ID
00123010: 00000000 nop
00123014: 000210c0 sll r2,r2,0x03
00123018: 3c018006 lui r1,0x8006
0012301c: 00220821 addu r1,r1,r2
00123020: 90233abc lbu r3,0x3abc(r1)			#load weapon power
00123024: 3c018006 lui r1,0x8006
00123028: 00220821 addu r1,r1,r2
0012302c: 90223abd lbu r2,0x3abd(r1)			#load wp-ev%
00123030: 12600004 beq r19,r0,0x00123044		#branch if hand? is 0
00123034: 00000000 nop
00123038: a6230008 sh r3,0x0008(r17)
0012303c: 08048c4e j 0x00123138
00123040: a622000c sh r2,0x000c(r17)			#store WP and wp-ev% to stack
00123044: a6230006 sh r3,0x0006(r17)			
00123048: 08048c4e j 0x00123138
0012304c: a622000a sh r2,0x000a(r17)
00123050: 10400015 beq r2,r0,0x001230a8		#branch if not a shield
00123054: 2a0200d0 slti r2,r16,0x00d0			#hence set if a piece of armour/helmet
00123058: 3c018006 lui r1,0x8006
0012305c: 00230821 addu r1,r1,r3
00123060: 90222ebc lbu r2,0x2ebc(r1)			#load second table ID
00123064: 00000000 nop
00123068: 00021040 sll r2,r2,0x01
0012306c: 3c018006 lui r1,0x8006
00123070: 00220821 addu r1,r1,r2
00123074: 90223eb8 lbu r2,0x3eb8(r1)			#load shield P-ev%
00123078: 00000000 nop
0012307c: a6220016 sh r2,0x0016(r17)			#store P-ev% to stack address
00123080: 3c018006 lui r1,0x8006
00123084: 00230821 addu r1,r1,r3
00123088: 90222ebc lbu r2,0x2ebc(r1)			#load second table ID again
0012308c: 00000000 nop
00123090: 00021040 sll r2,r2,0x01
00123094: 3c018006 lui r1,0x8006
00123098: 00220821 addu r1,r1,r2
0012309c: 90223eb9 lbu r2,0x3eb9(r1)			#load shield M-ev%
001230a0: 08048c4e j 0x00123138
001230a4: a6220020 sh r2,0x0020(r17)			#store M-ev% to stack address
001230a8: 1040000c beq r2,r0,0x001230dc		#branch if not helmet/armour
001230ac: 2602ff70 addiu r2,r16,0xff70			
001230b0: 00021040 sll r2,r2,0x01
001230b4: 3c018006 lui r1,0x8006
001230b8: 00220821 addu r1,r1,r2
001230bc: 90233ed8 lbu r3,0x3ed8(r1)			#load HP bonus
001230c0: 00000000 nop
001230c4: a643000e sh r3,0x000e(r18)			#store HP bonus to stack address
001230c8: 3c018006 lui r1,0x8006
001230cc: 00220821 addu r1,r1,r2
001230d0: 90223ed9 lbu r2,0x3ed9(r1)			#MP bonus
001230d4: 08048c4e j 0x00123138
001230d8: a6420014 sh r2,0x0014(r18)			#store MP bonus to stack address
001230dc: 2a0200f0 slti r2,r16,0x00f0			#set if an accessory
001230e0: 10400016 beq r2,r0,0x0012313c		#branch if not an accessory
001230e4: 00041040 sll r2,r4,0x01
001230e8: 3c018006 lui r1,0x8006
001230ec: 00230821 addu r1,r1,r3
001230f0: 90222ebc lbu r2,0x2ebc(r1)			#second table ID
001230f4: 00000000 nop
001230f8: 00021040 sll r2,r2,0x01
001230fc: 3c018006 lui r1,0x8006
00123100: 00220821 addu r1,r1,r2
00123104: 90223f58 lbu r2,0x3f58(r1)			#load accessory P-ev%
00123108: 00000000 nop
0012310c: a6220018 sh r2,0x0018(r17)			#store accessory P-ev% to stack
00123110: 3c018006 lui r1,0x8006
00123114: 00230821 addu r1,r1,r3
00123118: 90222ebc lbu r2,0x2ebc(r1)			#Load second table ID again
0012311c: 00000000 nop
00123120: 00021040 sll r2,r2,0x01
00123124: 3c018006 lui r1,0x8006
00123128: 00220821 addu r1,r1,r2
0012312c: 90223f59 lbu r2,0x3f59(r1)			#load accessory M-ev%
00123130: 00000000 nop
00123134: a6220022 sh r2,0x0022(r17)			#store accessory M-ev% to stack

Return here:
00123138: 00041040 sll r2,r4,0x01
0012313c: 00441021 addu r2,r2,r4
00123140: 000210c0 sll r2,r2,0x03
00123144: 00441021 addu r2,r2,r4			#attribute ID * 0x19
00123148: 3c018006 lui r1,0x8006
0012314c: 00220821 addu r1,r1,r2
00123150: 902342c7 lbu r3,0x42c7(r1)			#load attribute's Move
00123154: 00000000 nop
00123158: a6230000 sh r3,0x0000(r17)			#store attribute's move
0012315c: 3c018006 lui r1,0x8006
00123160: 00220821 addu r1,r1,r2
00123164: 902342c6 lbu r3,0x42c6(r1)			#load attribute's speed
00123168: 00000000 nop
0012316c: a6230002 sh r3,0x0002(r17)			#store attribute's speed
00123170: 3c018006 lui r1,0x8006
00123174: 00220821 addu r1,r1,r2
00123178: 902342c8 lbu r3,0x42c8(r1)			#load attribute's jump
0012317c: 00000000 nop
00123180: a6230004 sh r3,0x0004(r17)			#you'll never guess what it does with jump
00123184: 3c018006 lui r1,0x8006
00123188: 00220821 addu r1,r1,r2
0012318c: 902342c4 lbu r3,0x42c4(r1)			#load attribute's PA
00123190: 00000000 nop
00123194: a6230012 sh r3,0x0012(r17)			#store attribute's PA
00123198: 3c018006 lui r1,0x8006
0012319c: 00220821 addu r1,r1,r2
001231a0: 902242c5 lbu r2,0x42c5(r1)			#load attribute's MA
001231a4: 00000000 nop
001231a8: a622001c sh r2,0x001c(r17)			#store attribute's MA
001231ac: 8fbf0020 lw r31,0x0020(r29)
001231b0: 8fb3001c lw r19,0x001c(r29)
001231b4: 8fb20018 lw r18,0x0018(r29)
001231b8: 8fb10014 lw r17,0x0014(r29)
001231bc: 8fb00010 lw r16,0x0010(r29)
001231c0: 27bd0028 addiu r29,r29,0x0028
001231c4: 03e00008 jr r31
001231c8: 00000000 nop
Return Locations:
001231cc - 00123284: 0x00123214, 0x00123230