Finalise Unit's equips from Fitting Room
(Redirected from 00136eb0 - 00137028)
Jump to navigation
Jump to search
00136eb0: 27bdffe0 addiu r29,r29,0xffe0 00136eb4: 00043c00 sll r7,r4,0x10 r4 input = unit ID 00136eb8: 00073c03 sra r7,r7,0x10 00136ebc: 3c02801d lui r2,0x801d 00136ec0: 2442d5ec addiu r2,r2,0xd5ec 00136ec4: 00073080 sll r6,r7,0x02 Unit ID * 4 00136ec8: 00c24821 addu r9,r6,r2 r9 = pointer to current unit's formation pointer 00136ecc: 00051c00 sll r3,r5,0x10 r5 input = equip slot 00136ed0: 00031c03 sra r3,r3,0x10 00136ed4: 00034040 sll r8,r3,0x01 equip slot * 2 00136ed8: afb20018 sw r18,0x0018(r29) 00136edc: 00809021 addu r18,r4,r0 00136ee0: 00c73021 addu r6,r6,r7 Unit ID * 0x5 00136ee4: 00063040 sll r6,r6,0x01 Unit ID * 0xa 00136ee8: afbf001c sw r31,0x001c(r29) 00136eec: afb10014 sw r17,0x0014(r29) 00136ef0: afb00010 sw r16,0x0010(r29) 00136ef4: 8d220000 lw r2,0x0000(r9) load unit's formation pointer 00136ef8: 28630002 slti r3,r3,0x0002 00136efc: 01021021 addu r2,r8,r2 unit's equip's pointer 00136f00: a4400054 sh r0,0x0054(r2) store equip as 0 00136f04: 3c02801d lui r2,0x801d 00136f08: 2442d43c addiu r2,r2,0xd43c fitting room reserve items array 00136f0c: 00c21021 addu r2,r6,r2 current unit's reserved items 00136f10: 01022021 addu r4,r8,r2 00136f14: 94900000 lhu r16,0x0000(r4) load fitting room's current unit's current equip slot's item 00136f18: 10600038 beq r3,r0,0x00136ffc branch if not equipping to either hand? 00136f1c: 00000000 nop 00136f20: 8d230000 lw r3,0x0000(r9) load unit's formation pointer 00136f24: 00000000 nop 00136f28: 94620054 lhu r2,0x0054(r3) 00136f2c: 94640056 lhu r4,0x0056(r3) 00136f30: 14400016 bne r2,r0,0x00136f8c branch if right hand equip != 0 00136f34: 00000000 nop 00136f38: 14800014 bne r4,r0,0x00136f8c branch if left hand equip != 0 00136f3c: 00000000 nop 00136f40: 3c01801d lui r1,0x801d 00136f44: 00260821 addu r1,r1,r6 00136f48: 9422d43c lhu r2,-0x2bc4(r1) load fitting room's right hand equip 00136f4c: 00000000 nop 00136f50: a4620054 sh r2,0x0054(r3) store fitting room's equip in unit's right hand equip 00136f54: 8d230000 lw r3,0x0000(r9) 00136f58: 3c01801d lui r1,0x801d 00136f5c: 00260821 addu r1,r1,r6 00136f60: 9422d43e lhu r2,-0x2bc2(r1) load fitting room's left hand equip 00136f64: 00000000 nop 00136f68: a4620056 sh r2,0x0056(r3) store fitting room's equip in unit's left hand equip 00136f6c: 3c01801d lui r1,0x801d 00136f70: 00260821 addu r1,r1,r6 00136f74: a420d43c sh r0,-0x2bc4(r1) 00136f78: 3c01801d lui r1,0x801d 00136f7c: 00260821 addu r1,r1,r6 00136f80: a420d43e sh r0,-0x2bc2(r1) Clear fitting room reserved equips 00136f84: 0804dc04 j 0x00137010 end 00136f88: 00000000 nop 00136f8c: 12000020 beq r16,r0,0x00137010 end if item to equip = 0 00136f90: 00051400 sll r2,r5,0x10 00136f94: 00028c03 sra r17,r2,0x10 00136f98: 00103400 sll r6,r16,0x10 00136f9c: 3c048019 lui r4,0x8019 00136fa0: 8484ba20 lh r4,-0x45e0(r4) current unit formation ID 00136fa4: 02202821 addu r5,r17,r0 Hand polarity/equip slot 00136fa8: 0c049185 jal 0x00124614 WORLD: 2 H/S Check on Equip 00136fac: 00063403 sra r6,r6,0x10 Item to equip 00136fb0: 34030001 ori r3,r0,0x0001 00136fb4: 14430016 bne r2,r3,0x00137010 end if 2 handing 00136fb8: 00122400 sll r4,r18,0x10 00136fbc: 00042403 sra r4,r4,0x10 00136fc0: 00041080 sll r2,r4,0x02 unit ID * 4 00136fc4: 00112840 sll r5,r17,0x01 00136fc8: 3c01801d lui r1,0x801d 00136fcc: 00220821 addu r1,r1,r2 00136fd0: 8c23d5ec lw r3,-0x2a14(r1) unit's formation pointer 00136fd4: 00441021 addu r2,r2,r4 00136fd8: 00021040 sll r2,r2,0x01 unit's ID * a 00136fdc: 00a31821 addu r3,r5,r3 equip slot of current unit 00136fe0: a4700054 sh r16,0x0054(r3) store item to equip 00136fe4: 3c03801d lui r3,0x801d 00136fe8: 2463d43c addiu r3,r3,0xd43c 00136fec: 00431021 addu r2,r2,r3 00136ff0: 00a22821 addu r5,r5,r2 00136ff4: 0804dc04 j 0x00137010 00136ff8: a4a00000 sh r0,0x0000(r5) Store fitting room's reserved item as 0 00136ffc: 8d220000 lw r2,0x0000(r9) if not equipping to hand, 00137000: 00000000 nop 00137004: 01021021 addu r2,r8,r2 00137008: a4500054 sh r16,0x0054(r2) store new equip in slot 0013700c: a4800000 sh r0,0x0000(r4) store fitting room reserve as 0 00137010: 8fbf001c lw r31,0x001c(r29) 00137014: 8fb20018 lw r18,0x0018(r29) 00137018: 8fb10014 lw r17,0x0014(r29) 0013701c: 8fb00010 lw r16,0x0010(r29) 00137020: 27bd0020 addiu r29,r29,0x0020 00137024: 03e00008 jr r31 00137028: 00000000 nop