AI Ability Data Setting
Jump to navigation
Jump to search
AI Ability Data Setting 00195878: 27bdffc8 addiu r29,r29,0xffc8 0019587c: afb40020 sw r20,0x0020(r29) 00195880: 0080a021 addu r20,r4,r0 r20 = Unit's Move List 00195884: afb00010 sw r16,0x0010(r29) 00195888: 3c10801a lui r16,0x801a 0019588c: 2610f3c4 addiu r16,r16,0xf3c4 00195890: 02002021 addu r4,r16,r0 r4 = AI Data Pointer? 00195894: 34050014 ori r5,r0,0x0014 Limit = 0x14 (in bytes) 00195898: afbf0030 sw r31,0x0030(r29) 0019589c: afb7002c sw r23,0x002c(r29) 001958a0: afb60028 sw r22,0x0028(r29) 001958a4: afb50024 sw r21,0x0024(r29) 001958a8: afb3001c sw r19,0x001c(r29) 001958ac: afb20018 sw r18,0x0018(r29) 001958b0: 0c066ade jal 0x 0019ab78 Word Nulling 001958b4: afb10014 sw r17,0x0014(r29) 001958b8: 26040020 addiu r4,r16,0x0020 r4 = AI Data Pointer? + 0x20 001958bc: 0c066ade jal 0x 0019ab78 Word Nulling 001958c0: 34050004 ori r5,r0,0x0004 Limit = 4 (in bytes) 001958c4: 92820002 lbu r2,0x0002(r20) Load Skillset 001958c8: 00000000 nop 001958cc: a2020000 sb r2,0x0000(r16) Store Skillset 001958d0: 96830000 lhu r3,0x0000(r20) Load Ability/Unit ID 001958d4: 3c048019 lui r4,0x8019 001958d8: 248408cc addiu r4,r4,0x08cc 001958dc: 306303ff andi r3,r3,0x03ff r3 = Ability ID 001958e0: 00608821 addu r17,r3,r0 r17 = Ability ID 001958e4: 3c01801a lui r1,0x801a 001958e8: a423f3c6 sh r3,-0x0c3a(r1) Store Ability ID (why not use r16 + 2?) 001958ec: 96820000 lhu r2,0x0000(r20) Load Ability/Unit ID 001958f0: 92830002 lbu r3,0x0002(r20) Load Skillset 001958f4: 00021400 sll r2,r2,0x10 001958f8: 0002ae83 sra r21,r2,0x1a r21 = Unit's ID 001958fc: 001510c0 sll r2,r21,0x03 Unit's ID * 8 00195900: 00551023 subu r2,r2,r21 ID * 7 00195904: 00021180 sll r2,r2,0x06 ID * 1c0 00195908: 3c018006 lui r1,0x8006 0019590c: 00230821 addu r1,r1,r3 00195910: 90375cb4 lbu r23,0x5cb4(r1) Load Skillset's Action Menu 00195914: 00449021 addu r18,r2,r4 r18 = Unit's Data Pointer 00195918: 26e3ffff addiu r3,r23,0xffff r3 = Action Menu - 1 0019591c: 2c62000a sltiu r2,r3,0x000a 00195920: 104000b7 beq r2,r0,0x 00195c00 Branch if Action Menu - 1 >= a (Defend) 00195924: 0000b021 addu r22,r0,r0 r22 = 0 00195928: 00031080 sll r2,r3,0x02 Action Menu * 4 0019592c: 3c018019 lui r1,0x8019 00195930: 00220821 addu r1,r1,r2 00195934: 8c223d48 lw r2,0x3d48(r1) Load Pointer for below 00195938: 00000000 nop 0019593c: 00400008 jr r2 00195940: 00000000 nop