Move/Act/Wait menu loading routine
Jump to navigation
Jump to search
00138ed8: 27bdfec8 addiu r29,r29,0xfec8 00138edc: afbf0130 sw r31,0x0130(r29) 00138ee0: afb5012c sw r21,0x012c(r29) 00138ee4: afb40128 sw r20,0x0128(r29) 00138ee8: afb30124 sw r19,0x0124(r29) 00138eec: afb20120 sw r18,0x0120(r29) 00138ef0: afb1011c sw r17,0x011c(r29) 00138ef4: 0c0532f0 jal 0x0014cbc0 get menu address 00138ef8: afb00118 sw r16,0x0118(r29) 00138efc: 00408821 addu r17,r2,r0 r17 = menu address 00138f00: 27b00018 addiu r16,r29,0x0018 00138f04: 86230038 lh r3,0x0038(r17) load counter 00138f08: 2402ffff addiu r2,r0,0xffff 00138f0c: 14620002 bne r3,r2,0x00138f18 branch if not ff 00138f10: afa30110 sw r3,0x0110(r29) 00138f14: afa00110 sw r0,0x0110(r29) 00138f18: 27a40010 addiu r4,r29,0x0010 00138f1c: 02202821 addu r5,r17,r0 00138f20: 0c04e05d jal 0x00138174 00138f24: 02003021 addu r6,r16,r0 00138f28: 27a40094 addiu r4,r29,0x0094 00138f2c: 02002821 addu r5,r16,r0 00138f30: 0c052fd5 jal 0x0014bf54 00138f34: 3406007c ori r6,r0,0x007c 00138f38: 27a60010 addiu r6,r29,0x0010 00138f3c: 34070001 ori r7,r0,0x0001 00138f40: 00009021 addu r18,r0,r0 00138f44: 0200a821 addu r21,r16,r0 00138f48: 86240004 lh r4,0x0004(r17) 00138f4c: 86250006 lh r5,0x0006(r17) 00138f50: 0c05312a jal 0x0014c4a8 00138f54: 34140002 ori r20,r0,0x0002 00138f58: 34040008 ori r4,r0,0x0008 00138f5c: 34050009 ori r5,r0,0x0009 00138f60: 3c108016 lui r16,0x8016 00138f64: 26105fa8 addiu r16,r16,0x5fa8 00138f68: 86230004 lh r3,0x0004(r17) 00138f6c: 00409821 addu r19,r2,r0 00138f70: 0c0529b3 jal 0x0014a6cc 00138f74: ae030000 sw r3,0x0000(r16) 00138f78: 02602821 addu r5,r19,r0 00138f7c: 8624001c lh r4,0x001c(r17) load menu to load 00138f80: 3c018016 lui r1,0x8016 00138f84: ac205f8c sw r0,0x5f8c(r1) 00138f88: 0c052cbc jal 0x0014b2f0 load menu 00138f8c: 2606fff8 addiu r6,r16,0xfff8 00138f90: 27a40010 addiu r4,r29,0x0010 00138f94: 0c00923f jal 0x000248fc 00138f98: 02602821 addu r5,r19,r0 00138f9c: 0c0532a0 jal 0x0014ca80 Swap threads to load menu data from skillsets? 00138fa0: 00000000 nop 00138fa4: 16400004 bne r18,r0,0x00138fb8 branch if r18 != 0 00138fa8: 32420001 andi r2,r18,0x0001 r2 = r18 flag 1 00138fac: 0c04bc13 jal 0x0012f04c 00138fb0: 02602021 addu r4,r19,r0 00138fb4: 32420001 andi r2,r18,0x0001 00138fb8: 00021940 sll r3,r2,0x05 r18 flag 1 << 5 00138fbc: 00621823 subu r3,r3,r2 1 * 0x1f 00138fc0: 00031880 sll r3,r3,0x02 1 * 0x7c 00138fc4: 02a38021 addu r16,r21,r3 stack + 0x18 + 0 or 0x7c 00138fc8: 97a20110 lhu r2,0x0110(r29) load 0x110 from stack (woah) 00138fcc: 02002021 addu r4,r16,r0 r4 = stack + 0x18 00138fd0: 0c04e118 jal 0x00138460 00138fd4: a6220038 sh r2,0x0038(r17) store menu counter 00138fd8: 02202021 addu r4,r17,r0 r4 = menu address 00138fdc: 02002821 addu r5,r16,r0 r5 = stack + 0x18 00138fe0: 8fa70110 lw r7,0x0110(r29) load counter from stack 00138fe4: 0c04e15c jal 0x00138570 00138fe8: 02403021 addu r6,r18,r0 r6 = r18 00138fec: 8fa30090 lw r3,0x0090(r29) load 0? from stack 00138ff0: 00000000 nop 00138ff4: 14600005 bne r3,r0,0x0013900c branch if not 0 00138ff8: 00000000 nop 00138ffc: 8fa2010c lw r2,0x010c(r29) 00139000: 00000000 nop 00139004: 10540007 beq r2,r20,0x00139024 00139008: 00000000 nop 0013900c: 14740007 bne r3,r20,0x0013902c 00139010: 00000000 nop 00139014: 8fa2010c lw r2,0x010c(r29) 00139018: 00000000 nop 0013901c: 14400003 bne r2,r0,0x0013902c 00139020: 00000000 nop 00139024: afa00090 sw r0,0x0090(r29) 00139028: afa0010c sw r0,0x010c(r29) 0013902c: 3c048017 lui r4,0x8017 00139030: 248497d0 addiu r4,r4,0x97d0 00139034: 0c04e025 jal 0x00138094 00139038: 00000000 nop 0013903c: 1440000d bne r2,r0,0x00139074 00139040: 02202021 addu r4,r17,r0 00139044: 8fa50110 lw r5,0x0110(r29) 00139048: 0c04df04 jal 0x00137c10 0013904c: 26520001 addiu r18,r18,0x0001 counter + 1 00139050: 02202021 addu r4,r17,r0 00139054: 0c04dfb5 jal 0x00137ed4 00139058: 27a50110 addiu r5,r29,0x0110 0013905c: 0c04dfe1 jal 0x00137f84 00139060: 02202021 addu r4,r17,r0 00139064: 0c04e2c4 jal 0x00138b10 00139068: 02002021 addu r4,r16,r0 0013906c: 0804e3e7 j 0x00138f9c 00139070: 00000000 nop 00139074: 0c0532a0 jal 0x0014ca80 00139078: 00000000 nop 0013907c: 0c0532fd jal 0x0014cbf4 00139080: 00000000 nop 00139084: 14400003 bne r2,r0,0x00139094 00139088: 00000000 nop 0013908c: 0c053256 jal 0x0014c958 00139090: 00000000 nop 00139094: 8fbf0130 lw r31,0x0130(r29) 00139098: 8fb5012c lw r21,0x012c(r29) 0013909c: 8fb40128 lw r20,0x0128(r29) 001390a0: 8fb30124 lw r19,0x0124(r29) 001390a4: 8fb20120 lw r18,0x0120(r29) 001390a8: 8fb1011c lw r17,0x011c(r29) 001390ac: 8fb00118 lw r16,0x0118(r29) 001390b0: 27bd0138 addiu r29,r29,0x0138 001390b4: 03e00008 jr r31 001390b8: 00000000 nop