Difference between revisions of "Math Skill"
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
00181f0c: 03e00008 jr r31 | 00181f0c: 03e00008 jr r31 | ||
00181f10: 00000000 nop | 00181f10: 00000000 nop | ||
+ | |||
+ | 00181f14: 27bdffe8 addiu r29,r29,0xffe8 | ||
+ | 00181f18: afbf0010 sw r31,0x0010(r29) | ||
+ | 00181f1c: 30a500ff andi r5,r5,0x00ff | ||
+ | 00181f20: 0c0607ce jal 0x 00181f38 load skillset abilities | ||
+ | 00181f24: 3407000f ori r7,r0,0x000f check for 2nd set of math skill | ||
+ | 00181f28: 8fbf0010 lw r31,0x0010(r29) | ||
+ | 00181f2c: 27bd 0018 addiu r29,r29,0x 0018 | ||
+ | 00181f30: 03e00008 jr r31 | ||
+ | 00181f34: 00000000 nop | ||
+ | |||
+ | Routine that checks math skill IDS | ||
+ | r7 = 0xf0 (1st set) or 0x0f (second set) | ||
+ | 00181f38: 27bdff40 addiu r29,r29,0xff40 | ||
+ | 00181f3c: afb300b4 sw r19,0x00b4(r29) | ||
+ | 00181f40: 00809821 addu r19,r4,r0 r19 = attacker ID | ||
+ | 00181f44: afb000a8 sw r16,0x00a8(r29) | ||
+ | 00181f48: 00c08021 addu r16,r6,r0 r16 = ability list address | ||
+ | 00181f4c: afb200b0 sw r18,0x00b0(r29) | ||
+ | 00181f50: 00009021 addu r18,r0,r0 | ||
+ | 00181f54: afb100ac sw r17,0x00ac(r29) | ||
+ | 00181f58: 00a08821 addu r17,r5,r0 r17 = skillset | ||
+ | 00181f5c: afb400b8 sw r20,0x00b8(r29) | ||
+ | 00181f60: afbf00bc sw r31,0x00bc(r29) | ||
+ | 00181f64: 0c060435 jal 0x 001810d4 Get Data Pointer | ||
+ | 00181f68: 00e0a021 addu r20,r7,r0 r20 = PV mod | ||
+ | 00181f6c: 10400005 beq r2,r0,0x 00181f84 branch if unit data pointer=0 | ||
+ | 00181f70: 322300ff andi r3,r17,0x00ff r3=skillset | ||
+ | 00181f74: 34020015 ori r2,r0,0x0015 | ||
+ | 00181f78: 10620004 beq r3,r2,0x 00181f8c branch if skillset = math skill | ||
+ | 00181f7c: 2402ffff addiu r2,r0,0xffff | ||
+ | 00181f80: a6020000 sh r2,0x0000(r16 ) store ability does not exist | ||
+ | 00181f84: 08060811 j 0x 00182044 jump to end if skillset != math skill | ||
+ | 00181f88: 00001021 addu r2,r0,r0 return r2 = 0 (fail) | ||
+ | 00181f8c: 02602021 addu r4,r19,r0 r4 = attacker ID | ||
+ | 00181f90: 27a20060 addiu r2,r29,0x0060 | ||
+ | 00181f94: afa20010 sw r2,0x0010(r29) | ||
+ | 00181f98: 27a20078 addiu r2,r29,0x0078 | ||
+ | 00181f9c: afa2 0018 sw r2,0x 0018(r29) | ||
+ | 00181fa0: 27a20090 addiu r2,r29,0x0090 | ||
+ | 00181fa4: 34050015 ori r5,r0,0x0015 | ||
+ | 00181fa8: 27a60020 addiu r6,r29,0x0020 | ||
+ | 00181fac: 27a70048 addiu r7,r29,0x0048 | ||
+ | 00181fb0: afa00014 sw r0,0x0014(r29) | ||
+ | 00181fb4: 0c0605f0 jal 0x 001817c0 Skillset Loading | ||
+ | 00181fb8: afa2001c sw r2,0x001c(r29) | ||
+ | 00181fbc: 00403021 addu r6,r2,r0 | ||
+ | 00181fc0: 10c0fff0 beq r6,r0,0x 00181f84 | ||
+ | 00181fc4: 0246102a slt r2,r18,r6 | ||
+ | 00181fc8: 1040001b beq r2,r0,0x 00182038 | ||
+ | 00181fcc: 00002821 addu r5,r0,r0 | ||
+ | 00181fd0: 3408fe62 ori r8,r0,0xfe62 | ||
+ | 00181fd4: 3c078006 lui r7,0x8006 | ||
+ | 00181fd8: 24e70eb6 addiu r7,r7,0x0eb6 ability flags | ||
+ | 00181fdc: 27a40020 addiu r4,r29,0x0020 | ||
+ | 00181fe0: 94830000 lhu r3,0x0000(r4) load ability | ||
+ | 00181fe4: 00000000 nop | ||
+ | 00181fe8: 00681021 addu r2,r3,r8 ability ID - 0x19e | ||
+ | 00181fec: 3042ffff andi r2,r2,0xffff | ||
+ | 00181ff0: 2c420008 sltiu r2,r2,0x0008 | ||
+ | 00181ff4: 1040000c beq r2,r0,0x 00182028 branch if not math skill | ||
+ | 00181ff8: 24840002 addiu r4,r4,0x0002 Temp ability list++ (stack) | ||
+ | 00181ffc: 00031400 sll r2,r3,0x10 | ||
+ | 00182000: 00021403 sra r2,r2,0x10 | ||
+ | 00182004: 00471021 addu r2,r2,r7 | ||
+ | 00182008: 90420000 lbu r2,0x0000(r2) load Arithmeticks flags? | ||
+ | 0018200c: 00000000 nop | ||
+ | 00182010: 00541024 and r2,r2,r20 | ||
+ | 00182014: 10400004 beq r2,r0,0x 00182028 branch if not 0x80 | ||
+ | 00182018: 00000000 nop | ||
+ | 0018201c: a6030000 sh r3,0x0000(r16) store ability to ability list | ||
+ | 00182020: 26100002 addiu r16,r16,0x0002 | ||
+ | 00182024: 26520001 addiu r18,r18,0x0001 | ||
+ | 00182028: 24a50001 addiu r5,r5,0x0001 | ||
+ | 0018202c: 00a6102a slt r2,r5,r6 | ||
+ | 00182030: 1440ffeb bne r2,r0,0x 00181fe0 | ||
+ | 00182034: 00000000 nop | ||
+ | 00182038: 2402ffff addiu r2,r0,0xffff | ||
+ | 0018203c: a6020000 sh r2,0x0000(r16) store next ability 0xff (cutoff) | ||
+ | 00182040: 02401021 addu r2,r18,r0 return number of abilities found | ||
+ | 00182044: 8fbf00bc lw r31,0x00bc(r29) | ||
+ | 00182048: 8fb400b8 lw r20,0x00b8(r29) | ||
+ | 0018204c: 8fb300b4 lw r19,0x00b4(r29) | ||
+ | 00182050: 8fb200b0 lw r18,0x00b0(r29) | ||
+ | 00182054: 8fb100ac lw r17,0x00ac(r29) | ||
+ | 00182058: 8fb000a8 lw r16,0x00a8(r29) | ||
+ | 0018205c: 27bd00c0 addiu r29,r29,0x00c0 | ||
+ | 00182060: 03e00008 jr r31 |
Latest revision as of 16:52, 24 February 2013
Math Skill 00181ef0: 27bdffe8 addiu r29,r29,0xffe8 00181ef4: afbf0010 sw r31,0x0010(r29) 00181ef8: 30a500ff andi r5,r5,0x00ff 00181efc: 0c0607ce jal 0x00181f38 load skillset abilities 00181f00: 340700f0 ori r7,r0,0x00f0 check for 1st set of Math Skill 00181f04: 8fbf0010 lw r31,0x0010(r29) 00181f08: 27bd0018 addiu r29,r29,0x0018 00181f0c: 03e00008 jr r31 00181f10: 00000000 nop
00181f14: 27bdffe8 addiu r29,r29,0xffe8 00181f18: afbf0010 sw r31,0x0010(r29) 00181f1c: 30a500ff andi r5,r5,0x00ff 00181f20: 0c0607ce jal 0x 00181f38 load skillset abilities 00181f24: 3407000f ori r7,r0,0x000f check for 2nd set of math skill 00181f28: 8fbf0010 lw r31,0x0010(r29) 00181f2c: 27bd 0018 addiu r29,r29,0x 0018 00181f30: 03e00008 jr r31 00181f34: 00000000 nop
Routine that checks math skill IDS r7 = 0xf0 (1st set) or 0x0f (second set) 00181f38: 27bdff40 addiu r29,r29,0xff40 00181f3c: afb300b4 sw r19,0x00b4(r29) 00181f40: 00809821 addu r19,r4,r0 r19 = attacker ID 00181f44: afb000a8 sw r16,0x00a8(r29) 00181f48: 00c08021 addu r16,r6,r0 r16 = ability list address 00181f4c: afb200b0 sw r18,0x00b0(r29) 00181f50: 00009021 addu r18,r0,r0 00181f54: afb100ac sw r17,0x00ac(r29) 00181f58: 00a08821 addu r17,r5,r0 r17 = skillset 00181f5c: afb400b8 sw r20,0x00b8(r29) 00181f60: afbf00bc sw r31,0x00bc(r29) 00181f64: 0c060435 jal 0x 001810d4 Get Data Pointer 00181f68: 00e0a021 addu r20,r7,r0 r20 = PV mod 00181f6c: 10400005 beq r2,r0,0x 00181f84 branch if unit data pointer=0 00181f70: 322300ff andi r3,r17,0x00ff r3=skillset 00181f74: 34020015 ori r2,r0,0x0015 00181f78: 10620004 beq r3,r2,0x 00181f8c branch if skillset = math skill 00181f7c: 2402ffff addiu r2,r0,0xffff 00181f80: a6020000 sh r2,0x0000(r16 ) store ability does not exist 00181f84: 08060811 j 0x 00182044 jump to end if skillset != math skill 00181f88: 00001021 addu r2,r0,r0 return r2 = 0 (fail) 00181f8c: 02602021 addu r4,r19,r0 r4 = attacker ID 00181f90: 27a20060 addiu r2,r29,0x0060 00181f94: afa20010 sw r2,0x0010(r29) 00181f98: 27a20078 addiu r2,r29,0x0078 00181f9c: afa2 0018 sw r2,0x 0018(r29) 00181fa0: 27a20090 addiu r2,r29,0x0090 00181fa4: 34050015 ori r5,r0,0x0015 00181fa8: 27a60020 addiu r6,r29,0x0020 00181fac: 27a70048 addiu r7,r29,0x0048 00181fb0: afa00014 sw r0,0x0014(r29) 00181fb4: 0c0605f0 jal 0x 001817c0 Skillset Loading 00181fb8: afa2001c sw r2,0x001c(r29) 00181fbc: 00403021 addu r6,r2,r0 00181fc0: 10c0fff0 beq r6,r0,0x 00181f84 00181fc4: 0246102a slt r2,r18,r6 00181fc8: 1040001b beq r2,r0,0x 00182038 00181fcc: 00002821 addu r5,r0,r0 00181fd0: 3408fe62 ori r8,r0,0xfe62 00181fd4: 3c078006 lui r7,0x8006 00181fd8: 24e70eb6 addiu r7,r7,0x0eb6 ability flags 00181fdc: 27a40020 addiu r4,r29,0x0020 00181fe0: 94830000 lhu r3,0x0000(r4) load ability 00181fe4: 00000000 nop 00181fe8: 00681021 addu r2,r3,r8 ability ID - 0x19e 00181fec: 3042ffff andi r2,r2,0xffff 00181ff0: 2c420008 sltiu r2,r2,0x0008 00181ff4: 1040000c beq r2,r0,0x 00182028 branch if not math skill 00181ff8: 24840002 addiu r4,r4,0x0002 Temp ability list++ (stack) 00181ffc: 00031400 sll r2,r3,0x10 00182000: 00021403 sra r2,r2,0x10 00182004: 00471021 addu r2,r2,r7 00182008: 90420000 lbu r2,0x0000(r2) load Arithmeticks flags? 0018200c: 00000000 nop 00182010: 00541024 and r2,r2,r20 00182014: 10400004 beq r2,r0,0x 00182028 branch if not 0x80 00182018: 00000000 nop 0018201c: a6030000 sh r3,0x0000(r16) store ability to ability list 00182020: 26100002 addiu r16,r16,0x0002 00182024: 26520001 addiu r18,r18,0x0001 00182028: 24a50001 addiu r5,r5,0x0001 0018202c: 00a6102a slt r2,r5,r6 00182030: 1440ffeb bne r2,r0,0x 00181fe0 00182034: 00000000 nop 00182038: 2402ffff addiu r2,r0,0xffff 0018203c: a6020000 sh r2,0x0000(r16) store next ability 0xff (cutoff) 00182040: 02401021 addu r2,r18,r0 return number of abilities found 00182044: 8fbf00bc lw r31,0x00bc(r29) 00182048: 8fb400b8 lw r20,0x00b8(r29) 0018204c: 8fb300b4 lw r19,0x00b4(r29) 00182050: 8fb200b0 lw r18,0x00b0(r29) 00182054: 8fb100ac lw r17,0x00ac(r29) 00182058: 8fb000a8 lw r16,0x00a8(r29) 0018205c: 27bd00c0 addiu r29,r29,0x00c0 00182060: 03e00008 jr r31