Difference between revisions of "Call Attack Preparation (AT list preview)"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | + | '''BATTLE.BIN''' : - Call_Attack_Preparation_(AT_list_preview) | |
− | + | ------------------------------------------------------------------------------------------ | |
− | 0017c3dc: 27bdffe0 addiu r29,r29, | + | Parameter : Pointer to Data in Battle 0x16e formating (see return location section) - AI , Battle or Misc |
− | 0017c3e0: afbf0018 sw r31,0x0018(r29) | + | Return : r2 = 0x00 if Ability has a CT |
− | 0017c3e4: afb10014 sw r17,0x0014(r29) | + | r2 = 0x01 if Ability CT = 0x00 |
− | 0017c3e8: afb00010 sw r16,0x0010(r29) | + | r2 = -0x001 if Invalid data |
− | 0017c3ec: 90830000 lbu r3,0x0000(r4) | + | ------------------------------------------------------------------------------------------ |
− | 0017c3f0: 34060001 ori r6,r0,0x0001 | + | 0017c3dc: 27bdffe0 addiu r29,r29,-0x0020 | |
− | 0017c3f4: 000310c0 sll r2,r3,0x03 | + | 0017c3e0: afbf0018 sw r31,0x0018(r29) | |
− | 0017c3f8: 00431023 subu r2,r2,r3 | + | 0017c3e4: afb10014 sw r17,0x0014(r29) | |
− | 0017c3fc: 00021180 sll r2,r2,0x06 | + | 0017c3e8: afb00010 sw r16,0x0010(r29) | |
− | 0017c400: 3c038019 lui r3,0x8019 | + | 0017c3ec: 90830000 lbu r3,0x0000(r4) |{{f/load|Active Unit ID}} |
− | 0017c404: 246308cc addiu r3,r3,0x08cc | + | 0017c3f0: 34060001 ori r6,r0,0x0001 | |
− | 0017c408: 00438821 addu r17,r2,r3 | + | 0017c3f4: 000310c0 sll r2,r3,0x03 | |
− | 0017c40c: 0c05f117 jal 0x0017c45c | + | 0017c3f8: 00431023 subu r2,r2,r3 | |
− | 0017c410: 2625016e addiu r5,r17,0x016e | + | 0017c3fc: 00021180 sll r2,r2,0x06 | |
− | 0017c414: 00408021 addu r16,r2,r0 | + | 0017c400: 3c038019 lui r3,0x8019 |{{f/std|ID * 448 (0x1c0)}} |
− | 0017c418: 34020001 ori r2,r0,0x0001 | + | 0017c404: 246308cc addiu r3,r3,0x08cc |{{f/std|<nowiki>r17 =attacker unit data</nowiki>}} |
− | 0017c41c: 16020009 bne r16,r2,0x0017c444 | + | 0017c408: 00438821 addu r17,r2,r3 |{{f/adr|Acting Unit Battle Data pointer}} |
− | 0017c420: 02001021 addu r2,r16,r0 | + | 0017c40c: 0c05f117 jal 0x0017c45c |{{f/jal|Attack_Preparation|Attack_Preparation}} {{f/std|Mimic ability usage (set CT, set Charge/Perform, set Action taken flag)}} |
− | 0017c424: 3c028019 lui r2,0x8019 | + | 0017c410: 2625016e addiu r5,r17,0x016e |{{f/std|Send Pointer}} |
− | 0017c428: 8c42f5f0 lw r2,-0x0a10(r2) | + | 0017c414: 00408021 addu r16,r2,r0 | |
− | 0017c42c: 00000000 nop | + | 0017c418: 34020001 ori r2,r0,0x0001 |{{f/std|<nowiki>r16 = 0x01 if ability CT = 0</nowiki>}} |
− | 0017c430: 14400004 bne r2,r0,0x0017c444 | + | 0017c41c: 16020009 bne r16,r2,0x0017c444 {{f/Cond|if Ability CT > 0x00}} |
− | 0017c434: 02001021 addu r2,r16,r0 | + | 0017c420: 02001021 addu r2,r16,r0 | |
− | 0017c438: 0c060f78 jal 0x00183de0 | + | 0017c424: 3c028019 lui r2,0x8019 | |
− | 0017c43c: 02202021 addu r4,r17,r0 | + | 0017c428: 8c42f5f0 lw r2,-0x0a10(r2) |{{f/load|Type of action}} |
− | 0017c440: 02001021 addu r2,r16,r0 | + | 0017c42c: 00000000 nop | |
+ | 0017c430: 14400004 bne r2,r0,0x0017c444 {{f/Cond|If Not a Reaction}} | ||
+ | 0017c434: 02001021 addu r2,r16,r0 | | ||
+ | 0017c438: 0c060f78 jal 0x00183de0 |{{f/jal|Enable/disable_acting_status|Enable/disable_acting_status}} {{f/std|Remove Charging/Performing }} | ||
+ | 0017c43c: 02202021 addu r4,r17,r0 |{{f/std|Send Battle data pointer}} | ||
+ | 0017c440: 02001021 addu r2,r16,r0 |{{f/Returns|<nowiki>0x01 if CT = 0x00 Else 0x00</nowiki>}} | ||
0017c444: 8fbf0018 lw r31,0x0018(r29) | 0017c444: 8fbf0018 lw r31,0x0018(r29) | ||
0017c448: 8fb10014 lw r17,0x0014(r29) | 0017c448: 8fb10014 lw r17,0x0014(r29) | ||
Line 33: | Line 38: | ||
0017c454: 03e00008 jr r31 | 0017c454: 03e00008 jr r31 | ||
0017c458: 00000000 nop | 0017c458: 00000000 nop | ||
− | + | ===Return locations=== | |
+ | '''BATTLE.BIN''' | ||
+ | 0007412c: [[000740d4_-_00074200]] r4 = Pointer to Misc Unit Data+ 0x15e | ||
+ | 0017e3b4: [[Calculate_Reaction_Targetting_%26_Usage]] r4 = Pointer to Unit Battle Data + 0x16e | ||
+ | 0017e740: [[Store_counter_ability%3F]] r4 = Pointer to Unit Battle Data + 0x16e | ||
+ | 0018366c: [[AT_List_Preview%3F]] r4 = ?? | ||
+ | 0019d458: [[ AI End of turn, in between turn, etc.]] r4 = Pointer to 8019f3c4 + 0x1c | ||
+ | 0019d4b8: [[ AI End of turn, in between turn, etc.]] r4 = Pointer to 8019f3c4 + 0x1c |
Latest revision as of 06:12, 28 April 2024
BATTLE.BIN : - Call_Attack_Preparation_(AT_list_preview) ------------------------------------------------------------------------------------------ Parameter : Pointer to Data in Battle 0x16e formating (see return location section) - AI , Battle or Misc Return : r2 = 0x00 if Ability has a CT r2 = 0x01 if Ability CT = 0x00 r2 = -0x001 if Invalid data ------------------------------------------------------------------------------------------ 0017c3dc: 27bdffe0 addiu r29,r29,-0x0020 | 0017c3e0: afbf0018 sw r31,0x0018(r29) | 0017c3e4: afb10014 sw r17,0x0014(r29) | 0017c3e8: afb00010 sw r16,0x0010(r29) | 0017c3ec: 90830000 lbu r3,0x0000(r4) |Active Unit ID 0017c3f0: 34060001 ori r6,r0,0x0001 | 0017c3f4: 000310c0 sll r2,r3,0x03 | 0017c3f8: 00431023 subu r2,r2,r3 | 0017c3fc: 00021180 sll r2,r2,0x06 | 0017c400: 3c038019 lui r3,0x8019 |ID * 448 (0x1c0) 0017c404: 246308cc addiu r3,r3,0x08cc |r17 =attacker unit data 0017c408: 00438821 addu r17,r2,r3 |Acting Unit Battle Data pointer 0017c40c: 0c05f117 jal 0x0017c45c |-->Attack_Preparation Mimic ability usage (set CT, set Charge/Perform, set Action taken flag) 0017c410: 2625016e addiu r5,r17,0x016e |Send Pointer 0017c414: 00408021 addu r16,r2,r0 | 0017c418: 34020001 ori r2,r0,0x0001 |r16 = 0x01 if ability CT = 0 0017c41c: 16020009 bne r16,r2,0x0017c444 #if Ability CT > 0x00 0017c420: 02001021 addu r2,r16,r0 | 0017c424: 3c028019 lui r2,0x8019 | 0017c428: 8c42f5f0 lw r2,-0x0a10(r2) |Type of action 0017c42c: 00000000 nop | 0017c430: 14400004 bne r2,r0,0x0017c444 #If Not a Reaction 0017c434: 02001021 addu r2,r16,r0 | 0017c438: 0c060f78 jal 0x00183de0 |-->Enable/disable_acting_status Remove Charging/Performing 0017c43c: 02202021 addu r4,r17,r0 |Send Battle data pointer 0017c440: 02001021 addu r2,r16,r0 |0x01 if CT = 0x00 Else 0x00 0017c444: 8fbf0018 lw r31,0x0018(r29) 0017c448: 8fb10014 lw r17,0x0014(r29) 0017c44c: 8fb00010 lw r16,0x0010(r29) 0017c450: 27bd0020 addiu r29,r29,0x0020 0017c454: 03e00008 jr r31 0017c458: 00000000 nop
Return locations
BATTLE.BIN 0007412c: 000740d4_-_00074200 r4 = Pointer to Misc Unit Data+ 0x15e 0017e3b4: Calculate_Reaction_Targetting_&_Usage r4 = Pointer to Unit Battle Data + 0x16e 0017e740: Store_counter_ability? r4 = Pointer to Unit Battle Data + 0x16e 0018366c: AT_List_Preview? r4 = ?? 0019d458: AI End of turn, in between turn, etc. r4 = Pointer to 8019f3c4 + 0x1c 0019d4b8: AI End of turn, in between turn, etc. r4 = Pointer to 8019f3c4 + 0x1c