Set used item based on skillset
Jump to navigation
Jump to search
Set used item based on act menu selections
001411b4: 34020012 ori r2,r0,0x0012 001411b8: 3c068016 lui r6,0x8016 001411bc: 90c65ee4 lbu r6,0x5ee4(r6) menu depth 001411c0: 3c078016 lui r7,0x8016 001411c4: 90e75ee6 lbu r7,0x5ee6(r7) skillset selection 001411c8: 3c098016 lui r9,0x8016 001411cc: 95295ee8 lhu r9,0x5ee8(r9) ability selection 001411d0: 3c018017 lui r1,0x8017 001411d4: ac269828 sw r6,-0x67d8(r1) store main menu selection 001411d8: 10c2009c beq r6,r2,0x 0014144c branch if menu depth = 0x12 (? math only gets to like 0x8) 001411dc: 00e07021 addu r14,r7,r0 r7 = skillset selection
001411e0: 30c300fe andi r3,r6,0x00fe 001411e4: 340200fe ori r2,r0,0x00fe 001411e8: 10620098 beq r3,r2,0x 0014144c branch if none stored 001411ec: 00004021 addu r8,r0,r0
001411f0: 340b00ff ori r11,r0,0x00ff 001411f4: 340c0069 ori r12,r0,0x0069 001411f8: 340d0019 ori r13,r0,0x0019 001411fc: 3c048015 lui r4,0x8015 00141200: 2484d378 addiu r4,r4,0xd378 14d378 00141204: 3c038016 lui r3,0x8016 00141208: 8c635f84 lw r3,0x5f84(r3) load menu display byte 0014120c: 00002821 addu r5,r0,r0 00141210: 286a0064 slti r10,r3,0x0064 00141214: 3c018015 lui r1,0x8015 00141218: 00250821 addu r1,r1,r5 0014121c: 9422d374 lhu r2,-0x2c8c(r1) load menu ID 00141220: 00000000 nop 00141224: 1462001a bne r3,r2,0x 00141290 branch if not equal to current 00141228: 00000000 nop 0014122c: 10cb0013 beq r6,r11,0x 0014127c branch if no main menu selection 00141230: 00000000 nop 00141234: 106c0025 beq r3,r12,0x 001412cc branch if menu ID = 69 00141238: 00000000 nop 0014123c: 106d0003 beq r3,r13,0x 0014124c branch if menu ID = 19 00141240: 00000000 nop 00141244: 15400007 bne r10,r0,0x 00141264 branch if menu ID < 0x64 00141248: 00000000 nop
menu ID 19
0014124c: 8c820000 lw r2,0x0000(r4) load address based on menu ID 00141250: 00000000 nop 00141254: 00471021 addu r2,r2,r7 add skillset selection 00141258: 90460001 lbu r6,0x0001(r2) 0014125c: 080504a9 j 0x 001412a4 00141260: 3407fffe ori r7,r0,0xfffe
00141264: 8c820000 lw r2,0x0000(r4) load address based on menu ID 00141268: 00000000 nop 0014126c: 00461021 addu r2,r2,r6 add main menu selection 00141270: 90460001 lbu r6,0x0001(r2) load?? 00141274: 080504aa j 0x 001412a8 00141278: 3402001f ori r2,r0,0x001f
variable 1 = ff
0014127c: 8c820000 lw r2,0x0000(r4) load address based on menu ID 00141280: 00000000 nop 00141284: 90460000 lbu r6,0x0000(r2) 00141288: 080504aa j 0x 001412a8 0014128c: 3402001f ori r2,r0,0x001f
00141290: 24840008 addiu r4,r4,0x0008 00141294: 25080001 addiu r8,r8,0x0001 00141298: 2902001f slti r2,r8,0x001f 0014129c: 1440ffdd bne r2,r0,0x 00141214 loop until ?? 001412a0: 24a50008 addiu r5,r5,0x0008 001412a4: 3402001f ori r2,r0,0x001f
001412a8: 15020002 bne r8,r2,0x 001412b4 branch if r8 != 0x1f 001412ac: 29020010 slti r2,r8,0x0010 set if r8 < 10 001412b0: 34060007 ori r6,r0,0x0007 001412b4: 1040000d beq r2,r0,0x 001412ec branch if r8 > 10 001412b8: 24c2fffb addiu r2,r6,0xfffb 001412bc: 3c018015 lui r1,0x8015 001412c0: ac26d314 sw r6,-0x2cec(r1) store ?? 001412c4: 080504c0 j 0x 00141300 001412c8: 34020001 ori r2,r0,0x0001
69
001412cc: 3c068016 lui r6,0x8016 001412d0: 8cc65f78 lw r6,0x5f78(r6) 001412d4: 3c028016 lui r2,0x8016 001412d8: 90425f7c lbu r2,0x5f7c(r2) 001412dc: 3c018017 lui r1,0x8017 001412e0: a0229834 sb r2,-0x67cc(r1) 169834 001412e4: 080504a9 j 0x 001412a4 001412e8: 3407fffe ori r7,r0,0xfffe
001412ec: 2c420002 sltiu r2,r2,0x0002 001412f0: 10400003 beq r2,r0,0x 00141300 001412f4: 34020001 ori r2,r0,0x0001 001412f8: 3c018017 lui r1,0x8017 001412fc: a0269836 sb r6,-0x67ca(r1) store ??
00141300: 14c20005 bne r6,r2,0x 00141318 branch if ? != 1 (ai setting?) 00141304: 3402000c ori r2,r0,0x000c 00141308: 34020001 ori r2,r0,0x0001 0014130c: 3c018015 lui r1,0x8015 00141310: a022d324 sb r2,-0x2cdc(r1) store ?? = 1 00141314: 3402000c ori r2,r0,0x000c
00141318: 14c2000c bne r6,r2,0x 0014134c branch if ?? != 0x0c 0014131c: 28e20003 slti r2,r7,0x0003 00141320: 10400005 beq r2,r0,0x 00141338 branch if skillset slot # > 3 00141324: 24e2ffff addiu r2,r7,0xffff 00141328: 00021040 sll r2,r2,0x01 0014132c: 2523000c addiu r3,r9,0x000c 00141330: 080504cf j 0x 0014133c 00141334: 00433021 addu r6,r2,r3
00141338: 24e6000d addiu r6,r7,0x000d 0014133c: 3407fffe ori r7,r0,0xfffe 00141340: 3409fffe ori r9,r0,0xfffe 00141344: 3c018015 lui r1,0x8015 00141348: ac26d314 sw r6,-0x2cec(r1)
0014134c: 3c018017 lui r1,0x8017 00141350: ac269828 sw r6,-0x67d8(r1) store 169828 ability selected byte? 00141354: 30e300fe andi r3,r7,0x00fe 00141358: 340200fe ori r2,r0,0x00fe 0014135c: 1062003c beq r3,r2,0x 00141450 branch if no skillset selection 00141360: 30e200ff andi r2,r7,0x00ff r2 = variable 2 00141364: 3c018017 lui r1,0x8017 00141368: 002e0821 addu r1,r1,r14 add skillset selection counter 0014136c: 90274060 lbu r7,0x4060(r1) load skillset chosen 00141370: 00000000 nop 00141374: 24e2ffff addiu r2,r7,0xffff skillset - 1 00141378: 2c420002 sltiu r2,r2,0x0002 set if attack, defend 0014137c: 14400007 bne r2,r0,0x 0014139c branch if so 00141380: 24e2fffd addiu r2,r7,0xfffd 00141384: 2c420002 sltiu r2,r2,0x0002 00141388: 14400004 bne r2,r0,0x 0014139c branch if equip change, blank 0014138c: 24e2ffef addiu r2,r7,0xffef 00141390: 2c420002 sltiu r2,r2,0x0002 00141394: 10400005 beq r2,r0,0x 001413ac branch if not elemental, jump 00141398: 340200bc ori r2,r0,0x00bc
<1> Attack, defend, elemental, jump, equip change
0014139c: 3c018017 lui r1,0x8017 001413a0: a420982e sh r0,-0x67d2(r1) clear used item? 001413a4: 080504fd j 0x 001413f4 001413a8: 3409fffe ori r9,r0,0xfffe
<2> everything else
001413ac: 14e2000a bne r7,r2,0x 001413d8 branch if not monster? 001413b0: 00000000 nop 001413b4: 3c028017 lui r2,0x8017 001413b8: 8c429840 lw r2,-0x67c0(r2) 001413bc: 00000000 nop 001413c0: 14400005 bne r2,r0,0x 001413d8 001413c4: 3402fffe ori r2,r0,0xfffe 001413c8: 3c098017 lui r9,0x8017 001413cc: 9529e428 lhu r9,-0x1bd8(r9) 001413d0: 080504fe j 0x 001413f8 001413d4: 00000000 nop
001413d8: 3c028017 lui r2,0x8017 001413dc: 8c424048 lw r2,0x4048(r2) load ability list 001413e0: 00091840 sll r3,r9,0x01 ability*2 001413e4: 00621821 addu r3,r3,r2 001413e8: 94620000 lhu r2,0x0000(r3) load ability/item ID 001413ec: 00000000 nop 001413f0: 304901ff andi r9,r2,0x01ff remove extra flags
<1> return
001413f4: 3402fffe ori r2,r0,0xfffe 001413f8: 3c018017 lui r1,0x8017 001413fc: a027982d sb r7,-0x67d3(r1) store used skillset 00141400: 3c018015 lui r1,0x8015 00141404: ac27d30c sw r7,-0x2cf4(r1) store used skillset 00141408: 11220011 beq r9,r2,0x 00141450 branch if used item = fe 0014140c: 30e200ff andi r2,r7,0x00ff 00141410: 34020006 ori r2,r0,0x0006 00141414: 10e20005 beq r7,r2,0x 0014142c branch if skillset = item 00141418: 00000000 nop 0014141c: 24e2ffed addiu r2,r7,0xffed 00141420: 2c420002 sltiu r2,r2,0x0002 00141424: 10400005 beq r2,r0,0x 0014143c branch if skillset isn't draw out/throw 00141428: 00000000 nop
item, draw out, throw
0014142c: 3c018017 lui r1,0x8017 00141430: a0299834 sb r9,-0x67cc(r1) store used item ID 00141434: 08050511 j 0x 00141444 00141438: 00000000 nop
if not one of the above
0014143c: 3c018017 lui r1,0x8017 00141440: a429982e sh r9,-0x67d2(r1) store ability ID
all return
00141444: 3c018015 lui r1,0x8015 00141448: ac29d310 sw r9,-0x2cf0(r1) 14d310 store used item/ability ID 0014144c: 30e200ff andi r2,r7,0x00ff r2 = skillset
00141450: 00021200 sll r2,r2,0x08 00141454: 00c21025 or r2,r6,r2 r2 = skillset + ?? 00141458: 00091c00 sll r3,r9,0x10 0014145c: 03e00008 jr r31 return all variables compactly 00141460: 00431025 or r2,r2,r3 Ability + Skillset + ???