0011af4c - 0011b550
Jump to navigation
Jump to search
0011af4c: 3c028019 lui r2,0x8019 0011af50: 8042bad6 lb r2,-0x452a(r2) 0011af54: 27bdffc0 addiu r29,r29,0xffc0 0011af58: afbf003c sw r31,0x003c(r29) 0011af5c: afb20038 sw r18,0x0038(r29) 0011af60: afb10034 sw r17,0x0034(r29) 0011af64: 14400012 bne r2,r0,0x0011afb0 0011af68: afb00030 sw r16,0x0030(r29) 0011af6c: 34020001 ori r2,r0,0x0001 0011af70: 3c018019 lui r1,0x8019 0011af74: a022bad6 sb r2,-0x452a(r1) 0011af78: 2402ffff addiu r2,r0,0xffff 0011af7c: 3c01801d lui r1,0x801d 0011af80: a4228478 sh r2,-0x7b88(r1) 0011af84: 34020002 ori r2,r0,0x0002 0011af88: 3c01801d lui r1,0x801d 0011af8c: a0208474 sb r0,-0x7b8c(r1) 0011af90: 3c018019 lui r1,0x8019 0011af94: a022ba24 sb r2,-0x45dc(r1) 0011af98: 3c018019 lui r1,0x8019 0011af9c: a020ca66 sb r0,-0x359a(r1) 0011afa0: 3c018019 lui r1,0x8019 0011afa4: a020ca67 sb r0,-0x3599(r1) 0011afa8: 3c018019 lui r1,0x8019 0011afac: a020ca68 sb r0,-0x3598(r1) 0011afb0: 3c02801d lui r2,0x801d 0011afb4: 8c42d52c lw r2,-0x2ad4(r2) 0011afb8: 00000000 nop 0011afbc: 30420040 andi r2,r2,0x0040 0011afc0: 1040000f beq r2,r0,0x0011b000 0011afc4: 34020002 ori r2,r0,0x0002 0011afc8: 3c03801d lui r3,0x801d 0011afcc: 80638474 lb r3,-0x7b8c(r3) 0011afd0: 3c018019 lui r1,0x8019 0011afd4: a022bacc sb r2,-0x4534(r1) 0011afd8: 14600007 bne r3,r0,0x0011aff8 0011afdc: 34020001 ori r2,r0,0x0001 0011afe0: 3c018019 lui r1,0x8019 0011afe4: a020bad6 sb r0,-0x452a(r1) 0011afe8: 0c045022 jal 0x00114088 00114088 - 001140b8 0011afec: 00000000 nop 0011aff0: 08046d4e j 0x0011b538 0011aff4: 00001021 addu r2,r0,r0 0011aff8: 3c018019 lui r1,0x8019 0011affc: a022ca67 sb r2,-0x3599(r1) 0011b000: 3c048019 lui r4,0x8019 0011b004: 8484ba20 lh r4,-0x45e0(r4) 0011b008: 0c049550 jal 0x00125540 Lock Equipment And Abilities 0011b00c: 34120001 ori r18,r0,0x0001 0011b010: 00401821 addu r3,r2,r0 0011b014: 306200ff andi r2,r3,0x00ff 0011b018: 14520002 bne r2,r18,0x0011b024 skip if not full items/abilities usable 0011b01c: 00001821 addu r3,r0,r0 0011b020: 306200ff andi r2,r3,0x00ff 0011b024: 1040000e beq r2,r0,0x0011b060 skip if 0 (items usable only) 0011b028: 00000000 nop 0011b02c: 0c0455ad jal 0x001156b4 Turn Preview Stats Window on/off 0011b030: 00002021 addu r4,r0,r0 turn off 0011b034: 3c02801d lui r2,0x801d 0011b038: 8c42d52c lw r2,-0x2ad4(r2) 0011b03c: 3c01801d lui r1,0x801d 0011b040: ac20d754 sw r0,-0x28ac(r1) 0011b044: 30420020 andi r2,r2,0x0020 0011b048: 1040013a beq r2,r0,0x0011b534 0011b04c: 34020005 ori r2,r0,0x0005 0011b050: 3c018019 lui r1,0x8019 0011b054: a022bacc sb r2,-0x4534(r1) 0011b058: 08046d4e j 0x0011b538 0011b05c: 34020001 ori r2,r0,0x0001
items usable:
0011b060: 3c02801d lui r2,0x801d 0011b064: 80428474 lb r2,-0x7b8c(r2) 0011b068: 00000000 nop 0011b06c: 1440005a bne r2,r0,0x0011b1d8 0011b070: 34040005 ori r4,r0,0x0005 0011b074: 34050002 ori r5,r0,0x0002 0011b078: 3c06801d lui r6,0x801d 0011b07c: 8cc6d668 lw r6,-0x2998(r6) 0011b080: 0c04ae85 jal 0x0012ba14 Jump to cursor movement routine <- why doesn't this page exist? 0011b084: 34070006 ori r7,r0,0x0006 0011b088: 3c03801d lui r3,0x801d 0011b08c: 8c63d52c lw r3,-0x2ad4(r3) 0011b090: 3c018019 lui r1,0x8019 0011b094: a022ca66 sb r2,-0x359a(r1) 0011b098: 30630020 andi r3,r3,0x0020 0011b09c: 1060003b beq r3,r0,0x0011b18c 0011b0a0: 00023600 sll r6,r2,0x18 0011b0a4: 00062e03 sra r5,r6,0x18 0011b0a8: 24a50001 addiu r5,r5,0x0001 0011b0ac: 00063603 sra r6,r6,0x18 0011b0b0: 3c10801d lui r16,0x801d 0011b0b4: 2610d230 addiu r16,r16,0xd230 0011b0b8: 3c048019 lui r4,0x8019 0011b0bc: 8484ba20 lh r4,-0x45e0(r4) 0011b0c0: 02003821 addu r7,r16,r0 0011b0c4: 0c049315 jal 0x00124c54 00124c54 - 00124f10 0011b0c8: afb20010 sw r18,0x0010(r29) 0011b0cc: 0c0498dd jal 0x00126374 00126374 - 001263a4 0011b0d0: 34040002 ori r4,r0,0x0002 0011b0d4: 34110001 ori r17,r0,0x0001 0011b0d8: 3c018019 lui r1,0x8019 0011b0dc: a031ba24 sb r17,-0x45dc(r1) 0011b0e0: 3c01801d lui r1,0x801d 0011b0e4: a0318474 sb r17,-0x7b8c(r1) 0011b0e8: 3c018019 lui r1,0x8019 0011b0ec: ac32ba64 sw r18,-0x459c(r1) 0011b0f0: 0c03ff84 jal 0x000ffe10 Mark Thread As Stopped (WORLD.BIN) <- closes the "equip/best/remove/list" menu 0011b0f4: 3404000f ori r4,r0,0x000f <- stop thread f 0011b0f8: 3c028019 lui r2,0x8019 0011b0fc: 8042ca66 lb r2,-0x359a(r2) 0011b100: 00000000 nop 0011b104: 10400002 beq r2,r0,0x0011b110 0011b108: 00002021 addu r4,r0,r0 0011b10c: 2444ffff addiu r4,r2,0xffff 0011b110: 27a50018 addiu r5,r29,0x0018 0011b114: 27a6001a addiu r6,r29,0x001a 0011b118: 0c0462fc jal 0x00118bf0 00118bf0 - 00118d00 0011b11c: 02003821 addu r7,r16,r0 0011b120: 87a50018 lh r5,0x0018(r29) 0011b124: 87a6001a lh r6,0x001a(r29) 0011b128: 3c07801d lui r7,0x801d 0011b12c: 8ce7d8c0 lw r7,-0x2740(r7) 0011b130: 0c04992a jal 0x001264a8 001264a8 - 001264d8 0011b134: 02002021 addu r4,r16,r0 0011b138: 3c028012 lui r2,0x8012 0011b13c: 2442a9d8 addiu r2,r2,0xa9d8 0011b140: 3c01801d lui r1,0x801d 0011b144: ac22d794 sw r2,-0x286c(r1) 0011b148: 3c028012 lui r2,0x8012 0011b14c: 2442a97c addiu r2,r2,0xa97c 0011b150: 3c01801d lui r1,0x801d 0011b154: ac22d798 sw r2,-0x2868(r1) 0011b158: 3c028012 lui r2,0x8012 0011b15c: 2442aa34 addiu r2,r2,0xaa34 0011b160: 3c01801d lui r1,0x801d 0011b164: ac22d79c sw r2,-0x2864(r1) 0011b168: 3c028012 lui r2,0x8012 0011b16c: 2442aaa4 addiu r2,r2,0xaaa4 0011b170: 3c01801d lui r1,0x801d 0011b174: ac22d7a0 sw r2,-0x2860(r1) 0011b178: 2402ffff addiu r2,r0,0xffff 0011b17c: 3c018019 lui r1,0x8019 0011b180: a031bacc sb r17,-0x4534(r1) 0011b184: 3c01801d lui r1,0x801d 0011b188: a4228478 sh r2,-0x7b88(r1) 0011b18c: 3c028019 lui r2,0x8019 0011b190: 8442ba20 lh r2,-0x45e0(r2) 0011b194: 3c038019 lui r3,0x8019 0011b198: 8063ca66 lb r3,-0x359a(r3) 0011b19c: 00021080 sll r2,r2,0x02 0011b1a0: 3c01801d lui r1,0x801d 0011b1a4: 00220821 addu r1,r1,r2 0011b1a8: 8c22d5ec lw r2,-0x2a14(r1) 0011b1ac: 00031840 sll r3,r3,0x01 0011b1b0: 00621821 addu r3,r3,r2 0011b1b4: 94630054 lhu r3,0x0054(r3) 0011b1b8: 00000000 nop 0011b1bc: 10600002 beq r3,r0,0x0011b1c8 0011b1c0: 2402ffff addiu r2,r0,0xffff 0011b1c4: 24626800 addiu r2,r3,0x6800 0011b1c8: 3c01801d lui r1,0x801d 0011b1cc: ac22d754 sw r2,-0x28ac(r1) 0011b1d0: 08046d0c j 0x0011b430 0011b1d4: 00000000 nop 0011b1d8: 3c02801d lui r2,0x801d 0011b1dc: 8442d824 lh r2,-0x27dc(r2) 0011b1e0: 00000000 nop 0011b1e4: 1040000d beq r2,r0,0x0011b21c 0011b1e8: 2403ffff addiu r3,r0,0xffff 0011b1ec: 3c02801d lui r2,0x801d 0011b1f0: 8442d20c lh r2,-0x2df4(r2) 0011b1f4: 00000000 nop 0011b1f8: 00021040 sll r2,r2,0x01 0011b1fc: 3c01801d lui r1,0x801d 0011b200: 00220821 addu r1,r1,r2 0011b204: 9422d230 lhu r2,-0x2dd0(r1) 0011b208: 00000000 nop 0011b20c: 304203ff andi r2,r2,0x03ff 0011b210: 24436800 addiu r3,r2,0x6800 0011b214: 3c02801d lui r2,0x801d 0011b218: 8442d824 lh r2,-0x27dc(r2) 0011b21c: 3c01801d lui r1,0x801d 0011b220: ac23d754 sw r3,-0x28ac(r1) 0011b224: 1040000a beq r2,r0,0x0011b250 0011b228: 00008821 addu r17,r0,r0 0011b22c: 3c02801d lui r2,0x801d 0011b230: 8442d20c lh r2,-0x2df4(r2) 0011b234: 00000000 nop 0011b238: 00021040 sll r2,r2,0x01 0011b23c: 3c01801d lui r1,0x801d 0011b240: 00220821 addu r1,r1,r2 0011b244: 9422d230 lhu r2,-0x2dd0(r1) 0011b248: 00000000 nop 0011b24c: 305103ff andi r17,r2,0x03ff 0011b250: 3c02801d lui r2,0x801d 0011b254: 8c42d52c lw r2,-0x2ad4(r2) 0011b258: 00000000 nop 0011b25c: 30420020 andi r2,r2,0x0020 0011b260: 10400030 beq r2,r0,0x0011b324 0011b264: 00000000 nop 0011b268: 3c02801d lui r2,0x801d 0011b26c: 8442d824 lh r2,-0x27dc(r2) 0011b270: 00000000 nop 0011b274: 10400029 beq r2,r0,0x0011b31c 0011b278: 34020005 ori r2,r0,0x0005 0011b27c: 3c02801d lui r2,0x801d 0011b280: 8442d20c lh r2,-0x2df4(r2) 0011b284: 00000000 nop 0011b288: 00021040 sll r2,r2,0x01 0011b28c: 3c01801d lui r1,0x801d 0011b290: 00220821 addu r1,r1,r2 0011b294: 9422d230 lhu r2,-0x2dd0(r1) 0011b298: 00000000 nop 0011b29c: 30424000 andi r2,r2,0x4000 0011b2a0: 1440001e bne r2,r0,0x0011b31c 0011b2a4: 34020005 ori r2,r0,0x0005 0011b2a8: 02208021 addu r16,r17,r0 0011b2ac: 02002021 addu r4,r16,r0 0011b2b0: 0c04822e jal 0x001208b8 Change Item Quantity on Equip 0011b2b4: 00002821 addu r5,r0,r0 0011b2b8: 14400005 bne r2,r0,0x0011b2d0 0011b2bc: 3404c003 ori r4,r0,0xc003 0011b2c0: 0c044d3a jal 0x001134e8 001134e8 - 0011353c 0011b2c4: 34050030 ori r5,r0,0x0030 0011b2c8: 08046cc9 j 0x0011b324 0011b2cc: 00000000 nop 0011b2d0: 3c048019 lui r4,0x8019 0011b2d4: 8484ba20 lh r4,-0x45e0(r4) 0011b2d8: 3c058019 lui r5,0x8019 0011b2dc: 80a5ca66 lb r5,-0x359a(r5) 0011b2e0: 0c04910a jal 0x00124428 00124428 - 00124578 0011b2e4: 02003021 addu r6,r16,r0 0011b2e8: 34030001 ori r3,r0,0x0001 0011b2ec: 1443000a bne r2,r3,0x0011b318 0011b2f0: 02002021 addu r4,r16,r0 0011b2f4: 0c04822e jal 0x001208b8 Change Item Quantity on Equip 0011b2f8: 2405ffff addiu r5,r0,0xffff 0011b2fc: 0c0452f2 jal 0x00114bc8 00114bc8 - 00114d48 0011b300: 00000000 nop 0011b304: 34020001 ori r2,r0,0x0001 0011b308: 3c018019 lui r1,0x8019 0011b30c: a022ca67 sb r2,-0x3599(r1) 0011b310: 08046cc7 j 0x0011b31c 0011b314: 3402000a ori r2,r0,0x000a 0011b318: 34020005 ori r2,r0,0x0005 0011b31c: 3c018019 lui r1,0x8019 0011b320: a022bacc sb r2,-0x4534(r1) 0011b324: 3c02801d lui r2,0x801d 0011b328: 8442d824 lh r2,-0x27dc(r2) 0011b32c: 00000000 nop 0011b330: 10400039 beq r2,r0,0x0011b418 0011b334: 00000000 nop 0011b338: 3c03801d lui r3,0x801d 0011b33c: 8463d20c lh r3,-0x2df4(r3) 0011b340: 3c02801d lui r2,0x801d 0011b344: 84428478 lh r2,-0x7b88(r2) 0011b348: 00000000 nop 0011b34c: 10430032 beq r2,r3,0x0011b418 0011b350: 00603821 addu r7,r3,r0 0011b354: 34040014 ori r4,r0,0x0014 0011b358: 3c058019 lui r5,0x8019 0011b35c: 80a5ca66 lb r5,-0x359a(r5) 0011b360: 3c01801d lui r1,0x801d 0011b364: a4278478 sh r7,-0x7b88(r1) 0011b368: 0c04910a jal 0x00124428 00124428 - 00124578 <- check if can equip item? 0011b36c: 02203021 addu r6,r17,r0 0011b370: 00403021 addu r6,r2,r0 #put return value in r6 0011b374: 34020001 ori r2,r0,0x0001 0011b378: 14c20022 bne r6,r2,0x0011b404 #branch if cannot equip item 0011b37c: 34020001 ori r2,r0,0x0001 0011b380: 3c048019 lui r4,0x8019 0011b384: 2484ab40 addiu r4,r4,0xab40 #appears to be an address for preview data? 0011b388: 3c058019 lui r5,0x8019 0011b38c: 24a5aa98 addiu r5,r5,0xaa98 #ditto, but offset by like 40 because lazy devs I guess 0011b390: 3c038019 lui r3,0x8019 0011b394: 8463ba20 lh r3,-0x45e0(r3) #load unit formation ID 0011b398: 3c07801d lui r7,0x801d 0011b39c: 8ce7d63c lw r7,-0x29c4(r7) #load preview/"fake" unit's formation pointer (duplicate of currently focused unit) 0011b3a0: 3c018019 lui r1,0x8019 0011b3a4: a022ca68 sb r2,-0x3598(r1) #set preview window to show 0011b3a8: 3c018019 lui r1,0x8019 0011b3ac: ac26bac4 sw r6,-0x453c(r1) #also store 1 0011b3b0: 00031880 sll r3,r3,0x02 0011b3b4: 3c01801d lui r1,0x801d 0011b3b8: 00230821 addu r1,r1,r3 0011b3bc: 8c26d5ec lw r6,-0x2a14(r1) #load current unit's formation data 0011b3c0: 24e70054 addiu r7,r7,0x0054 #Preview unit's equipment 0011b3c4: 0c048d0c jal 0x00123430 #00123430 - 00123504 - Calculates Preview bonuses for all differences in equipment 0011b3c8: 24c60054 addiu r6,r6,0x0054 #Real unit's equipment 0011b3cc: 3406000a ori r6,r0,0x000a #r6 = 0xa (copy #10 bytes of data) 0011b3d0: 3c028019 lui r2,0x8019 0011b3d4: 8442ba20 lh r2,-0x45e0(r2) #load unit's formation ID 0011b3d8: 3c05801d lui r5,0x801d 0011b3dc: 8ca5d63c lw r5,-0x29c4(r5) #preview unit's formation pointer 0011b3e0: 00021080 sll r2,r2,0x02 0011b3e4: 3c01801d lui r1,0x801d 0011b3e8: 00220821 addu r1,r1,r2 0011b3ec: 8c24d5ec lw r4,-0x2a14(r1) #real unit's formation data 0011b3f0: 24a50054 addiu r5,r5,0x0054 0011b3f4: 0c0088b7 jal 0x000222dc #bcopy <- copy preview unit's equips to real unit 0011b3f8: 24840054 addiu r4,r4,0x0054 0011b3fc: 08046d04 j 0x0011b410 #jump ahead 0011b400: 34020001 ori r2,r0,0x0001 #r2 = 1 0011b404: 3c018019 lui r1,0x8019 #if cannot equip item? 0011b408: a020ca68 sb r0,-0x3598(r1) #store no preview window 0011b40c: 34020001 ori r2,r0,0x0001 0011b410: 3c018019 lui r1,0x8019 0011b414: ac22ba38 sw r2,-0x45c8(r1) #store r2 at 0x8018ba38 0011b418: 3c05801d lui r5,0x801d 0011b41c: 8ca5d52c lw r5,-0x2ad4(r5) # 0011b420: 3c048019 lui r4,0x8019 0011b424: 2484c9a0 addiu r4,r4,0xc9a0 #r4 = 0x8018c9a0 0011b428: 0c049937 jal 0x001264dc #001264dc - 0012656c contains a call to various other routines (jalr r2, r31) based on byte 0x00 in r4. 0011b42c: 00000000 nop 0011b430: 3c028019 lui r2,0x8019 0011b434: 8042ca67 lb r2,-0x3599(r2) 0011b438: 00000000 nop 0011b43c: 10400020 beq r2,r0,0x0011b4c0 #if this is 1, it straight up just closes the equipment preview window lol 0011b440: 34020002 ori r2,r0,0x0002 0011b444: 3c018019 lui r1,0x8019 0011b448: ac20ba64 sw r0,-0x459c(r1) # 0011b44c: 3c01801d lui r1,0x801d 0011b450: a0208474 sb r0,-0x7b8c(r1) 0011b454: 3c018019 lui r1,0x8019 0011b458: a022ba24 sb r2,-0x45dc(r1) 0011b45c: 0c0498dd jal 0x00126374 #00126374 - 001263a4 if r4 is 0, save it 2 places? 0011b460: 00002021 addu r4,r0,r0 #set r4 to 0 0011b464: 34020001 ori r2,r0,0x0001 0011b468: 3c018019 lui r1,0x8019 0011b46c: a020ca68 sb r0,-0x3598(r1) #set preview window to disabled automatically (if 0, hides the second box that shows up to display bonus numbers) 0011b470: 3c018019 lui r1,0x8019 0011b474: ac22ba38 sw r2,-0x45c8(r1) 0011b478: 0c03ff7d jal 0x000ffdf4 Mark Thread As Running (WORLD.BIN) <- reopens the "equip/best/remove/list" menu 0011b47c: 3404000f ori r4,r0,0x000f mark thread f as running? 0011b480: 3c028019 lui r2,0x8019 0011b484: 8042ca66 lb r2,-0x359a(r2) #load current equipment position index (00 is right hand, 01 is left hand, 03 is head, etc.) 0011b488: 00000000 nop 0011b48c: 10400002 beq r2,r0,0x0011b498 #branch if right hand 0011b490: 00002021 addu r4,r0,r0 0011b494: 2444ffff addiu r4,r2,0xffff #subtract 1 0011b498: 3c05801d lui r5,0x801d 0011b49c: 84a5d20c lh r5,-0x2df4(r5) 0011b4a0: 3c06801d lui r6,0x801d 0011b4a4: 84c6d54c lh r6,-0x2ab4(r6) 0011b4a8: 3c07801d lui r7,0x801d 0011b4ac: 24e7d230 addiu r7,r7,0xd230 0011b4b0: 0c0462e9 jal 0x00118ba4 00118ba4 - 00118bec 0011b4b4: 00000000 nop 0011b4b8: 3c018019 lui r1,0x8019 0011b4bc: a020ca67 sb r0,-0x3599(r1) #if 1, immediately disables preview - closes out of equipment list without making any edits 0011b4c0: 3c048019 lui r4,0x8019 0011b4c4: 8084ca68 lb r4,-0x3598(r4) #r4 input = preview box trigger 0011b4c8: 0c0455ad jal 0x001156b4 Turn Preview Stats Window on/off 0011b4cc: 00000000 nop 0011b4d0: 34040028 ori r4,r0,0x0028 #r4 input = 0x28 0011b4d4: 3c028019 lui r2,0x8019 0011b4d8: 8042ca66 lb r2,-0x359a(r2) #load cursor equipment index 0011b4dc: 3c108019 lui r16,0x8019 0011b4e0: 2610ca6e addiu r16,r16,0xca6e 0011b4e4: 00021100 sll r2,r2,0x04 0011b4e8: 24420090 addiu r2,r2,0x0090 #add 0x90 0011b4ec: 0c04a62c jal 0x001298b0 001298b0 - 001298bc 0011b4f0: a6020000 sh r2,0x0000(r16) #store cursor position on screen (?) 0011b4f4: 00003021 addu r6,r0,r0 0011b4f8: 3c02801d lui r2,0x801d 0011b4fc: 80428474 lb r2,-0x7b8c(r2) 0011b500: 00000000 nop 0011b504: 14400006 bne r2,r0,0x0011b520 0011b508: 2604fffe addiu r4,r16,0xfffe 0011b50c: 3c028015 lui r2,0x8015 0011b510: 8c42330c lw r2,0x330c(r2) 0011b514: 00000000 nop 0011b518: 10400002 beq r2,r0,0x0011b524 0011b51c: 00000000 nop 0011b520: 34060001 ori r6,r0,0x0001 0011b524: 3c058019 lui r5,0x8019 0011b528: 24a5ca6a addiu r5,r5,0xca6a 0011b52c: 0c04a0b7 jal 0x001282dc 001282dc - 00128598 0011b530: 00000000 nop 0011b534: 34020001 ori r2,r0,0x0001 0011b538: 8fbf003c lw r31,0x003c(r29) 0011b53c: 8fb20038 lw r18,0x0038(r29) 0011b540: 8fb10034 lw r17,0x0034(r29) 0011b544: 8fb00030 lw r16,0x0030(r29) 0011b548: 27bd0040 addiu r29,r29,0x0040 0011b54c: 03e00008 jr r31 0011b550: 00000000 nop