Difference between revisions of "Copy Unit Data to Status Billboard"
Jump to navigation
Jump to search
m (Talcall moved page 00133754 - 00133c94 to Copy Unit Data to Status Billboard: it copies unit data to status billboard) |
RetroTypes (talk | contribs) m (Formatting and adding additional comments) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | + | DUPLICATED : [[Store_units_small_in_battle_display_data]] | |
− | 00133754: 3c048015 lui r4,0x8015 | + | 00133754: 3c048015 lui r4,0x8015 # |
− | 00133758: 8484d09a lh r4,-0x2f66(r4) | + | 00133758: 8484d09a lh r4,-0x2f66(r4) #r4 = 0x8014d09a (hit % data (for display?)) |
− | 0013375c: 27bdffc8 addiu r29,r29,0xffc8 | + | 0013375c: 27bdffc8 addiu r29,r29,0xffc8 # |
− | 00133760: afbf0034 sw r31,0x0034(r29) | + | 00133760: afbf0034 sw r31,0x0034(r29) # |
− | 00133764: afb40030 sw r20,0x0030(r29) | + | 00133764: afb40030 sw r20,0x0030(r29) # |
− | 00133768: afb3002c sw r19,0x002c(r29) | + | 00133768: afb3002c sw r19,0x002c(r29) # |
− | 0013376c: afb20028 sw r18,0x0028(r29) | + | 0013376c: afb20028 sw r18,0x0028(r29) # |
− | 00133770: afb10024 sw r17,0x0024(r29) | + | 00133770: afb10024 sw r17,0x0024(r29) # |
− | 00133774: 0c0602bf jal 0x00180afc | + | 00133774: 0c0602bf jal 0x00180afc #[[Get Unit's Data Pointer]] for Unit ID at 0x8014d09a |
− | 00133778: afb00020 sw r16,0x0020(r29) | + | 00133778: afb00020 sw r16,0x0020(r29) # |
− | 0013377c: 0040a021 addu r20,r2,r0 | + | 0013377c: 0040a021 addu r20,r2,r0 #r20 = Unit Pointer |
− | 00133780: 3c118015 lui r17,0x8015 | + | 00133780: 3c118015 lui r17,0x8015 # |
− | 00133784: 2631d0a0 addiu r17,r17,0xd0a0 | + | 00133784: 2631d0a0 addiu r17,r17,0xd0a0 #r17 = 0x8014d0a0 (Billboard data) |
− | 00133788: 12800005 beq r20,r0,0x001337a0 | + | 00133788: 12800005 beq r20,r0,0x001337a0 #If unit exists /Else Branch if Unit doesn't exist |
− | 0013378c: 00000000 nop | + | 0013378c: 00000000 nop # |
− | 00133790: 3c058015 lui r5,0x8015 | + | 00133790: 3c058015 lui r5,0x8015 # |
− | 00133794: 24a5d05c addiu r5,r5,0xd05c | + | 00133794: 24a5d05c addiu r5,r5,0xd05c #r5 = 0x8014d05c (start of display data) |
− | 00133798: 0c04cd62 jal 0x00133588 | + | 00133798: 0c04cd62 jal 0x00133588 #[[Store level,exp, HP/MP hardcoding, store CT]] |
− | 0013379c: 02802021 addu r4,r20,r0 | + | 0013379c: 02802021 addu r4,r20,r0 #r4 = Unit Pointer |
− | 001337a0: 3c048015 lui r4,0x8015 | + | 001337a0: 3c048015 lui r4,0x8015 # |
− | 001337a4: 8484d08a lh r4,-0x2f76(r4) | + | 001337a4: 8484d08a lh r4,-0x2f76(r4) #r4 = 0x8014d08a |
− | 001337a8: 0c0602bf jal 0x00180afc | + | 001337a8: 0c0602bf jal 0x00180afc #[[Get Unit's Data Pointer]] for Unit ID at 0x8014d08a |
− | 001337ac: 00000000 nop | + | 001337ac: 00000000 nop # |
− | 001337b0: 0040a021 addu r20,r2,r0 | + | 001337b0: 0040a021 addu r20,r2,r0 #r20 = New Unit Pointer |
− | 001337b4: 1280012f beq r20,r0,0x00133c74 | + | 001337b4: 1280012f beq r20,r0,0x00133c74 #If Unit exists /Else Branch to END if Unit doesn't exist |
− | 001337b8: 00000000 nop | + | 001337b8: 00000000 nop # |
− | 001337bc: 3c058015 lui r5,0x8015 | + | 001337bc: 3c058015 lui r5,0x8015 # |
− | 001337c0: 24a5d038 addiu r5,r5,0xd038 | + | 001337c0: 24a5d038 addiu r5,r5,0xd038 #r5 = 0x8014d038 (pre attack display) |
− | 001337c4: 0c04cd62 jal 0x00133588 | + | 001337c4: 0c04cd62 jal 0x00133588 #[[Store level,exp, HP/MP hardcoding, store CT]] |
− | 001337c8: 02802021 addu r4,r20,r0 | + | 001337c8: 02802021 addu r4,r20,r0 #r4 = Unit Pointer |
− | 001337cc: 92820003 lbu r2,0x0003(r20) | + | 001337cc: 92820003 lbu r2,0x0003(r20) #r2 = Job ID |
− | 001337d0: 3c018015 lui r1,0x8015 | + | 001337d0: 3c018015 lui r1,0x8015 # |
− | 001337d4: a422d082 sh r2,-0x2f7e(r1) | + | 001337d4: a422d082 sh r2,-0x2f7e(r1) #Store Job ID at 0x8014d082 |
− | 001337d8: 92820024 lbu r2,0x0024(r20) | + | 001337d8: 92820024 lbu r2,0x0024(r20) #r2 = Brave |
− | 001337dc: 3c018015 lui r1,0x8015 | + | 001337dc: 3c018015 lui r1,0x8015 # |
− | 001337e0: a422d084 sh r2,-0x2f7c(r1) | + | 001337e0: a422d084 sh r2,-0x2f7c(r1) #Store brave at 0x8014d084 |
− | 001337e4: 92820026 lbu r2,0x0026(r20) | + | 001337e4: 92820026 lbu r2,0x0026(r20) #r2 = Faith |
− | 001337e8: 3c018015 lui r1,0x8015 | + | 001337e8: 3c018015 lui r1,0x8015 # |
− | 001337ec: a422d086 sh r2,-0x2f7a(r1) | + | 001337ec: a422d086 sh r2,-0x2f7a(r1) #Store Faith at 0x8014d086 |
− | 001337f0: 96820008 lhu r2,0x0008(r20) | + | 001337f0: 96820008 lhu r2,0x0008(r20) #r2 = Birthday + Zodiac |
− | 001337f4: 00000000 nop | + | 001337f4: 00000000 nop # |
− | 001337f8: 00021302 srl r2,r2,0x0c | + | 001337f8: 00021302 srl r2,r2,0x0c #Isolate Zodiac |
− | 001337fc: 3c018015 lui r1,0x8015 | + | 001337fc: 3c018015 lui r1,0x8015 # |
− | 00133800: a422d088 sh r2,-0x2f78(r1) | + | 00133800: a422d088 sh r2,-0x2f78(r1) #Store Zodiac at 0x8014d088 |
− | 00133804: 9282003a lbu r2,0x003a(r20) | + | 00133804: 9282003a lbu r2,0x003a(r20) #r2 = Move |
− | 00133808: 00000000 nop | + | 00133808: 00000000 nop # |
− | 0013380c: a6220000 sh r2,0x0000(r17) | + | 0013380c: a6220000 sh r2,0x0000(r17) #Store Move at 0x8014d0a0 (Billboard data) |
− | 00133810: 92820038 lbu r2,0x0038(r20) | + | 00133810: 92820038 lbu r2,0x0038(r20) #r2 = Speed |
− | 00133814: 3c018015 lui r1,0x8015 | + | 00133814: 3c018015 lui r1,0x8015 # |
− | 00133818: a422d0a2 sh r2,-0x2f5e(r1) | + | 00133818: a422d0a2 sh r2,-0x2f5e(r1) #Store Speed at 0x8014d0a2 |
− | 0013381c: 9282003b lbu r2,0x003b(r20) | + | 0013381c: 9282003b lbu r2,0x003b(r20) #r2 = Jump |
− | 00133820: 3c018015 lui r1,0x8015 | + | 00133820: 3c018015 lui r1,0x8015 # |
− | 00133824: a422d0a4 sh r2,-0x2f5c(r1) | + | 00133824: a422d0a4 sh r2,-0x2f5c(r1) #Store Jump at 0x8014d0a4 |
− | 00133828: 9282003e lbu r2,0x003e(r20) | + | 00133828: 9282003e lbu r2,0x003e(r20) #r2 = Weapon 1 Evade |
− | 0013382c: 3c018015 lui r1,0x8015 | + | 0013382c: 3c018015 lui r1,0x8015 # |
− | 00133830: a422d0aa sh r2,-0x2f56(r1) | + | 00133830: a422d0aa sh r2,-0x2f56(r1) #Store W1-Ev% at 0x8014d0aa |
− | 00133834: 9282003f lbu r2,0x003f(r20) | + | 00133834: 9282003f lbu r2,0x003f(r20) #r2 = Weapon 2 Evade |
− | 00133838: 3c018015 lui r1,0x8015 | + | 00133838: 3c018015 lui r1,0x8015 # |
− | 0013383c: a422d0ac sh r2,-0x2f54(r1) | + | 0013383c: a422d0ac sh r2,-0x2f54(r1) #Store W2-Ev% at 0x8014d0ac |
− | 00133840: 9282003c lbu r2,0x003c(r20) | + | 00133840: 9282003c lbu r2,0x003c(r20) #r2 = WP 1 |
− | 00133844: 3c018015 lui r1,0x8015 | + | 00133844: 3c018015 lui r1,0x8015 # |
− | 00133848: a422d0a6 sh r2,-0x2f5a(r1) | + | 00133848: a422d0a6 sh r2,-0x2f5a(r1) #Store WP 1 at 0x8014d0a6 |
− | 0013384c: 9282003d lbu r2,0x003d(r20) | + | 0013384c: 9282003d lbu r2,0x003d(r20) #r2 = WP 2 |
− | 00133850: 3c018015 lui r1,0x8015 | + | 00133850: 3c018015 lui r1,0x8015 # |
− | 00133854: a422d0a8 sh r2,-0x2f58(r1) | + | 00133854: a422d0a8 sh r2,-0x2f58(r1) #Store WP 2 at 0x8014d0a8 |
− | 00133858: 92820036 lbu r2,0x0036(r20) | + | 00133858: 92820036 lbu r2,0x0036(r20) #r2 = PA |
− | 0013385c: 3c018015 lui r1,0x8015 | + | 0013385c: 3c018015 lui r1,0x8015 # |
− | 00133860: a422d0b2 sh r2,-0x2f4e(r1) | + | 00133860: a422d0b2 sh r2,-0x2f4e(r1) #Store PA at 0x8014d0b2 |
− | 00133864: 92820043 lbu r2,0x0043(r20) | + | 00133864: 92820043 lbu r2,0x0043(r20) #r2 = P-C-Ev% (Physical Class Evasion) |
− | 00133868: 3c018015 lui r1,0x8015 | + | 00133868: 3c018015 lui r1,0x8015 # |
− | 0013386c: a422d0b4 sh r2,-0x2f4c(r1) | + | 0013386c: a422d0b4 sh r2,-0x2f4c(r1) #Store P-C-Ev% at 0x8014d0b4 |
− | 00133870: 92820041 lbu r2,0x0041(r20) | + | 00133870: 92820041 lbu r2,0x0041(r20) #r2 = RH P-S-Ev% |
− | 00133874: 3c018015 lui r1,0x8015 | + | 00133874: 3c018015 lui r1,0x8015 # |
− | 00133878: a422d0b6 sh r2,-0x2f4a(r1) | + | 00133878: a422d0b6 sh r2,-0x2f4a(r1) #Store P-S-Ev% at 0x8014d0b6 |
− | 0013387c: 92830041 lbu r3,0x0041(r20) | + | 0013387c: 92830041 lbu r3,0x0041(r20) #r3 = RH P-S-Ev% |
− | 00133880: 92820042 lbu r2,0x0042(r20) | + | 00133880: 92820042 lbu r2,0x0042(r20) #r2 = LH P-S-Ev% |
− | 00133884: 00000000 nop | + | 00133884: 00000000 nop # |
− | 00133888: 0043102b sltu r2,r2,r3 | + | 00133888: 0043102b sltu r2,r2,r3 #Compare LH and RH P-S-Ev% |
− | 0013388c: 14400004 bne r2,r0,0x001338a0 | + | 0013388c: 14400004 bne r2,r0,0x001338a0 #If LH P-S-Ev% is higher than RH P-S-Ev% /Else Branch if RH Shield has higher Ev% |
− | 00133890: 00000000 nop | + | 00133890: 00000000 nop # |
− | 00133894: 92820042 lbu r2,0x0042(r20) | + | 00133894: 92820042 lbu r2,0x0042(r20) #r2 = LH P-S-Ev% |
− | 00133898: 3c018015 lui r1,0x8015 | + | 00133898: 3c018015 lui r1,0x8015 # |
− | 0013389c: a422d0b6 sh r2,-0x2f4a(r1) | + | 0013389c: a422d0b6 sh r2,-0x2f4a(r1) #Store P-S-Ev% at 0x8014d0b6 |
− | 001338a0: 92820040 lbu r2,0x0040(r20) | + | 001338a0: 92820040 lbu r2,0x0040(r20) #r2 = P-A-Ev% |
− | 001338a4: 3c018015 lui r1,0x8015 | + | 001338a4: 3c018015 lui r1,0x8015 # |
− | 001338a8: a422d0b8 sh r2,-0x2f48(r1) | + | 001338a8: a422d0b8 sh r2,-0x2f48(r1) #Store P-A-Ev% at 0x8014d0b8 |
− | 001338ac: 92820037 lbu r2,0x0037(r20) | + | 001338ac: 92820037 lbu r2,0x0037(r20) #r2 = MA |
− | 001338b0: 3c018015 lui r1,0x8015 | + | 001338b0: 3c018015 lui r1,0x8015 # |
− | 001338b4: a420d0be sh r0,-0x2f42(r1) | + | 001338b4: a420d0be sh r0,-0x2f42(r1) #Store 0 M-C-Ev% at 0x8014d0be |
− | 001338b8: 3c018015 lui r1,0x8015 | + | 001338b8: 3c018015 lui r1,0x8015 # |
− | 001338bc: a422d0bc sh r2,-0x2f44(r1) | + | 001338bc: a422d0bc sh r2,-0x2f44(r1) #Store MA at 0x8014d0bc |
− | 001338c0: 92820045 lbu r2,0x0045(r20) | + | 001338c0: 92820045 lbu r2,0x0045(r20) #r2 = RH M-S-Ev% |
− | 001338c4: 3c018015 lui r1,0x8015 | + | 001338c4: 3c018015 lui r1,0x8015 # |
− | 001338c8: a422d0c0 sh r2,-0x2f40(r1) | + | 001338c8: a422d0c0 sh r2,-0x2f40(r1) #Store RH M-S-Ev% at 0x8014d0c0 |
− | 001338cc: 92830045 lbu r3,0x0045(r20) | + | 001338cc: 92830045 lbu r3,0x0045(r20) #r3 = RH M-S-Ev% |
− | 001338d0: 92820046 lbu r2,0x0046(r20) | + | 001338d0: 92820046 lbu r2,0x0046(r20) #r2 = LH M-S-Ev% |
− | 001338d4: 00000000 nop | + | 001338d4: 00000000 nop # |
− | 001338d8: 0043102b sltu r2,r2,r3 | + | 001338d8: 0043102b sltu r2,r2,r3 #Compare LH and RH M-S-Ev% |
− | + | 001338dc: 14400004 bne r2,r0,0x001338f0 #If LH M-S-Ev% is higher than RH M-S-Ev% /Else Branch if RH shield has higher Ev% | |
− | 001338e0: 34040004 ori r4,r0,0x0004 | + | 001338e0: 34040004 ori r4,r0,0x0004 #r4 = 4 (counter) |
− | 001338e4: 92820046 lbu r2,0x0046(r20) | + | 001338e4: 92820046 lbu r2,0x0046(r20) #r2 = LH M-S-Ev% |
− | 001338e8: 3c018015 lui r1,0x8015 | + | 001338e8: 3c018015 lui r1,0x8015 # |
− | 001338ec: a422d0c0 sh r2,-0x2f40(r1) | + | 001338ec: a422d0c0 sh r2,-0x2f40(r1) #Store LH M-S-Ev% 0x8014d0c0 |
− | + | 001338f0: 92820044 lbu r2,0x0044(r20) #r2 = M-A-Ev% | |
− | 001338f4: 26230008 addiu r3,r17,0x0008 | + | 001338f4: 26230008 addiu r3,r17,0x0008 #r3 = r17 + 8 (Billboard + 8) |
− | 001338f8: 3c018015 lui r1,0x8015 | + | 001338f8: 3c018015 lui r1,0x8015 # |
− | 001338fc: a422d0c2 sh r2,-0x2f3e(r1) | + | 001338fc: a422d0c2 sh r2,-0x2f3e(r1) #Store M-A-Ev% 0x8014d0c2 |
− | 00133900: a4600024 sh r0,0x0024(r3) | + | #Loop start |
− | 00133904: 2484ffff addiu r4,r4,0xffff | + | 00133900: a4600024 sh r0,0x0024(r3) #Store 0 at Billboard location (first at Billboard data 2c, then cycle through all equipment?) |
− | 00133908: 0481fffd bgez r4,0x00133900 | + | 00133904: 2484ffff addiu r4,r4,0xffff #Subtract 1 from r4 (counter--) |
− | 0013390c: 2463fffe addiu r3,r3,0xfffe | + | 00133908: 0481fffd bgez r4,0x00133900 #Loop 4 times? (clear <s>WP 1, WP 2, Jump, Speed, move</s> equipment) |
− | 00133910: 92820006 lbu r2,0x0006(r20) | + | 0013390c: 2463fffe addiu r3,r3,0xfffe #Subtract 2 from r3 (previous Billboard data slot) |
− | 00133914: 00000000 nop | + | 00133910: 92820006 lbu r2,0x0006(r20) #r2 = Unit Gender |
− | 00133918: 30420020 andi r2,r2,0x0020 | + | 00133914: 00000000 nop # |
− | 0013391c: 1440001e bne r2,r0,0x00133998 | + | 00133918: 30420020 andi r2,r2,0x0020 #Monster check |
− | 00133920: 340200ff ori r2,r0,0x00ff | + | 0013391c: 1440001e bne r2,r0,0x00133998 #If Human /Else Branch if not human (monsters cannot wear things) |
− | 00133924: 9283001d lbu r3,0x001d(r20) | + | 00133920: 340200ff ori r2,r0,0x00ff #r2 = 0xFF |
− | 00133928: 00000000 nop | + | 00133924: 9283001d lbu r3,0x001d(r20) #r3 = RH Weapon |
− | 0013392c: 10620004 beq r3,r2,0x00133940 | + | 00133928: 00000000 nop # |
− | 00133930: 00000000 nop | + | 0013392c: 10620004 beq r3,r2,0x00133940 #If RH has valid Weapon /Else Branch if right hand is actually Shield |
− | 00133934: 9282001d lbu r2,0x001d(r20) | + | 00133930: 00000000 nop # |
− | 00133938: 0804ce53 j 0x0013394c | + | 00133934: 9282001d lbu r2,0x001d(r20) #r2 = RH Weapon |
− | 0013393c: a6220024 sh r2,0x0024(r17) | + | 00133938: 0804ce53 j 0x0013394c #Jump to LH Equipment |
− | 00133940: 9282001e lbu r2,0x001e(r20) | + | 0013393c: a6220024 sh r2,0x0024(r17) #Store RH Weapon as RH Equipment |
− | 00133944: 00000000 nop | + | 00133940: 9282001e lbu r2,0x001e(r20) #r2 = RH Shield |
− | 00133948: a6220024 sh r2,0x0024(r17) | + | 00133944: 00000000 nop # |
− | 0013394c: 9283001f lbu r3,0x001f(r20) | + | 00133948: a6220024 sh r2,0x0024(r17) #Store RH Shield as RH Equipment |
− | 00133950: 340200ff ori r2,r0,0x00ff | + | 0013394c: 9283001f lbu r3,0x001f(r20) #r3 = LH weapon |
− | 00133954: 10620004 beq r3,r2,0x00133968 | + | 00133950: 340200ff ori r2,r0,0x00ff #r2 = 0xFF |
− | 00133958: 00000000 nop | + | 00133954: 10620004 beq r3,r2,0x00133968 #If LH has valid Weapon /Else Branch if left hand is actually Shield |
− | 0013395c: 9282001f lbu r2,0x001f(r20) | + | 00133958: 00000000 nop # |
− | 00133960: 0804ce5d j 0x00133974 | + | 0013395c: 9282001f lbu r2,0x001f(r20) #r2 = LH Weapon |
− | 00133964: a6220026 sh r2,0x0026(r17) | + | 00133960: 0804ce5d j 0x00133974 #Jump to Helmet Equipment |
− | 00133968: 92820020 lbu r2,0x0020(r20) | + | 00133964: a6220026 sh r2,0x0026(r17) #Store LH weapon as LH Equipment |
− | 0013396c: 00000000 nop | + | 00133968: 92820020 lbu r2,0x0020(r20) #r2 = LH shield |
− | 00133970: a6220026 sh r2,0x0026(r17) | + | 0013396c: 00000000 nop # |
− | 00133974: 9282001a lbu r2,0x001a(r20) | + | 00133970: a6220026 sh r2,0x0026(r17) #Store LH shield as LH Equipment |
− | 00133978: 00000000 nop | + | 00133974: 9282001a lbu r2,0x001a(r20) #r2 = Helmet |
− | 0013397c: a6220028 sh r2,0x0028(r17) | + | 00133978: 00000000 nop # |
− | 00133980: 9282001b lbu r2,0x001b(r20) | + | 0013397c: a6220028 sh r2,0x0028(r17) #Store Helmet |
− | 00133984: 00000000 nop | + | 00133980: 9282001b lbu r2,0x001b(r20) #r2 = Armor |
− | 00133988: a622002a sh r2,0x002a(r17) | + | 00133984: 00000000 nop # |
− | 0013398c: 9282001c lbu r2,0x001c(r20) | + | 00133988: a622002a sh r2,0x002a(r17) #Store Armor |
− | 00133990: 00000000 nop | + | 0013398c: 9282001c lbu r2,0x001c(r20) #r2 = Accessory |
− | 00133994: a622002c sh r2,0x002c(r17) | + | 00133990: 00000000 nop # |
− | 00133998: 00002021 addu r4,r0,r0 | + | 00133994: a622002c sh r2,0x002c(r17) #Store Accessory |
− | 0013399c: 340600ff ori r6,r0,0x00ff | + | 00133998: 00002021 addu r4,r0,r0 #r4 = 0 (counter) |
− | 001339a0: 2405ffff addiu r5,r0,0xffff | + | 0013399c: 340600ff ori r6,r0,0x00ff #r6 = 0xFF |
− | 001339a4: 02201821 addu r3,r17,r0 | + | 001339a0: 2405ffff addiu r5,r0,0xffff #r5 = -1 |
− | 001339a8: 84620024 lh r2,0x0024(r3) | + | 001339a4: 02201821 addu r3,r17,r0 #r3 = Billboard |
− | 001339ac: 00000000 nop | + | #Loop Start |
− | 001339b0: 10400003 beq r2,r0,0x001339c0 | + | 001339a8: 84620024 lh r2,0x0024(r3) #r2 = Equipment |
− | 001339b4: 00000000 nop | + | 001339ac: 00000000 nop # |
− | 001339b8: 14460002 bne r2,r6,0x001339c4 | + | 001339b0: 10400003 beq r2,r0,0x001339c0 #If not empty /Else Branch if null |
− | 001339bc: 00000000 nop | + | 001339b4: 00000000 nop # |
− | 001339c0: a4650024 sh r5,0x0024(r3) | + | 001339b8: 14460002 bne r2,r6,0x001339c4 #If FF /Else Branch if not FF |
− | 001339c4: 24840001 addiu r4,r4,0x0001 | + | 001339bc: 00000000 nop # |
− | 001339c8: 28820005 slti r2,r4,0x0005 | + | 001339c0: a4650024 sh r5,0x0024(r3) # #Store no item in Equipment slot |
− | 001339cc: 1440fff6 bne r2,r0,0x001339a8 | + | 001339c4: 24840001 addiu r4,r4,0x0001 #Add 1 to r4 (counter++) |
− | 001339d0: 24630002 addiu r3,r3,0x0002 | + | 001339c8: 28820005 slti r2,r4,0x0005 #Compare r4 counter to 5 |
− | 001339d4: a620000e sh r0,0x000e(r17) | + | 001339cc: 1440fff6 bne r2,r0,0x001339a8 #loop 5 times |
− | 001339d8: 92820012 lbu r2,0x0012(r20) | + | 001339d0: 24630002 addiu r3,r3,0x0002 #Add 2 to r3 (Move to next Billboard slot) |
− | 001339dc: 00000000 nop | + | 001339d4: a620000e sh r0,0x000e(r17) #Primary Skillset on Billboard = 0 |
− | 001339e0: 24420050 addiu r2,r2,0x0050 | + | 001339d8: 92820012 lbu r2,0x0012(r20) #r2 = Unit's Primary Skillset |
− | 001339e4: 304200ff andi r2,r2,0x00ff | + | 001339dc: 00000000 nop # |
− | 001339e8: 2c420030 sltiu r2,r2,0x0030 | + | 001339e0: 24420050 addiu r2,r2,0x0050 #r2 = Unit's Primary Skillset + 0x50 |
− | 001339ec: 10400002 beq r2,r0,0x001339f8 | + | 001339e4: 304200ff andi r2,r2,0x00ff #Isolate last 2 bits (Generic Monster = Skillset - 0xb0; otherwise = Skillset + 0x50) |
− | 001339f0: 34020001 ori r2,r0,0x0001 | + | 001339e8: 2c420030 sltiu r2,r2,0x0030 #Compare to 0x30 (True if Skillset is Generic Monster) |
− | 001339f4: a622000e sh r2,0x000e(r17) | + | 001339ec: 10400002 beq r2,r0,0x001339f8 #If Generic Monster /Else Branch if Not Generic Monster |
− | 001339f8: 8622000e lh r2,0x000e(r17) | + | 001339f0: 34020001 ori r2,r0,0x0001 #r2 = 1 |
− | 001339fc: 00000000 nop | + | 001339f4: a622000e sh r2,0x000e(r17) #Store Primary Skillset on Billboard = 1 (Attack) |
− | 00133a00: 10400030 beq r2,r0,0x00133ac4 | + | 001339f8: 8622000e lh r2,0x000e(r17) #r2 = Primary Skillset on Billboard |
− | 00133a04: 00000000 nop | + | 001339fc: 00000000 nop # |
− | 00133a08: 92840012 lbu r4,0x0012(r20) | + | 00133a00: 10400030 beq r2,r0,0x00133ac4 #If Generic Monster Skillset /Else Branch if not Generic Monster Skillset |
− | 00133a0c: 0c01698e jal 0x0005a638 | + | 00133a04: 00000000 nop # |
− | 00133a10: 34050001 ori r5,r0,0x0001 | + | 00133a08: 92840012 lbu r4,0x0012(r20) #r4 = Unit's Primary Skillset |
− | 00133a14: 00402821 addu r5,r2,r0 | + | 00133a0c: 0c01698e jal 0x0005a638 #[[Store Skillset's Abilities]] |
− | 00133a18: 00002021 addu r4,r0,r0 | + | 00133a10: 34050001 ori r5,r0,0x0001 #r5 = 1 (Check Active Abilities, not RSM) |
− | 00133a1c: 02201821 addu r3,r17,r0 | + | 00133a14: 00402821 addu r5,r2,r0 #r5 = Temporary Ability List Pointer |
− | 00133a20: 94a20000 lhu r2,0x0000(r5) | + | 00133a18: 00002021 addu r4,r0,r0 #r4 = 0 (counter) |
− | 00133a24: 24a50002 addiu r5,r5,0x0002 | + | 00133a1c: 02201821 addu r3,r17,r0 #r3 = Billboard |
− | 00133a28: 24840001 addiu r4,r4,0x0001 | + | #Loop Start |
− | 00133a2c: a462002e sh r2,0x002e(r3) | + | 00133a20: 94a20000 lhu r2,0x0000(r5) #r2 = First Ability ID |
− | 00133a30: 28820005 slti r2,r4,0x0005 | + | 00133a24: 24a50002 addiu r5,r5,0x0002 #Add 2 to r5 (Go to next Ability Pointer) |
− | 00133a34: 1440fffa bne r2,r0,0x00133a20 | + | 00133a28: 24840001 addiu r4,r4,0x0001 #Add 1 to r4 (counter++) |
− | 00133a38: 24630002 addiu r3,r3,0x0002 | + | 00133a2c: a462002e sh r2,0x002e(r3) #Store Ability to 1st Monster Ability Slot on Billboard |
− | 00133a3c: 3c028018 lui r2,0x8018 | + | 00133a30: 28820005 slti r2,r4,0x0005 #Compare counter to 5 |
− | 00133a40: 24422430 addiu r2,r2,0x2430 | + | 00133a34: 1440fffa bne r2,r0,0x00133a20 #Loop 5 times |
− | 00133a44: 3c018017 lui r1,0x8017 | + | 00133a38: 24630002 addiu r3,r3,0x0002 #Add 2 to r3 (Move to next Billboard slot) |
− | 00133a48: ac223ca8 sw r2,0x3ca8(r1) | + | 00133a3c: 3c028018 lui r2,0x8018 # |
− | 00133a4c: 0c0533ad jal 0x0014ceb4 | + | 00133a40: 24422430 addiu r2,r2,0x2430 #r2 = 0x80182430 (prep call routine [[Monster Skill check prep]]) |
− | 00133a50: 02802021 addu r4,r20,r0 | + | 00133a44: 3c018017 lui r1,0x8017 # |
− | 00133a54: 14400002 bne r2,r0,0x00133a60 | + | 00133a48: ac223ca8 sw r2,0x3ca8(r1) #store thread |
− | 00133a58: 00002021 addu r4,r0,r0 | + | 00133a4c: 0c0533ad jal 0x0014ceb4 #[[Call Inner Subroutine]] perform monster skill check prep (why call it this way?) |
− | 00133a5c: a6200034 sh r0,0x0034(r17) | + | 00133a50: 02802021 addu r4,r20,r0 #r4 = Unit Data Pointer |
− | 00133a60: 00008021 addu r16,r0,r0 | + | 00133a54: 14400002 bne r2,r0,0x00133a60 #If Monster Skill not active /Else Branch if beast master adjacent |
− | 00133a64: 02203021 addu r6,r17,r0 | + | 00133a58: 00002021 addu r4,r0,r0 #r4 = 0 (ability counter) |
− | 00133a68: 02202821 addu r5,r17,r0 | + | 00133a5c: a6200034 sh r0,0x0034(r17) #Store no 4th monster ability (Monster Skill-only ability slot) |
− | 00133a6c: 84c2002e lh r2,0x002e(r6) | + | 00133a60: 00008021 addu r16,r0,r0 #r16 = 0 (Loop counter) |
− | 00133a70: 00000000 nop | + | 00133a64: 02203021 addu r6,r17,r0 #r6 = Billboard |
− | 00133a74: 10400004 beq r2,r0,0x00133a88 | + | 00133a68: 02202821 addu r5,r17,r0 #r5 = Billboard |
− | 00133a78: 00401821 addu r3,r2,r0 | + | #Loop Start |
− | 00133a7c: a4a3002e sh r3,0x002e(r5) | + | 00133a6c: 84c2002e lh r2,0x002e(r6) #r2 = Monster Ability |
− | 00133a80: 24a50002 addiu r5,r5,0x0002 | + | 00133a70: 00000000 nop # |
− | 00133a84: 24840001 addiu r4,r4,0x0001 | + | 00133a74: 10400004 beq r2,r0,0x00133a88 #If valid Ability /Else Branch if null/Attack |
− | 00133a88: 26100001 addiu r16,r16,0x0001 | + | 00133a78: 00401821 addu r3,r2,r0 #r3 = Ability ID |
− | 00133a8c: 2a020005 slti r2,r16,0x0005 | + | 00133a7c: a4a3002e sh r3,0x002e(r5) #Store to Billboard |
− | 00133a90: 1440fff6 bne r2,r0,0x00133a6c | + | 00133a80: 24a50002 addiu r5,r5,0x0002 #Add 2 to r5 (Move to next Billboard slot) |
− | 00133a94: 24c60002 addiu r6,r6,0x0002 | + | 00133a84: 24840001 addiu r4,r4,0x0001 #Add 1 to r4 (Ability counter++) |
− | 00133a98: 28820005 slti r2,r4,0x0005 | + | 00133a88: 26100001 addiu r16,r16,0x0001 #Add 1 to r16 (Loop counter++) |
− | 00133a9c: 10400020 beq r2,r0,0x00133b20 | + | 00133a8c: 2a020005 slti r2,r16,0x0005 #Compare Loop counter to 5 |
− | 00133aa0: 00041040 sll r2,r4,0x01 | + | 00133a90: 1440fff6 bne r2,r0,0x00133a6c #Loop 4 times |
− | 00133aa4: 00511821 addu r3,r2,r17 | + | 00133a94: 24c60002 addiu r6,r6,0x0002 #Add 2 to r6 (Move to next Billboard slot) |
− | 00133aa8: a460002e sh r0,0x002e(r3) | + | 00133a98: 28820005 slti r2,r4,0x0005 #Compare Ability counter to 5 |
− | 00133aac: 24840001 addiu r4,r4,0x0001 | + | 00133a9c: 10400020 beq r2,r0,0x00133b20 #If 4 or less Abilities /Else Branch if 5 or more Abilities (not possible?) |
− | 00133ab0: 28820005 slti r2,r4,0x0005 | + | 00133aa0: 00041040 sll r2,r4,0x01 #r2 = Ability counter * 2 |
− | 00133ab4: 1440fffc bne r2,r0,0x00133aa8 | + | 00133aa4: 00511821 addu r3,r2,r17 #r3 = Billboard + final saved ability ID * 2 |
− | 00133ab8: 24630002 addiu r3,r3,0x0002 | + | #Loop Start |
− | + | 00133aa8: a460002e sh r0,0x002e(r3) #Store 0 in next Billboard Ability slot | |
− | 00133ac0: 00002021 addu r4,r0,r0 | + | 00133aac: 24840001 addiu r4,r4,0x0001 #Add 1 to r4 (Ability counter++) |
− | 00133ac4: 92820012 lbu r2,0x0012(r20) | + | 00133ab0: 28820005 slti r2,r4,0x0005 #Compare Ability counter to 5 |
− | 00133ac8: 00000000 nop | + | 00133ab4: 1440fffc bne r2,r0,0x00133aa8 #Loop if all 5 Billboard Ability slots handled |
− | 00133acc: 14400004 bne r2,r0,0x00133ae0 | + | 00133ab8: 24630002 addiu r3,r3,0x0002 #Add 2 to r3 (Move to next Billboard slot) |
− | 00133ad0: a622002e sh r2,0x002e(r17) | + | 00133abc: 0804cec9 j 0x00133b24 #Jump past non-Generic Monster Skillset stuff |
− | 00133ad4: 340200fe ori r2,r0,0x00fe | + | 00133ac0: 00002021 addu r4,r0,r0 #r4 = 0 |
− | 00133ad8: 3c018015 lui r1,0x8015 | + | 00133ac4: 92820012 lbu r2,0x0012(r20) #r2 = Unit's Primary Skillset |
− | 00133adc: a022d120 sb r2,-0x2ee0(r1) | + | 00133ac8: 00000000 nop # |
− | 00133ae0: 92820013 lbu r2,0x0013(r20) | + | 00133acc: 14400004 bne r2,r0,0x00133ae0 #If Unit's Primary Skillset = 0 /Else Branch if Primary Skillset ≠ 0 (Attack) |
− | 00133ae4: 00000000 nop | + | 00133ad0: a622002e sh r2,0x002e(r17) #Store Primary Skillset to Billboard |
− | 00133ae8: 14400004 bne r2,r0,0x00133afc | + | 00133ad4: 340200fe ori r2,r0,0x00fe #r2 = 0xFE (Random?) |
− | 00133aec: a6220030 sh r2,0x0030(r17) | + | 00133ad8: 3c018015 lui r1,0x8015 # |
− | 00133af0: 340200fe ori r2,r0,0x00fe | + | 00133adc: a022d120 sb r2,-0x2ee0(r1) #Store 0xFE Skillset at 0x8014d120 if Primary Skillset is null |
− | 00133af4: 3c018015 lui r1,0x8015 | + | 00133ae0: 92820013 lbu r2,0x0013(r20) #r2 = Secondary Skillset |
− | 00133af8: a022d135 sb r2,-0x2ecb(r1) | + | 00133ae4: 00000000 nop # |
− | 00133afc: 96820014 lhu r2,0x0014(r20) | + | 00133ae8: 14400004 bne r2,r0,0x00133afc #If Unit's Secondary Skillset = 0 /Else Branch if Secondary Skillset ≠ 0 (Attack) |
− | 00133b00: 00000000 nop | + | 00133aec: a6220030 sh r2,0x0030(r17) #Store Secondary Skillset to Billboard |
− | 00133b04: a6220032 sh r2,0x0032(r17) | + | 00133af0: 340200fe ori r2,r0,0x00fe #r2 = 0xFE (Random?) |
− | 00133b08: 96820016 lhu r2,0x0016(r20) | + | 00133af4: 3c018015 lui r1,0x8015 # |
− | 00133b0c: 00000000 nop | + | 00133af8: a022d135 sb r2,-0x2ecb(r1) #Store 0xFE Skillset at 0x8014d135 if Secondary Skillset is null |
− | 00133b10: a6220034 sh r2,0x0034(r17) | + | 00133afc: 96820014 lhu r2,0x0014(r20) #r2 = Unit's Reaction |
− | 00133b14: 96820018 lhu r2,0x0018(r20) | + | 00133b00: 00000000 nop # |
− | 00133b18: 00000000 nop | + | 00133b04: a6220032 sh r2,0x0032(r17) #Store Reaction to Billboard |
− | 00133b1c: a6220036 sh r2,0x0036(r17) | + | 00133b08: 96820016 lhu r2,0x0016(r20) #r2 = Unit's Support |
− | 00133b20: 00002021 addu r4,r0,r0 | + | 00133b0c: 00000000 nop # |
− | 00133b24: 02202821 addu r5,r17,r0 | + | 00133b10: a6220034 sh r2,0x0034(r17) #Store Support to Billboard |
− | 00133b28: 84a2002e lh r2,0x002e(r5) | + | 00133b14: 96820018 lhu r2,0x0018(r20) #r2 = Unit's Movement |
− | 00133b2c: 00000000 nop | + | 00133b18: 00000000 nop # |
− | 00133b30: 14400003 bne r2,r0,0x00133b40 | + | 00133b1c: a6220036 sh r2,0x0036(r17) #Store Movement to Billboard |
− | 00133b34: 00401821 addu r3,r2,r0 | + | 00133b20: 00002021 addu r4,r0,r0 #r4 = 0 (counter) |
− | 00133b38: 2462ffff addiu r2,r3,0xffff | + | 00133b24: 02202821 addu r5,r17,r0 #r5 = Billboard |
− | 00133b3c: a4a2002e sh r2,0x002e(r5) | + | #Loop Start |
− | 00133b40: 24840001 addiu r4,r4,0x0001 | + | 00133b28: 84a2002e lh r2,0x002e(r5) #r2 = Billboard Skillset/Ability Data |
− | 00133b44: 28820005 slti r2,r4,0x0005 | + | 00133b2c: 00000000 nop # |
− | 00133b48: 1440fff7 bne r2,r0,0x00133b28 | + | 00133b30: 14400003 bne r2,r0,0x00133b40 #If Skillset/Ability = 0 /Else Branch if not 0 |
− | 00133b4c: 24a50002 addiu r5,r5,0x0002 | + | 00133b34: 00401821 addu r3,r2,r0 #r3 = Billboard Skillset/Ability Data |
− | 00133b50: 00008021 addu r16,r0,r0 | + | 00133b38: 2462ffff addiu r2,r3,0xffff #r2 = -1 |
− | 00133b54: 86230024 lh r3,0x0024(r17) | + | 00133b3c: a4a2002e sh r2,0x002e(r5) #Store -1 on Billboard |
− | 00133b58: 2402ffff addiu r2,r0,0xffff | + | 00133b40: 24840001 addiu r4,r4,0x0001 #Add 1 to r4 (counter++) |
− | 00133b5c: 10620008 beq r3,r2,0x00133b80 | + | 00133b44: 28820005 slti r2,r4,0x0005 #Compare counter to 5 |
− | 00133b60: a6200010 sh r0,0x0010(r17) | + | 00133b48: 1440fff7 bne r2,r0,0x00133b28 #Loop 4 times |
− | 00133b64: 86220026 lh r2,0x0026(r17) | + | 00133b4c: 24a50002 addiu r5,r5,0x0002 #Add 2 to r5 (Move to next Billboard slot) |
− | 00133b68: 00000000 nop | + | 00133b50: 00008021 addu r16,r0,r0 #r16 = 0 (counter) |
− | 00133b6c: 00021027 nor r2,r0,r2 | + | 00133b54: 86230024 lh r3,0x0024(r17) #r3 = RH Equipment |
− | 00133b70: 2c420001 sltiu r2,r2,0x0001 | + | 00133b58: 2402ffff addiu r2,r0,0xffff #r2 = -1 |
− | 00133b74: 00021023 subu r2,r0,r2 | + | 00133b5c: 10620008 beq r3,r2,0x00133b80 #If RH Equipment is valid /Else Branch if RH Equipment invalid |
− | 00133b78: 0804cee5 j 0x00133b94 | + | 00133b60: a6200010 sh r0,0x0010(r17) #Store 0 to Billboard 2 hands flag |
− | 00133b7c: 00628024 and r16,r3,r2 | + | 00133b64: 86220026 lh r2,0x0026(r17) #r2 = LH Equipment |
− | 00133b80: 86220026 lh r2,0x0026(r17) | + | 00133b68: 00000000 nop # |
− | 00133b84: 00000000 nop | + | 00133b6c: 00021027 nor r2,r0,r2 #r2 = 0 if LH Equipment is NOT 0? |
− | 00133b88: 10430002 beq r2,r3,0x00133b94 | + | 00133b70: 2c420001 sltiu r2,r2,0x0001 #r2 = 0 if LH Equipment is 0? |
− | 00133b8c: 00000000 nop | + | 00133b74: 00021023 subu r2,r0,r2 #r2 = 0 if LH Equipment is 0, -1 if LH Equipment is NOT 0? |
− | 00133b90: 00408021 addu r16,r2,r0 | + | 00133b78: 0804cee5 j 0x00133b94 #Jump past LH section below |
− | 00133b94: 12000017 beq r16,r0,0x00133bf4 | + | 00133b7c: 00628024 and r16,r3,r2 #r16 = bit ANDed both equips? (0 only if both are 0?) |
− | 00133b98: 00000000 nop | + | 00133b80: 86220026 lh r2,0x0026(r17) #r2 = LH Equipment |
− | 00133b9c: 0c016a21 jal 0x0005a884 | + | 00133b84: 00000000 nop # |
− | 00133ba0: 02002021 addu r4,r16,r0 | + | 00133b88: 10430002 beq r2,r3,0x00133b94 #If RH Equipment ≠ LH Equipment /Else Branch if LH equip = RH Equipment |
− | 00133ba4: 90420003 lbu r2,0x0003(r2) | + | 00133b8c: 00000000 nop # |
− | 00133ba8: 00000000 nop | + | 00133b90: 00408021 addu r16,r2,r0 #r16 = LH equip |
− | 00133bac: 30420080 andi r2,r2,0x0080 | + | 00133b94: 12000017 beq r16,r0,0x00133bf4 #If Both RH and LH Equipment are the same? /Else Branch |
− | 00133bb0: 10400010 beq r2,r0,0x00133bf4 | + | 00133b98: 00000000 nop # |
− | 00133bb4: 001010c0 sll r2,r16,0x03 | + | 00133b9c: 0c016a21 jal 0x0005a884 #[[Get Item Data Pointer]] |
− | 00133bb8: 3c018006 lui r1,0x8006 | + | 00133ba0: 02002021 addu r4,r16,r0 #r4 = Item ID of 2 Handed Weapon? |
− | 00133bbc: 00220821 addu r1,r1,r2 | + | 00133ba4: 90420003 lbu r2,0x0003(r2) #r2 = Item Type |
− | 00133bc0: 90233ab9 lbu r3,0x3ab9(r1) | + | 00133ba8: 00000000 nop # |
− | 00133bc4: 00000000 nop | + | 00133bac: 30420080 andi r2,r2,0x0080 #r2 = 0x80 (Weapon flag) |
− | 00133bc8: 30620001 andi r2,r3,0x0001 | + | 00133bb0: 10400010 beq r2,r0,0x00133bf4 #If Weapon /Else Branch if not weapon |
− | 00133bcc: 14400008 bne r2,r0,0x00133bf0 | + | 00133bb4: 001010c0 sll r2,r16,0x03 #Item ID * 8 |
− | 00133bd0: 34020001 ori r2,r0,0x0001 | + | 00133bb8: 3c018006 lui r1,0x8006 # |
− | 00133bd4: 92820091 lbu r2,0x0091(r20) | + | 00133bbc: 00220821 addu r1,r1,r2 # |
− | 00133bd8: 00000000 nop | + | 00133bc0: 90233ab9 lbu r3,0x3ab9(r1) #Weapon Attack flags |
− | 00133bdc: 30420002 andi r2,r2,0x0002 | + | 00133bc4: 00000000 nop # |
− | 00133be0: 10400004 beq r2,r0,0x00133bf4 | + | 00133bc8: 30620001 andi r2,r3,0x0001 #Forced 2 Hands check |
− | 00133be4: 30620004 andi r2,r3,0x0004 | + | 00133bcc: 14400008 bne r2,r0,0x00133bf0 #If Item is not Forced 2 Hands /Else Branch if Forced 2 Hands |
− | 00133be8: 10400002 beq r2,r0,0x00133bf4 | + | 00133bd0: 34020001 ori r2,r0,0x0001 #r2 = 1 |
− | 00133bec: 34020001 ori r2,r0,0x0001 | + | 00133bd4: 92820091 lbu r2,0x0091(r20) #r2 = Unit's Support Abilities 3 |
− | 00133bf0: a6220010 sh r2,0x0010(r17) | + | 00133bd8: 00000000 nop # |
− | 00133bf4: 3c108015 lui r16,0x8015 | + | 00133bdc: 30420002 andi r2,r2,0x0002 #2 Hands check |
− | 00133bf8: 2610d148 addiu r16,r16,0xd148 | + | 00133be0: 10400004 beq r2,r0,0x00133bf4 #If 2 Hands Support Ability equipped /Else Branch if 2 hands not equipped |
− | 00133bfc: 0c04cd5a jal 0x00133568 | + | 00133be4: 30620004 andi r2,r3,0x0004 #Item 2 Hands check (can be 2 Hands'd) |
− | 00133c00: 02002021 addu r4,r16,r0 | + | 00133be8: 10400002 beq r2,r0,0x00133bf4 #If Weapin can be 2 Hands'd /Else Branch if cannot |
− | 00133c04: 3c118015 lui r17,0x8015 | + | 00133bec: 34020001 ori r2,r0,0x0001 #r2 = 1 |
− | 00133c08: 2631d15c addiu r17,r17,0xd15c | + | 00133bf0: a6220010 sh r2,0x0010(r17) # #Store 2 Hands to Billboard |
− | 00133c0c: 0c04cd5a jal 0x00133568 | + | 00133bf4: 3c108015 lui r16,0x8015 # |
− | 00133c10: 02202021 addu r4,r17,r0 | + | 00133bf8: 2610d148 addiu r16,r16,0xd148 #r16 = 0x8015d148 (Unit Name?) |
− | 00133c14: 3c128015 lui r18,0x8015 | + | 00133bfc: 0c04cd5a jal 0x00133568 #[[00133568 - 00133584]] Initialize data Set for name storing |
− | 00133c18: 2652d120 addiu r18,r18,0xd120 | + | 00133c00: 02002021 addu r4,r16,r0 #r4 = r16 (input) |
− | 00133c1c: 0c04cd5a jal 0x00133568 | + | 00133c04: 3c118015 lui r17,0x8015 # |
− | 00133c20: 02402021 addu r4,r18,r0 | + | 00133c08: 2631d15c addiu r17,r17,0xd15c #r17 = 0x8015d15c (Job Name initialising?) |
− | 00133c24: 3c138015 lui r19,0x8015 | + | 00133c0c: 0c04cd5a jal 0x00133568 #[[00133568 - 00133584]] |
− | 00133c28: 2673d134 addiu r19,r19,0xd134 | + | 00133c10: 02202021 addu r4,r17,r0 #r4 = r17 (input) |
− | 00133c2c: 0c04cd5a jal 0x00133568 | + | 00133c14: 3c128015 lui r18,0x8015 # |
− | 00133c30: 02602021 addu r4,r19,r0 | + | 00133c18: 2652d120 addiu r18,r18,0xd120 #r18 = 0x8015d120 (Primary Skillset initialisation?) |
− | 00133c34: 02002021 addu r4,r16,r0 | + | 00133c1c: 0c04cd5a jal 0x00133568 #[[00133568 - 00133584]] |
− | 00133c38: 2685012c addiu r5,r20,0x012c | + | 00133c20: 02402021 addu r4,r18,r0 #r4 = r18 (input) |
− | 00133c3c: 0c052fd5 jal 0x0014bf54 | + | 00133c24: 3c138015 lui r19,0x8015 # |
− | 00133c40: 34060010 ori r6,r0,0x0010 | + | 00133c28: 2673d134 addiu r19,r19,0xd134 #r19 = 0x8015d134 (Secondary Skillset initialisation?) |
− | 00133c44: 02202021 addu r4,r17,r0 | + | 00133c2c: 0c04cd5a jal 0x00133568 #[[00133568 - 00133584]] |
− | 00133c48: 2685013c addiu r5,r20,0x013c | + | 00133c30: 02602021 addu r4,r19,r0 #r4 = r19 (input) |
− | 00133c4c: 0c052fd5 jal 0x0014bf54 | + | 00133c34: 02002021 addu r4,r16,r0 #r4 = r16 (Unit Name pointer?) |
− | 00133c50: 34060010 ori r6,r0,0x0010 | + | 00133c38: 2685012c addiu r5,r20,0x012c #r5 = Unit Nickname |
− | 00133c54: 02402021 addu r4,r18,r0 | + | 00133c3c: 0c052fd5 jal 0x0014bf54 #[[Copy Bytes (0x14bf54)]] - Store Unit Nickname |
− | 00133c58: 2685014c addiu r5,r20,0x014c | + | 00133c40: 34060010 ori r6,r0,0x0010 #r6 = 0x10 (16 characters) |
− | 00133c5c: 0c052fd5 jal 0x0014bf54 | + | 00133c44: 02202021 addu r4,r17,r0 #r4 = r17 (Job Name pointer?) |
− | 00133c60: 34060010 ori r6,r0,0x0010 | + | 00133c48: 2685013c addiu r5,r20,0x013c #r5 = Unit Job Nickname |
− | 00133c64: 02602021 addu r4,r19 | + | 00133c4c: 0c052fd5 jal 0x0014bf54 #[[Copy Bytes (0x14bf54)]] - Store Job Nickname |
− | + | 00133c50: 34060010 ori r6,r0,0x0010 #r6 = 0x10 (16 characters) | |
− | + | 00133c54: 02402021 addu r4,r18,r0 #r4 = r18 (Primary Skillset pointer?) | |
− | + | 00133c58: 2685014c addiu r5,r20,0x014c #r5 = Primary Skillset Name | |
− | 00133c74: 8fbf0034 lw r31,0x0034(r29) | + | 00133c5c: 0c052fd5 jal 0x0014bf54 #[[Copy Bytes (0x14bf54)]] - Store Primary Skillset Name |
− | 00133c78: 8fb40030 lw r20,0x0030(r29) | + | 00133c60: 34060010 ori r6,r0,0x0010 #r6 = 0x10 (16 characters) |
− | 00133c7c: 8fb3002c lw r19,0x002c(r29) | + | 00133c64: 02602021 addu r4,r19,r0 #r4 = r19 (Secondary Skillset pointer?) |
− | 00133c80: 8fb20028 lw r18,0x0028(r29) | + | 00133c68: 26850154 addiu r5,r20,0x0154 #r5 = Secondary Skillset Name |
− | 00133c84: 8fb10024 lw r17,0x0024(r29) | + | 00133c6c: 0c052fd5 jal 0x0014bf54 #[[Copy Bytes (0x14bf54)]] - Store Secondary Skillset Name |
− | 00133c88: 8fb00020 lw r16,0x0020(r29) | + | 00133c70: 34060010 ori r6,r0,0x0010 #r6 = 0x10 (16 characters) |
− | 00133c8c: 27bd0038 addiu r29,r29,0x0038 | + | 00133c74: 8fbf0034 lw r31,0x0034(r29) # |
− | 00133c90: 03e00008 jr r31 | + | 00133c78: 8fb40030 lw r20,0x0030(r29) # |
− | 00133c94: 00000000 nop | + | 00133c7c: 8fb3002c lw r19,0x002c(r29) # |
− | + | 00133c80: 8fb20028 lw r18,0x0028(r29) # | |
+ | 00133c84: 8fb10024 lw r17,0x0024(r29) # | ||
+ | 00133c88: 8fb00020 lw r16,0x0020(r29) # | ||
+ | 00133c8c: 27bd0038 addiu r29,r29,0x0038 # | ||
+ | 00133c90: 03e00008 jr r31 # | ||
+ | 00133c94: 00000000 nop # |
Latest revision as of 13:25, 14 April 2025
DUPLICATED : Store_units_small_in_battle_display_data 00133754: 3c048015 lui r4,0x8015 # 00133758: 8484d09a lh r4,-0x2f66(r4) #r4 = 0x8014d09a (hit % data (for display?)) 0013375c: 27bdffc8 addiu r29,r29,0xffc8 # 00133760: afbf0034 sw r31,0x0034(r29) # 00133764: afb40030 sw r20,0x0030(r29) # 00133768: afb3002c sw r19,0x002c(r29) # 0013376c: afb20028 sw r18,0x0028(r29) # 00133770: afb10024 sw r17,0x0024(r29) # 00133774: 0c0602bf jal 0x00180afc #Get Unit's Data Pointer for Unit ID at 0x8014d09a 00133778: afb00020 sw r16,0x0020(r29) # 0013377c: 0040a021 addu r20,r2,r0 #r20 = Unit Pointer 00133780: 3c118015 lui r17,0x8015 # 00133784: 2631d0a0 addiu r17,r17,0xd0a0 #r17 = 0x8014d0a0 (Billboard data) 00133788: 12800005 beq r20,r0,0x001337a0 #If unit exists /Else Branch if Unit doesn't exist 0013378c: 00000000 nop # 00133790: 3c058015 lui r5,0x8015 # 00133794: 24a5d05c addiu r5,r5,0xd05c #r5 = 0x8014d05c (start of display data) 00133798: 0c04cd62 jal 0x00133588 #Store level,exp, HP/MP hardcoding, store CT 0013379c: 02802021 addu r4,r20,r0 #r4 = Unit Pointer 001337a0: 3c048015 lui r4,0x8015 # 001337a4: 8484d08a lh r4,-0x2f76(r4) #r4 = 0x8014d08a 001337a8: 0c0602bf jal 0x00180afc #Get Unit's Data Pointer for Unit ID at 0x8014d08a 001337ac: 00000000 nop # 001337b0: 0040a021 addu r20,r2,r0 #r20 = New Unit Pointer 001337b4: 1280012f beq r20,r0,0x00133c74 #If Unit exists /Else Branch to END if Unit doesn't exist 001337b8: 00000000 nop # 001337bc: 3c058015 lui r5,0x8015 # 001337c0: 24a5d038 addiu r5,r5,0xd038 #r5 = 0x8014d038 (pre attack display) 001337c4: 0c04cd62 jal 0x00133588 #Store level,exp, HP/MP hardcoding, store CT 001337c8: 02802021 addu r4,r20,r0 #r4 = Unit Pointer 001337cc: 92820003 lbu r2,0x0003(r20) #r2 = Job ID 001337d0: 3c018015 lui r1,0x8015 # 001337d4: a422d082 sh r2,-0x2f7e(r1) #Store Job ID at 0x8014d082 001337d8: 92820024 lbu r2,0x0024(r20) #r2 = Brave 001337dc: 3c018015 lui r1,0x8015 # 001337e0: a422d084 sh r2,-0x2f7c(r1) #Store brave at 0x8014d084 001337e4: 92820026 lbu r2,0x0026(r20) #r2 = Faith 001337e8: 3c018015 lui r1,0x8015 # 001337ec: a422d086 sh r2,-0x2f7a(r1) #Store Faith at 0x8014d086 001337f0: 96820008 lhu r2,0x0008(r20) #r2 = Birthday + Zodiac 001337f4: 00000000 nop # 001337f8: 00021302 srl r2,r2,0x0c #Isolate Zodiac 001337fc: 3c018015 lui r1,0x8015 # 00133800: a422d088 sh r2,-0x2f78(r1) #Store Zodiac at 0x8014d088 00133804: 9282003a lbu r2,0x003a(r20) #r2 = Move 00133808: 00000000 nop # 0013380c: a6220000 sh r2,0x0000(r17) #Store Move at 0x8014d0a0 (Billboard data) 00133810: 92820038 lbu r2,0x0038(r20) #r2 = Speed 00133814: 3c018015 lui r1,0x8015 # 00133818: a422d0a2 sh r2,-0x2f5e(r1) #Store Speed at 0x8014d0a2 0013381c: 9282003b lbu r2,0x003b(r20) #r2 = Jump 00133820: 3c018015 lui r1,0x8015 # 00133824: a422d0a4 sh r2,-0x2f5c(r1) #Store Jump at 0x8014d0a4 00133828: 9282003e lbu r2,0x003e(r20) #r2 = Weapon 1 Evade 0013382c: 3c018015 lui r1,0x8015 # 00133830: a422d0aa sh r2,-0x2f56(r1) #Store W1-Ev% at 0x8014d0aa 00133834: 9282003f lbu r2,0x003f(r20) #r2 = Weapon 2 Evade 00133838: 3c018015 lui r1,0x8015 # 0013383c: a422d0ac sh r2,-0x2f54(r1) #Store W2-Ev% at 0x8014d0ac 00133840: 9282003c lbu r2,0x003c(r20) #r2 = WP 1 00133844: 3c018015 lui r1,0x8015 # 00133848: a422d0a6 sh r2,-0x2f5a(r1) #Store WP 1 at 0x8014d0a6 0013384c: 9282003d lbu r2,0x003d(r20) #r2 = WP 2 00133850: 3c018015 lui r1,0x8015 # 00133854: a422d0a8 sh r2,-0x2f58(r1) #Store WP 2 at 0x8014d0a8 00133858: 92820036 lbu r2,0x0036(r20) #r2 = PA 0013385c: 3c018015 lui r1,0x8015 # 00133860: a422d0b2 sh r2,-0x2f4e(r1) #Store PA at 0x8014d0b2 00133864: 92820043 lbu r2,0x0043(r20) #r2 = P-C-Ev% (Physical Class Evasion) 00133868: 3c018015 lui r1,0x8015 # 0013386c: a422d0b4 sh r2,-0x2f4c(r1) #Store P-C-Ev% at 0x8014d0b4 00133870: 92820041 lbu r2,0x0041(r20) #r2 = RH P-S-Ev% 00133874: 3c018015 lui r1,0x8015 # 00133878: a422d0b6 sh r2,-0x2f4a(r1) #Store P-S-Ev% at 0x8014d0b6 0013387c: 92830041 lbu r3,0x0041(r20) #r3 = RH P-S-Ev% 00133880: 92820042 lbu r2,0x0042(r20) #r2 = LH P-S-Ev% 00133884: 00000000 nop # 00133888: 0043102b sltu r2,r2,r3 #Compare LH and RH P-S-Ev% 0013388c: 14400004 bne r2,r0,0x001338a0 #If LH P-S-Ev% is higher than RH P-S-Ev% /Else Branch if RH Shield has higher Ev% 00133890: 00000000 nop # 00133894: 92820042 lbu r2,0x0042(r20) #r2 = LH P-S-Ev% 00133898: 3c018015 lui r1,0x8015 # 0013389c: a422d0b6 sh r2,-0x2f4a(r1) #Store P-S-Ev% at 0x8014d0b6 001338a0: 92820040 lbu r2,0x0040(r20) #r2 = P-A-Ev% 001338a4: 3c018015 lui r1,0x8015 # 001338a8: a422d0b8 sh r2,-0x2f48(r1) #Store P-A-Ev% at 0x8014d0b8 001338ac: 92820037 lbu r2,0x0037(r20) #r2 = MA 001338b0: 3c018015 lui r1,0x8015 # 001338b4: a420d0be sh r0,-0x2f42(r1) #Store 0 M-C-Ev% at 0x8014d0be 001338b8: 3c018015 lui r1,0x8015 # 001338bc: a422d0bc sh r2,-0x2f44(r1) #Store MA at 0x8014d0bc 001338c0: 92820045 lbu r2,0x0045(r20) #r2 = RH M-S-Ev% 001338c4: 3c018015 lui r1,0x8015 # 001338c8: a422d0c0 sh r2,-0x2f40(r1) #Store RH M-S-Ev% at 0x8014d0c0 001338cc: 92830045 lbu r3,0x0045(r20) #r3 = RH M-S-Ev% 001338d0: 92820046 lbu r2,0x0046(r20) #r2 = LH M-S-Ev% 001338d4: 00000000 nop # 001338d8: 0043102b sltu r2,r2,r3 #Compare LH and RH M-S-Ev% 001338dc: 14400004 bne r2,r0,0x001338f0 #If LH M-S-Ev% is higher than RH M-S-Ev% /Else Branch if RH shield has higher Ev% 001338e0: 34040004 ori r4,r0,0x0004 #r4 = 4 (counter) 001338e4: 92820046 lbu r2,0x0046(r20) #r2 = LH M-S-Ev% 001338e8: 3c018015 lui r1,0x8015 # 001338ec: a422d0c0 sh r2,-0x2f40(r1) #Store LH M-S-Ev% 0x8014d0c0 001338f0: 92820044 lbu r2,0x0044(r20) #r2 = M-A-Ev% 001338f4: 26230008 addiu r3,r17,0x0008 #r3 = r17 + 8 (Billboard + 8) 001338f8: 3c018015 lui r1,0x8015 # 001338fc: a422d0c2 sh r2,-0x2f3e(r1) #Store M-A-Ev% 0x8014d0c2 #Loop start 00133900: a4600024 sh r0,0x0024(r3) #Store 0 at Billboard location (first at Billboard data 2c, then cycle through all equipment?) 00133904: 2484ffff addiu r4,r4,0xffff #Subtract 1 from r4 (counter--) 00133908: 0481fffd bgez r4,0x00133900 #Loop 4 times? (clearWP 1, WP 2, Jump, Speed, moveequipment) 0013390c: 2463fffe addiu r3,r3,0xfffe #Subtract 2 from r3 (previous Billboard data slot) 00133910: 92820006 lbu r2,0x0006(r20) #r2 = Unit Gender 00133914: 00000000 nop # 00133918: 30420020 andi r2,r2,0x0020 #Monster check 0013391c: 1440001e bne r2,r0,0x00133998 #If Human /Else Branch if not human (monsters cannot wear things) 00133920: 340200ff ori r2,r0,0x00ff #r2 = 0xFF 00133924: 9283001d lbu r3,0x001d(r20) #r3 = RH Weapon 00133928: 00000000 nop # 0013392c: 10620004 beq r3,r2,0x00133940 #If RH has valid Weapon /Else Branch if right hand is actually Shield 00133930: 00000000 nop # 00133934: 9282001d lbu r2,0x001d(r20) #r2 = RH Weapon 00133938: 0804ce53 j 0x0013394c #Jump to LH Equipment 0013393c: a6220024 sh r2,0x0024(r17) #Store RH Weapon as RH Equipment 00133940: 9282001e lbu r2,0x001e(r20) #r2 = RH Shield 00133944: 00000000 nop # 00133948: a6220024 sh r2,0x0024(r17) #Store RH Shield as RH Equipment 0013394c: 9283001f lbu r3,0x001f(r20) #r3 = LH weapon 00133950: 340200ff ori r2,r0,0x00ff #r2 = 0xFF 00133954: 10620004 beq r3,r2,0x00133968 #If LH has valid Weapon /Else Branch if left hand is actually Shield 00133958: 00000000 nop # 0013395c: 9282001f lbu r2,0x001f(r20) #r2 = LH Weapon 00133960: 0804ce5d j 0x00133974 #Jump to Helmet Equipment 00133964: a6220026 sh r2,0x0026(r17) #Store LH weapon as LH Equipment 00133968: 92820020 lbu r2,0x0020(r20) #r2 = LH shield 0013396c: 00000000 nop # 00133970: a6220026 sh r2,0x0026(r17) #Store LH shield as LH Equipment 00133974: 9282001a lbu r2,0x001a(r20) #r2 = Helmet 00133978: 00000000 nop # 0013397c: a6220028 sh r2,0x0028(r17) #Store Helmet 00133980: 9282001b lbu r2,0x001b(r20) #r2 = Armor 00133984: 00000000 nop # 00133988: a622002a sh r2,0x002a(r17) #Store Armor 0013398c: 9282001c lbu r2,0x001c(r20) #r2 = Accessory 00133990: 00000000 nop # 00133994: a622002c sh r2,0x002c(r17) #Store Accessory 00133998: 00002021 addu r4,r0,r0 #r4 = 0 (counter) 0013399c: 340600ff ori r6,r0,0x00ff #r6 = 0xFF 001339a0: 2405ffff addiu r5,r0,0xffff #r5 = -1 001339a4: 02201821 addu r3,r17,r0 #r3 = Billboard #Loop Start 001339a8: 84620024 lh r2,0x0024(r3) #r2 = Equipment 001339ac: 00000000 nop # 001339b0: 10400003 beq r2,r0,0x001339c0 #If not empty /Else Branch if null 001339b4: 00000000 nop # 001339b8: 14460002 bne r2,r6,0x001339c4 #If FF /Else Branch if not FF 001339bc: 00000000 nop # 001339c0: a4650024 sh r5,0x0024(r3) # #Store no item in Equipment slot 001339c4: 24840001 addiu r4,r4,0x0001 #Add 1 to r4 (counter++) 001339c8: 28820005 slti r2,r4,0x0005 #Compare r4 counter to 5 001339cc: 1440fff6 bne r2,r0,0x001339a8 #loop 5 times 001339d0: 24630002 addiu r3,r3,0x0002 #Add 2 to r3 (Move to next Billboard slot) 001339d4: a620000e sh r0,0x000e(r17) #Primary Skillset on Billboard = 0 001339d8: 92820012 lbu r2,0x0012(r20) #r2 = Unit's Primary Skillset 001339dc: 00000000 nop # 001339e0: 24420050 addiu r2,r2,0x0050 #r2 = Unit's Primary Skillset + 0x50 001339e4: 304200ff andi r2,r2,0x00ff #Isolate last 2 bits (Generic Monster = Skillset - 0xb0; otherwise = Skillset + 0x50) 001339e8: 2c420030 sltiu r2,r2,0x0030 #Compare to 0x30 (True if Skillset is Generic Monster) 001339ec: 10400002 beq r2,r0,0x001339f8 #If Generic Monster /Else Branch if Not Generic Monster 001339f0: 34020001 ori r2,r0,0x0001 #r2 = 1 001339f4: a622000e sh r2,0x000e(r17) #Store Primary Skillset on Billboard = 1 (Attack) 001339f8: 8622000e lh r2,0x000e(r17) #r2 = Primary Skillset on Billboard 001339fc: 00000000 nop # 00133a00: 10400030 beq r2,r0,0x00133ac4 #If Generic Monster Skillset /Else Branch if not Generic Monster Skillset 00133a04: 00000000 nop # 00133a08: 92840012 lbu r4,0x0012(r20) #r4 = Unit's Primary Skillset 00133a0c: 0c01698e jal 0x0005a638 #Store Skillset's Abilities 00133a10: 34050001 ori r5,r0,0x0001 #r5 = 1 (Check Active Abilities, not RSM) 00133a14: 00402821 addu r5,r2,r0 #r5 = Temporary Ability List Pointer 00133a18: 00002021 addu r4,r0,r0 #r4 = 0 (counter) 00133a1c: 02201821 addu r3,r17,r0 #r3 = Billboard #Loop Start 00133a20: 94a20000 lhu r2,0x0000(r5) #r2 = First Ability ID 00133a24: 24a50002 addiu r5,r5,0x0002 #Add 2 to r5 (Go to next Ability Pointer) 00133a28: 24840001 addiu r4,r4,0x0001 #Add 1 to r4 (counter++) 00133a2c: a462002e sh r2,0x002e(r3) #Store Ability to 1st Monster Ability Slot on Billboard 00133a30: 28820005 slti r2,r4,0x0005 #Compare counter to 5 00133a34: 1440fffa bne r2,r0,0x00133a20 #Loop 5 times 00133a38: 24630002 addiu r3,r3,0x0002 #Add 2 to r3 (Move to next Billboard slot) 00133a3c: 3c028018 lui r2,0x8018 # 00133a40: 24422430 addiu r2,r2,0x2430 #r2 = 0x80182430 (prep call routine Monster Skill check prep) 00133a44: 3c018017 lui r1,0x8017 # 00133a48: ac223ca8 sw r2,0x3ca8(r1) #store thread 00133a4c: 0c0533ad jal 0x0014ceb4 #Call Inner Subroutine perform monster skill check prep (why call it this way?) 00133a50: 02802021 addu r4,r20,r0 #r4 = Unit Data Pointer 00133a54: 14400002 bne r2,r0,0x00133a60 #If Monster Skill not active /Else Branch if beast master adjacent 00133a58: 00002021 addu r4,r0,r0 #r4 = 0 (ability counter) 00133a5c: a6200034 sh r0,0x0034(r17) #Store no 4th monster ability (Monster Skill-only ability slot) 00133a60: 00008021 addu r16,r0,r0 #r16 = 0 (Loop counter) 00133a64: 02203021 addu r6,r17,r0 #r6 = Billboard 00133a68: 02202821 addu r5,r17,r0 #r5 = Billboard #Loop Start 00133a6c: 84c2002e lh r2,0x002e(r6) #r2 = Monster Ability 00133a70: 00000000 nop # 00133a74: 10400004 beq r2,r0,0x00133a88 #If valid Ability /Else Branch if null/Attack 00133a78: 00401821 addu r3,r2,r0 #r3 = Ability ID 00133a7c: a4a3002e sh r3,0x002e(r5) #Store to Billboard 00133a80: 24a50002 addiu r5,r5,0x0002 #Add 2 to r5 (Move to next Billboard slot) 00133a84: 24840001 addiu r4,r4,0x0001 #Add 1 to r4 (Ability counter++) 00133a88: 26100001 addiu r16,r16,0x0001 #Add 1 to r16 (Loop counter++) 00133a8c: 2a020005 slti r2,r16,0x0005 #Compare Loop counter to 5 00133a90: 1440fff6 bne r2,r0,0x00133a6c #Loop 4 times 00133a94: 24c60002 addiu r6,r6,0x0002 #Add 2 to r6 (Move to next Billboard slot) 00133a98: 28820005 slti r2,r4,0x0005 #Compare Ability counter to 5 00133a9c: 10400020 beq r2,r0,0x00133b20 #If 4 or less Abilities /Else Branch if 5 or more Abilities (not possible?) 00133aa0: 00041040 sll r2,r4,0x01 #r2 = Ability counter * 2 00133aa4: 00511821 addu r3,r2,r17 #r3 = Billboard + final saved ability ID * 2 #Loop Start 00133aa8: a460002e sh r0,0x002e(r3) #Store 0 in next Billboard Ability slot 00133aac: 24840001 addiu r4,r4,0x0001 #Add 1 to r4 (Ability counter++) 00133ab0: 28820005 slti r2,r4,0x0005 #Compare Ability counter to 5 00133ab4: 1440fffc bne r2,r0,0x00133aa8 #Loop if all 5 Billboard Ability slots handled 00133ab8: 24630002 addiu r3,r3,0x0002 #Add 2 to r3 (Move to next Billboard slot) 00133abc: 0804cec9 j 0x00133b24 #Jump past non-Generic Monster Skillset stuff 00133ac0: 00002021 addu r4,r0,r0 #r4 = 0 00133ac4: 92820012 lbu r2,0x0012(r20) #r2 = Unit's Primary Skillset 00133ac8: 00000000 nop # 00133acc: 14400004 bne r2,r0,0x00133ae0 #If Unit's Primary Skillset = 0 /Else Branch if Primary Skillset ≠ 0 (Attack) 00133ad0: a622002e sh r2,0x002e(r17) #Store Primary Skillset to Billboard 00133ad4: 340200fe ori r2,r0,0x00fe #r2 = 0xFE (Random?) 00133ad8: 3c018015 lui r1,0x8015 # 00133adc: a022d120 sb r2,-0x2ee0(r1) #Store 0xFE Skillset at 0x8014d120 if Primary Skillset is null 00133ae0: 92820013 lbu r2,0x0013(r20) #r2 = Secondary Skillset 00133ae4: 00000000 nop # 00133ae8: 14400004 bne r2,r0,0x00133afc #If Unit's Secondary Skillset = 0 /Else Branch if Secondary Skillset ≠ 0 (Attack) 00133aec: a6220030 sh r2,0x0030(r17) #Store Secondary Skillset to Billboard 00133af0: 340200fe ori r2,r0,0x00fe #r2 = 0xFE (Random?) 00133af4: 3c018015 lui r1,0x8015 # 00133af8: a022d135 sb r2,-0x2ecb(r1) #Store 0xFE Skillset at 0x8014d135 if Secondary Skillset is null 00133afc: 96820014 lhu r2,0x0014(r20) #r2 = Unit's Reaction 00133b00: 00000000 nop # 00133b04: a6220032 sh r2,0x0032(r17) #Store Reaction to Billboard 00133b08: 96820016 lhu r2,0x0016(r20) #r2 = Unit's Support 00133b0c: 00000000 nop # 00133b10: a6220034 sh r2,0x0034(r17) #Store Support to Billboard 00133b14: 96820018 lhu r2,0x0018(r20) #r2 = Unit's Movement 00133b18: 00000000 nop # 00133b1c: a6220036 sh r2,0x0036(r17) #Store Movement to Billboard 00133b20: 00002021 addu r4,r0,r0 #r4 = 0 (counter) 00133b24: 02202821 addu r5,r17,r0 #r5 = Billboard #Loop Start 00133b28: 84a2002e lh r2,0x002e(r5) #r2 = Billboard Skillset/Ability Data 00133b2c: 00000000 nop # 00133b30: 14400003 bne r2,r0,0x00133b40 #If Skillset/Ability = 0 /Else Branch if not 0 00133b34: 00401821 addu r3,r2,r0 #r3 = Billboard Skillset/Ability Data 00133b38: 2462ffff addiu r2,r3,0xffff #r2 = -1 00133b3c: a4a2002e sh r2,0x002e(r5) #Store -1 on Billboard 00133b40: 24840001 addiu r4,r4,0x0001 #Add 1 to r4 (counter++) 00133b44: 28820005 slti r2,r4,0x0005 #Compare counter to 5 00133b48: 1440fff7 bne r2,r0,0x00133b28 #Loop 4 times 00133b4c: 24a50002 addiu r5,r5,0x0002 #Add 2 to r5 (Move to next Billboard slot) 00133b50: 00008021 addu r16,r0,r0 #r16 = 0 (counter) 00133b54: 86230024 lh r3,0x0024(r17) #r3 = RH Equipment 00133b58: 2402ffff addiu r2,r0,0xffff #r2 = -1 00133b5c: 10620008 beq r3,r2,0x00133b80 #If RH Equipment is valid /Else Branch if RH Equipment invalid 00133b60: a6200010 sh r0,0x0010(r17) #Store 0 to Billboard 2 hands flag 00133b64: 86220026 lh r2,0x0026(r17) #r2 = LH Equipment 00133b68: 00000000 nop # 00133b6c: 00021027 nor r2,r0,r2 #r2 = 0 if LH Equipment is NOT 0? 00133b70: 2c420001 sltiu r2,r2,0x0001 #r2 = 0 if LH Equipment is 0? 00133b74: 00021023 subu r2,r0,r2 #r2 = 0 if LH Equipment is 0, -1 if LH Equipment is NOT 0? 00133b78: 0804cee5 j 0x00133b94 #Jump past LH section below 00133b7c: 00628024 and r16,r3,r2 #r16 = bit ANDed both equips? (0 only if both are 0?) 00133b80: 86220026 lh r2,0x0026(r17) #r2 = LH Equipment 00133b84: 00000000 nop # 00133b88: 10430002 beq r2,r3,0x00133b94 #If RH Equipment ≠ LH Equipment /Else Branch if LH equip = RH Equipment 00133b8c: 00000000 nop # 00133b90: 00408021 addu r16,r2,r0 #r16 = LH equip 00133b94: 12000017 beq r16,r0,0x00133bf4 #If Both RH and LH Equipment are the same? /Else Branch 00133b98: 00000000 nop # 00133b9c: 0c016a21 jal 0x0005a884 #Get Item Data Pointer 00133ba0: 02002021 addu r4,r16,r0 #r4 = Item ID of 2 Handed Weapon? 00133ba4: 90420003 lbu r2,0x0003(r2) #r2 = Item Type 00133ba8: 00000000 nop # 00133bac: 30420080 andi r2,r2,0x0080 #r2 = 0x80 (Weapon flag) 00133bb0: 10400010 beq r2,r0,0x00133bf4 #If Weapon /Else Branch if not weapon 00133bb4: 001010c0 sll r2,r16,0x03 #Item ID * 8 00133bb8: 3c018006 lui r1,0x8006 # 00133bbc: 00220821 addu r1,r1,r2 # 00133bc0: 90233ab9 lbu r3,0x3ab9(r1) #Weapon Attack flags 00133bc4: 00000000 nop # 00133bc8: 30620001 andi r2,r3,0x0001 #Forced 2 Hands check 00133bcc: 14400008 bne r2,r0,0x00133bf0 #If Item is not Forced 2 Hands /Else Branch if Forced 2 Hands 00133bd0: 34020001 ori r2,r0,0x0001 #r2 = 1 00133bd4: 92820091 lbu r2,0x0091(r20) #r2 = Unit's Support Abilities 3 00133bd8: 00000000 nop # 00133bdc: 30420002 andi r2,r2,0x0002 #2 Hands check 00133be0: 10400004 beq r2,r0,0x00133bf4 #If 2 Hands Support Ability equipped /Else Branch if 2 hands not equipped 00133be4: 30620004 andi r2,r3,0x0004 #Item 2 Hands check (can be 2 Hands'd) 00133be8: 10400002 beq r2,r0,0x00133bf4 #If Weapin can be 2 Hands'd /Else Branch if cannot 00133bec: 34020001 ori r2,r0,0x0001 #r2 = 1 00133bf0: a6220010 sh r2,0x0010(r17) # #Store 2 Hands to Billboard 00133bf4: 3c108015 lui r16,0x8015 # 00133bf8: 2610d148 addiu r16,r16,0xd148 #r16 = 0x8015d148 (Unit Name?) 00133bfc: 0c04cd5a jal 0x00133568 #00133568 - 00133584 Initialize data Set for name storing 00133c00: 02002021 addu r4,r16,r0 #r4 = r16 (input) 00133c04: 3c118015 lui r17,0x8015 # 00133c08: 2631d15c addiu r17,r17,0xd15c #r17 = 0x8015d15c (Job Name initialising?) 00133c0c: 0c04cd5a jal 0x00133568 #00133568 - 00133584 00133c10: 02202021 addu r4,r17,r0 #r4 = r17 (input) 00133c14: 3c128015 lui r18,0x8015 # 00133c18: 2652d120 addiu r18,r18,0xd120 #r18 = 0x8015d120 (Primary Skillset initialisation?) 00133c1c: 0c04cd5a jal 0x00133568 #00133568 - 00133584 00133c20: 02402021 addu r4,r18,r0 #r4 = r18 (input) 00133c24: 3c138015 lui r19,0x8015 # 00133c28: 2673d134 addiu r19,r19,0xd134 #r19 = 0x8015d134 (Secondary Skillset initialisation?) 00133c2c: 0c04cd5a jal 0x00133568 #00133568 - 00133584 00133c30: 02602021 addu r4,r19,r0 #r4 = r19 (input) 00133c34: 02002021 addu r4,r16,r0 #r4 = r16 (Unit Name pointer?) 00133c38: 2685012c addiu r5,r20,0x012c #r5 = Unit Nickname 00133c3c: 0c052fd5 jal 0x0014bf54 #Copy Bytes (0x14bf54) - Store Unit Nickname 00133c40: 34060010 ori r6,r0,0x0010 #r6 = 0x10 (16 characters) 00133c44: 02202021 addu r4,r17,r0 #r4 = r17 (Job Name pointer?) 00133c48: 2685013c addiu r5,r20,0x013c #r5 = Unit Job Nickname 00133c4c: 0c052fd5 jal 0x0014bf54 #Copy Bytes (0x14bf54) - Store Job Nickname 00133c50: 34060010 ori r6,r0,0x0010 #r6 = 0x10 (16 characters) 00133c54: 02402021 addu r4,r18,r0 #r4 = r18 (Primary Skillset pointer?) 00133c58: 2685014c addiu r5,r20,0x014c #r5 = Primary Skillset Name 00133c5c: 0c052fd5 jal 0x0014bf54 #Copy Bytes (0x14bf54) - Store Primary Skillset Name 00133c60: 34060010 ori r6,r0,0x0010 #r6 = 0x10 (16 characters) 00133c64: 02602021 addu r4,r19,r0 #r4 = r19 (Secondary Skillset pointer?) 00133c68: 26850154 addiu r5,r20,0x0154 #r5 = Secondary Skillset Name 00133c6c: 0c052fd5 jal 0x0014bf54 #Copy Bytes (0x14bf54) - Store Secondary Skillset Name 00133c70: 34060010 ori r6,r0,0x0010 #r6 = 0x10 (16 characters) 00133c74: 8fbf0034 lw r31,0x0034(r29) # 00133c78: 8fb40030 lw r20,0x0030(r29) # 00133c7c: 8fb3002c lw r19,0x002c(r29) # 00133c80: 8fb20028 lw r18,0x0028(r29) # 00133c84: 8fb10024 lw r17,0x0024(r29) # 00133c88: 8fb00020 lw r16,0x0020(r29) # 00133c8c: 27bd0038 addiu r29,r29,0x0038 # 00133c90: 03e00008 jr r31 # 00133c94: 00000000 nop #