diff --git a/include/enums.h b/include/enums.h index cba30fa447..a9656bf528 100644 --- a/include/enums.h +++ b/include/enums.h @@ -4180,6 +4180,75 @@ enum BattleSubStates { BATTLE_SUB_STATE_UNK_12E = 0x0000012E, }; +enum BattleSubStatesPlayer { + BATTLE_SUB_STATE_PLAYER_NONE = 0, + // Main menu + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_1 = 1, + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_2 = 2, + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_3 = 3, + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_4 = 4, + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_5 = 5, + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_6 = 6, + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_7 = 7, + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_8 = 8, + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_9 = 9, + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_10 = 10, + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_11 = 11, + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_12 = 12, + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_13 = 13, + BATTLE_SUB_STATE_PLAYER_MAIN_MENU_14 = 14, + // Unknown + BATTLE_SUB_STATE_PLAYER_UNKNOWN_1 = 20, + BATTLE_SUB_STATE_PLAYER_UNKNOWN_2 = 21, + BATTLE_SUB_STATE_PLAYER_UNKNOWN_3 = 22, + BATTLE_SUB_STATE_PLAYER_UNKNOWN_4 = 23, + BATTLE_SUB_STATE_PLAYER_UNKNOWN_5 = 24, + BATTLE_SUB_STATE_PLAYER_UNKNOWN_6 = 25, + // Change Member + BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_1 = 30, + BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_2 = 31, + BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_3 = 32, + BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_4 = 33, + BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_5 = 34, + BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_6 = 35, + BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_7 = 36, + // Items + BATTLE_SUB_STATE_PLAYER_ITEMS_1 = 40, + BATTLE_SUB_STATE_PLAYER_ITEMS_2 = 41, + BATTLE_SUB_STATE_PLAYER_ITEMS_3 = 42, + BATTLE_SUB_STATE_PLAYER_ITEMS_4 = 43, + BATTLE_SUB_STATE_PLAYER_ITEMS_5 = 44, + BATTLE_SUB_STATE_PLAYER_ITEMS_6 = 45, + // Star Spirits + BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_1 = 60, + BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_2 = 61, + BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_3 = 62, + BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_4 = 63, + BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_5 = 64, + BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_6 = 65, + BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_7 = 66, + // Unused + BATTLE_SUB_STATE_PLAYER_UNUSED_1 = 70, + BATTLE_SUB_STATE_PLAYER_UNUSED_2 = 71, + BATTLE_SUB_STATE_PLAYER_UNUSED_3 = 72, + BATTLE_SUB_STATE_PLAYER_UNUSED_4 = 73, + BATTLE_SUB_STATE_PLAYER_UNUSED_5 = 74, + BATTLE_SUB_STATE_PLAYER_UNUSED_6 = 75, + // Berserker + BATTLE_SUB_STATE_PLAYER_BERSERKER_1 = 100, + // Strategies + BATTLE_SUB_STATE_PLAYER_STRATEGIES_1 = 200, + BATTLE_SUB_STATE_PLAYER_STRATEGIES_2 = 201, + BATTLE_SUB_STATE_PLAYER_STRATEGIES_3 = 202, + BATTLE_SUB_STATE_PLAYER_STRATEGIES_4 = 203, + BATTLE_SUB_STATE_PLAYER_STRATEGIES_5 = 204, + BATTLE_SUB_STATE_PLAYER_STRATEGIES_6 = 205, + BATTLE_SUB_STATE_PLAYER_STRATEGIES_8 = 207, + // initialize + BATTLE_SUB_STATE_PLAYER_INIT_12C = 300, + BATTLE_SUB_STATE_PLAYER_INIT_MENU = 302, +}; + enum BattleSubStatesPartner { BATTLE_SUB_STATE_PARTNER_NONE = 0, // Main menu diff --git a/src/415D90.c b/src/415D90.c index 47b58bde31..2586c1ab22 100644 --- a/src/415D90.c +++ b/src/415D90.c @@ -1,7 +1,7 @@ #include "common.h" #include "battle/battle.h" #include "hud_element.h" -#include "pause/pause_common.h" +#include "battle/action_cmd.h" #include "sprite/npc/Goompa.h" #include "sprite/npc/BattleGoombario.h" @@ -87,9 +87,13 @@ extern HudScript HES_StarBeamDisabled; extern HudScript HES_PeachBeam; extern HudScript HES_PeachBeamDisabled; +extern HudScript HES_MoveDiamond; extern HudScript HES_MoveDiamondDisabled; +extern HudScript HES_MoveBlueOrb; extern HudScript HES_MoveBlueOrbDisabled; +extern HudScript HES_MoveGreenOrb; extern HudScript HES_MoveGreenOrbDisabled; +extern HudScript HES_MoveRedOrb; extern HudScript HES_MoveRedOrbDisabled; extern HudScript HES_GreenArrowDown; @@ -98,6 +102,7 @@ extern HudScript HES_HandPointer; extern HudScript HES_HandPointDownLoop; extern HudScript HES_HandPointLeftLoop; +extern HudScript HES_FPCost; extern HudScript HES_FPCostReduced; extern HudScript HES_FPCostReducedTwice; extern HudScript HES_POWCost; @@ -114,6 +119,8 @@ extern HudScript HES_SwapArrowRight; extern HudScript HES_SwapBackground; extern HudScript HES_SwapZ; +extern IconHudScriptPair gItemHudScripts[]; + s16 D_802AB340[] = { 28, 40 }; s16 D_802AB344[] = { 0, -2 }; @@ -2139,54 +2146,39 @@ s32 func_802A58D0(void) { void btl_init_menu_boots(void); void btl_init_menu_hammer(void); -// Some issue with the popup bss -#ifdef NON_MATCHING void btl_state_update_player_menu(void) { - BattleStatus* battleStatus = &gBattleStatus; // s6 - PlayerData* playerData = &gPlayerData; // s5 - Actor* playerActor = battleStatus->playerActor; // s7 - Actor* partnerActor = battleStatus->partnerActor; // s1 + BattleStatus* battleStatus = &gBattleStatus; + PlayerData* playerData = &gPlayerData; + Actor* playerActor = battleStatus->playerActor; + Actor* partnerActor = battleStatus->partnerActor; PopupMenu* popup = &D_802ACCD0; MoveData* moveData; - s32 s4, s8; - s32 s0; + s32 entryIdx, initialPos; s32 i; - s32 s00; - s32 s1, v0, s; + s32 submenuResult; + s32 jumpTargetCount, hammerTargetCount, jumpChance; ItemData* itemData; s32 starBeamLevel; s32 currentSubmenu; s32 currentSubmenu2; IconHudScriptPair* hudScriptPair; PartnerPopupProperties* prop; - s32 new_var; - s32 moveID; -/* - var target current - - playerData s5 s3 - i s3 s2 - &gItemTables s4 s5 - 2 at 0x9BC s2 s4 - moveData s2 s5 - hudScriptPair at 0xE70 s5 a1 -*/ switch (gBattleSubState) { - case 0: + case BATTLE_SUB_STATE_PLAYER_NONE: battleStatus->moveCategory = -1; battleStatus->selectedMoveID = 0; battleStatus->currentAttackElement = 0; if (!can_btl_state_update_switch_to_player()) { - btl_set_state(0x16); + btl_set_state(BATTLE_STATE_END_PLAYER_TURN); return; } - btl_cam_use_preset(2); + btl_cam_use_preset(BTL_CAM_PRESET_C); btl_cam_move(10); - if (!(battleStatus->flags1 & 0x100000)) { - gBattleSubState = 0x12e; + if (!(battleStatus->flags1 & BS_FLAGS1_100000)) { + gBattleSubState = BATTLE_SUB_STATE_PLAYER_INIT_MENU; } else { - gBattleSubState = 0x12c; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_INIT_12C; partnerActor->state.currentPos.x = partnerActor->homePos.x; partnerActor->state.currentPos.z = partnerActor->homePos.z; partnerActor->state.goalPos.x = playerActor->homePos.x; @@ -2195,16 +2187,16 @@ void btl_state_update_player_menu(void) { partnerActor->state.angle = 0.0f; } break; - case 0x12c: + case BATTLE_SUB_STATE_PLAYER_INIT_12C: if (partnerActor->state.moveTime != 0) { partnerActor->currentPos.x += (partnerActor->state.goalPos.x - partnerActor->currentPos.x) / partnerActor->state.moveTime; partnerActor->currentPos.z += (partnerActor->state.goalPos.z - partnerActor->currentPos.z) / partnerActor->state.moveTime; playerActor->currentPos.x += (partnerActor->state.currentPos.x - playerActor->currentPos.x) / partnerActor->state.moveTime; playerActor->currentPos.z += (partnerActor->state.currentPos.z - playerActor->currentPos.z) / partnerActor->state.moveTime; } - partnerActor->currentPos.z -= sin_rad(partnerActor->state.angle * 6.28318f / 360.0f) * 16.0f; + partnerActor->currentPos.z -= sin_rad(DEG_TO_RAD(partnerActor->state.angle)) * 16.0f; partnerActor->yaw = clamp_angle(-partnerActor->state.angle); - playerActor->currentPos.z += sin_rad(partnerActor->state.angle * 6.28318f / 360.0f) * 16.0f; + playerActor->currentPos.z += sin_rad(DEG_TO_RAD(partnerActor->state.angle)) * 16.0f; playerActor->yaw = clamp_angle(-partnerActor->state.angle); partnerActor->state.angle += 90.0f; if (partnerActor->state.moveTime != 0) { @@ -2218,161 +2210,158 @@ void btl_state_update_player_menu(void) { partnerActor->homePos.z = partnerActor->currentPos.z; playerActor->homePos.x = playerActor->currentPos.x; playerActor->homePos.z = playerActor->currentPos.z; - gBattleSubState = 0x12e; - battleStatus->flags1 &= ~0x100000; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_INIT_MENU; + battleStatus->flags1 &= ~BS_FLAGS1_100000; } break; } switch (gBattleSubState) { - case 0x12e: - gBattleStatus.flags1 |= 2; - playerActor->flags &= ~0x4000000; - playerActor->flags |= 0x8000000; + case BATTLE_SUB_STATE_PLAYER_INIT_MENU: + gBattleStatus.flags1 |= BS_FLAGS1_2; + playerActor->flags &= ~ACTOR_FLAG_4000000; + playerActor->flags |= ACTOR_FLAG_8000000; if (partnerActor != NULL) { - partnerActor->flags |= 0x4000000; - partnerActor->flags |= 0x8000000; + partnerActor->flags |= ACTOR_FLAG_4000000; + partnerActor->flags |= ACTOR_FLAG_8000000; } func_80263268(); func_80263300(); btl_init_menu_boots(); btl_init_menu_hammer(); - if (player_team_is_ability_active(playerActor, 0x15)) { - gBattleSubState = 0x64; + if (player_team_is_ability_active(playerActor, ABILITY_BERSERKER)) { + gBattleSubState = BATTLE_SUB_STATE_PLAYER_BERSERKER_1; break; } - s4 = 0; - s8 = 2; + entryIdx = 0; + initialPos = 2; if (battleStatus->unk_4C[0] < 0) { battleStatus->unk_4C[0] = 0; } battle_menu_submenuIDs[0] = 7; - battle_menu_isEnabled[0] = 1; + battle_menu_isEnabled[0] = TRUE; main_battle_menu_JumpHudScripts[0] = battle_menu_StrategiesHudScript.enabled; battle_menu_messageIDs[0] = battle_menu_centeredMessagesC[0]; - if (battleStatus->actionCommandMode != 2) { - if (gBattleStatus.flags1 & 0x2000000) { - battle_menu_messageIDs[0] = 0x1d0054; // TODO + if (battleStatus->actionCommandMode != ACTION_COMMAND_MODE_TUTORIAL) { + if (gBattleStatus.flags1 & BS_FLAGS1_2000000) { + battle_menu_messageIDs[0] = MSG_Menus_0054; } } else { - battle_menu_messageIDs[0] = 0x1d0054; + battle_menu_messageIDs[0] = MSG_Menus_0054; } - battle_menu_isMessageDisabled[s4] = 0; + battle_menu_isMessageDisabled[entryIdx] = 0; if (!(battleStatus->menuDisableFlags & 0x80)) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_StrategiesHudScript.enabled; - battle_menu_isEnabled[s4] = 0; - battle_menu_isMessageDisabled[s4] = 0x48; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_StrategiesHudScript.disabled; + battle_menu_isEnabled[entryIdx] = FALSE; + battle_menu_isMessageDisabled[entryIdx] = 0x48; } if (battleStatus->unk_4C[0] == 7) { - s8 = s4; + initialPos = entryIdx; } - s4++; + entryIdx++; if (battleStatus->menuStatus[0] >= 0) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_ItemHudScripts.enabled; - battle_menu_submenuIDs[s4] = 2; - battle_menu_isEnabled[s4] = 1; - battle_menu_messageIDs[s4] = battle_menu_centeredMessagesB[0]; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_ItemHudScripts.enabled; + battle_menu_submenuIDs[entryIdx] = 2; + battle_menu_isEnabled[entryIdx] = TRUE; + battle_menu_messageIDs[entryIdx] = battle_menu_centeredMessagesB[0]; if(battleStatus->menuStatus[0] == 0) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_ItemHudScripts.disabled; - battle_menu_isEnabled[s4] = 0; - battle_menu_isMessageDisabled[s4] = 0x45; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_ItemHudScripts.disabled; + battle_menu_isEnabled[entryIdx] = FALSE; + battle_menu_isMessageDisabled[entryIdx] = 0x45; } if (!(battleStatus->menuDisableFlags & 0x4)) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_ItemHudScripts.disabled; - battle_menu_isEnabled[s4] = 0; - battle_menu_isMessageDisabled[s4] = 0x48; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_ItemHudScripts.disabled; + battle_menu_isEnabled[entryIdx] = FALSE; + battle_menu_isMessageDisabled[entryIdx] = 0x48; } if (battleStatus->itemLossTurns >= 0) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_ItemHudScripts.disabled; - battle_menu_isEnabled[s4] = 0; - battle_menu_isMessageDisabled[s4] = 0x48; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_ItemHudScripts.disabled; + battle_menu_isEnabled[entryIdx] = FALSE; + battle_menu_isMessageDisabled[entryIdx] = 0x48; } if (battleStatus->unk_4C[0] == 2) { - s8 = s4; + initialPos = entryIdx; } - s4++; + entryIdx++; } - //4f0 - main_battle_menu_JumpHudScripts[s4] = battle_menu_JumpHudScripts[playerData->bootsLevel + 1].enabled; - battle_menu_submenuIDs[s4] = 0; - battle_menu_isEnabled[s4] = 1; - battle_menu_messageIDs[s4] = battle_menu_centeredMessagesA[0]; + + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_JumpHudScripts[playerData->bootsLevel + 1].enabled; + battle_menu_submenuIDs[entryIdx] = 0; + battle_menu_isEnabled[entryIdx] = TRUE; + battle_menu_messageIDs[entryIdx] = battle_menu_centeredMessagesA[0]; if (battleStatus->menuStatus[1] <= 0) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_JumpHudScripts[0].enabled; - battle_menu_isEnabled[s4] = 0; - battle_menu_isMessageDisabled[s4] = 0x43; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_JumpHudScripts[0].enabled; + battle_menu_isEnabled[entryIdx] = FALSE; + battle_menu_isMessageDisabled[entryIdx] = 0x43; } - //594 if (!(battleStatus->menuDisableFlags & 0x1)) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_JumpHudScripts[0].disabled; - battle_menu_isEnabled[s4] = 0; - battle_menu_isMessageDisabled[s4] = 0x48; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_JumpHudScripts[0].disabled; + battle_menu_isEnabled[entryIdx] = FALSE; + battle_menu_isMessageDisabled[entryIdx] = 0x48; } - //5c0 if (battleStatus->jumpLossTurns >= 0) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_JumpHudScripts[0].disabled; - battle_menu_isEnabled[s4] = 0; - battle_menu_isMessageDisabled[s4] = 0x48; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_JumpHudScripts[0].disabled; + battle_menu_isEnabled[entryIdx] = FALSE; + battle_menu_isMessageDisabled[entryIdx] = 0x48; } - //5e8 if (battleStatus->unk_4C[0] == 0) { - s8 = s4; + initialPos = entryIdx; } - //5f4 - s4++; + entryIdx++; + if (playerData->hammerLevel >= 0) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_HammerHudScripts[playerData->hammerLevel + 1].enabled; - battle_menu_submenuIDs[s4] = 1; - battle_menu_isEnabled[s4] = 1; - battle_menu_messageIDs[s4] = battle_menu_centeredMessagesA[1]; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_HammerHudScripts[playerData->hammerLevel + 1].enabled; + battle_menu_submenuIDs[entryIdx] = 1; + battle_menu_isEnabled[entryIdx] = TRUE; + battle_menu_messageIDs[entryIdx] = battle_menu_centeredMessagesA[1]; if (battleStatus->menuStatus[2] <= 0) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_HammerHudScripts[0].enabled; - battle_menu_isEnabled[s4] = 0; - battle_menu_isMessageDisabled[s4] = 0x44; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_HammerHudScripts[0].enabled; + battle_menu_isEnabled[entryIdx] = FALSE; + battle_menu_isMessageDisabled[entryIdx] = 0x44; } if (!(battleStatus->menuDisableFlags & 0x2)) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_HammerHudScripts[0].disabled; - battle_menu_isEnabled[s4] = 0; - battle_menu_isMessageDisabled[s4] = 0x48; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_HammerHudScripts[0].disabled; + battle_menu_isEnabled[entryIdx] = FALSE; + battle_menu_isMessageDisabled[entryIdx] = 0x48; } if (battleStatus->hammerLossTurns >= 0) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_HammerHudScripts[0].disabled; - battle_menu_isEnabled[s4] = 0; - battle_menu_isMessageDisabled[s4] = 0x48; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_HammerHudScripts[0].disabled; + battle_menu_isEnabled[entryIdx] = FALSE; + battle_menu_isMessageDisabled[entryIdx] = 0x48; } if (battleStatus->unk_4C[0] == 1) { - s8 = s4; + initialPos = entryIdx; } - s4++; + entryIdx++; } - //6cc + if (playerData->maxStarPower != 0) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_StarPowerHudScripts.enabled; - battle_menu_submenuIDs[s4] = 8; - battle_menu_isEnabled[s4] = 1; - battle_menu_messageIDs[s4] = battle_menu_centeredMessagesD[0]; - battle_menu_isMessageDisabled[s4] = 0; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_StarPowerHudScripts.enabled; + battle_menu_submenuIDs[entryIdx] = 8; + battle_menu_isEnabled[entryIdx] = TRUE; + battle_menu_messageIDs[entryIdx] = battle_menu_centeredMessagesD[0]; + battle_menu_isMessageDisabled[entryIdx] = 0; if (!(battleStatus->menuDisableFlags & 0x100)) { - main_battle_menu_JumpHudScripts[s4] = battle_menu_StarPowerHudScripts.disabled; - battle_menu_isEnabled[s4] = 0; - battle_menu_isMessageDisabled[s4] = 0x48; + main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_StarPowerHudScripts.disabled; + battle_menu_isEnabled[entryIdx] = FALSE; + battle_menu_isMessageDisabled[entryIdx] = 0x48; } if (battleStatus->unk_4C[0] == 8) { - s8 = s4; + initialPos = entryIdx; } - s4++; + entryIdx++; } - //770 - main_menu_numOptions = s4; + + main_menu_numOptions = entryIdx; D_802AD0A8 = 0; - D_802AD0B0 = s8; - D_802AD100 = 2 - s8; + D_802AD0B0 = initialPos; + D_802AD100 = 2 - initialPos; if (func_802A58D0() != 0) { D_802AD104 = 1; } else { @@ -2381,48 +2370,47 @@ void btl_state_update_player_menu(void) { func_802A1000(); D_802ACC60 = 8; D_802ACC6C = 0; - gBattleSubState = 1; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_1; break; - case 1: - //7e8 + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_1: if (battleStatus->hustleTurns != 0) { - set_animation(0, 0, 0x10027); + set_animation(ACTOR_PLAYER, 0, ANIM_Mario_RunThinking); } else { - set_animation(0, 0, func_80265D44(0x1c)); + set_animation(ACTOR_PLAYER, 0, func_80265D44(0x1c)); } - s00 = func_802A11B0(); + submenuResult = func_802A11B0(); if (D_802ACC6C != 0) { D_802ACC6C--; - } else if (!(gBattleStatus.flags1 & 0x2000000) && (gGameStatusPtr->pressedButtons[0] & 0x2000)) { - if (func_802A58D0() != 0 && battleStatus->hustleTurns != 1) { - sfx_play_sound(0xf); + } else if (!(gBattleStatus.flags1 & BS_FLAGS1_2000000) && (gGameStatusPtr->pressedButtons[0] & BUTTON_Z)) { + if (func_802A58D0() && battleStatus->hustleTurns != 1) { + sfx_play_sound(SOUND_F); battleStatus->unk_4C[0] = battle_menu_submenuIDs[D_802AD002 + D_802AD06B]; func_802A10B8(); - btl_set_state(0xb); - } else if (partnerActor != NULL && !(partnerActor->flags & 0x200000) && battleStatus->hustleTurns != 1) { - sfx_play_sound(0x21d); - gBattleSubState = 8; + btl_set_state(BATTLE_STATE_SWITCH_TO_PARTNER); + } else if (partnerActor != NULL && !(partnerActor->flags & BS_FLAGS1_200000) && battleStatus->hustleTurns != 1) { + sfx_play_sound(SOUND_MENU_ERROR); + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_8; } - break; // TODO + break; } - //904 + if (D_802ACC60 != 0) { D_802ACC60--; - } else if (s00 != 0) { - set_animation(0, 0, 0x10004); - battleStatus->unk_4C[0] = battleStatus->currentSubmenu = battle_menu_submenuIDs[s00 - 1]; - for (i = 0; i < 24; i++) { + } else if (submenuResult != 0) { + set_animation(ACTOR_PLAYER, 0, ANIM_Mario_Walking); + battleStatus->unk_4C[0] = battleStatus->currentSubmenu = battle_menu_submenuIDs[submenuResult - 1]; + for (i = 0; i < ARRAY_COUNT(battleStatus->submenuMoves); i++) { battleStatus->submenuMoves[i] = 0; - battleStatus->submenuIcons[0] = 0; + battleStatus->submenuIcons[0] = 0; ///< @bug ? battleStatus->submenuStatus[i] = 0; } - //970 + switch (battleStatus->currentSubmenu) { case 2: - battleStatus->submenuIcons[0] = 0x155; + battleStatus->submenuIcons[0] = ITEM_PARTNER_ATTACK; battleStatus->submenuStatus[0] = 1; battleStatus->submenuMoves[0] = D_802AB4F0[8]; - for (i = 0; i < 10; i++) { + for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) { if (playerData->invItems[i] == 0) { continue; } @@ -2433,29 +2421,29 @@ void btl_state_update_player_menu(void) { battleStatus->currentTargetListFlags = itemData->targetFlags; player_create_target_list(playerActor); } - s4 = 1; - for (i = 0; i < 64; i++) { + entryIdx = 1; + for (i = 0; i < ARRAY_COUNT(playerData->equippedBadges); i++) { if (playerData->equippedBadges[i] != 0) { - moveID = gItemTable[playerData->equippedBadges[i]].moveID; + s32 moveID = gItemTable[playerData->equippedBadges[i]].moveID; moveData = &gMoveTable[moveID]; if (moveData->category == D_802AB4F0[battleStatus->currentSubmenu]) { - battleStatus->submenuMoves[s4] = moveID; - battleStatus->submenuIcons[s4] = playerData->equippedBadges[i]; - battleStatus->submenuStatus[s4] = 1; + battleStatus->submenuMoves[entryIdx] = moveID; + battleStatus->submenuIcons[entryIdx] = playerData->equippedBadges[i]; + battleStatus->submenuStatus[entryIdx] = 1; if (playerData->curFP < moveData->costFP) { - battleStatus->submenuStatus[s4] = 0; + battleStatus->submenuStatus[entryIdx] = 0; } - s4++; + entryIdx++; } } } - battleStatus->submenuMoveCount = s4; - if (s4 == 1) { + battleStatus->submenuMoveCount = entryIdx; + if (entryIdx == 1) { battleStatus->submenuMoveCount = 0; } break; + do { // required to match case 1: - //ae0 btl_init_menu_hammer(); if (battleStatus->submenuMoveCount == 1) { battleStatus->submenuMoveCount = 0; @@ -2465,7 +2453,6 @@ void btl_state_update_player_menu(void) { } break; case 0: - //af0 btl_init_menu_boots(); if (battleStatus->submenuMoveCount == 1) { battleStatus->submenuMoveCount = 0; @@ -2474,93 +2461,93 @@ void btl_state_update_player_menu(void) { battleStatus->submenuMoveCount = 0; } break; - do { case 8: - //b1c - - battleStatus->submenuMoves[0] = 0x77; - battleStatus->submenuIcons[0] = 0x155; + battleStatus->submenuMoves[0] = MOVE_FOCUS; + battleStatus->submenuIcons[0] = ITEM_PARTNER_ATTACK; battleStatus->submenuStatus[0] = 1; - s4 = 1; - s8 = battleStatus->currentSubmenu; + entryIdx = 1; + initialPos = 8; for (i = 0; i < playerData->maxStarPower; i++) { - moveData = &gMoveTable[0x78 + i]; - //b4c - battleStatus->submenuMoves[s4] = 0x78 + i; - battleStatus->submenuIcons[s4] = 0; + moveData = &gMoveTable[MOVE_REFRESH + i]; + battleStatus->submenuMoves[entryIdx] = MOVE_REFRESH + i; + battleStatus->submenuIcons[entryIdx] = 0; battleStatus->moveCategory = 8; - battleStatus->selectedItemID = 0x78 + i; + battleStatus->selectedItemID = MOVE_REFRESH + i; battleStatus->currentTargetListFlags = moveData->flags; player_create_target_list(playerActor); - battleStatus->submenuStatus[s4] = 1; + battleStatus->submenuStatus[entryIdx] = 1; if (playerActor->targetListLength == 0) { - battleStatus->submenuStatus[s4] = -2; + battleStatus->submenuStatus[entryIdx] = -2; } if (playerData->specialBarsFilled / 256 < moveData->costFP) { - battleStatus->submenuStatus[s4] = 0; + battleStatus->submenuStatus[entryIdx] = 0; } - if (gBattleStatus.flags2 & 0x1000) { - battleStatus->submenuStatus[s4] = -1; + if (gBattleStatus.flags2 & BS_FLAGS2_NO_TARGET_AVAILABLE) { + battleStatus->submenuStatus[entryIdx] = -1; } - s4++; + entryIdx++; } - //be4 starBeamLevel = playerData->starBeamLevel; if (starBeamLevel == 1) { - moveData = &gMoveTable[0x7f]; - battleStatus->submenuMoves[s4] = 0x7f; - battleStatus->submenuIcons[s4] = 0; - battleStatus->moveCategory = 8; - battleStatus->selectedItemID = 0x78 + i; - battleStatus->currentTargetListFlags = moveData->flags; - player_create_target_list(playerActor); - battleStatus->submenuStatus[s4] = starBeamLevel; - if (playerActor->targetListLength == 0) { - battleStatus->submenuStatus[s4] = -2; - } - if (playerData->specialBarsFilled / 256 < moveData->costFP) { - battleStatus->submenuStatus[s4] = 0; - } - if (gBattleStatus.flags2 & 0x1000) { - battleStatus->submenuStatus[s4] = -1; - } - s4++; + do { + moveData = &gMoveTable[MOVE_STAR_BEAM]; + battleStatus->submenuMoves[entryIdx] = MOVE_STAR_BEAM; + battleStatus->submenuIcons[entryIdx] = 0; + battleStatus->moveCategory = 8; + battleStatus->selectedItemID = MOVE_REFRESH + i; + battleStatus->currentTargetListFlags = moveData->flags; + player_create_target_list(playerActor); + battleStatus->submenuStatus[entryIdx] = starBeamLevel; + if (playerActor->targetListLength == 0) { + battleStatus->submenuStatus[entryIdx] = -2; + } + if (playerData->specialBarsFilled / 256 < moveData->costFP) { + battleStatus->submenuStatus[entryIdx] = 0; + } + if (gBattleStatus.flags2 & BS_FLAGS2_NO_TARGET_AVAILABLE) { + battleStatus->submenuStatus[entryIdx] = -1; + } + entryIdx++; + } while (0); } - //c80 if (playerData->starBeamLevel == 2) { - moveData = &gMoveTable[0x80]; - battleStatus->submenuMoves[s4] = 0x80; - battleStatus->submenuIcons[s4] = 0; - battleStatus->moveCategory = 8; - battleStatus->selectedItemID = 0x78 + i; - battleStatus->currentTargetListFlags = moveData->flags; - player_create_target_list(playerActor); - battleStatus->submenuStatus[s4] = 1; - if (playerActor->targetListLength == 0) { - battleStatus->submenuStatus[s4] = -2; - } - if (playerData->specialBarsFilled / 256 < moveData->costFP) { - battleStatus->submenuStatus[s4] = 0; - } - if (gBattleStatus.flags2 & 0x1000) { - battleStatus->submenuStatus[s4] = -1; - } - s4++; + do { + do { + moveData = &gMoveTable[MOVE_PEACH_BEAM]; + battleStatus->submenuMoves[entryIdx] = MOVE_PEACH_BEAM; + battleStatus->submenuIcons[entryIdx] = 0; + battleStatus->moveCategory = 8; + battleStatus->selectedItemID = MOVE_REFRESH + i; + battleStatus->currentTargetListFlags = moveData->flags; + player_create_target_list(playerActor); + battleStatus->submenuStatus[entryIdx] = 1; + if (playerActor->targetListLength == 0) { + battleStatus->submenuStatus[entryIdx] = -2; + } + if (playerData->specialBarsFilled / 256 < moveData->costFP) { + battleStatus->submenuStatus[entryIdx] = 0; + } + if (gBattleStatus.flags2 & BS_FLAGS2_NO_TARGET_AVAILABLE) { + battleStatus->submenuStatus[entryIdx] = -1; + } + entryIdx++; + } while (0); + } while (0); // TODO required to match } - battleStatus->submenuMoveCount = s4; + battleStatus->submenuMoveCount = entryIdx; break; } while (0); // TODO required to match } - //d28 ??? + currentSubmenu = battleStatus->currentSubmenu; if (currentSubmenu == 8) { - gBattleSubState = 0x3c; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_1; btl_state_update_player_menu(); btl_state_update_player_menu(); break; } else if (currentSubmenu == 7) { - if (battleStatus->actionCommandMode != 2 && !(gBattleStatus.flags1 & 0x2000000)) { - gBattleSubState = 0xc8; + if (battleStatus->actionCommandMode != ACTION_COMMAND_MODE_TUTORIAL && !(gBattleStatus.flags1 & BS_FLAGS1_2000000)) { + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STRATEGIES_1; btl_state_update_player_menu(); btl_state_update_player_menu(); break; @@ -2569,41 +2556,40 @@ void btl_state_update_player_menu(void) { battleStatus->moveCategory = currentSubmenu; battleStatus->selectedItemID = 0; battleStatus->selectedMoveID = 0; - btl_set_state(0x12); + btl_set_state(BATTLE_STATE_PLAYER_MOVE); break; } } else { - //d8c if (battleStatus->submenuMoveCount == 0) { if (currentSubmenu != 2) { - gBattleSubState = 0xa; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_10; break; } else { - gBattleSubState = 0x28; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_ITEMS_1; btl_state_update_player_menu(); btl_state_update_player_menu(); break; } } - s8 = 0; + initialPos = 0; if (currentSubmenu == 0) { if (battleStatus->unk_4C[1] < 0) { battleStatus->unk_4C[1] = 0; } - s8 = battleStatus->unk_4C[1]; + initialPos = battleStatus->unk_4C[1]; } if (battleStatus->currentSubmenu == 1) { if (battleStatus->unk_4C[2] < 0) { battleStatus->unk_4C[2] = 0; } - s8 = battleStatus->unk_4C[2]; + initialPos = battleStatus->unk_4C[2]; } if (battleStatus->currentSubmenu == 2) { if (battleStatus->unk_4C[3] < 0) { battleStatus->unk_4C[3] = 0; } - s8 = battleStatus->unk_4C[3]; + initialPos = battleStatus->unk_4C[3]; } for (i = 0; i < battleStatus->submenuMoveCount; i++) { @@ -2638,61 +2624,56 @@ void btl_state_update_player_menu(void) { battle_menu_moveOptionDisplayCostReductions[i] = 0; battle_menu_moveOptionDisplayCostReductionColors[i] = 0; - if (player_team_is_ability_active(playerActor, 0x18)) { - battle_menu_moveOptionDisplayCostReductions[i] += player_team_is_ability_active(playerActor, 0x18); + if (player_team_is_ability_active(playerActor, ABILITY_FLOWER_SAVER)) { + battle_menu_moveOptionDisplayCostReductions[i] += player_team_is_ability_active(playerActor, ABILITY_FLOWER_SAVER); battle_menu_moveOptionDisplayCostReductionColors[i] = 1; } - //f68 - if (player_team_is_ability_active(playerActor, 0x26)) { - battle_menu_moveOptionDisplayCostReductions[i] += 2 * player_team_is_ability_active(playerActor, 0x26); + if (player_team_is_ability_active(playerActor, ABILITY_FLOWER_FANATIC)) { + battle_menu_moveOptionDisplayCostReductions[i] += 2 * player_team_is_ability_active(playerActor, ABILITY_FLOWER_FANATIC); battle_menu_moveOptionDisplayCostReductionColors[i] = 2; } - //f9c + battle_menu_moveIndices[i] = i; battle_menu_moveOptionsEnabled[i] = battleStatus->submenuStatus[i]; battle_menu_moveOptionNames[i] = moveData->nameMsg; battle_menu_moveOptionDescriptions[i] = moveData->shortDescMsg; } - //ff0 battle_menu_hasSpiritsMenu = 0; - D_802AD4A8 = s8; + D_802AD4A8 = initialPos; battle_menu_moveOptionCount = battleStatus->submenuMoveCount; func_802A2684(); - gBattleSubState = 0x2; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_2; break; } } break; - case 2: - s00 = func_802A2C84(); - if (s00 == -1) { - gBattleSubState = 0x7; - } else if (s00 == 0) { - } else if (s00 == 0xff) { + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_2: + submenuResult = func_802A2C84(); + if (submenuResult == -1) { + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_7; + } else if (submenuResult == 0) { + } else if (submenuResult == 255) { func_802A1050(); D_802ACC60 = 8; D_802ACC6C = 4; - gBattleSubState = 1; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_1; btl_state_update_player_menu(); btl_state_update_player_menu(); } else { - battleStatus->unk_49 = battle_menu_moveIndices[s00 - 1]; + battleStatus->unk_49 = battle_menu_moveIndices[submenuResult - 1]; battleStatus->selectedMoveID = battleStatus->submenuMoves[battleStatus->unk_49]; - //1090 if (battleStatus->currentSubmenu == 0) { battleStatus->unk_4C[1] = battle_menu_moveOptionActive; } - //10a4 if (battleStatus->currentSubmenu == 1) { battleStatus->unk_4C[2] = battle_menu_moveOptionActive; } - //10c0 currentSubmenu2 = battleStatus->currentSubmenu; if (battleStatus->currentSubmenu == 2) { battleStatus->unk_4C[3] = battle_menu_moveOptionActive; if (battleStatus->currentSubmenu == currentSubmenu2) { - gBattleSubState = 0x14; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_UNKNOWN_1; btl_state_update_player_menu(); btl_state_update_player_menu(); break; @@ -2700,22 +2681,22 @@ void btl_state_update_player_menu(void) { } func_802A27D0(); func_802A1030(); - gBattleSubState = 3; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_3; } break; - case 3: - s00 = func_802A2C84(); - if ((battleStatus->currentButtonsPressed & 0x4000) && s00 == 0) { + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_3: + submenuResult = func_802A2C84(); + if ((battleStatus->currentButtonsPressed & BUTTON_B) && submenuResult == 0) { func_802A2AB8(); func_802A1098(); - gBattleSubState = 4; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_4; break; } if (func_802A11B0() == 0) { break; } - battleStatus->unk_6C = 5; - battleStatus->unk_6E = 6; + battleStatus->unk_6C = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_5; + battleStatus->unk_6E = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_6; battleStatus->selectedMoveID = battleStatus->submenuMoves[battleStatus->unk_49]; battleStatus->currentTargetListFlags = gMoveTable[battleStatus->submenuMoves[battleStatus->unk_49]].flags; currentSubmenu = battleStatus->currentSubmenu; @@ -2723,145 +2704,144 @@ void btl_state_update_player_menu(void) { case 0: battleStatus->moveCategory = 0; battleStatus->selectedItemID = playerData->bootsLevel; - btl_set_state(0x11); + btl_set_state(BATTLE_STATE_SELECT_TARGET); break; case 1: battleStatus->moveCategory = 1; battleStatus->selectedItemID = playerData->hammerLevel; - btl_set_state(0x11); + btl_set_state(BATTLE_STATE_SELECT_TARGET); break; - case 4: gBattleSubState = battleStatus->unk_6E; btl_state_update_player_menu(); battleStatus->moveCategory = 4; - btl_set_state(0x19); + btl_set_state(BATTLE_STATE_DEFEND); break; } break; - case 4: + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_4: func_802A2C84(); if (func_802A11B0() != 0) { - gBattleSubState = 2; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_2; } break; - case 5: + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_5: func_802A2AB8(); func_802A1098(); - gBattleSubState = 4; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_4; break; - case 6: + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_6: func_802A27E4(); func_802A10B8(); break; - case 7: + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_7: if (func_802A2C84() != -1) { - gBattleSubState = 2; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_2; } break; - case 8: - if (gBattleStatus.flags2 & 0x4) { - btl_show_variable_battle_message(0x50, 0x3c, 0); + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_8: + if (gBattleStatus.flags2 & BS_FLAGS2_4) { + btl_show_variable_battle_message(0x50, 60, 0); } else { - btl_show_variable_battle_message(0x51, 0x3c, playerData->currentPartner); + btl_show_variable_battle_message(0x51, 60, playerData->currentPartner); } D_802AD607 = 1; gBattleSubState = 9; break; - case 9: + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_9: if (!btl_is_popup_displayed()) { D_802ACC6C = 4; D_802AD607 = 0; D_802ACC60 = 0; - gBattleSubState = 1; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_1; } break; - case 0xa: + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_10: func_802A1030(); - gBattleSubState = 0xb; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_11; break; - case 0xb: - s00 = func_802A11B0(); - if ((battleStatus->currentButtonsPressed & 0x4000) && s00 == 0) { + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_11: + submenuResult = func_802A11B0(); + if ((battleStatus->currentButtonsPressed & BUTTON_B) && submenuResult == 0) { func_802A1078(); - gBattleSubState = 0xc; - } else if (s00 != 0) { - battleStatus->unk_6C = 0xd; - battleStatus->unk_6E = 0xe; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_12; + } else if (submenuResult != 0) { + battleStatus->unk_6C = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_13; + battleStatus->unk_6E = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_14; switch (battleStatus->currentSubmenu) { case 0: battleStatus->moveCategory = 0; battleStatus->selectedItemID = playerData->bootsLevel; - battleStatus->selectedMoveID = playerData->bootsLevel + 0x1a; + battleStatus->selectedMoveID = playerData->bootsLevel + MOVE_JUMP1; battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags; - btl_set_state(0x11); + btl_set_state(BATTLE_STATE_SELECT_TARGET); break; case 1: battleStatus->moveCategory = 1; battleStatus->selectedItemID = playerData->hammerLevel; - battleStatus->selectedMoveID = playerData->hammerLevel + 3; + battleStatus->selectedMoveID = playerData->hammerLevel + MOVE_HAMMER1; battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags; - btl_set_state(0x11); + btl_set_state(BATTLE_STATE_SELECT_TARGET); break; default: - goto CASE_C; + goto CASE_C; // TODO find better match } } break; CASE_C: - case 0xc: + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_12: if (func_802A11B0() != 0) { D_802ACC60 = 8; D_802ACC6C = 4; - gBattleSubState = 1; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_1; } break; - case 0xd: + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_13: func_802A1078(); - gBattleSubState = 0xc; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_12; break; - case 0xe: + case BATTLE_SUB_STATE_PLAYER_MAIN_MENU_14: func_802A10B8(); break; - case 0x14: - if (battleStatus->selectedMoveID == 0x35) { + case BATTLE_SUB_STATE_PLAYER_UNKNOWN_1: + if (battleStatus->selectedMoveID == MOVE_DOUBLE_DIP) { battleStatus->itemUsesLeft = 2; } - if (battleStatus->selectedMoveID == 0x36) { + if (battleStatus->selectedMoveID == MOVE_TRIPLE_DIP) { battleStatus->itemUsesLeft = 3; } - s4 = 0; - for (i = 0; i < 10; i++) { + entryIdx = 0; + for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) { if (playerData->invItems[i] == 0) { continue; } itemData = &gItemTable[playerData->invItems[i]]; hudScriptPair = &gItemHudScripts[itemData->hudElemID]; - if (!(itemData->typeFlags & 0x2)) { + if (!(itemData->typeFlags & ITEM_TYPE_FLAG_BATTLE_USABLE)) { continue; } battleStatus->moveCategory = 2; battleStatus->selectedItemID = playerData->invItems[i]; battleStatus->currentTargetListFlags = itemData->targetFlags; player_create_target_list(playerActor); - popup->ptrIcon[s4] = hudScriptPair->enabled; - popup->userIndex[s4] = playerData->invItems[i]; - popup->enabled[s4] = 1; - popup->nameMsg[s4] = itemData->nameMsg; - popup->descMsg[s4] = itemData->shortDescMsg; + popup->ptrIcon[entryIdx] = hudScriptPair->enabled; + popup->userIndex[entryIdx] = playerData->invItems[i]; + popup->enabled[entryIdx] = TRUE; + popup->nameMsg[entryIdx] = itemData->nameMsg; + popup->descMsg[entryIdx] = itemData->shortDescMsg; if (playerActor->targetListLength == 0) { - popup->ptrIcon[s4] = hudScriptPair->disabled; - popup->enabled[s4] = 0; + popup->ptrIcon[entryIdx] = hudScriptPair->disabled; + popup->enabled[entryIdx] = 0; } - s4++; + entryIdx++; } popup->unk_31C = 0; popup->unk_320 = 0; - if (battleStatus->selectedMoveID == 0x35) { + if (battleStatus->selectedMoveID == MOVE_DOUBLE_DIP) { popup->unk_31C = 1; popup->unk_320 = battleStatus->itemUsesLeft; } - if (battleStatus->selectedMoveID == 0x36) { + if (battleStatus->selectedMoveID == MOVE_TRIPLE_DIP) { popup->unk_31C = 2; popup->unk_320 = battleStatus->itemUsesLeft; } @@ -2869,165 +2849,163 @@ void btl_state_update_player_menu(void) { battleStatus->unk_4C[4] = 0; } popup->popupType = 0; - popup->numEntries = s4; - s8 = battleStatus->unk_4C[4]; - popup->initialPos = s8; + popup->numEntries = entryIdx; + initialPos = battleStatus->unk_4C[4]; + popup->initialPos = initialPos; func_800F513C(popup); func_800F52BC(); - gBattleSubState = 0x15; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_UNKNOWN_2; break; - case 0x15: - + case BATTLE_SUB_STATE_PLAYER_UNKNOWN_2: if (popup->result != 0) { if (popup->result == 0xff) { func_802A2910(); battleStatus->selectedMoveID = 0; battleStatus->itemUsesLeft = 0; - gBattleSubState = 2; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_2; btl_state_update_player_menu(); btl_state_update_player_menu(); } else { - battleStatus->unk_6C = 0x18; - battleStatus->unk_6E = 0x19; + battleStatus->unk_6C = BATTLE_SUB_STATE_PLAYER_UNKNOWN_5; + battleStatus->unk_6E = BATTLE_SUB_STATE_PLAYER_UNKNOWN_6; battleStatus->unk_1AA = popup->userIndex[popup->result - 1]; battleStatus->moveCategory = 2; battleStatus->selectedItemID = battleStatus->unk_1AA; - battleStatus->currentTargetListFlags = gItemTable[battleStatus->selectedItemID].targetFlags | 0x8000; + battleStatus->currentTargetListFlags = gItemTable[battleStatus->selectedItemID].targetFlags | ITEM_TARGET_FLAG_8000; battleStatus->currentAttackElement = 0; battleStatus->unk_4C[4] = popup->result - 1; hide_popup_menu(); func_802A27D0(); func_802A1030(); - gBattleSubState = 0x16; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_UNKNOWN_3; } } break; - case 0x16: - if ((battleStatus->currentButtonsPressed & 0x4000) && popup->result == 0) { + case BATTLE_SUB_STATE_PLAYER_UNKNOWN_3: + if ((battleStatus->currentButtonsPressed & BUTTON_B) && popup->result == 0) { func_800F16CC(); func_802A2C58(); func_802A1098(); battleStatus->selectedMoveID = 0; - gBattleSubState = 0x17; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_UNKNOWN_4; } else { func_802A2C84(); if (func_802A11B0()) { - btl_set_state(0x11); + btl_set_state(BATTLE_STATE_SELECT_TARGET); } } break; - case 0x17: + case BATTLE_SUB_STATE_PLAYER_UNKNOWN_4: func_802A2C84(); if (func_802A11B0() != 0) { - gBattleSubState = 0x15; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_UNKNOWN_2; } break; - case 0x18: + case BATTLE_SUB_STATE_PLAYER_UNKNOWN_5: func_800F16CC(); func_802A2C58(); func_802A1098(); func_802A2C84(); - gBattleSubState = 0x17; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_UNKNOWN_4; break; - case 0x19: + case BATTLE_SUB_STATE_PLAYER_UNKNOWN_6: destroy_popup_menu(); func_802A27E4(); func_802A10B8(); break; - case 0x28: //1708 - s4 = 0; - for (i = 0; i < 10; i++) { + case BATTLE_SUB_STATE_PLAYER_ITEMS_1: + entryIdx = 0; + for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) { if (playerData->invItems[i] == 0) { continue; } itemData = &gItemTable[playerData->invItems[i]]; hudScriptPair = &gItemHudScripts[itemData->hudElemID]; - if (!(itemData->typeFlags & 0x2)) { + if (!(itemData->typeFlags & ITEM_TYPE_FLAG_BATTLE_USABLE)) { continue; } battleStatus->moveCategory = 2; battleStatus->selectedItemID = playerData->invItems[i]; battleStatus->currentTargetListFlags = itemData->targetFlags; player_create_target_list(playerActor); - popup->ptrIcon[s4] = hudScriptPair->enabled; + popup->ptrIcon[entryIdx] = hudScriptPair->enabled; - popup->userIndex[s4] = playerData->invItems[i]; - popup->enabled[s4] = 1; - popup->nameMsg[s4] = itemData->nameMsg; - popup->descMsg[s4] = itemData->shortDescMsg; + popup->userIndex[entryIdx] = playerData->invItems[i]; + popup->enabled[entryIdx] = 1; + popup->nameMsg[entryIdx] = itemData->nameMsg; + popup->descMsg[entryIdx] = itemData->shortDescMsg; if (playerActor->targetListLength == 0) { - popup->ptrIcon[s4] = hudScriptPair->disabled; - popup->enabled[s4] = 0; + popup->ptrIcon[entryIdx] = hudScriptPair->disabled; + popup->enabled[entryIdx] = 0; } - s4++; + entryIdx++; } if (battleStatus->unk_4C[4] < 0) { battleStatus->unk_4C[4] = 0; } - s8 = battleStatus->unk_4C[4]; + initialPos = battleStatus->unk_4C[4]; popup->popupType = 0; - popup->numEntries = s4; + popup->numEntries = entryIdx; popup->unk_31C = 0; popup->unk_320 = 0; - popup->initialPos = s8; + popup->initialPos = initialPos; func_800F513C(popup); func_800F52BC(); - gBattleSubState = 0x29; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_ITEMS_2; break; - case 0x29: + case BATTLE_SUB_STATE_PLAYER_ITEMS_2: if (popup->result != 0) { if (popup->result == 0xff) { func_802A1050(); D_802ACC60 = 8; D_802ACC6C = 4; - gBattleSubState = 1; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_1; btl_state_update_player_menu(); btl_state_update_player_menu(); } else { - battleStatus->unk_6C = 0x2C; - battleStatus->unk_6E = 0x2D; + battleStatus->unk_6C = 44; + battleStatus->unk_6E = 45; battleStatus->unk_1AA = popup->userIndex[popup->result - 1]; battleStatus->moveCategory = 2; battleStatus->selectedItemID = battleStatus->unk_1AA; - battleStatus->selectedMoveID = 0x34; - battleStatus->currentTargetListFlags = gItemTable[battleStatus->selectedItemID].targetFlags | 0x8000; + battleStatus->selectedMoveID = MOVE_ITEMS; + battleStatus->currentTargetListFlags = gItemTable[battleStatus->selectedItemID].targetFlags | ITEM_TARGET_FLAG_8000; battleStatus->currentAttackElement = 0; battleStatus->unk_4C[4] = popup->result - 1; hide_popup_menu(); func_802A1030(); - gBattleSubState = 0x2A; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_ITEMS_3; } } break; - case 0x2a: - if ((battleStatus->currentButtonsPressed & 0x4000) && popup->result == 0) { + case BATTLE_SUB_STATE_PLAYER_ITEMS_3: + if ((battleStatus->currentButtonsPressed & BUTTON_B) && popup->result == 0) { func_800F16CC(); func_802A1098(); - gBattleSubState = 0x2b; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_ITEMS_4; } else { if (func_802A11B0() != 0) { - btl_set_state(0x11); + btl_set_state(BATTLE_STATE_SELECT_TARGET); } } break; - case 0x2b: + case BATTLE_SUB_STATE_PLAYER_ITEMS_4: if (func_802A11B0() != 0) { - gBattleSubState = 0x29; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_ITEMS_2; } break; - case 0x2c: + case BATTLE_SUB_STATE_PLAYER_ITEMS_5: func_800F16CC(); func_802A1098(); - gBattleSubState = 0x2b; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_ITEMS_4; break; - case 0x2d: + case BATTLE_SUB_STATE_PLAYER_ITEMS_6: destroy_popup_menu(); func_802A10B8(); break; - case 0x3c: + case BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_1: for (i = 0; i < battleStatus->submenuMoveCount; i++) { moveData = &gMoveTable[battleStatus->submenuMoves[i]]; - battle_menu_moveOptionCantUseTypes[i] = 0; if (battleStatus->submenuStatus[i] == 0) { @@ -3038,20 +3016,18 @@ void btl_state_update_player_menu(void) { battleStatus->submenuStatus[i] = 0; battle_menu_moveOptionCantUseTypes[i] = 0x48; } - if (battleStatus->submenuStatus[i] == -2) { battleStatus->submenuStatus[i] = 0; battle_menu_moveOptionCantUseTypes[i] = 0x48; } - if (!(battleStatus->unk_74 & (1 << i))) { battleStatus->submenuStatus[i] = 0; battle_menu_moveOptionCantUseTypes[i] = 0x48; } - battle_menu_moveOptionIconScripts[i] = battle_menu_StarPowerMovesHudScripts[2 * (battleStatus->submenuMoves[i] - 0x77) + 0]; + battle_menu_moveOptionIconScripts[i] = battle_menu_StarPowerMovesHudScripts[2 * (battleStatus->submenuMoves[i] - MOVE_FOCUS) + 0]; if (battleStatus->submenuStatus[i] == 0) { - battle_menu_moveOptionIconScripts[i] = battle_menu_StarPowerMovesHudScripts[2 * (battleStatus->submenuMoves[i] - 0x77) + 1]; + battle_menu_moveOptionIconScripts[i] = battle_menu_StarPowerMovesHudScripts[2 * (battleStatus->submenuMoves[i] - MOVE_FOCUS) + 1]; } battle_menu_moveOptionDisplayCosts[i] = moveData->costFP; battle_menu_moveOptionBPCosts[i] = moveData->costBP; @@ -3066,42 +3042,42 @@ void btl_state_update_player_menu(void) { if (battleStatus->unk_4C[6] < 0) { battleStatus->unk_4C[6] = 0; } - s8 = battleStatus->unk_4C[6]; + initialPos = battleStatus->unk_4C[6]; battle_menu_moveOptionCount = battleStatus->submenuMoveCount; - D_802AD4A8 = s8; + D_802AD4A8 = initialPos; battle_menu_hasSpiritsMenu = 1; func_802A2684(); - gBattleSubState = 0x3d; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_2; break; - case 0x3d: - s00 = func_802A2C84(); - if (s00 == -1) { - gBattleSubState = 0x42; - } else if (s00 == 0) { - } else if (s00 == 0xff) { + case BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_2: + submenuResult = func_802A2C84(); + if (submenuResult == -1) { + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_7; + } else if (submenuResult == 0) { + } else if (submenuResult == 0xff) { func_802A1050(); D_802ACC60 = 8; D_802ACC6C = 4; - gBattleSubState = 1; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_1; btl_state_update_player_menu(); btl_state_update_player_menu(); } else { - battleStatus->unk_49 = battle_menu_moveIndices[s00 - 1]; + battleStatus->unk_49 = battle_menu_moveIndices[submenuResult - 1]; battleStatus->unk_4C[6] = battle_menu_moveOptionActive; func_802A27D0(); func_802A1030(); - gBattleSubState = 0x3e; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_3; } break; - case 0x3e: - s00 = func_802A2C84(); - if ((battleStatus->currentButtonsPressed & 0x4000) && s00 == 0) { + case BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_3: + submenuResult = func_802A2C84(); + if ((battleStatus->currentButtonsPressed & BUTTON_B) && submenuResult == 0) { func_802A2AB8(); func_802A1098(); - gBattleSubState = 0x3f; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_4; } else if (func_802A11B0() != 0) { - battleStatus->unk_6C = 0x40; - battleStatus->unk_6E = 0x41; + battleStatus->unk_6C = BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_5; + battleStatus->unk_6E = BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_6; battleStatus->moveCategory = 8; battleStatus->selectedMoveID = battleStatus->submenuMoves[battleStatus->unk_49]; battleStatus->currentTargetListFlags = gMoveTable[battleStatus->submenuMoves[battleStatus->unk_49]].flags; @@ -3109,44 +3085,42 @@ void btl_state_update_player_menu(void) { if (playerData->starBeamLevel == 2 && battleStatus->selectedItemID == 8) { battleStatus->selectedItemID++; } - btl_set_state(0x11); + btl_set_state(BATTLE_STATE_SELECT_TARGET); } break; - case 0x3f: + case BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_4: func_802A2C84(); if (func_802A11B0() != 0) { - gBattleSubState = 0x3d; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_2; } break; - case 0x40: + case BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_5: func_802A2AB8(); func_802A1098(); - gBattleSubState = 0x3f; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_4; break; - case 0x41: + case BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_6: func_802A27E4(); func_802A10B8(); break; - case 0x42: + case BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_7: if (func_802A2C84() != -1) { - gBattleSubState = 0x3d; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STAR_SPIRITS_2; } break; - case 0x46: + case BATTLE_SUB_STATE_PLAYER_UNUSED_1: if (!can_btl_state_update_switch_to_player()) { battleStatus->itemUsesLeft = 1; - btl_set_state(0x16); + btl_set_state(BATTLE_STATE_END_PLAYER_TURN); } else { - s4 = 0; - for (i = 0; i < 10; i++) { + entryIdx = 0; + for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) { if (playerData->invItems[i] == 0) { continue; } - itemData = &gItemTable[playerData->invItems[i]]; hudScriptPair = &gItemHudScripts[itemData->hudElemID]; - - if (!(itemData->typeFlags & 0x2)) { + if (!(itemData->typeFlags & ITEM_TYPE_FLAG_BATTLE_USABLE)) { continue; } @@ -3154,363 +3128,362 @@ void btl_state_update_player_menu(void) { battleStatus->selectedItemID = playerData->invItems[i]; battleStatus->currentTargetListFlags = itemData->targetFlags; player_create_target_list(playerActor); - popup->ptrIcon[s4] = hudScriptPair->enabled; - popup->userIndex[s4] = playerData->invItems[i]; - popup->enabled[s4] = 1; - popup->nameMsg[s4] = itemData->nameMsg; - popup->descMsg[s4] = itemData->shortDescMsg; + popup->ptrIcon[entryIdx] = hudScriptPair->enabled; + popup->userIndex[entryIdx] = playerData->invItems[i]; + popup->enabled[entryIdx] = TRUE; + popup->nameMsg[entryIdx] = itemData->nameMsg; + popup->descMsg[entryIdx] = itemData->shortDescMsg; if (playerActor->targetListLength == 0) { - popup->ptrIcon[s4] = hudScriptPair->disabled; - popup->enabled[s4] = 0; + popup->ptrIcon[entryIdx] = hudScriptPair->disabled; + popup->enabled[entryIdx] = FALSE; } - s4++; + entryIdx++; } - if (s4 == 0) { + if (entryIdx == 0) { battleStatus->itemUsesLeft = 1; - btl_set_state(0x16); + btl_set_state(BATTLE_STATE_END_PLAYER_TURN); } else { popup->popupType = 0; - if (battleStatus->selectedMoveID == 0x35) { - popup->popupType = 0x64; + if (battleStatus->selectedMoveID == MOVE_DOUBLE_DIP) { + popup->popupType = 100; popup->unk_31C = 1; popup->unk_320 = battleStatus->itemUsesLeft; } - if (battleStatus->selectedMoveID == 0x36) { + if (battleStatus->selectedMoveID == MOVE_TRIPLE_DIP) { popup->unk_31C = 2; - popup->popupType += 0xc8; + popup->popupType += 200; popup->unk_320 = battleStatus->itemUsesLeft; } if (battleStatus->unk_4C[4] < 0) { battleStatus->unk_4C[4] = 0; } - popup->numEntries = s4; - s8 = battleStatus->unk_4C[4]; - popup->initialPos = s8; + popup->numEntries = entryIdx; + initialPos = battleStatus->unk_4C[4]; + popup->initialPos = initialPos; func_800F513C(popup); func_800F52BC(); - gBattleSubState = 0x47; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_UNUSED_2; } } break; - case 0x47: + case BATTLE_SUB_STATE_PLAYER_UNUSED_2: if (popup->result != 0) { - if (popup->result == 0xff) { + if (popup->result == 255) { battleStatus->itemUsesLeft = 1; - btl_set_state(0x16); + btl_set_state(BATTLE_STATE_END_PLAYER_TURN); } else { - battleStatus->unk_6C = 0x4a; - battleStatus->unk_6E = 0x4b; + battleStatus->unk_6C = BATTLE_SUB_STATE_PLAYER_UNUSED_5; + battleStatus->unk_6E = BATTLE_SUB_STATE_PLAYER_UNUSED_6; battleStatus->unk_1AA = popup->userIndex[popup->result - 1]; battleStatus->moveCategory = 2; battleStatus->selectedItemID = battleStatus->unk_1AA; - battleStatus->currentTargetListFlags = gItemTable[battleStatus->selectedItemID].targetFlags | 0x8000; + battleStatus->currentTargetListFlags = gItemTable[battleStatus->selectedItemID].targetFlags | ITEM_TARGET_FLAG_8000; battleStatus->currentAttackElement = 0; battleStatus->unk_4C[4] = popup->result - 1; hide_popup_menu(); D_802ACC60 = 5; - gBattleSubState = 0x48; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_UNUSED_3; } } break; - case 0x48: + case BATTLE_SUB_STATE_PLAYER_UNUSED_3: if (D_802ACC60 != 0) { D_802ACC60--; } else { - btl_set_state(0x11); + btl_set_state(BATTLE_STATE_SELECT_TARGET); } break; - case 0x49: + case BATTLE_SUB_STATE_PLAYER_UNUSED_4: if (D_802ACC60 != 0) { D_802ACC60--; } else { - gBattleSubState = 0x47; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_UNUSED_2; } break; - case 0x4a: + case BATTLE_SUB_STATE_PLAYER_UNUSED_5: func_800F16CC(); D_802ACC60 = 5; - gBattleSubState = 0x49; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_UNUSED_4; break; - case 0x4b: + case BATTLE_SUB_STATE_PLAYER_UNUSED_6: destroy_popup_menu(); break; - case 0x64: + case BATTLE_SUB_STATE_PLAYER_BERSERKER_1: if (playerData->bootsLevel >= 0) { - battleStatus->currentTargetListFlags = gMoveTable[0x1e].flags; + battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_JUMP5].flags; player_create_target_list(playerActor); - s1 = playerActor->targetListLength; + jumpTargetCount = playerActor->targetListLength; } else { - s1 = 0; + jumpTargetCount = 0; } + if (playerData->hammerLevel >= 0) { - battleStatus->currentTargetListFlags = gMoveTable[7].flags; + battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_HAMMER5].flags; player_create_target_list(playerActor); - v0 = playerActor->targetListLength; + hammerTargetCount = playerActor->targetListLength; } else { - v0 = 0; + hammerTargetCount = 0; } - if (s1 <= 0 && v0 <= 0) { + + if (jumpTargetCount <= 0 && hammerTargetCount <= 0) { battleStatus->moveCategory = 9; battleStatus->unk_95 = 0; - btl_set_state(0x16); + btl_set_state(BATTLE_STATE_END_PLAYER_TURN); } else { - s = 50; - if (s1 <= 0) { - s = 0; + jumpChance = 50; + if (jumpTargetCount <= 0) { + jumpChance = 0; } - if (v0 <= 0) { - s = 101; + if (hammerTargetCount <= 0) { + jumpChance = 101; } - if (rand_int(100) < s) { - battleStatus->selectedMoveID = 0x1e; + if (rand_int(100) < jumpChance) { + battleStatus->selectedMoveID = MOVE_UNUSED_JUMP5; battleStatus->moveCategory = 0; - battleStatus->currentTargetListFlags = gMoveTable[0x1e].flags; + battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_JUMP5].flags; battleStatus->selectedItemID = playerData->bootsLevel; player_create_target_list(playerActor); } else { - battleStatus->selectedMoveID = 7; + battleStatus->selectedMoveID = MOVE_UNUSED_HAMMER5; battleStatus->moveCategory = 1; - battleStatus->currentTargetListFlags = gMoveTable[7].flags; + battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_HAMMER5].flags; battleStatus->selectedItemID = playerData->hammerLevel; player_create_target_list(playerActor); } - btl_set_state(0x12); + btl_set_state(BATTLE_STATE_PLAYER_MOVE); } break; - case 0xc8: - s4 = 0; + case BATTLE_SUB_STATE_PLAYER_STRATEGIES_1: + entryIdx = 0; func_80263268(); if (battleStatus->changePartnerAllowed >= 0) { D_802AD678[0] = 5; D_802AD658[0] = battle_menu_leftJustfiedMessagesB[0]; D_802AD640[0] = battle_menu_PartnerHudScripts[playerData->currentPartner]; D_802AD690[0] = 1; - D_802AD6C0[0] = 0x1d00a1; + D_802AD6C0[0] = MSG_Menus_Action_ChangePartner; if (battleStatus->changePartnerAllowed <= 0) { D_802AD640[0] = battle_menu_DisabledPartnerHudScripts[playerData->currentPartner]; D_802AD690[0] = 0; D_802AD6A8[0] = 0; } - s4++; + entryIdx++; } - D_802AD640[s4] = battle_menu_DoNothingHudScripts.enabled; - D_802AD678[s4] = 9; - D_802AD690[s4] = 1; - D_802AD658[s4] = battle_menu_leftJustfiedMessagesA[9]; - D_802AD6C0[s4] = 0x1d00a2; - s4++; + D_802AD640[entryIdx] = battle_menu_DoNothingHudScripts.enabled; + D_802AD678[entryIdx] = 9; + D_802AD690[entryIdx] = 1; + D_802AD658[entryIdx] = battle_menu_leftJustfiedMessagesA[9]; + D_802AD6C0[entryIdx] = MSG_Menus_Action_DoNothing; + entryIdx++; - D_802AD640[s4] = battle_menu_FleeHudScripts.enabled; - D_802AD678[s4] = 3; - D_802AD690[s4] = 1; - D_802AD658[s4] = battle_menu_leftJustfiedMessagesA[3]; - D_802AD6C0[s4] = 0x1d00a3; - if (!(gBattleStatus.flags2 & 0x20)) { - D_802AD640[s4] = battle_menu_FleeHudScripts.disabled; - D_802AD690[s4] = 0; - D_802AD6A8[s4] = 1; + D_802AD640[entryIdx] = battle_menu_FleeHudScripts.enabled; + D_802AD678[entryIdx] = 3; + D_802AD690[entryIdx] = 1; + D_802AD658[entryIdx] = battle_menu_leftJustfiedMessagesA[3]; + D_802AD6C0[entryIdx] = MSG_Menus_Action_RunAway; + if (!(gBattleStatus.flags2 & BS_FLAGS2_20)) { + D_802AD640[entryIdx] = battle_menu_FleeHudScripts.disabled; + D_802AD690[entryIdx] = 0; + D_802AD6A8[entryIdx] = 1; } - s4++; + entryIdx++; if (battleStatus->unk_4C[7] < 0) { battleStatus->unk_4C[7] = 0; } - s8 = battleStatus->unk_4C[7]; - D_802AD66C = s4; - D_802AD670 = s8; + initialPos = battleStatus->unk_4C[7]; + D_802AD66C = entryIdx; + D_802AD670 = initialPos; func_802A45D8(); - gBattleSubState = 0xc9; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STRATEGIES_2; break; - case 0xc9: - s00 = func_802A4A54(); - if (s00 == -1) { - gBattleSubState = 0xcf; - } else if (s00 == 0) { - } else if (s00 == 0xff) { + case BATTLE_SUB_STATE_PLAYER_STRATEGIES_2: + submenuResult = func_802A4A54(); + if (submenuResult == -1) { + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STRATEGIES_8; + } else if (submenuResult == 0) { + } else if (submenuResult == 255) { func_802A1050(); D_802ACC60 = 8; D_802ACC6C = 4; - gBattleSubState = 1; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_1; btl_state_update_player_menu(); btl_state_update_player_menu(); } else { - battleStatus->currentSubmenu = D_802AD678[s00 - 1]; - battleStatus->unk_4C[7] = s00 - 1; + battleStatus->currentSubmenu = D_802AD678[submenuResult - 1]; + battleStatus->unk_4C[7] = submenuResult - 1; if (battleStatus->currentSubmenu == 5) { - gBattleSubState = 0x1e; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_1; btl_state_update_player_menu(); btl_state_update_player_menu(); } else { func_802A4718(); func_802A1030(); - gBattleSubState = 0xca; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STRATEGIES_3; } } break; - case 0xca: - s00 = func_802A4A54(); - if ((battleStatus->currentButtonsPressed & 0x4000) && s00 == 0) { + case BATTLE_SUB_STATE_PLAYER_STRATEGIES_3: + submenuResult = func_802A4A54(); + if ((battleStatus->currentButtonsPressed & BUTTON_B) && submenuResult == 0) { func_802A48FC(); func_802A1098(); - gBattleSubState = 0xcb; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STRATEGIES_4; } else if (func_802A11B0() != 0) { - battleStatus->unk_6C = 0xcc; - battleStatus->unk_6E = 0xcd; + battleStatus->unk_6C = BATTLE_SUB_STATE_PLAYER_STRATEGIES_5; + battleStatus->unk_6E = BATTLE_SUB_STATE_PLAYER_STRATEGIES_6; switch (battleStatus->currentSubmenu) { case 3: - gBattleSubState = 0xcd; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STRATEGIES_6; btl_state_update_player_menu(); battleStatus->moveCategory = 3; - battleStatus->selectedMoveID = 0x39; - btl_set_state(0x18); + battleStatus->selectedMoveID = MOVE_UNUSED_39; + btl_set_state(BATTLE_STATE_RUN_AWAY); break; case 9: battleStatus->hustleTurns = 0; - gBattleStatus.flags1 &= 0xfbffffff; + gBattleStatus.flags1 &= ~BS_FLAGS1_HUSTLE_DRINK_ON; gBattleSubState = battleStatus->unk_6E; btl_state_update_player_menu(); - btl_set_state(0x16); + btl_set_state(BATTLE_STATE_END_PLAYER_TURN); break; case 4: - gBattleSubState = 0xcd; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STRATEGIES_6; btl_state_update_player_menu(); - battleStatus->selectedMoveID = 0x31; + battleStatus->selectedMoveID = MOVE_UNUSED_DEFEND_PLUS; battleStatus->moveCategory = 4; - btl_set_state(0x19); + btl_set_state(BATTLE_STATE_DEFEND); break; case 10: - gBattleSubState = 0xcd; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STRATEGIES_6; btl_state_update_player_menu(); - btl_set_state(0xb); + btl_set_state(BATTLE_STATE_SWITCH_TO_PARTNER); break; } } break; - case 0xcb: + case BATTLE_SUB_STATE_PLAYER_STRATEGIES_4: func_802A4A54(); if (func_802A11B0() != 0) { D_802ACC60 = 8; D_802ACC6C = 4; - gBattleSubState = 1; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_MAIN_MENU_1; } break; - case 0xcc: + case BATTLE_SUB_STATE_PLAYER_STRATEGIES_5: func_802A48FC(); func_802A1098(); - gBattleSubState = 0xcb; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STRATEGIES_4; break; - case 0xcd: + case BATTLE_SUB_STATE_PLAYER_STRATEGIES_6: func_802A472C(); func_802A10B8(); break; - case 0xcf: + case BATTLE_SUB_STATE_PLAYER_STRATEGIES_8: if (func_802A4A54() != -1) { - gBattleSubState = 0xc9; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STRATEGIES_2; } break; - case 0x1e://0x74 - s4 = 0; - for (i = 1; i < 12; i++) { + case BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_1: + entryIdx = 0; + for (i = 1; i < ARRAY_COUNT(playerData->partners); i++) { s32 partnerId = D_8008EEC0[i]; if (playerData->partners[partnerId].enabled) { prop = &gPartnerPopupProperties[partnerId]; - popup->ptrIcon[s4] = battle_menu_PartnerHudScripts[partnerId]; - popup->userIndex[s4] = partnerId; - popup->enabled[s4] = 1; - popup->nameMsg[s4] = prop->nameMsg; - popup->descMsg[s4] = prop->battleDescMsg; - popup->value[s4] = playerData->partners[partnerId].level; + popup->ptrIcon[entryIdx] = battle_menu_PartnerHudScripts[partnerId]; + popup->userIndex[entryIdx] = partnerId; + popup->enabled[entryIdx] = 1; + popup->nameMsg[entryIdx] = prop->nameMsg; + popup->descMsg[entryIdx] = prop->battleDescMsg; + popup->value[entryIdx] = playerData->partners[partnerId].level; if (playerData->currentPartner == partnerId) { - popup->enabled[s4] = 0; - popup->ptrIcon[s4] = battle_menu_DisabledPartnerHudScripts[partnerId]; + popup->enabled[entryIdx] = 0; + popup->ptrIcon[entryIdx] = battle_menu_DisabledPartnerHudScripts[partnerId]; } - s4++; + entryIdx++; } } if (battleStatus->unk_4C[5] < 0) { battleStatus->unk_4C[5] = 0; } popup->popupType = 1; - popup->numEntries = s4; + popup->numEntries = entryIdx; popup->initialPos = D_8008EEF0[playerData->currentPartner] - 1; popup->unk_31C = 0; popup->unk_320 = 0; func_800F513C(popup); func_800F52BC(); - gBattleSubState = 0x1f; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_2; break; - case 0x1f: + case BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_2: if (popup->result == -1) { - gBattleSubState = 0x24; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_7; } else if (popup->result != 0) { if (popup->result == 255) { func_802A47E0(); - gBattleSubState = 0xC9; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_STRATEGIES_2; btl_state_update_player_menu(); btl_state_update_player_menu(); } else { - battleStatus->unk_6C = 0x22; - battleStatus->unk_6E = 0x23; + battleStatus->unk_6C = BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_5; + battleStatus->unk_6E = BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_6; battleStatus->unk_1AC = popup->userIndex[popup->result - 1]; battleStatus->moveCategory = 5; - battleStatus->selectedMoveID = 0x37; - battleStatus->currentTargetListFlags = 2; + battleStatus->selectedMoveID = MOVE_UNUSED_37; + battleStatus->currentTargetListFlags = ITEM_TARGET_FLAG_2; battleStatus->selectedItemID = battleStatus->unk_1AC; battleStatus->unk_4C[5] = popup->result - 1; hide_popup_menu(); func_802A4718(); func_802A1030(); - gBattleSubState = 0x20; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_3; } } break; - case 0x20: - if ((battleStatus->currentButtonsPressed & 0x4000) && popup->result == 0) { + case BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_3: + if ((battleStatus->currentButtonsPressed & BUTTON_B) && popup->result == 0) { func_800F16CC(); func_802A4A10(); func_802A1098(); - gBattleSubState = 0x21; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_4; } else { func_802A4A54(); if (func_802A11B0() != 0) { gBattleSubState = battleStatus->unk_6E; btl_state_update_player_menu(); - btl_set_state(0x1d); + btl_set_state(BATTLE_STATE_CHANGE_PARTNER); } } break; - case 0x21: + case BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_4: func_802A4A54(); if (func_802A11B0() != 0) { - gBattleSubState = 0x1f; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_2; } break; - case 0x22: + case BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_5: func_800F16CC(); func_802A4A10(); func_802A1098(); - gBattleSubState = 0x21; + gBattleSubState = BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_4; break; - case 0x23: + case BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_6: destroy_popup_menu(); func_802A472C(); func_802A10B8(); break; - case 0x24: - set_window_update(6, 2); - set_window_update(7, 2); + case BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_7: + set_window_update(WINDOW_ID_6, WINDOW_UPDATE_HIDE); + set_window_update(WINDOW_ID_7, WINDOW_UPDATE_HIDE); if (popup->result != -1) { - set_window_update(6, 9); - set_window_update(7, 9); - gBattleSubState = 0x1f; + set_window_update(WINDOW_ID_6, WINDOW_UPDATE_9); + set_window_update(WINDOW_ID_7, WINDOW_UPDATE_9); + gBattleSubState = BATTLE_SUB_STATE_PLAYER_CHANGE_MEMBER_2; } break; } } -#else -INCLUDE_ASM(s32, "415D90", btl_state_update_player_menu); -#endif void btl_state_draw_player_menu(void) { switch (gBattleSubState) { @@ -3930,7 +3903,7 @@ void btl_state_update_partner_menu(void) { item = &gItemTable[playerData->invItems[i]]; hudScript = &gItemHudScripts[item->hudElemID].enabled; - if (!(item->typeFlags & 2)) { + if (!(item->typeFlags & ITEM_TYPE_FLAG_BATTLE_USABLE)) { continue; } popupMenu->ptrIcon[popupIndex] = hudScript[0]; @@ -3968,7 +3941,7 @@ void btl_state_update_partner_menu(void) { battleStatus->unk_1AA = popupMenu->userIndex[popupMenu->result - 1]; battleStatus->moveCategory = 2; battleStatus->selectedItemID = battleStatus->unk_1AA; - battleStatus->currentTargetListFlags = gItemTable[battleStatus->selectedItemID].targetFlags | 0x8000; + battleStatus->currentTargetListFlags = gItemTable[battleStatus->selectedItemID].targetFlags | ITEM_TARGET_FLAG_8000; battleStatus->currentAttackElement = 0; battleStatus->unk_5C[4] = popupMenu->result - 1; hide_popup_menu(); @@ -4048,7 +4021,7 @@ void btl_state_update_partner_menu(void) { battleStatus->unk_1AC = popupMenu->userIndex[popupMenu->result - 1]; battleStatus->moveCategory = 5; battleStatus->selectedMoveID = MOVE_UNUSED_37; - battleStatus->currentTargetListFlags = 2; + battleStatus->currentTargetListFlags = ITEM_TARGET_FLAG_2; battleStatus->selectedItemID = battleStatus->unk_1AC; battleStatus->unk_5C[5] = popupMenu->result - 1; hide_popup_menu(); @@ -4319,8 +4292,8 @@ void btl_state_update_partner_menu(void) { battleStatus->unk_6E = BATTLE_SUB_STATE_PARTNER_CHANGE_PARTNER_6; battleStatus->unk_1AC = popupMenu->userIndex[popupMenu->result - 1]; battleStatus->moveCategory = 5; - battleStatus->selectedMoveID = 0x37; - battleStatus->currentTargetListFlags = 2; + battleStatus->selectedMoveID = MOVE_UNUSED_37; + battleStatus->currentTargetListFlags = ITEM_TARGET_FLAG_2; battleStatus->selectedItemID = battleStatus->unk_1AC; battleStatus->unk_5C[5] = popupMenu->result - 1; hide_popup_menu(); diff --git a/ver/us/asm/nonmatchings/415D90/btl_state_update_player_menu.s b/ver/us/asm/nonmatchings/415D90/btl_state_update_player_menu.s deleted file mode 100644 index 9e7ba6ba27..0000000000 --- a/ver/us/asm/nonmatchings/415D90/btl_state_update_player_menu.s +++ /dev/null @@ -1,2797 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_802ABBD8 -.word .L802A6170_41AF00, .L802A69A0_41B730, .L802A6A88_41B818, .L802A6B98_41B928, .L802A6BB8_41B948, .L802A762C_41C3BC, .L802A6BD0_41B960, .L802A6BEC_41B97C, .L802A6C34_41B9C4, .L802A6C64_41B9F4, .L802A6C74_41BA04, .L802A6D58_41BAE8, .L802A6D84_41BB14, .L802A72D4_41C064, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A6D94_41BB24, .L802A6F1C_41BCAC, .L802A6FD4_41BD64, .L802A7038_41BDC8, .L802A7058_41BDE8, .L802A7080_41BE10, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A7E3C_41CBCC, .L802A7F54_41CCE4, .L802A8024_41CDB4, .L802A80A0_41CE30, .L802A80C0_41CE50, .L802A80E0_41CE70, .L802A80F8_41CE88, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A7090_41BE20, .L802A7198_41BF28, .L802A7264_41BFF4, .L802A729C_41C02C, .L802A72B4_41C044, .L802A72CC_41C05C, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A72E4_41C074, .L802A74A4_41C234, .L802A7528_41C2B8, .L802A75F4_41C384, .L802A7614_41C3A4, .L802A762C_41C3BC, .L802A763C_41C3CC, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A7658_41C3E8, .L802A77F0_41C580, .L802A7898_41C628, .L802A78BC_41C64C, .L802A78E0_41C670, .L802A78FC_41C68C, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A790C_41C69C, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A7A24_41C7B4, .L802A7BEC_41C97C, .L802A7C7C_41CA0C, .L802A7DD4_41CB64, .L802A7E08_41CB98, .L802A80E8_41CE78, .L802A8144_41CED4, .L802A7E20_41CBB0, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A8144_41CED4, .L802A5C50_41A9E0 - -.section .text - -glabel btl_state_update_player_menu -/* 41A718 802A5988 27BDFFB0 */ addiu $sp, $sp, -0x50 -/* 41A71C 802A598C AFB60028 */ sw $s6, 0x28($sp) -/* 41A720 802A5990 3C16800E */ lui $s6, %hi(gBattleStatus) -/* 41A724 802A5994 26D6C070 */ addiu $s6, $s6, %lo(gBattleStatus) -/* 41A728 802A5998 AFB50024 */ sw $s5, 0x24($sp) -/* 41A72C 802A599C 3C158011 */ lui $s5, %hi(gPlayerData) -/* 41A730 802A59A0 26B5F290 */ addiu $s5, $s5, %lo(gPlayerData) -/* 41A734 802A59A4 AFB00010 */ sw $s0, 0x10($sp) -/* 41A738 802A59A8 3C10800E */ lui $s0, %hi(gBattleSubState) -/* 41A73C 802A59AC 2610C4DC */ addiu $s0, $s0, %lo(gBattleSubState) -/* 41A740 802A59B0 AFBF0034 */ sw $ra, 0x34($sp) -/* 41A744 802A59B4 AFBE0030 */ sw $fp, 0x30($sp) -/* 41A748 802A59B8 AFB7002C */ sw $s7, 0x2c($sp) -/* 41A74C 802A59BC AFB40020 */ sw $s4, 0x20($sp) -/* 41A750 802A59C0 AFB3001C */ sw $s3, 0x1c($sp) -/* 41A754 802A59C4 AFB20018 */ sw $s2, 0x18($sp) -/* 41A758 802A59C8 AFB10014 */ sw $s1, 0x14($sp) -/* 41A75C 802A59CC F7B80048 */ sdc1 $f24, 0x48($sp) -/* 41A760 802A59D0 F7B60040 */ sdc1 $f22, 0x40($sp) -/* 41A764 802A59D4 F7B40038 */ sdc1 $f20, 0x38($sp) -/* 41A768 802A59D8 8ED700D8 */ lw $s7, 0xd8($s6) -/* 41A76C 802A59DC 8E030000 */ lw $v1, ($s0) -/* 41A770 802A59E0 8ED100DC */ lw $s1, 0xdc($s6) -/* 41A774 802A59E4 10600005 */ beqz $v1, .L802A59FC -/* 41A778 802A59E8 2402012C */ addiu $v0, $zero, 0x12c -/* 41A77C 802A59EC 10620023 */ beq $v1, $v0, .L802A5A7C -/* 41A780 802A59F0 00000000 */ nop -/* 41A784 802A59F4 080A9709 */ j .L802A5C24 -/* 41A788 802A59F8 00000000 */ nop -.L802A59FC: -/* 41A78C 802A59FC 2402FFFF */ addiu $v0, $zero, -1 -/* 41A790 802A5A00 A2C20178 */ sb $v0, 0x178($s6) -/* 41A794 802A5A04 A6C0017C */ sh $zero, 0x17c($s6) -/* 41A798 802A5A08 0C0A9606 */ jal can_btl_state_update_switch_to_player -/* 41A79C 802A5A0C AEC00188 */ sw $zero, 0x188($s6) -/* 41A7A0 802A5A10 104008D8 */ beqz $v0, .L802A7D74 -/* 41A7A4 802A5A14 00000000 */ nop -/* 41A7A8 802A5A18 0C093903 */ jal btl_cam_use_preset -/* 41A7AC 802A5A1C 24040002 */ addiu $a0, $zero, 2 -/* 41A7B0 802A5A20 0C093936 */ jal btl_cam_move -/* 41A7B4 802A5A24 2404000A */ addiu $a0, $zero, 0xa -/* 41A7B8 802A5A28 8EC20000 */ lw $v0, ($s6) -/* 41A7BC 802A5A2C 3C030010 */ lui $v1, 0x10 -/* 41A7C0 802A5A30 00431024 */ and $v0, $v0, $v1 -/* 41A7C4 802A5A34 14400004 */ bnez $v0, .L802A5A48 -/* 41A7C8 802A5A38 2402012C */ addiu $v0, $zero, 0x12c -/* 41A7CC 802A5A3C 2402012E */ addiu $v0, $zero, 0x12e -/* 41A7D0 802A5A40 080A9709 */ j .L802A5C24 -/* 41A7D4 802A5A44 AE020000 */ sw $v0, ($s0) -.L802A5A48: -/* 41A7D8 802A5A48 C6200138 */ lwc1 $f0, 0x138($s1) -/* 41A7DC 802A5A4C C6220140 */ lwc1 $f2, 0x140($s1) -/* 41A7E0 802A5A50 E620000C */ swc1 $f0, 0xc($s1) -/* 41A7E4 802A5A54 E6220014 */ swc1 $f2, 0x14($s1) -/* 41A7E8 802A5A58 C6E00138 */ lwc1 $f0, 0x138($s7) -/* 41A7EC 802A5A5C AE020000 */ sw $v0, ($s0) -/* 41A7F0 802A5A60 E6200018 */ swc1 $f0, 0x18($s1) -/* 41A7F4 802A5A64 C6E00140 */ lwc1 $f0, 0x140($s7) -/* 41A7F8 802A5A68 24020004 */ addiu $v0, $zero, 4 -/* 41A7FC 802A5A6C A6220070 */ sh $v0, 0x70($s1) -/* 41A800 802A5A70 AE200054 */ sw $zero, 0x54($s1) -/* 41A804 802A5A74 080A9709 */ j .L802A5C24 -/* 41A808 802A5A78 E6200020 */ swc1 $f0, 0x20($s1) -.L802A5A7C: -/* 41A80C 802A5A7C 86220070 */ lh $v0, 0x70($s1) -/* 41A810 802A5A80 10400022 */ beqz $v0, .L802A5B0C -/* 41A814 802A5A84 00000000 */ nop -/* 41A818 802A5A88 C6200018 */ lwc1 $f0, 0x18($s1) -/* 41A81C 802A5A8C C6280144 */ lwc1 $f8, 0x144($s1) -/* 41A820 802A5A90 C6220020 */ lwc1 $f2, 0x20($s1) -/* 41A824 802A5A94 46080001 */ sub.s $f0, $f0, $f8 -/* 41A828 802A5A98 C624014C */ lwc1 $f4, 0x14c($s1) -/* 41A82C 802A5A9C 46041081 */ sub.s $f2, $f2, $f4 -/* 41A830 802A5AA0 44823000 */ mtc1 $v0, $f6 -/* 41A834 802A5AA4 00000000 */ nop -/* 41A838 802A5AA8 468031A0 */ cvt.s.w $f6, $f6 -/* 41A83C 802A5AAC 46060003 */ div.s $f0, $f0, $f6 -/* 41A840 802A5AB0 46004200 */ add.s $f8, $f8, $f0 -/* 41A844 802A5AB4 46003006 */ mov.s $f0, $f6 -/* 41A848 802A5AB8 46061083 */ div.s $f2, $f2, $f6 -/* 41A84C 802A5ABC C620000C */ lwc1 $f0, 0xc($s1) -/* 41A850 802A5AC0 46022100 */ add.s $f4, $f4, $f2 -/* 41A854 802A5AC4 E6280144 */ swc1 $f8, 0x144($s1) -/* 41A858 802A5AC8 E624014C */ swc1 $f4, 0x14c($s1) -/* 41A85C 802A5ACC C6E40144 */ lwc1 $f4, 0x144($s7) -/* 41A860 802A5AD0 46040001 */ sub.s $f0, $f0, $f4 -/* 41A864 802A5AD4 46003086 */ mov.s $f2, $f6 -/* 41A868 802A5AD8 46060003 */ div.s $f0, $f0, $f6 -/* 41A86C 802A5ADC 46002100 */ add.s $f4, $f4, $f0 -/* 41A870 802A5AE0 E6E40144 */ swc1 $f4, 0x144($s7) -/* 41A874 802A5AE4 C6200014 */ lwc1 $f0, 0x14($s1) -/* 41A878 802A5AE8 C6E4014C */ lwc1 $f4, 0x14c($s7) -/* 41A87C 802A5AEC 86220070 */ lh $v0, 0x70($s1) -/* 41A880 802A5AF0 46040001 */ sub.s $f0, $f0, $f4 -/* 41A884 802A5AF4 44821000 */ mtc1 $v0, $f2 -/* 41A888 802A5AF8 00000000 */ nop -/* 41A88C 802A5AFC 468010A0 */ cvt.s.w $f2, $f2 -/* 41A890 802A5B00 46020003 */ div.s $f0, $f0, $f2 -/* 41A894 802A5B04 46002100 */ add.s $f4, $f4, $f0 -/* 41A898 802A5B08 E6E4014C */ swc1 $f4, 0x14c($s7) -.L802A5B0C: -/* 41A89C 802A5B0C C62C0054 */ lwc1 $f12, 0x54($s1) -/* 41A8A0 802A5B10 3C0140C9 */ lui $at, 0x40c9 -/* 41A8A4 802A5B14 34210FD0 */ ori $at, $at, 0xfd0 -/* 41A8A8 802A5B18 4481B000 */ mtc1 $at, $f22 -/* 41A8AC 802A5B1C 00000000 */ nop -/* 41A8B0 802A5B20 46166302 */ mul.s $f12, $f12, $f22 -/* 41A8B4 802A5B24 00000000 */ nop -/* 41A8B8 802A5B28 3C0143B4 */ lui $at, 0x43b4 -/* 41A8BC 802A5B2C 4481C000 */ mtc1 $at, $f24 -/* 41A8C0 802A5B30 3C014180 */ lui $at, 0x4180 -/* 41A8C4 802A5B34 4481A000 */ mtc1 $at, $f20 -/* 41A8C8 802A5B38 0C00A85B */ jal sin_rad -/* 41A8CC 802A5B3C 46186303 */ div.s $f12, $f12, $f24 -/* 41A8D0 802A5B40 46140002 */ mul.s $f0, $f0, $f20 -/* 41A8D4 802A5B44 00000000 */ nop -/* 41A8D8 802A5B48 C622014C */ lwc1 $f2, 0x14c($s1) -/* 41A8DC 802A5B4C 46001081 */ sub.s $f2, $f2, $f0 -/* 41A8E0 802A5B50 C62C0054 */ lwc1 $f12, 0x54($s1) -/* 41A8E4 802A5B54 46006307 */ neg.s $f12, $f12 -/* 41A8E8 802A5B58 0C00A6C9 */ jal clamp_angle -/* 41A8EC 802A5B5C E622014C */ swc1 $f2, 0x14c($s1) -/* 41A8F0 802A5B60 C62C0054 */ lwc1 $f12, 0x54($s1) -/* 41A8F4 802A5B64 46166302 */ mul.s $f12, $f12, $f22 -/* 41A8F8 802A5B68 00000000 */ nop -/* 41A8FC 802A5B6C E620018C */ swc1 $f0, 0x18c($s1) -/* 41A900 802A5B70 0C00A85B */ jal sin_rad -/* 41A904 802A5B74 46186303 */ div.s $f12, $f12, $f24 -/* 41A908 802A5B78 46140002 */ mul.s $f0, $f0, $f20 -/* 41A90C 802A5B7C 00000000 */ nop -/* 41A910 802A5B80 C6E2014C */ lwc1 $f2, 0x14c($s7) -/* 41A914 802A5B84 46001080 */ add.s $f2, $f2, $f0 -/* 41A918 802A5B88 E6E2014C */ swc1 $f2, 0x14c($s7) -/* 41A91C 802A5B8C C62C0054 */ lwc1 $f12, 0x54($s1) -/* 41A920 802A5B90 0C00A6C9 */ jal clamp_angle -/* 41A924 802A5B94 46006307 */ neg.s $f12, $f12 -/* 41A928 802A5B98 E6E0018C */ swc1 $f0, 0x18c($s7) -/* 41A92C 802A5B9C C6200054 */ lwc1 $f0, 0x54($s1) -/* 41A930 802A5BA0 3C0142B4 */ lui $at, 0x42b4 -/* 41A934 802A5BA4 44811000 */ mtc1 $at, $f2 -/* 41A938 802A5BA8 86220070 */ lh $v0, 0x70($s1) -/* 41A93C 802A5BAC 46020000 */ add.s $f0, $f0, $f2 -/* 41A940 802A5BB0 96230070 */ lhu $v1, 0x70($s1) -/* 41A944 802A5BB4 10400004 */ beqz $v0, .L802A5BC8 -/* 41A948 802A5BB8 E6200054 */ swc1 $f0, 0x54($s1) -/* 41A94C 802A5BBC 2462FFFF */ addiu $v0, $v1, -1 -/* 41A950 802A5BC0 080A9709 */ j .L802A5C24 -/* 41A954 802A5BC4 A6220070 */ sh $v0, 0x70($s1) -.L802A5BC8: -/* 41A958 802A5BC8 C6200018 */ lwc1 $f0, 0x18($s1) -/* 41A95C 802A5BCC C6220020 */ lwc1 $f2, 0x20($s1) -/* 41A960 802A5BD0 C624000C */ lwc1 $f4, 0xc($s1) -/* 41A964 802A5BD4 E6200144 */ swc1 $f0, 0x144($s1) -/* 41A968 802A5BD8 E622014C */ swc1 $f2, 0x14c($s1) -/* 41A96C 802A5BDC E6E40144 */ swc1 $f4, 0x144($s7) -/* 41A970 802A5BE0 C6200014 */ lwc1 $f0, 0x14($s1) -/* 41A974 802A5BE4 E6E0014C */ swc1 $f0, 0x14c($s7) -/* 41A978 802A5BE8 C6200144 */ lwc1 $f0, 0x144($s1) -/* 41A97C 802A5BEC C622014C */ lwc1 $f2, 0x14c($s1) -/* 41A980 802A5BF0 3C04FFEF */ lui $a0, 0xffef -/* 41A984 802A5BF4 E6200138 */ swc1 $f0, 0x138($s1) -/* 41A988 802A5BF8 E6220140 */ swc1 $f2, 0x140($s1) -/* 41A98C 802A5BFC C6E00144 */ lwc1 $f0, 0x144($s7) -/* 41A990 802A5C00 C6E2014C */ lwc1 $f2, 0x14c($s7) -/* 41A994 802A5C04 3484FFFF */ ori $a0, $a0, 0xffff -/* 41A998 802A5C08 E6E00138 */ swc1 $f0, 0x138($s7) -/* 41A99C 802A5C0C E6E20140 */ swc1 $f2, 0x140($s7) -/* 41A9A0 802A5C10 8EC20000 */ lw $v0, ($s6) -/* 41A9A4 802A5C14 2403012E */ addiu $v1, $zero, 0x12e -/* 41A9A8 802A5C18 AE030000 */ sw $v1, ($s0) -/* 41A9AC 802A5C1C 00441024 */ and $v0, $v0, $a0 -/* 41A9B0 802A5C20 AEC20000 */ sw $v0, ($s6) -.L802A5C24: -/* 41A9B4 802A5C24 3C02800E */ lui $v0, %hi(gBattleSubState) -/* 41A9B8 802A5C28 8C42C4DC */ lw $v0, %lo(gBattleSubState)($v0) -/* 41A9BC 802A5C2C 2443FFFF */ addiu $v1, $v0, -1 -/* 41A9C0 802A5C30 2C62012E */ sltiu $v0, $v1, 0x12e -/* 41A9C4 802A5C34 10400943 */ beqz $v0, .L802A8144_41CED4 -/* 41A9C8 802A5C38 00031080 */ sll $v0, $v1, 2 -/* 41A9CC 802A5C3C 3C01802B */ lui $at, %hi(jtbl_802ABBD8) -/* 41A9D0 802A5C40 00220821 */ addu $at, $at, $v0 -/* 41A9D4 802A5C44 8C22BBD8 */ lw $v0, %lo(jtbl_802ABBD8)($at) -/* 41A9D8 802A5C48 00400008 */ jr $v0 -/* 41A9DC 802A5C4C 00000000 */ nop -.L802A5C50_41A9E0: -/* 41A9E0 802A5C50 3C10800E */ lui $s0, %hi(gBattleStatus) -/* 41A9E4 802A5C54 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus) -/* 41A9E8 802A5C58 3C03FBFF */ lui $v1, 0xfbff -/* 41A9EC 802A5C5C 8E020000 */ lw $v0, ($s0) -/* 41A9F0 802A5C60 3463FFFF */ ori $v1, $v1, 0xffff -/* 41A9F4 802A5C64 34420002 */ ori $v0, $v0, 2 -/* 41A9F8 802A5C68 AE020000 */ sw $v0, ($s0) -/* 41A9FC 802A5C6C 8EE20000 */ lw $v0, ($s7) -/* 41AA00 802A5C70 3C040800 */ lui $a0, 0x800 -/* 41AA04 802A5C74 00431024 */ and $v0, $v0, $v1 -/* 41AA08 802A5C78 00441025 */ or $v0, $v0, $a0 -/* 41AA0C 802A5C7C 12200006 */ beqz $s1, .L802A5C98 -/* 41AA10 802A5C80 AEE20000 */ sw $v0, ($s7) -/* 41AA14 802A5C84 8E220000 */ lw $v0, ($s1) -/* 41AA18 802A5C88 3C030400 */ lui $v1, 0x400 -/* 41AA1C 802A5C8C 00431025 */ or $v0, $v0, $v1 -/* 41AA20 802A5C90 00441025 */ or $v0, $v0, $a0 -/* 41AA24 802A5C94 AE220000 */ sw $v0, ($s1) -.L802A5C98: -/* 41AA28 802A5C98 0C098C9A */ jal func_80263268 -/* 41AA2C 802A5C9C 00000000 */ nop -/* 41AA30 802A5CA0 0C098CC0 */ jal func_80263300 -/* 41AA34 802A5CA4 00000000 */ nop -/* 41AA38 802A5CA8 0C098D2E */ jal btl_init_menu_boots -/* 41AA3C 802A5CAC 00000000 */ nop -/* 41AA40 802A5CB0 0C098DB9 */ jal btl_init_menu_hammer -/* 41AA44 802A5CB4 00000000 */ nop -/* 41AA48 802A5CB8 02E0202D */ daddu $a0, $s7, $zero -/* 41AA4C 802A5CBC 0C099CAB */ jal player_team_is_ability_active -/* 41AA50 802A5CC0 24050015 */ addiu $a1, $zero, 0x15 -/* 41AA54 802A5CC4 1440091D */ bnez $v0, .L802A813C -/* 41AA58 802A5CC8 24020064 */ addiu $v0, $zero, 0x64 -/* 41AA5C 802A5CCC 0000A02D */ daddu $s4, $zero, $zero -/* 41AA60 802A5CD0 82C2004C */ lb $v0, 0x4c($s6) -/* 41AA64 802A5CD4 04410002 */ bgez $v0, .L802A5CE0 -/* 41AA68 802A5CD8 241E0002 */ addiu $fp, $zero, 2 -/* 41AA6C 802A5CDC A2C0004C */ sb $zero, 0x4c($s6) -.L802A5CE0: -/* 41AA70 802A5CE0 3C03802B */ lui $v1, %hi(battle_menu_StrategiesHudScript) -/* 41AA74 802A5CE4 8C63B478 */ lw $v1, %lo(battle_menu_StrategiesHudScript)($v1) -/* 41AA78 802A5CE8 24020007 */ addiu $v0, $zero, 7 -/* 41AA7C 802A5CEC 3C01802B */ lui $at, %hi(battle_menu_submenuIDs) -/* 41AA80 802A5CF0 AC22D0B8 */ sw $v0, %lo(battle_menu_submenuIDs)($at) -/* 41AA84 802A5CF4 24020001 */ addiu $v0, $zero, 1 -/* 41AA88 802A5CF8 3C01802B */ lui $at, %hi(battle_menu_isEnabled) -/* 41AA8C 802A5CFC AC22D0D0 */ sw $v0, %lo(battle_menu_isEnabled)($at) -/* 41AA90 802A5D00 3C02802B */ lui $v0, %hi(battle_menu_centeredMessagesC) -/* 41AA94 802A5D04 8C42B4DC */ lw $v0, %lo(battle_menu_centeredMessagesC)($v0) -/* 41AA98 802A5D08 3C01802B */ lui $at, %hi(main_battle_menu_JumpHudScripts) -/* 41AA9C 802A5D0C AC23D078 */ sw $v1, %lo(main_battle_menu_JumpHudScripts)($at) -/* 41AAA0 802A5D10 82C30083 */ lb $v1, 0x83($s6) -/* 41AAA4 802A5D14 3C04802B */ lui $a0, %hi(battle_menu_messageIDs) -/* 41AAA8 802A5D18 2484D090 */ addiu $a0, $a0, %lo(battle_menu_messageIDs) -/* 41AAAC 802A5D1C 107E0006 */ beq $v1, $fp, .L802A5D38 -/* 41AAB0 802A5D20 AC820000 */ sw $v0, ($a0) -/* 41AAB4 802A5D24 8E020000 */ lw $v0, ($s0) -/* 41AAB8 802A5D28 3C030200 */ lui $v1, 0x200 -/* 41AABC 802A5D2C 00431024 */ and $v0, $v0, $v1 -/* 41AAC0 802A5D30 10400004 */ beqz $v0, .L802A5D44 -/* 41AAC4 802A5D34 00000000 */ nop -.L802A5D38: -/* 41AAC8 802A5D38 3C02001D */ lui $v0, 0x1d -/* 41AACC 802A5D3C 34420054 */ ori $v0, $v0, 0x54 -/* 41AAD0 802A5D40 AC820000 */ sw $v0, ($a0) -.L802A5D44: -/* 41AAD4 802A5D44 3C08802B */ lui $t0, %hi(battle_menu_isMessageDisabled) -/* 41AAD8 802A5D48 2508D0E8 */ addiu $t0, $t0, %lo(battle_menu_isMessageDisabled) -/* 41AADC 802A5D4C 00141880 */ sll $v1, $s4, 2 -/* 41AAE0 802A5D50 00682021 */ addu $a0, $v1, $t0 -/* 41AAE4 802A5D54 AC800000 */ sw $zero, ($a0) -/* 41AAE8 802A5D58 96C20070 */ lhu $v0, 0x70($s6) -/* 41AAEC 802A5D5C 30420080 */ andi $v0, $v0, 0x80 -/* 41AAF0 802A5D60 1440000B */ bnez $v0, .L802A5D90 -/* 41AAF4 802A5D64 00000000 */ nop -/* 41AAF8 802A5D68 3C02802B */ lui $v0, %hi(battle_menu_StrategiesHudScript+4) -/* 41AAFC 802A5D6C 8C42B47C */ lw $v0, %lo(battle_menu_StrategiesHudScript+4)($v0) -/* 41AB00 802A5D70 3C01802B */ lui $at, %hi(battle_menu_isEnabled) -/* 41AB04 802A5D74 00230821 */ addu $at, $at, $v1 -/* 41AB08 802A5D78 AC20D0D0 */ sw $zero, %lo(battle_menu_isEnabled)($at) -/* 41AB0C 802A5D7C 3C01802B */ lui $at, %hi(main_battle_menu_JumpHudScripts) -/* 41AB10 802A5D80 00230821 */ addu $at, $at, $v1 -/* 41AB14 802A5D84 AC22D078 */ sw $v0, %lo(main_battle_menu_JumpHudScripts)($at) -/* 41AB18 802A5D88 24020048 */ addiu $v0, $zero, 0x48 -/* 41AB1C 802A5D8C AC820000 */ sw $v0, ($a0) -.L802A5D90: -/* 41AB20 802A5D90 82C3004C */ lb $v1, 0x4c($s6) -/* 41AB24 802A5D94 24020007 */ addiu $v0, $zero, 7 -/* 41AB28 802A5D98 50620001 */ beql $v1, $v0, .L802A5DA0 -/* 41AB2C 802A5D9C 0280F02D */ daddu $fp, $s4, $zero -.L802A5DA0: -/* 41AB30 802A5DA0 82C2007D */ lb $v0, 0x7d($s6) -/* 41AB34 802A5DA4 04400034 */ bltz $v0, .L802A5E78 -/* 41AB38 802A5DA8 26940001 */ addiu $s4, $s4, 1 -/* 41AB3C 802A5DAC 3C03802B */ lui $v1, %hi(main_battle_menu_JumpHudScripts) -/* 41AB40 802A5DB0 2463D078 */ addiu $v1, $v1, %lo(main_battle_menu_JumpHudScripts) -/* 41AB44 802A5DB4 00142080 */ sll $a0, $s4, 2 -/* 41AB48 802A5DB8 3C07802B */ lui $a3, %hi(battle_menu_ItemHudScripts) -/* 41AB4C 802A5DBC 24E7B388 */ addiu $a3, $a3, %lo(battle_menu_ItemHudScripts) -/* 41AB50 802A5DC0 00833021 */ addu $a2, $a0, $v1 -/* 41AB54 802A5DC4 8CE20000 */ lw $v0, ($a3) -/* 41AB58 802A5DC8 24090002 */ addiu $t1, $zero, 2 -/* 41AB5C 802A5DCC ACC20000 */ sw $v0, ($a2) -/* 41AB60 802A5DD0 3C02802B */ lui $v0, %hi(battle_menu_isEnabled) -/* 41AB64 802A5DD4 2442D0D0 */ addiu $v0, $v0, %lo(battle_menu_isEnabled) -/* 41AB68 802A5DD8 00822821 */ addu $a1, $a0, $v0 -/* 41AB6C 802A5DDC 24020001 */ addiu $v0, $zero, 1 -/* 41AB70 802A5DE0 3C01802B */ lui $at, %hi(battle_menu_submenuIDs) -/* 41AB74 802A5DE4 00240821 */ addu $at, $at, $a0 -/* 41AB78 802A5DE8 AC29D0B8 */ sw $t1, %lo(battle_menu_submenuIDs)($at) -/* 41AB7C 802A5DEC ACA20000 */ sw $v0, ($a1) -/* 41AB80 802A5DF0 3C02802B */ lui $v0, %hi(battle_menu_centeredMessagesB) -/* 41AB84 802A5DF4 8C42B4C8 */ lw $v0, %lo(battle_menu_centeredMessagesB)($v0) -/* 41AB88 802A5DF8 3C01802B */ lui $at, %hi(battle_menu_messageIDs) -/* 41AB8C 802A5DFC 00240821 */ addu $at, $at, $a0 -/* 41AB90 802A5E00 AC22D090 */ sw $v0, %lo(battle_menu_messageIDs)($at) -/* 41AB94 802A5E04 82C2007D */ lb $v0, 0x7d($s6) -/* 41AB98 802A5E08 14400006 */ bnez $v0, .L802A5E24 -/* 41AB9C 802A5E0C 00881821 */ addu $v1, $a0, $t0 -/* 41ABA0 802A5E10 8CE20004 */ lw $v0, 4($a3) -/* 41ABA4 802A5E14 ACC20000 */ sw $v0, ($a2) -/* 41ABA8 802A5E18 24020045 */ addiu $v0, $zero, 0x45 -/* 41ABAC 802A5E1C ACA00000 */ sw $zero, ($a1) -/* 41ABB0 802A5E20 AC620000 */ sw $v0, ($v1) -.L802A5E24: -/* 41ABB4 802A5E24 96C20070 */ lhu $v0, 0x70($s6) -/* 41ABB8 802A5E28 30420004 */ andi $v0, $v0, 4 -/* 41ABBC 802A5E2C 14400006 */ bnez $v0, .L802A5E48 -/* 41ABC0 802A5E30 00881821 */ addu $v1, $a0, $t0 -/* 41ABC4 802A5E34 8CE20004 */ lw $v0, 4($a3) -/* 41ABC8 802A5E38 ACC20000 */ sw $v0, ($a2) -/* 41ABCC 802A5E3C 24020048 */ addiu $v0, $zero, 0x48 -/* 41ABD0 802A5E40 ACA00000 */ sw $zero, ($a1) -/* 41ABD4 802A5E44 AC620000 */ sw $v0, ($v1) -.L802A5E48: -/* 41ABD8 802A5E48 82C200B0 */ lb $v0, 0xb0($s6) -/* 41ABDC 802A5E4C 04400006 */ bltz $v0, .L802A5E68 -/* 41ABE0 802A5E50 00881821 */ addu $v1, $a0, $t0 -/* 41ABE4 802A5E54 8CE20004 */ lw $v0, 4($a3) -/* 41ABE8 802A5E58 ACC20000 */ sw $v0, ($a2) -/* 41ABEC 802A5E5C 24020048 */ addiu $v0, $zero, 0x48 -/* 41ABF0 802A5E60 ACA00000 */ sw $zero, ($a1) -/* 41ABF4 802A5E64 AC620000 */ sw $v0, ($v1) -.L802A5E68: -/* 41ABF8 802A5E68 82C2004C */ lb $v0, 0x4c($s6) -/* 41ABFC 802A5E6C 50490001 */ beql $v0, $t1, .L802A5E74 -/* 41AC00 802A5E70 0280F02D */ daddu $fp, $s4, $zero -.L802A5E74: -/* 41AC04 802A5E74 26940001 */ addiu $s4, $s4, 1 -.L802A5E78: -/* 41AC08 802A5E78 3C0C802B */ lui $t4, %hi(main_battle_menu_JumpHudScripts) -/* 41AC0C 802A5E7C 258CD078 */ addiu $t4, $t4, %lo(main_battle_menu_JumpHudScripts) -/* 41AC10 802A5E80 00141880 */ sll $v1, $s4, 2 -/* 41AC14 802A5E84 006C3021 */ addu $a2, $v1, $t4 -/* 41AC18 802A5E88 3C0B802B */ lui $t3, %hi(battle_menu_isEnabled) -/* 41AC1C 802A5E8C 256BD0D0 */ addiu $t3, $t3, %lo(battle_menu_isEnabled) -/* 41AC20 802A5E90 006B2821 */ addu $a1, $v1, $t3 -/* 41AC24 802A5E94 24090001 */ addiu $t1, $zero, 1 -/* 41AC28 802A5E98 3C0A802B */ lui $t2, %hi(battle_menu_centeredMessagesA) -/* 41AC2C 802A5E9C 254AB4C0 */ addiu $t2, $t2, %lo(battle_menu_centeredMessagesA) -/* 41AC30 802A5EA0 82A20000 */ lb $v0, ($s5) -/* 41AC34 802A5EA4 24420001 */ addiu $v0, $v0, 1 -/* 41AC38 802A5EA8 000210C0 */ sll $v0, $v0, 3 -/* 41AC3C 802A5EAC 3C01802B */ lui $at, %hi(battle_menu_JumpHudScripts) -/* 41AC40 802A5EB0 00220821 */ addu $at, $at, $v0 -/* 41AC44 802A5EB4 8C22B348 */ lw $v0, %lo(battle_menu_JumpHudScripts)($at) -/* 41AC48 802A5EB8 3C04802B */ lui $a0, %hi(battle_menu_JumpHudScripts) -/* 41AC4C 802A5EBC 2484B348 */ addiu $a0, $a0, %lo(battle_menu_JumpHudScripts) -/* 41AC50 802A5EC0 ACC20000 */ sw $v0, ($a2) -/* 41AC54 802A5EC4 3C01802B */ lui $at, %hi(battle_menu_submenuIDs) -/* 41AC58 802A5EC8 00230821 */ addu $at, $at, $v1 -/* 41AC5C 802A5ECC AC20D0B8 */ sw $zero, %lo(battle_menu_submenuIDs)($at) -/* 41AC60 802A5ED0 ACA90000 */ sw $t1, ($a1) -/* 41AC64 802A5ED4 8D420000 */ lw $v0, ($t2) -/* 41AC68 802A5ED8 3C07802B */ lui $a3, %hi(battle_menu_submenuIDs) -/* 41AC6C 802A5EDC 24E7D0B8 */ addiu $a3, $a3, %lo(battle_menu_submenuIDs) -/* 41AC70 802A5EE0 3C01802B */ lui $at, %hi(battle_menu_messageIDs) -/* 41AC74 802A5EE4 00230821 */ addu $at, $at, $v1 -/* 41AC78 802A5EE8 AC22D090 */ sw $v0, %lo(battle_menu_messageIDs)($at) -/* 41AC7C 802A5EEC 82C2007E */ lb $v0, 0x7e($s6) -/* 41AC80 802A5EF0 3C08802B */ lui $t0, %hi(battle_menu_messageIDs) -/* 41AC84 802A5EF4 2508D090 */ addiu $t0, $t0, %lo(battle_menu_messageIDs) -/* 41AC88 802A5EF8 1C400008 */ bgtz $v0, .L802A5F1C -/* 41AC8C 802A5EFC 00000000 */ nop -/* 41AC90 802A5F00 8C820000 */ lw $v0, ($a0) -/* 41AC94 802A5F04 ACC20000 */ sw $v0, ($a2) -/* 41AC98 802A5F08 24020043 */ addiu $v0, $zero, 0x43 -/* 41AC9C 802A5F0C ACA00000 */ sw $zero, ($a1) -/* 41ACA0 802A5F10 3C01802B */ lui $at, %hi(battle_menu_isMessageDisabled) -/* 41ACA4 802A5F14 00230821 */ addu $at, $at, $v1 -/* 41ACA8 802A5F18 AC22D0E8 */ sw $v0, %lo(battle_menu_isMessageDisabled)($at) -.L802A5F1C: -/* 41ACAC 802A5F1C 96C20070 */ lhu $v0, 0x70($s6) -/* 41ACB0 802A5F20 30420001 */ andi $v0, $v0, 1 -/* 41ACB4 802A5F24 14400008 */ bnez $v0, .L802A5F48 -/* 41ACB8 802A5F28 00000000 */ nop -/* 41ACBC 802A5F2C 8C820004 */ lw $v0, 4($a0) -/* 41ACC0 802A5F30 ACC20000 */ sw $v0, ($a2) -/* 41ACC4 802A5F34 24020048 */ addiu $v0, $zero, 0x48 -/* 41ACC8 802A5F38 ACA00000 */ sw $zero, ($a1) -/* 41ACCC 802A5F3C 3C01802B */ lui $at, %hi(battle_menu_isMessageDisabled) -/* 41ACD0 802A5F40 00230821 */ addu $at, $at, $v1 -/* 41ACD4 802A5F44 AC22D0E8 */ sw $v0, %lo(battle_menu_isMessageDisabled)($at) -.L802A5F48: -/* 41ACD8 802A5F48 82C200AF */ lb $v0, 0xaf($s6) -/* 41ACDC 802A5F4C 04400008 */ bltz $v0, .L802A5F70 -/* 41ACE0 802A5F50 00000000 */ nop -/* 41ACE4 802A5F54 8C820004 */ lw $v0, 4($a0) -/* 41ACE8 802A5F58 ACC20000 */ sw $v0, ($a2) -/* 41ACEC 802A5F5C 24020048 */ addiu $v0, $zero, 0x48 -/* 41ACF0 802A5F60 ACA00000 */ sw $zero, ($a1) -/* 41ACF4 802A5F64 3C01802B */ lui $at, %hi(battle_menu_isMessageDisabled) -/* 41ACF8 802A5F68 00230821 */ addu $at, $at, $v1 -/* 41ACFC 802A5F6C AC22D0E8 */ sw $v0, %lo(battle_menu_isMessageDisabled)($at) -.L802A5F70: -/* 41AD00 802A5F70 82C2004C */ lb $v0, 0x4c($s6) -/* 41AD04 802A5F74 50400001 */ beql $v0, $zero, .L802A5F7C -/* 41AD08 802A5F78 0280F02D */ daddu $fp, $s4, $zero -.L802A5F7C: -/* 41AD0C 802A5F7C 82A20001 */ lb $v0, 1($s5) -/* 41AD10 802A5F80 04400034 */ bltz $v0, .L802A6054 -/* 41AD14 802A5F84 26940001 */ addiu $s4, $s4, 1 -/* 41AD18 802A5F88 00142080 */ sll $a0, $s4, 2 -/* 41AD1C 802A5F8C 24420001 */ addiu $v0, $v0, 1 -/* 41AD20 802A5F90 000210C0 */ sll $v0, $v0, 3 -/* 41AD24 802A5F94 008C3021 */ addu $a2, $a0, $t4 -/* 41AD28 802A5F98 3C01802B */ lui $at, %hi(battle_menu_HammerHudScripts) -/* 41AD2C 802A5F9C 00220821 */ addu $at, $at, $v0 -/* 41AD30 802A5FA0 8C22B368 */ lw $v0, %lo(battle_menu_HammerHudScripts)($at) -/* 41AD34 802A5FA4 008B2821 */ addu $a1, $a0, $t3 -/* 41AD38 802A5FA8 ACC20000 */ sw $v0, ($a2) -/* 41AD3C 802A5FAC 00871021 */ addu $v0, $a0, $a3 -/* 41AD40 802A5FB0 AC490000 */ sw $t1, ($v0) -/* 41AD44 802A5FB4 ACA90000 */ sw $t1, ($a1) -/* 41AD48 802A5FB8 8D430004 */ lw $v1, 4($t2) -/* 41AD4C 802A5FBC 00881021 */ addu $v0, $a0, $t0 -/* 41AD50 802A5FC0 AC430000 */ sw $v1, ($v0) -/* 41AD54 802A5FC4 82C2007F */ lb $v0, 0x7f($s6) -/* 41AD58 802A5FC8 3C03802B */ lui $v1, %hi(battle_menu_HammerHudScripts) -/* 41AD5C 802A5FCC 1C400008 */ bgtz $v0, .L802A5FF0 -/* 41AD60 802A5FD0 2463B368 */ addiu $v1, $v1, %lo(battle_menu_HammerHudScripts) -/* 41AD64 802A5FD4 8C620000 */ lw $v0, ($v1) -/* 41AD68 802A5FD8 ACC20000 */ sw $v0, ($a2) -/* 41AD6C 802A5FDC 24020044 */ addiu $v0, $zero, 0x44 -/* 41AD70 802A5FE0 ACA00000 */ sw $zero, ($a1) -/* 41AD74 802A5FE4 3C01802B */ lui $at, %hi(battle_menu_isMessageDisabled) -/* 41AD78 802A5FE8 00240821 */ addu $at, $at, $a0 -/* 41AD7C 802A5FEC AC22D0E8 */ sw $v0, %lo(battle_menu_isMessageDisabled)($at) -.L802A5FF0: -/* 41AD80 802A5FF0 96C20070 */ lhu $v0, 0x70($s6) -/* 41AD84 802A5FF4 30420002 */ andi $v0, $v0, 2 -/* 41AD88 802A5FF8 14400008 */ bnez $v0, .L802A601C -/* 41AD8C 802A5FFC 00000000 */ nop -/* 41AD90 802A6000 8C620004 */ lw $v0, 4($v1) -/* 41AD94 802A6004 ACC20000 */ sw $v0, ($a2) -/* 41AD98 802A6008 24020048 */ addiu $v0, $zero, 0x48 -/* 41AD9C 802A600C ACA00000 */ sw $zero, ($a1) -/* 41ADA0 802A6010 3C01802B */ lui $at, %hi(battle_menu_isMessageDisabled) -/* 41ADA4 802A6014 00240821 */ addu $at, $at, $a0 -/* 41ADA8 802A6018 AC22D0E8 */ sw $v0, %lo(battle_menu_isMessageDisabled)($at) -.L802A601C: -/* 41ADAC 802A601C 82C200AE */ lb $v0, 0xae($s6) -/* 41ADB0 802A6020 04400008 */ bltz $v0, .L802A6044 -/* 41ADB4 802A6024 00000000 */ nop -/* 41ADB8 802A6028 8C620004 */ lw $v0, 4($v1) -/* 41ADBC 802A602C ACC20000 */ sw $v0, ($a2) -/* 41ADC0 802A6030 24020048 */ addiu $v0, $zero, 0x48 -/* 41ADC4 802A6034 ACA00000 */ sw $zero, ($a1) -/* 41ADC8 802A6038 3C01802B */ lui $at, %hi(battle_menu_isMessageDisabled) -/* 41ADCC 802A603C 00240821 */ addu $at, $at, $a0 -/* 41ADD0 802A6040 AC22D0E8 */ sw $v0, %lo(battle_menu_isMessageDisabled)($at) -.L802A6044: -/* 41ADD4 802A6044 82C2004C */ lb $v0, 0x4c($s6) -/* 41ADD8 802A6048 50490001 */ beql $v0, $t1, .L802A6050 -/* 41ADDC 802A604C 0280F02D */ daddu $fp, $s4, $zero -.L802A6050: -/* 41ADE0 802A6050 26940001 */ addiu $s4, $s4, 1 -.L802A6054: -/* 41ADE4 802A6054 82A2028E */ lb $v0, 0x28e($s5) -/* 41ADE8 802A6058 10400027 */ beqz $v0, .L802A60F8 -/* 41ADEC 802A605C 00141880 */ sll $v1, $s4, 2 -/* 41ADF0 802A6060 3C04802B */ lui $a0, %hi(main_battle_menu_JumpHudScripts) -/* 41ADF4 802A6064 2484D078 */ addiu $a0, $a0, %lo(main_battle_menu_JumpHudScripts) -/* 41ADF8 802A6068 3C06802B */ lui $a2, %hi(battle_menu_StarPowerHudScripts) -/* 41ADFC 802A606C 24C6B390 */ addiu $a2, $a2, %lo(battle_menu_StarPowerHudScripts) -/* 41AE00 802A6070 00642821 */ addu $a1, $v1, $a0 -/* 41AE04 802A6074 8CC20000 */ lw $v0, ($a2) -/* 41AE08 802A6078 24070008 */ addiu $a3, $zero, 8 -/* 41AE0C 802A607C ACA20000 */ sw $v0, ($a1) -/* 41AE10 802A6080 3C02802B */ lui $v0, %hi(battle_menu_isEnabled) -/* 41AE14 802A6084 2442D0D0 */ addiu $v0, $v0, %lo(battle_menu_isEnabled) -/* 41AE18 802A6088 00622021 */ addu $a0, $v1, $v0 -/* 41AE1C 802A608C 24020001 */ addiu $v0, $zero, 1 -/* 41AE20 802A6090 3C01802B */ lui $at, %hi(battle_menu_submenuIDs) -/* 41AE24 802A6094 00230821 */ addu $at, $at, $v1 -/* 41AE28 802A6098 AC27D0B8 */ sw $a3, %lo(battle_menu_submenuIDs)($at) -/* 41AE2C 802A609C AC820000 */ sw $v0, ($a0) -/* 41AE30 802A60A0 3C02802B */ lui $v0, %hi(battle_menu_centeredMessagesD) -/* 41AE34 802A60A4 8C42B4E0 */ lw $v0, %lo(battle_menu_centeredMessagesD)($v0) -/* 41AE38 802A60A8 3C01802B */ lui $at, %hi(battle_menu_messageIDs) -/* 41AE3C 802A60AC 00230821 */ addu $at, $at, $v1 -/* 41AE40 802A60B0 AC22D090 */ sw $v0, %lo(battle_menu_messageIDs)($at) -/* 41AE44 802A60B4 3C02802B */ lui $v0, %hi(battle_menu_isMessageDisabled) -/* 41AE48 802A60B8 2442D0E8 */ addiu $v0, $v0, %lo(battle_menu_isMessageDisabled) -/* 41AE4C 802A60BC 00621821 */ addu $v1, $v1, $v0 -/* 41AE50 802A60C0 AC600000 */ sw $zero, ($v1) -/* 41AE54 802A60C4 96C20070 */ lhu $v0, 0x70($s6) -/* 41AE58 802A60C8 30420100 */ andi $v0, $v0, 0x100 -/* 41AE5C 802A60CC 14400006 */ bnez $v0, .L802A60E8 -/* 41AE60 802A60D0 00000000 */ nop -/* 41AE64 802A60D4 8CC20004 */ lw $v0, 4($a2) -/* 41AE68 802A60D8 ACA20000 */ sw $v0, ($a1) -/* 41AE6C 802A60DC 24020048 */ addiu $v0, $zero, 0x48 -/* 41AE70 802A60E0 AC800000 */ sw $zero, ($a0) -/* 41AE74 802A60E4 AC620000 */ sw $v0, ($v1) -.L802A60E8: -/* 41AE78 802A60E8 82C2004C */ lb $v0, 0x4c($s6) -/* 41AE7C 802A60EC 50470001 */ beql $v0, $a3, .L802A60F4 -/* 41AE80 802A60F0 0280F02D */ daddu $fp, $s4, $zero -.L802A60F4: -/* 41AE84 802A60F4 26940001 */ addiu $s4, $s4, 1 -.L802A60F8: -/* 41AE88 802A60F8 24020002 */ addiu $v0, $zero, 2 -/* 41AE8C 802A60FC 005E1023 */ subu $v0, $v0, $fp -/* 41AE90 802A6100 3C01802B */ lui $at, %hi(main_menu_numOptions) -/* 41AE94 802A6104 AC34D0AC */ sw $s4, %lo(main_menu_numOptions)($at) -/* 41AE98 802A6108 3C01802B */ lui $at, %hi(D_802AD0A8) -/* 41AE9C 802A610C AC20D0A8 */ sw $zero, %lo(D_802AD0A8)($at) -/* 41AEA0 802A6110 3C01802B */ lui $at, %hi(D_802AD0B0) -/* 41AEA4 802A6114 AC3ED0B0 */ sw $fp, %lo(D_802AD0B0)($at) -/* 41AEA8 802A6118 3C01802B */ lui $at, %hi(D_802AD100) -/* 41AEAC 802A611C AC22D100 */ sw $v0, %lo(D_802AD100)($at) -/* 41AEB0 802A6120 0C0A9634 */ jal func_802A58D0 -/* 41AEB4 802A6124 00000000 */ nop -/* 41AEB8 802A6128 10400006 */ beqz $v0, .L802A6144 -/* 41AEBC 802A612C 00000000 */ nop -/* 41AEC0 802A6130 24020001 */ addiu $v0, $zero, 1 -/* 41AEC4 802A6134 3C01802B */ lui $at, %hi(D_802AD104) -/* 41AEC8 802A6138 AC22D104 */ sw $v0, %lo(D_802AD104)($at) -/* 41AECC 802A613C 080A9853 */ j .L802A614C -/* 41AED0 802A6140 00000000 */ nop -.L802A6144: -/* 41AED4 802A6144 3C01802B */ lui $at, %hi(D_802AD104) -/* 41AED8 802A6148 AC20D104 */ sw $zero, %lo(D_802AD104)($at) -.L802A614C: -/* 41AEDC 802A614C 0C0A8400 */ jal func_802A1000 -/* 41AEE0 802A6150 00000000 */ nop -/* 41AEE4 802A6154 24020008 */ addiu $v0, $zero, 8 -/* 41AEE8 802A6158 3C01802B */ lui $at, %hi(D_802ACC60) -/* 41AEEC 802A615C AC22CC60 */ sw $v0, %lo(D_802ACC60)($at) -/* 41AEF0 802A6160 3C01802B */ lui $at, %hi(D_802ACC6C) -/* 41AEF4 802A6164 AC20CC6C */ sw $zero, %lo(D_802ACC6C)($at) -/* 41AEF8 802A6168 080AA04F */ j .L802A813C -/* 41AEFC 802A616C 24020001 */ addiu $v0, $zero, 1 -.L802A6170_41AF00: -/* 41AF00 802A6170 82C2008B */ lb $v0, 0x8b($s6) -/* 41AF04 802A6174 10400005 */ beqz $v0, .L802A618C -/* 41AF08 802A6178 0000202D */ daddu $a0, $zero, $zero -/* 41AF0C 802A617C 0080282D */ daddu $a1, $a0, $zero -/* 41AF10 802A6180 3C060001 */ lui $a2, 1 -/* 41AF14 802A6184 080A9868 */ j .L802A61A0 -/* 41AF18 802A6188 34C60027 */ ori $a2, $a2, 0x27 -.L802A618C: -/* 41AF1C 802A618C 0C099751 */ jal func_80265D44 -/* 41AF20 802A6190 2404001C */ addiu $a0, $zero, 0x1c -/* 41AF24 802A6194 0000202D */ daddu $a0, $zero, $zero -/* 41AF28 802A6198 0080282D */ daddu $a1, $a0, $zero -/* 41AF2C 802A619C 0040302D */ daddu $a2, $v0, $zero -.L802A61A0: -/* 41AF30 802A61A0 0C098F3F */ jal set_animation -/* 41AF34 802A61A4 00000000 */ nop -/* 41AF38 802A61A8 0C0A846C */ jal func_802A11B0 -/* 41AF3C 802A61AC 00000000 */ nop -/* 41AF40 802A61B0 3C04802B */ lui $a0, %hi(D_802ACC6C) -/* 41AF44 802A61B4 2484CC6C */ addiu $a0, $a0, %lo(D_802ACC6C) -/* 41AF48 802A61B8 8C830000 */ lw $v1, ($a0) -/* 41AF4C 802A61BC 10600004 */ beqz $v1, .L802A61D0 -/* 41AF50 802A61C0 0040802D */ daddu $s0, $v0, $zero -/* 41AF54 802A61C4 2462FFFF */ addiu $v0, $v1, -1 -/* 41AF58 802A61C8 080A98A3 */ j .L802A628C -/* 41AF5C 802A61CC AC820000 */ sw $v0, ($a0) -.L802A61D0: -/* 41AF60 802A61D0 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 41AF64 802A61D4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 41AF68 802A61D8 3C030200 */ lui $v1, 0x200 -/* 41AF6C 802A61DC 00431024 */ and $v0, $v0, $v1 -/* 41AF70 802A61E0 1440002A */ bnez $v0, .L802A628C -/* 41AF74 802A61E4 00000000 */ nop -/* 41AF78 802A61E8 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 41AF7C 802A61EC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 41AF80 802A61F0 8C420010 */ lw $v0, 0x10($v0) -/* 41AF84 802A61F4 30422000 */ andi $v0, $v0, 0x2000 -/* 41AF88 802A61F8 10400024 */ beqz $v0, .L802A628C -/* 41AF8C 802A61FC 00000000 */ nop -/* 41AF90 802A6200 0C0A9634 */ jal func_802A58D0 -/* 41AF94 802A6204 00000000 */ nop -/* 41AF98 802A6208 10400013 */ beqz $v0, .L802A6258 -/* 41AF9C 802A620C 24020001 */ addiu $v0, $zero, 1 -/* 41AFA0 802A6210 82C3008B */ lb $v1, 0x8b($s6) -/* 41AFA4 802A6214 10620010 */ beq $v1, $v0, .L802A6258 -/* 41AFA8 802A6218 00000000 */ nop -/* 41AFAC 802A621C 0C05272D */ jal sfx_play_sound -/* 41AFB0 802A6220 2404000F */ addiu $a0, $zero, 0xf -/* 41AFB4 802A6224 3C02802B */ lui $v0, %hi(D_802AD002) -/* 41AFB8 802A6228 8042D002 */ lb $v0, %lo(D_802AD002)($v0) -/* 41AFBC 802A622C 3C03802B */ lui $v1, %hi(D_802AD06B) -/* 41AFC0 802A6230 8063D06B */ lb $v1, %lo(D_802AD06B)($v1) -/* 41AFC4 802A6234 00431021 */ addu $v0, $v0, $v1 -/* 41AFC8 802A6238 00021080 */ sll $v0, $v0, 2 -/* 41AFCC 802A623C 3C01802B */ lui $at, %hi(battle_menu_submenuIDs+0x3) -/* 41AFD0 802A6240 00220821 */ addu $at, $at, $v0 -/* 41AFD4 802A6244 9022D0BB */ lbu $v0, %lo(battle_menu_submenuIDs+0x3)($at) -/* 41AFD8 802A6248 0C0A842E */ jal func_802A10B8 -/* 41AFDC 802A624C A2C2004C */ sb $v0, 0x4c($s6) -/* 41AFE0 802A6250 080A9F71 */ j .L802A7DC4 -/* 41AFE4 802A6254 00000000 */ nop -.L802A6258: -/* 41AFE8 802A6258 122007BA */ beqz $s1, .L802A8144_41CED4 -/* 41AFEC 802A625C 3C030020 */ lui $v1, 0x20 -/* 41AFF0 802A6260 8E220000 */ lw $v0, ($s1) -/* 41AFF4 802A6264 00431024 */ and $v0, $v0, $v1 -/* 41AFF8 802A6268 144007B6 */ bnez $v0, .L802A8144_41CED4 -/* 41AFFC 802A626C 24020001 */ addiu $v0, $zero, 1 -/* 41B000 802A6270 82C3008B */ lb $v1, 0x8b($s6) -/* 41B004 802A6274 106207B3 */ beq $v1, $v0, .L802A8144_41CED4 -/* 41B008 802A6278 00000000 */ nop -/* 41B00C 802A627C 0C05272D */ jal sfx_play_sound -/* 41B010 802A6280 2404021D */ addiu $a0, $zero, 0x21d -/* 41B014 802A6284 080AA04F */ j .L802A813C -/* 41B018 802A6288 24020008 */ addiu $v0, $zero, 8 -.L802A628C: -/* 41B01C 802A628C 3C03802B */ lui $v1, %hi(D_802ACC60) -/* 41B020 802A6290 2463CC60 */ addiu $v1, $v1, %lo(D_802ACC60) -/* 41B024 802A6294 8C620000 */ lw $v0, ($v1) -/* 41B028 802A6298 5440058D */ bnel $v0, $zero, .L802A78D0 -/* 41B02C 802A629C 2442FFFF */ addiu $v0, $v0, -1 -/* 41B030 802A62A0 120007A8 */ beqz $s0, .L802A8144_41CED4 -/* 41B034 802A62A4 0000202D */ daddu $a0, $zero, $zero -/* 41B038 802A62A8 0080282D */ daddu $a1, $a0, $zero -/* 41B03C 802A62AC 3C060001 */ lui $a2, 1 -/* 41B040 802A62B0 0C098F3F */ jal set_animation -/* 41B044 802A62B4 34C60004 */ ori $a2, $a2, 4 -/* 41B048 802A62B8 2602FFFF */ addiu $v0, $s0, -1 -/* 41B04C 802A62BC 00021080 */ sll $v0, $v0, 2 -/* 41B050 802A62C0 3C01802B */ lui $at, %hi(battle_menu_submenuIDs+0x3) -/* 41B054 802A62C4 00220821 */ addu $at, $at, $v0 -/* 41B058 802A62C8 9022D0BB */ lbu $v0, %lo(battle_menu_submenuIDs+0x3)($at) -/* 41B05C 802A62CC 0000982D */ daddu $s3, $zero, $zero -/* 41B060 802A62D0 A2C20048 */ sb $v0, 0x48($s6) -/* 41B064 802A62D4 A2C2004C */ sb $v0, 0x4c($s6) -/* 41B068 802A62D8 02D31021 */ addu $v0, $s6, $s3 -.L802A62DC: -/* 41B06C 802A62DC 26730001 */ addiu $s3, $s3, 1 -/* 41B070 802A62E0 A04001DE */ sb $zero, 0x1de($v0) -/* 41B074 802A62E4 A6C001AE */ sh $zero, 0x1ae($s6) -/* 41B078 802A62E8 A04001F6 */ sb $zero, 0x1f6($v0) -/* 41B07C 802A62EC 2A620018 */ slti $v0, $s3, 0x18 -/* 41B080 802A62F0 1440FFFA */ bnez $v0, .L802A62DC -/* 41B084 802A62F4 02D31021 */ addu $v0, $s6, $s3 -/* 41B088 802A62F8 82C30048 */ lb $v1, 0x48($s6) -/* 41B08C 802A62FC 24100001 */ addiu $s0, $zero, 1 -/* 41B090 802A6300 10700059 */ beq $v1, $s0, .L802A6468 -/* 41B094 802A6304 28620002 */ slti $v0, $v1, 2 -/* 41B098 802A6308 10400005 */ beqz $v0, .L802A6320 -/* 41B09C 802A630C 24020002 */ addiu $v0, $zero, 2 -/* 41B0A0 802A6310 10600059 */ beqz $v1, .L802A6478 -/* 41B0A4 802A6314 00000000 */ nop -/* 41B0A8 802A6318 080A99AC */ j .L802A66B0 -/* 41B0AC 802A631C 00000000 */ nop -.L802A6320: -/* 41B0B0 802A6320 10620005 */ beq $v1, $v0, .L802A6338 -/* 41B0B4 802A6324 24020008 */ addiu $v0, $zero, 8 -/* 41B0B8 802A6328 1062005E */ beq $v1, $v0, .L802A64A4 -/* 41B0BC 802A632C 24140001 */ addiu $s4, $zero, 1 -/* 41B0C0 802A6330 080A99AC */ j .L802A66B0 -/* 41B0C4 802A6334 00000000 */ nop -.L802A6338: -/* 41B0C8 802A6338 0000982D */ daddu $s3, $zero, $zero -/* 41B0CC 802A633C 3C148008 */ lui $s4, %hi(gItemTable) -/* 41B0D0 802A6340 269478E0 */ addiu $s4, $s4, %lo(gItemTable) -/* 41B0D4 802A6344 24120002 */ addiu $s2, $zero, 2 -/* 41B0D8 802A6348 02A0882D */ daddu $s1, $s5, $zero -/* 41B0DC 802A634C 3C03802B */ lui $v1, %hi(D_802AB4F0 + 0x23) -/* 41B0E0 802A6350 9063B513 */ lbu $v1, %lo(D_802AB4F0 + 0x23)($v1) -/* 41B0E4 802A6354 24020155 */ addiu $v0, $zero, 0x155 -/* 41B0E8 802A6358 A6C201AE */ sh $v0, 0x1ae($s6) -/* 41B0EC 802A635C A2D001F6 */ sb $s0, 0x1f6($s6) -/* 41B0F0 802A6360 A2C301DE */ sb $v1, 0x1de($s6) -.L802A6364: -/* 41B0F4 802A6364 862201B4 */ lh $v0, 0x1b4($s1) -/* 41B0F8 802A6368 5040000B */ beql $v0, $zero, .L802A6398 -/* 41B0FC 802A636C 26730001 */ addiu $s3, $s3, 1 -/* 41B100 802A6370 00021140 */ sll $v0, $v0, 5 -/* 41B104 802A6374 A2D20178 */ sb $s2, 0x178($s6) -/* 41B108 802A6378 962301B4 */ lhu $v1, 0x1b4($s1) -/* 41B10C 802A637C 00548021 */ addu $s0, $v0, $s4 -/* 41B110 802A6380 A6C3017A */ sh $v1, 0x17a($s6) -/* 41B114 802A6384 8E020008 */ lw $v0, 8($s0) -/* 41B118 802A6388 02E0202D */ daddu $a0, $s7, $zero -/* 41B11C 802A638C 0C098C0B */ jal player_create_target_list -/* 41B120 802A6390 AEC20184 */ sw $v0, 0x184($s6) -/* 41B124 802A6394 26730001 */ addiu $s3, $s3, 1 -.L802A6398: -/* 41B128 802A6398 2A62000A */ slti $v0, $s3, 0xa -/* 41B12C 802A639C 1440FFF1 */ bnez $v0, .L802A6364 -/* 41B130 802A63A0 26310002 */ addiu $s1, $s1, 2 -/* 41B134 802A63A4 24140001 */ addiu $s4, $zero, 1 -/* 41B138 802A63A8 0000982D */ daddu $s3, $zero, $zero -/* 41B13C 802A63AC 3C0B8008 */ lui $t3, %hi(gItemTable) -/* 41B140 802A63B0 256B78E0 */ addiu $t3, $t3, %lo(gItemTable) -/* 41B144 802A63B4 3C0A8009 */ lui $t2, %hi(gMoveTable) -/* 41B148 802A63B8 254AF060 */ addiu $t2, $t2, %lo(gMoveTable) -/* 41B14C 802A63BC 3C09802B */ lui $t1, %hi(D_802AB4F0) -/* 41B150 802A63C0 2529B4F0 */ addiu $t1, $t1, %lo(D_802AB4F0) -/* 41B154 802A63C4 0280402D */ daddu $t0, $s4, $zero -/* 41B158 802A63C8 02A0302D */ daddu $a2, $s5, $zero -/* 41B15C 802A63CC 26C70002 */ addiu $a3, $s6, 2 -.L802A63D0: -/* 41B160 802A63D0 84C20208 */ lh $v0, 0x208($a2) -/* 41B164 802A63D4 5040001C */ beql $v0, $zero, .L802A6448 -/* 41B168 802A63D8 26730001 */ addiu $s3, $s3, 1 -/* 41B16C 802A63DC 00021140 */ sll $v0, $v0, 5 -/* 41B170 802A63E0 004B1021 */ addu $v0, $v0, $t3 -/* 41B174 802A63E4 9045001A */ lbu $a1, 0x1a($v0) -/* 41B178 802A63E8 82C30048 */ lb $v1, 0x48($s6) -/* 41B17C 802A63EC 00051080 */ sll $v0, $a1, 2 -/* 41B180 802A63F0 00451021 */ addu $v0, $v0, $a1 -/* 41B184 802A63F4 00021080 */ sll $v0, $v0, 2 -/* 41B188 802A63F8 004A9021 */ addu $s2, $v0, $t2 -/* 41B18C 802A63FC 00031880 */ sll $v1, $v1, 2 -/* 41B190 802A6400 00691821 */ addu $v1, $v1, $t1 -/* 41B194 802A6404 82440010 */ lb $a0, 0x10($s2) -/* 41B198 802A6408 8C620000 */ lw $v0, ($v1) -/* 41B19C 802A640C 5482000E */ bnel $a0, $v0, .L802A6448 -/* 41B1A0 802A6410 26730001 */ addiu $s3, $s3, 1 -/* 41B1A4 802A6414 02D42021 */ addu $a0, $s6, $s4 -/* 41B1A8 802A6418 A08501DE */ sb $a1, 0x1de($a0) -/* 41B1AC 802A641C 94C20208 */ lhu $v0, 0x208($a2) -/* 41B1B0 802A6420 A4E201AE */ sh $v0, 0x1ae($a3) -/* 41B1B4 802A6424 A08801F6 */ sb $t0, 0x1f6($a0) -/* 41B1B8 802A6428 82A20005 */ lb $v0, 5($s5) -/* 41B1BC 802A642C 82430011 */ lb $v1, 0x11($s2) -/* 41B1C0 802A6430 0043102A */ slt $v0, $v0, $v1 -/* 41B1C4 802A6434 54400001 */ bnel $v0, $zero, .L802A643C -/* 41B1C8 802A6438 A08001F6 */ sb $zero, 0x1f6($a0) -.L802A643C: -/* 41B1CC 802A643C 24E70002 */ addiu $a3, $a3, 2 -/* 41B1D0 802A6440 26940001 */ addiu $s4, $s4, 1 -/* 41B1D4 802A6444 26730001 */ addiu $s3, $s3, 1 -.L802A6448: -/* 41B1D8 802A6448 2A620040 */ slti $v0, $s3, 0x40 -/* 41B1DC 802A644C 1440FFE0 */ bnez $v0, .L802A63D0 -/* 41B1E0 802A6450 24C60002 */ addiu $a2, $a2, 2 -/* 41B1E4 802A6454 24020001 */ addiu $v0, $zero, 1 -/* 41B1E8 802A6458 16820095 */ bne $s4, $v0, .L802A66B0 -/* 41B1EC 802A645C A2D4020E */ sb $s4, 0x20e($s6) -/* 41B1F0 802A6460 080A99AC */ j .L802A66B0 -/* 41B1F4 802A6464 A2C0020E */ sb $zero, 0x20e($s6) -.L802A6468: -/* 41B1F8 802A6468 0C098DB9 */ jal btl_init_menu_hammer -/* 41B1FC 802A646C 00000000 */ nop -/* 41B200 802A6470 080A9920 */ j .L802A6480 -/* 41B204 802A6474 00000000 */ nop -.L802A6478: -/* 41B208 802A6478 0C098D2E */ jal btl_init_menu_boots -/* 41B20C 802A647C 00000000 */ nop -.L802A6480: -/* 41B210 802A6480 92C2020E */ lbu $v0, 0x20e($s6) -/* 41B214 802A6484 50500001 */ beql $v0, $s0, .L802A648C -/* 41B218 802A6488 A2C0020E */ sb $zero, 0x20e($s6) -.L802A648C: -/* 41B21C 802A648C 82C30083 */ lb $v1, 0x83($s6) -/* 41B220 802A6490 24020002 */ addiu $v0, $zero, 2 -/* 41B224 802A6494 50620086 */ beql $v1, $v0, .L802A66B0 -/* 41B228 802A6498 A2C0020E */ sb $zero, 0x20e($s6) -/* 41B22C 802A649C 080A99AC */ j .L802A66B0 -/* 41B230 802A64A0 00000000 */ nop -.L802A64A4: -/* 41B234 802A64A4 0000982D */ daddu $s3, $zero, $zero -/* 41B238 802A64A8 24020077 */ addiu $v0, $zero, 0x77 -/* 41B23C 802A64AC A2C201DE */ sb $v0, 0x1de($s6) -/* 41B240 802A64B0 82A3028E */ lb $v1, 0x28e($s5) -/* 41B244 802A64B4 24020155 */ addiu $v0, $zero, 0x155 -/* 41B248 802A64B8 A6C201AE */ sh $v0, 0x1ae($s6) -/* 41B24C 802A64BC 1860002B */ blez $v1, .L802A656C -/* 41B250 802A64C0 A2D001F6 */ sb $s0, 0x1f6($s6) -/* 41B254 802A64C4 241E0008 */ addiu $fp, $zero, 8 -/* 41B258 802A64C8 3C038009 */ lui $v1, %hi(gMoveTable+0x960) -/* 41B25C 802A64CC 2463F9C0 */ addiu $v1, $v1, %lo(gMoveTable+0x960) -/* 41B260 802A64D0 26D10002 */ addiu $s1, $s6, 2 -.L802A64D4: -/* 41B264 802A64D4 0060902D */ daddu $s2, $v1, $zero -/* 41B268 802A64D8 02D48021 */ addu $s0, $s6, $s4 -/* 41B26C 802A64DC 26620078 */ addiu $v0, $s3, 0x78 -/* 41B270 802A64E0 A20201DE */ sb $v0, 0x1de($s0) -/* 41B274 802A64E4 A62001AE */ sh $zero, 0x1ae($s1) -/* 41B278 802A64E8 A2DE0178 */ sb $fp, 0x178($s6) -/* 41B27C 802A64EC A6C2017A */ sh $v0, 0x17a($s6) -/* 41B280 802A64F0 8E420004 */ lw $v0, 4($s2) -/* 41B284 802A64F4 02E0202D */ daddu $a0, $s7, $zero -/* 41B288 802A64F8 0C098C0B */ jal player_create_target_list -/* 41B28C 802A64FC AEC20184 */ sw $v0, 0x184($s6) -/* 41B290 802A6500 24020001 */ addiu $v0, $zero, 1 -/* 41B294 802A6504 A20201F6 */ sb $v0, 0x1f6($s0) -/* 41B298 802A6508 82E2040C */ lb $v0, 0x40c($s7) -/* 41B29C 802A650C 14400002 */ bnez $v0, .L802A6518 -/* 41B2A0 802A6510 2402FFFE */ addiu $v0, $zero, -2 -/* 41B2A4 802A6514 A20201F6 */ sb $v0, 0x1f6($s0) -.L802A6518: -/* 41B2A8 802A6518 86A20290 */ lh $v0, 0x290($s5) -/* 41B2AC 802A651C 04420001 */ bltzl $v0, .L802A6524 -/* 41B2B0 802A6520 244200FF */ addiu $v0, $v0, 0xff -.L802A6524: -/* 41B2B4 802A6524 82430011 */ lb $v1, 0x11($s2) -/* 41B2B8 802A6528 00021203 */ sra $v0, $v0, 8 -/* 41B2BC 802A652C 0043102A */ slt $v0, $v0, $v1 -/* 41B2C0 802A6530 54400001 */ bnel $v0, $zero, .L802A6538 -/* 41B2C4 802A6534 A20001F6 */ sb $zero, 0x1f6($s0) -.L802A6538: -/* 41B2C8 802A6538 3C02800E */ lui $v0, %hi(gBattleStatus+0x4) -/* 41B2CC 802A653C 8C42C074 */ lw $v0, %lo(gBattleStatus+0x4)($v0) -/* 41B2D0 802A6540 30421000 */ andi $v0, $v0, 0x1000 -/* 41B2D4 802A6544 10400002 */ beqz $v0, .L802A6550 -/* 41B2D8 802A6548 2402FFFF */ addiu $v0, $zero, -1 -/* 41B2DC 802A654C A20201F6 */ sb $v0, 0x1f6($s0) -.L802A6550: -/* 41B2E0 802A6550 26310002 */ addiu $s1, $s1, 2 -/* 41B2E4 802A6554 26940001 */ addiu $s4, $s4, 1 -/* 41B2E8 802A6558 82A2028E */ lb $v0, 0x28e($s5) -/* 41B2EC 802A655C 26730001 */ addiu $s3, $s3, 1 -/* 41B2F0 802A6560 0262102A */ slt $v0, $s3, $v0 -/* 41B2F4 802A6564 1440FFDB */ bnez $v0, .L802A64D4 -/* 41B2F8 802A6568 26430014 */ addiu $v1, $s2, 0x14 -.L802A656C: -/* 41B2FC 802A656C 82B10292 */ lb $s1, 0x292($s5) -/* 41B300 802A6570 24020001 */ addiu $v0, $zero, 1 -/* 41B304 802A6574 16220024 */ bne $s1, $v0, .L802A6608 -/* 41B308 802A6578 02D48021 */ addu $s0, $s6, $s4 -/* 41B30C 802A657C 3C128009 */ lui $s2, %hi(gMoveTable+0x9EC) -/* 41B310 802A6580 2652FA4C */ addiu $s2, $s2, %lo(gMoveTable+0x9EC) -/* 41B314 802A6584 2402007F */ addiu $v0, $zero, 0x7f -/* 41B318 802A6588 A20201DE */ sb $v0, 0x1de($s0) -/* 41B31C 802A658C 00141040 */ sll $v0, $s4, 1 -/* 41B320 802A6590 02C21021 */ addu $v0, $s6, $v0 -/* 41B324 802A6594 A44001AE */ sh $zero, 0x1ae($v0) -/* 41B328 802A6598 24020008 */ addiu $v0, $zero, 8 -/* 41B32C 802A659C A2C20178 */ sb $v0, 0x178($s6) -/* 41B330 802A65A0 26620078 */ addiu $v0, $s3, 0x78 -/* 41B334 802A65A4 A6C2017A */ sh $v0, 0x17a($s6) -/* 41B338 802A65A8 8E420004 */ lw $v0, 4($s2) -/* 41B33C 802A65AC 02E0202D */ daddu $a0, $s7, $zero -/* 41B340 802A65B0 0C098C0B */ jal player_create_target_list -/* 41B344 802A65B4 AEC20184 */ sw $v0, 0x184($s6) -/* 41B348 802A65B8 A21101F6 */ sb $s1, 0x1f6($s0) -/* 41B34C 802A65BC 82E2040C */ lb $v0, 0x40c($s7) -/* 41B350 802A65C0 14400002 */ bnez $v0, .L802A65CC -/* 41B354 802A65C4 2402FFFE */ addiu $v0, $zero, -2 -/* 41B358 802A65C8 A20201F6 */ sb $v0, 0x1f6($s0) -.L802A65CC: -/* 41B35C 802A65CC 86A20290 */ lh $v0, 0x290($s5) -/* 41B360 802A65D0 04420001 */ bltzl $v0, .L802A65D8 -/* 41B364 802A65D4 244200FF */ addiu $v0, $v0, 0xff -.L802A65D8: -/* 41B368 802A65D8 82430011 */ lb $v1, 0x11($s2) -/* 41B36C 802A65DC 00021203 */ sra $v0, $v0, 8 -/* 41B370 802A65E0 0043102A */ slt $v0, $v0, $v1 -/* 41B374 802A65E4 54400001 */ bnel $v0, $zero, .L802A65EC -/* 41B378 802A65E8 A20001F6 */ sb $zero, 0x1f6($s0) -.L802A65EC: -/* 41B37C 802A65EC 3C02800E */ lui $v0, %hi(gBattleStatus+0x4) -/* 41B380 802A65F0 8C42C074 */ lw $v0, %lo(gBattleStatus+0x4)($v0) -/* 41B384 802A65F4 30421000 */ andi $v0, $v0, 0x1000 -/* 41B388 802A65F8 10400002 */ beqz $v0, .L802A6604 -/* 41B38C 802A65FC 2402FFFF */ addiu $v0, $zero, -1 -/* 41B390 802A6600 A20201F6 */ sb $v0, 0x1f6($s0) -.L802A6604: -/* 41B394 802A6604 26940001 */ addiu $s4, $s4, 1 -.L802A6608: -/* 41B398 802A6608 82A30292 */ lb $v1, 0x292($s5) -/* 41B39C 802A660C 24020002 */ addiu $v0, $zero, 2 -/* 41B3A0 802A6610 54620027 */ bnel $v1, $v0, .L802A66B0 -/* 41B3A4 802A6614 A2D4020E */ sb $s4, 0x20e($s6) -/* 41B3A8 802A6618 3C128009 */ lui $s2, %hi(gMoveTable+0xA00) -/* 41B3AC 802A661C 2652FA60 */ addiu $s2, $s2, %lo(gMoveTable+0xA00) -/* 41B3B0 802A6620 02D48021 */ addu $s0, $s6, $s4 -/* 41B3B4 802A6624 24020080 */ addiu $v0, $zero, 0x80 -/* 41B3B8 802A6628 A20201DE */ sb $v0, 0x1de($s0) -/* 41B3BC 802A662C 00141040 */ sll $v0, $s4, 1 -/* 41B3C0 802A6630 02C21021 */ addu $v0, $s6, $v0 -/* 41B3C4 802A6634 A44001AE */ sh $zero, 0x1ae($v0) -/* 41B3C8 802A6638 24020008 */ addiu $v0, $zero, 8 -/* 41B3CC 802A663C A2C20178 */ sb $v0, 0x178($s6) -/* 41B3D0 802A6640 26620078 */ addiu $v0, $s3, 0x78 -/* 41B3D4 802A6644 A6C2017A */ sh $v0, 0x17a($s6) -/* 41B3D8 802A6648 8E420004 */ lw $v0, 4($s2) -/* 41B3DC 802A664C 02E0202D */ daddu $a0, $s7, $zero -/* 41B3E0 802A6650 0C098C0B */ jal player_create_target_list -/* 41B3E4 802A6654 AEC20184 */ sw $v0, 0x184($s6) -/* 41B3E8 802A6658 24020001 */ addiu $v0, $zero, 1 -/* 41B3EC 802A665C A20201F6 */ sb $v0, 0x1f6($s0) -/* 41B3F0 802A6660 82E2040C */ lb $v0, 0x40c($s7) -/* 41B3F4 802A6664 14400002 */ bnez $v0, .L802A6670 -/* 41B3F8 802A6668 2402FFFE */ addiu $v0, $zero, -2 -/* 41B3FC 802A666C A20201F6 */ sb $v0, 0x1f6($s0) -.L802A6670: -/* 41B400 802A6670 86A20290 */ lh $v0, 0x290($s5) -/* 41B404 802A6674 04420001 */ bltzl $v0, .L802A667C -/* 41B408 802A6678 244200FF */ addiu $v0, $v0, 0xff -.L802A667C: -/* 41B40C 802A667C 82430011 */ lb $v1, 0x11($s2) -/* 41B410 802A6680 00021203 */ sra $v0, $v0, 8 -/* 41B414 802A6684 0043102A */ slt $v0, $v0, $v1 -/* 41B418 802A6688 54400001 */ bnel $v0, $zero, .L802A6690 -/* 41B41C 802A668C A20001F6 */ sb $zero, 0x1f6($s0) -.L802A6690: -/* 41B420 802A6690 3C02800E */ lui $v0, %hi(gBattleStatus+0x4) -/* 41B424 802A6694 8C42C074 */ lw $v0, %lo(gBattleStatus+0x4)($v0) -/* 41B428 802A6698 30421000 */ andi $v0, $v0, 0x1000 -/* 41B42C 802A669C 10400002 */ beqz $v0, .L802A66A8 -/* 41B430 802A66A0 2402FFFF */ addiu $v0, $zero, -1 -/* 41B434 802A66A4 A20201F6 */ sb $v0, 0x1f6($s0) -.L802A66A8: -/* 41B438 802A66A8 26940001 */ addiu $s4, $s4, 1 -/* 41B43C 802A66AC A2D4020E */ sb $s4, 0x20e($s6) -.L802A66B0: -/* 41B440 802A66B0 82D00048 */ lb $s0, 0x48($s6) -/* 41B444 802A66B4 24020008 */ addiu $v0, $zero, 8 -/* 41B448 802A66B8 16020003 */ bne $s0, $v0, .L802A66C8 -/* 41B44C 802A66BC 24020007 */ addiu $v0, $zero, 7 -/* 41B450 802A66C0 080A9FE1 */ j .L802A7F84 -/* 41B454 802A66C4 2402003C */ addiu $v0, $zero, 0x3c -.L802A66C8: -/* 41B458 802A66C8 16020012 */ bne $s0, $v0, .L802A6714 -/* 41B45C 802A66CC 24020002 */ addiu $v0, $zero, 2 -/* 41B460 802A66D0 82C30083 */ lb $v1, 0x83($s6) -/* 41B464 802A66D4 10620006 */ beq $v1, $v0, .L802A66F0 -/* 41B468 802A66D8 3C030200 */ lui $v1, 0x200 -/* 41B46C 802A66DC 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 41B470 802A66E0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 41B474 802A66E4 00431024 */ and $v0, $v0, $v1 -/* 41B478 802A66E8 10400626 */ beqz $v0, .L802A7F84 -/* 41B47C 802A66EC 240200C8 */ addiu $v0, $zero, 0xc8 -.L802A66F0: -/* 41B480 802A66F0 0C0A842E */ jal func_802A10B8 -/* 41B484 802A66F4 00000000 */ nop -/* 41B488 802A66F8 24040012 */ addiu $a0, $zero, 0x12 -/* 41B48C 802A66FC A2D00178 */ sb $s0, 0x178($s6) -/* 41B490 802A6700 A6C0017A */ sh $zero, 0x17a($s6) -/* 41B494 802A6704 0C090464 */ jal btl_set_state -/* 41B498 802A6708 A6C0017C */ sh $zero, 0x17c($s6) -/* 41B49C 802A670C 080AA051 */ j .L802A8144_41CED4 -/* 41B4A0 802A6710 00000000 */ nop -.L802A6714: -/* 41B4A4 802A6714 92C2020E */ lbu $v0, 0x20e($s6) -/* 41B4A8 802A6718 14400005 */ bnez $v0, .L802A6730 -/* 41B4AC 802A671C 24020002 */ addiu $v0, $zero, 2 -/* 41B4B0 802A6720 16020686 */ bne $s0, $v0, .L802A813C -/* 41B4B4 802A6724 2402000A */ addiu $v0, $zero, 0xa -/* 41B4B8 802A6728 080A9FE1 */ j .L802A7F84 -/* 41B4BC 802A672C 24020028 */ addiu $v0, $zero, 0x28 -.L802A6730: -/* 41B4C0 802A6730 16000005 */ bnez $s0, .L802A6748 -/* 41B4C4 802A6734 0000F02D */ daddu $fp, $zero, $zero -/* 41B4C8 802A6738 82C2004D */ lb $v0, 0x4d($s6) -/* 41B4CC 802A673C 04420001 */ bltzl $v0, .L802A6744 -/* 41B4D0 802A6740 A2C0004D */ sb $zero, 0x4d($s6) -.L802A6744: -/* 41B4D4 802A6744 82DE004D */ lb $fp, 0x4d($s6) -.L802A6748: -/* 41B4D8 802A6748 82C30048 */ lb $v1, 0x48($s6) -/* 41B4DC 802A674C 24020001 */ addiu $v0, $zero, 1 -/* 41B4E0 802A6750 14620007 */ bne $v1, $v0, .L802A6770 -/* 41B4E4 802A6754 24020002 */ addiu $v0, $zero, 2 -/* 41B4E8 802A6758 82C2004E */ lb $v0, 0x4e($s6) -/* 41B4EC 802A675C 04420001 */ bltzl $v0, .L802A6764 -/* 41B4F0 802A6760 A2C0004E */ sb $zero, 0x4e($s6) -.L802A6764: -/* 41B4F4 802A6764 82DE004E */ lb $fp, 0x4e($s6) -/* 41B4F8 802A6768 82C30048 */ lb $v1, 0x48($s6) -/* 41B4FC 802A676C 24020002 */ addiu $v0, $zero, 2 -.L802A6770: -/* 41B500 802A6770 14620005 */ bne $v1, $v0, .L802A6788 -/* 41B504 802A6774 00000000 */ nop -/* 41B508 802A6778 82C2004F */ lb $v0, 0x4f($s6) -/* 41B50C 802A677C 04420001 */ bltzl $v0, .L802A6784 -/* 41B510 802A6780 A2C0004F */ sb $zero, 0x4f($s6) -.L802A6784: -/* 41B514 802A6784 82DE004F */ lb $fp, 0x4f($s6) -.L802A6788: -/* 41B518 802A6788 92C2020E */ lbu $v0, 0x20e($s6) -/* 41B51C 802A678C 1040007A */ beqz $v0, .L802A6978 -/* 41B520 802A6790 0000982D */ daddu $s3, $zero, $zero -/* 41B524 802A6794 02D3A021 */ addu $s4, $s6, $s3 -.L802A6798: -/* 41B528 802A6798 928201DE */ lbu $v0, 0x1de($s4) -/* 41B52C 802A679C 3C0E8009 */ lui $t6, %hi(gMoveTable) -/* 41B530 802A67A0 25CEF060 */ addiu $t6, $t6, %lo(gMoveTable) -/* 41B534 802A67A4 00021880 */ sll $v1, $v0, 2 -/* 41B538 802A67A8 00621821 */ addu $v1, $v1, $v0 -/* 41B53C 802A67AC 00031880 */ sll $v1, $v1, 2 -/* 41B540 802A67B0 00131040 */ sll $v0, $s3, 1 -/* 41B544 802A67B4 02C21021 */ addu $v0, $s6, $v0 -/* 41B548 802A67B8 006E9021 */ addu $s2, $v1, $t6 -/* 41B54C 802A67BC 3C0E8008 */ lui $t6, %hi(gItemTable) -/* 41B550 802A67C0 25CE78E0 */ addiu $t6, $t6, %lo(gItemTable) -/* 41B554 802A67C4 3C03802B */ lui $v1, %hi(battle_menu_moveOptionCantUseTypes) -/* 41B558 802A67C8 2463D5E8 */ addiu $v1, $v1, %lo(battle_menu_moveOptionCantUseTypes) -/* 41B55C 802A67CC 844201AE */ lh $v0, 0x1ae($v0) -/* 41B560 802A67D0 02632021 */ addu $a0, $s3, $v1 -/* 41B564 802A67D4 00021140 */ sll $v0, $v0, 5 -/* 41B568 802A67D8 004E8021 */ addu $s0, $v0, $t6 -/* 41B56C 802A67DC 86020004 */ lh $v0, 4($s0) -/* 41B570 802A67E0 3C0E8009 */ lui $t6, %hi(gItemHudScripts) -/* 41B574 802A67E4 25CEA680 */ addiu $t6, $t6, %lo(gItemHudScripts) -/* 41B578 802A67E8 A0800000 */ sb $zero, ($a0) -/* 41B57C 802A67EC 828301F6 */ lb $v1, 0x1f6($s4) -/* 41B580 802A67F0 000210C0 */ sll $v0, $v0, 3 -/* 41B584 802A67F4 14600003 */ bnez $v1, .L802A6804 -/* 41B588 802A67F8 004EA821 */ addu $s5, $v0, $t6 -/* 41B58C 802A67FC A0800000 */ sb $zero, ($a0) -/* 41B590 802A6800 828301F6 */ lb $v1, 0x1f6($s4) -.L802A6804: -/* 41B594 802A6804 2402FFFF */ addiu $v0, $zero, -1 -/* 41B598 802A6808 14620005 */ bne $v1, $v0, .L802A6820 -/* 41B59C 802A680C 2402FFFE */ addiu $v0, $zero, -2 -/* 41B5A0 802A6810 A28001F6 */ sb $zero, 0x1f6($s4) -/* 41B5A4 802A6814 240E0048 */ addiu $t6, $zero, 0x48 -/* 41B5A8 802A6818 A08E0000 */ sb $t6, ($a0) -/* 41B5AC 802A681C 828301F6 */ lb $v1, 0x1f6($s4) -.L802A6820: -/* 41B5B0 802A6820 14620003 */ bne $v1, $v0, .L802A6830 -/* 41B5B4 802A6824 240E0048 */ addiu $t6, $zero, 0x48 -/* 41B5B8 802A6828 A28001F6 */ sb $zero, 0x1f6($s4) -/* 41B5BC 802A682C A08E0000 */ sb $t6, ($a0) -.L802A6830: -/* 41B5C0 802A6830 828301F6 */ lb $v1, 0x1f6($s4) -/* 41B5C4 802A6834 2402FFFD */ addiu $v0, $zero, -3 -/* 41B5C8 802A6838 14620003 */ bne $v1, $v0, .L802A6848 -/* 41B5CC 802A683C 24020054 */ addiu $v0, $zero, 0x54 -/* 41B5D0 802A6840 A28001F6 */ sb $zero, 0x1f6($s4) -/* 41B5D4 802A6844 A0820000 */ sb $v0, ($a0) -.L802A6848: -/* 41B5D8 802A6848 3C03802B */ lui $v1, %hi(battle_menu_moveOptionIconScripts) -/* 41B5DC 802A684C 2463D260 */ addiu $v1, $v1, %lo(battle_menu_moveOptionIconScripts) -/* 41B5E0 802A6850 00138080 */ sll $s0, $s3, 2 -/* 41B5E4 802A6854 8EA20000 */ lw $v0, ($s5) -/* 41B5E8 802A6858 02031821 */ addu $v1, $s0, $v1 -/* 41B5EC 802A685C AC620000 */ sw $v0, ($v1) -/* 41B5F0 802A6860 828201F6 */ lb $v0, 0x1f6($s4) -/* 41B5F4 802A6864 14400003 */ bnez $v0, .L802A6874 -/* 41B5F8 802A6868 00000000 */ nop -/* 41B5FC 802A686C 8EA20004 */ lw $v0, 4($s5) -/* 41B600 802A6870 AC620000 */ sw $v0, ($v1) -.L802A6874: -/* 41B604 802A6874 82420011 */ lb $v0, 0x11($s2) -/* 41B608 802A6878 02E0202D */ daddu $a0, $s7, $zero -/* 41B60C 802A687C 3C01802B */ lui $at, %hi(battle_menu_moveOptionDisplayCosts) -/* 41B610 802A6880 00300821 */ addu $at, $at, $s0 -/* 41B614 802A6884 AC22D320 */ sw $v0, %lo(battle_menu_moveOptionDisplayCosts)($at) -/* 41B618 802A6888 82420012 */ lb $v0, 0x12($s2) -/* 41B61C 802A688C 24050018 */ addiu $a1, $zero, 0x18 -/* 41B620 802A6890 3C01802B */ lui $at, %hi(battle_menu_moveOptionSortPriorities) -/* 41B624 802A6894 00330821 */ addu $at, $at, $s3 -/* 41B628 802A6898 A020D5D0 */ sb $zero, %lo(battle_menu_moveOptionSortPriorities)($at) -/* 41B62C 802A689C 3C01802B */ lui $at, %hi(battle_menu_moveOptionBPCosts) -/* 41B630 802A68A0 00300821 */ addu $at, $at, $s0 -/* 41B634 802A68A4 AC22D440 */ sw $v0, %lo(battle_menu_moveOptionBPCosts)($at) -/* 41B638 802A68A8 3C02802B */ lui $v0, %hi(battle_menu_moveOptionDisplayCostReductions) -/* 41B63C 802A68AC 2442D380 */ addiu $v0, $v0, %lo(battle_menu_moveOptionDisplayCostReductions) -/* 41B640 802A68B0 02028821 */ addu $s1, $s0, $v0 -/* 41B644 802A68B4 3C02802B */ lui $v0, %hi(battle_menu_moveOptionDisplayCostReductionColors) -/* 41B648 802A68B8 2442D3E0 */ addiu $v0, $v0, %lo(battle_menu_moveOptionDisplayCostReductionColors) -/* 41B64C 802A68BC 0202A821 */ addu $s5, $s0, $v0 -/* 41B650 802A68C0 AE200000 */ sw $zero, ($s1) -/* 41B654 802A68C4 0C099CAB */ jal player_team_is_ability_active -/* 41B658 802A68C8 AEA00000 */ sw $zero, ($s5) -/* 41B65C 802A68CC 10400008 */ beqz $v0, .L802A68F0 -/* 41B660 802A68D0 02E0202D */ daddu $a0, $s7, $zero -/* 41B664 802A68D4 0C099CAB */ jal player_team_is_ability_active -/* 41B668 802A68D8 24050018 */ addiu $a1, $zero, 0x18 -/* 41B66C 802A68DC 8E230000 */ lw $v1, ($s1) -/* 41B670 802A68E0 00621821 */ addu $v1, $v1, $v0 -/* 41B674 802A68E4 24020001 */ addiu $v0, $zero, 1 -/* 41B678 802A68E8 AE230000 */ sw $v1, ($s1) -/* 41B67C 802A68EC AEA20000 */ sw $v0, ($s5) -.L802A68F0: -/* 41B680 802A68F0 02E0202D */ daddu $a0, $s7, $zero -/* 41B684 802A68F4 0C099CAB */ jal player_team_is_ability_active -/* 41B688 802A68F8 24050026 */ addiu $a1, $zero, 0x26 -/* 41B68C 802A68FC 10400009 */ beqz $v0, .L802A6924 -/* 41B690 802A6900 02E0202D */ daddu $a0, $s7, $zero -/* 41B694 802A6904 0C099CAB */ jal player_team_is_ability_active -/* 41B698 802A6908 24050026 */ addiu $a1, $zero, 0x26 -/* 41B69C 802A690C 8E230000 */ lw $v1, ($s1) -/* 41B6A0 802A6910 00021040 */ sll $v0, $v0, 1 -/* 41B6A4 802A6914 00621821 */ addu $v1, $v1, $v0 -/* 41B6A8 802A6918 24020002 */ addiu $v0, $zero, 2 -/* 41B6AC 802A691C AE230000 */ sw $v1, ($s1) -/* 41B6B0 802A6920 AEA20000 */ sw $v0, ($s5) -.L802A6924: -/* 41B6B4 802A6924 3C01802B */ lui $at, %hi(battle_menu_moveIndices) -/* 41B6B8 802A6928 00300821 */ addu $at, $at, $s0 -/* 41B6BC 802A692C AC33D4B0 */ sw $s3, %lo(battle_menu_moveIndices)($at) -/* 41B6C0 802A6930 828201F6 */ lb $v0, 0x1f6($s4) -/* 41B6C4 802A6934 3C01802B */ lui $at, %hi(battle_menu_moveOptionsEnabled) -/* 41B6C8 802A6938 00300821 */ addu $at, $at, $s0 -/* 41B6CC 802A693C AC22D510 */ sw $v0, %lo(battle_menu_moveOptionsEnabled)($at) -/* 41B6D0 802A6940 8E420000 */ lw $v0, ($s2) -/* 41B6D4 802A6944 3C01802B */ lui $at, %hi(battle_menu_moveOptionNames) -/* 41B6D8 802A6948 00300821 */ addu $at, $at, $s0 -/* 41B6DC 802A694C AC22D2C0 */ sw $v0, %lo(battle_menu_moveOptionNames)($at) -/* 41B6E0 802A6950 8E420008 */ lw $v0, 8($s2) -/* 41B6E4 802A6954 3C01802B */ lui $at, %hi(battle_menu_moveOptionDescriptions) -/* 41B6E8 802A6958 00300821 */ addu $at, $at, $s0 -/* 41B6EC 802A695C AC22D570 */ sw $v0, %lo(battle_menu_moveOptionDescriptions)($at) -/* 41B6F0 802A6960 92C2020E */ lbu $v0, 0x20e($s6) -/* 41B6F4 802A6964 26730001 */ addiu $s3, $s3, 1 -/* 41B6F8 802A6968 0262102A */ slt $v0, $s3, $v0 -/* 41B6FC 802A696C 1440FF8A */ bnez $v0, .L802A6798 -/* 41B700 802A6970 02D3A021 */ addu $s4, $s6, $s3 -/* 41B704 802A6974 92C2020E */ lbu $v0, 0x20e($s6) -.L802A6978: -/* 41B708 802A6978 3C01802B */ lui $at, %hi(battle_menu_hasSpiritsMenu) -/* 41B70C 802A697C AC20D4A0 */ sw $zero, %lo(battle_menu_hasSpiritsMenu)($at) -/* 41B710 802A6980 3C01802B */ lui $at, %hi(D_802AD4A8) -/* 41B714 802A6984 AC3ED4A8 */ sw $fp, %lo(D_802AD4A8)($at) -/* 41B718 802A6988 3C01802B */ lui $at, %hi(battle_menu_moveOptionCount) -/* 41B71C 802A698C AC22D4A4 */ sw $v0, %lo(battle_menu_moveOptionCount)($at) -/* 41B720 802A6990 0C0A89A1 */ jal func_802A2684 -/* 41B724 802A6994 00000000 */ nop -/* 41B728 802A6998 080AA04F */ j .L802A813C -/* 41B72C 802A699C 24020002 */ addiu $v0, $zero, 2 -.L802A69A0_41B730: -/* 41B730 802A69A0 0C0A8B21 */ jal func_802A2C84 -/* 41B734 802A69A4 00000000 */ nop -/* 41B738 802A69A8 0040802D */ daddu $s0, $v0, $zero -/* 41B73C 802A69AC 2402FFFF */ addiu $v0, $zero, -1 -/* 41B740 802A69B0 120205E2 */ beq $s0, $v0, .L802A813C -/* 41B744 802A69B4 24020007 */ addiu $v0, $zero, 7 -/* 41B748 802A69B8 120005E2 */ beqz $s0, .L802A8144_41CED4 -/* 41B74C 802A69BC 240200FF */ addiu $v0, $zero, 0xff -/* 41B750 802A69C0 5602000B */ bnel $s0, $v0, .L802A69F0 -/* 41B754 802A69C4 2602FFFF */ addiu $v0, $s0, -1 -/* 41B758 802A69C8 0C0A8414 */ jal func_802A1050 -/* 41B75C 802A69CC 00000000 */ nop -/* 41B760 802A69D0 24020008 */ addiu $v0, $zero, 8 -/* 41B764 802A69D4 3C01802B */ lui $at, %hi(D_802ACC60) -/* 41B768 802A69D8 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at) -/* 41B76C 802A69DC 24020004 */ addiu $v0, $zero, 4 -/* 41B770 802A69E0 3C01802B */ lui $at, %hi(D_802ACC6C) -/* 41B774 802A69E4 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at) -/* 41B778 802A69E8 080A9FE1 */ j .L802A7F84 -/* 41B77C 802A69EC 24020001 */ addiu $v0, $zero, 1 -.L802A69F0: -/* 41B780 802A69F0 00021080 */ sll $v0, $v0, 2 -/* 41B784 802A69F4 3C01802B */ lui $at, %hi(battle_menu_moveIndices+0x3) -/* 41B788 802A69F8 00220821 */ addu $at, $at, $v0 -/* 41B78C 802A69FC 9022D4B3 */ lbu $v0, %lo(battle_menu_moveIndices+0x3)($at) -/* 41B790 802A6A00 82C30048 */ lb $v1, 0x48($s6) -/* 41B794 802A6A04 A2C20049 */ sb $v0, 0x49($s6) -/* 41B798 802A6A08 00021600 */ sll $v0, $v0, 0x18 -/* 41B79C 802A6A0C 00021603 */ sra $v0, $v0, 0x18 -/* 41B7A0 802A6A10 02C21021 */ addu $v0, $s6, $v0 -/* 41B7A4 802A6A14 904201DE */ lbu $v0, 0x1de($v0) -/* 41B7A8 802A6A18 14600004 */ bnez $v1, .L802A6A2C -/* 41B7AC 802A6A1C A6C2017C */ sh $v0, 0x17c($s6) -/* 41B7B0 802A6A20 3C02802B */ lui $v0, %hi(battle_menu_moveOptionActive + 0x3) -/* 41B7B4 802A6A24 9042D603 */ lbu $v0, %lo(battle_menu_moveOptionActive + 0x3)($v0) -/* 41B7B8 802A6A28 A2C2004D */ sb $v0, 0x4d($s6) -.L802A6A2C: -/* 41B7BC 802A6A2C 82C30048 */ lb $v1, 0x48($s6) -/* 41B7C0 802A6A30 24020001 */ addiu $v0, $zero, 1 -/* 41B7C4 802A6A34 14620004 */ bne $v1, $v0, .L802A6A48 -/* 41B7C8 802A6A38 00000000 */ nop -/* 41B7CC 802A6A3C 3C02802B */ lui $v0, %hi(battle_menu_moveOptionActive + 0x3) -/* 41B7D0 802A6A40 9042D603 */ lbu $v0, %lo(battle_menu_moveOptionActive + 0x3)($v0) -/* 41B7D4 802A6A44 A2C2004E */ sb $v0, 0x4e($s6) -.L802A6A48: -/* 41B7D8 802A6A48 82C40048 */ lb $a0, 0x48($s6) -/* 41B7DC 802A6A4C 24020002 */ addiu $v0, $zero, 2 -/* 41B7E0 802A6A50 14820007 */ bne $a0, $v0, .L802A6A70 -/* 41B7E4 802A6A54 0080182D */ daddu $v1, $a0, $zero -/* 41B7E8 802A6A58 3C02802B */ lui $v0, %hi(battle_menu_moveOptionActive + 0x3) -/* 41B7EC 802A6A5C 9042D603 */ lbu $v0, %lo(battle_menu_moveOptionActive + 0x3)($v0) -/* 41B7F0 802A6A60 14640003 */ bne $v1, $a0, .L802A6A70 -/* 41B7F4 802A6A64 A2C2004F */ sb $v0, 0x4f($s6) -/* 41B7F8 802A6A68 080A9FE1 */ j .L802A7F84 -/* 41B7FC 802A6A6C 24020014 */ addiu $v0, $zero, 0x14 -.L802A6A70: -/* 41B800 802A6A70 0C0A89F4 */ jal func_802A27D0 -/* 41B804 802A6A74 00000000 */ nop -/* 41B808 802A6A78 0C0A840C */ jal func_802A1030 -/* 41B80C 802A6A7C 00000000 */ nop -/* 41B810 802A6A80 080AA04F */ j .L802A813C -/* 41B814 802A6A84 24020003 */ addiu $v0, $zero, 3 -.L802A6A88_41B818: -/* 41B818 802A6A88 0C0A8B21 */ jal func_802A2C84 -/* 41B81C 802A6A8C 00000000 */ nop -/* 41B820 802A6A90 8EC30214 */ lw $v1, 0x214($s6) -/* 41B824 802A6A94 30634000 */ andi $v1, $v1, 0x4000 -/* 41B828 802A6A98 10600009 */ beqz $v1, .L802A6AC0 -/* 41B82C 802A6A9C 0040802D */ daddu $s0, $v0, $zero -/* 41B830 802A6AA0 16000007 */ bnez $s0, .L802A6AC0 -/* 41B834 802A6AA4 00000000 */ nop -/* 41B838 802A6AA8 0C0A8AAE */ jal func_802A2AB8 -/* 41B83C 802A6AAC 00000000 */ nop -/* 41B840 802A6AB0 0C0A8426 */ jal func_802A1098 -/* 41B844 802A6AB4 00000000 */ nop -/* 41B848 802A6AB8 080AA04F */ j .L802A813C -/* 41B84C 802A6ABC 24020004 */ addiu $v0, $zero, 4 -.L802A6AC0: -/* 41B850 802A6AC0 0C0A846C */ jal func_802A11B0 -/* 41B854 802A6AC4 00000000 */ nop -/* 41B858 802A6AC8 1040059E */ beqz $v0, .L802A8144_41CED4 -/* 41B85C 802A6ACC 24020005 */ addiu $v0, $zero, 5 -/* 41B860 802A6AD0 A6C2006C */ sh $v0, 0x6c($s6) -/* 41B864 802A6AD4 82C20049 */ lb $v0, 0x49($s6) -/* 41B868 802A6AD8 24030006 */ addiu $v1, $zero, 6 -/* 41B86C 802A6ADC A6C3006E */ sh $v1, 0x6e($s6) -/* 41B870 802A6AE0 02C21021 */ addu $v0, $s6, $v0 -/* 41B874 802A6AE4 904301DE */ lbu $v1, 0x1de($v0) -/* 41B878 802A6AE8 82C20049 */ lb $v0, 0x49($s6) -/* 41B87C 802A6AEC 02C21021 */ addu $v0, $s6, $v0 -/* 41B880 802A6AF0 A6C3017C */ sh $v1, 0x17c($s6) -/* 41B884 802A6AF4 904301DE */ lbu $v1, 0x1de($v0) -/* 41B888 802A6AF8 82D00048 */ lb $s0, 0x48($s6) -/* 41B88C 802A6AFC 00031080 */ sll $v0, $v1, 2 -/* 41B890 802A6B00 00431021 */ addu $v0, $v0, $v1 -/* 41B894 802A6B04 00021080 */ sll $v0, $v0, 2 -/* 41B898 802A6B08 3C018009 */ lui $at, %hi(gMoveTable + 0x4) -/* 41B89C 802A6B0C 00220821 */ addu $at, $at, $v0 -/* 41B8A0 802A6B10 8C22F064 */ lw $v0, %lo(gMoveTable + 0x4)($at) -/* 41B8A4 802A6B14 AEC20184 */ sw $v0, 0x184($s6) -/* 41B8A8 802A6B18 24020001 */ addiu $v0, $zero, 1 -/* 41B8AC 802A6B1C 1202000E */ beq $s0, $v0, .L802A6B58 -/* 41B8B0 802A6B20 2A020002 */ slti $v0, $s0, 2 -/* 41B8B4 802A6B24 50400005 */ beql $v0, $zero, .L802A6B3C -/* 41B8B8 802A6B28 24020004 */ addiu $v0, $zero, 4 -/* 41B8BC 802A6B2C 12000007 */ beqz $s0, .L802A6B4C -/* 41B8C0 802A6B30 24040011 */ addiu $a0, $zero, 0x11 -/* 41B8C4 802A6B34 080AA051 */ j .L802A8144_41CED4 -/* 41B8C8 802A6B38 00000000 */ nop -.L802A6B3C: -/* 41B8CC 802A6B3C 1202000F */ beq $s0, $v0, .L802A6B7C -/* 41B8D0 802A6B40 00000000 */ nop -/* 41B8D4 802A6B44 080AA051 */ j .L802A8144_41CED4 -/* 41B8D8 802A6B48 00000000 */ nop -.L802A6B4C: -/* 41B8DC 802A6B4C 92A20000 */ lbu $v0, ($s5) -/* 41B8E0 802A6B50 080A9AD9 */ j .L802A6B64 -/* 41B8E4 802A6B54 A2C00178 */ sb $zero, 0x178($s6) -.L802A6B58: -/* 41B8E8 802A6B58 92A20001 */ lbu $v0, 1($s5) -/* 41B8EC 802A6B5C 24040011 */ addiu $a0, $zero, 0x11 -/* 41B8F0 802A6B60 A2D00178 */ sb $s0, 0x178($s6) -.L802A6B64: -/* 41B8F4 802A6B64 00021600 */ sll $v0, $v0, 0x18 -/* 41B8F8 802A6B68 00021603 */ sra $v0, $v0, 0x18 -/* 41B8FC 802A6B6C 0C090464 */ jal btl_set_state -/* 41B900 802A6B70 A6C2017A */ sh $v0, 0x17a($s6) -/* 41B904 802A6B74 080AA051 */ j .L802A8144_41CED4 -/* 41B908 802A6B78 00000000 */ nop -.L802A6B7C: -/* 41B90C 802A6B7C 86C2006E */ lh $v0, 0x6e($s6) -/* 41B910 802A6B80 3C01800E */ lui $at, %hi(gBattleSubState) -/* 41B914 802A6B84 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) -/* 41B918 802A6B88 0C0A9662 */ jal btl_state_update_player_menu -/* 41B91C 802A6B8C 00000000 */ nop -/* 41B920 802A6B90 080A9F69 */ j .L802A7DA4 -/* 41B924 802A6B94 24040019 */ addiu $a0, $zero, 0x19 -.L802A6B98_41B928: -/* 41B928 802A6B98 0C0A8B21 */ jal func_802A2C84 -/* 41B92C 802A6B9C 00000000 */ nop -/* 41B930 802A6BA0 0C0A846C */ jal func_802A11B0 -/* 41B934 802A6BA4 00000000 */ nop -/* 41B938 802A6BA8 10400566 */ beqz $v0, .L802A8144_41CED4 -/* 41B93C 802A6BAC 24020002 */ addiu $v0, $zero, 2 -/* 41B940 802A6BB0 080AA04F */ j .L802A813C -/* 41B944 802A6BB4 00000000 */ nop -.L802A6BB8_41B948: -/* 41B948 802A6BB8 0C0A8AAE */ jal func_802A2AB8 -/* 41B94C 802A6BBC 00000000 */ nop -/* 41B950 802A6BC0 0C0A8426 */ jal func_802A1098 -/* 41B954 802A6BC4 00000000 */ nop -/* 41B958 802A6BC8 080AA04F */ j .L802A813C -/* 41B95C 802A6BCC 24020004 */ addiu $v0, $zero, 4 -.L802A6BD0_41B960: -/* 41B960 802A6BD0 0C0A8B21 */ jal func_802A2C84 -/* 41B964 802A6BD4 00000000 */ nop -/* 41B968 802A6BD8 2403FFFF */ addiu $v1, $zero, -1 -/* 41B96C 802A6BDC 10430559 */ beq $v0, $v1, .L802A8144_41CED4 -/* 41B970 802A6BE0 24020002 */ addiu $v0, $zero, 2 -/* 41B974 802A6BE4 080AA04F */ j .L802A813C -/* 41B978 802A6BE8 00000000 */ nop -.L802A6BEC_41B97C: -/* 41B97C 802A6BEC 3C02800E */ lui $v0, %hi(gBattleStatus+0x4) -/* 41B980 802A6BF0 8C42C074 */ lw $v0, %lo(gBattleStatus+0x4)($v0) -/* 41B984 802A6BF4 30420004 */ andi $v0, $v0, 4 -/* 41B988 802A6BF8 10400004 */ beqz $v0, .L802A6C0C -/* 41B98C 802A6BFC 24040050 */ addiu $a0, $zero, 0x50 -/* 41B990 802A6C00 2405003C */ addiu $a1, $zero, 0x3c -/* 41B994 802A6C04 080A9B06 */ j .L802A6C18 -/* 41B998 802A6C08 0000302D */ daddu $a2, $zero, $zero -.L802A6C0C: -/* 41B99C 802A6C0C 24040051 */ addiu $a0, $zero, 0x51 -/* 41B9A0 802A6C10 82A60012 */ lb $a2, 0x12($s5) -/* 41B9A4 802A6C14 2405003C */ addiu $a1, $zero, 0x3c -.L802A6C18: -/* 41B9A8 802A6C18 0C093E81 */ jal btl_show_variable_battle_message -/* 41B9AC 802A6C1C 00000000 */ nop -/* 41B9B0 802A6C20 24020001 */ addiu $v0, $zero, 1 -/* 41B9B4 802A6C24 3C01802B */ lui $at, %hi(D_802AD607) -/* 41B9B8 802A6C28 A022D607 */ sb $v0, %lo(D_802AD607)($at) -/* 41B9BC 802A6C2C 080AA04F */ j .L802A813C -/* 41B9C0 802A6C30 24020009 */ addiu $v0, $zero, 9 -.L802A6C34_41B9C4: -/* 41B9C4 802A6C34 0C093EAD */ jal btl_is_popup_displayed -/* 41B9C8 802A6C38 00000000 */ nop -/* 41B9CC 802A6C3C 14400541 */ bnez $v0, .L802A8144_41CED4 -/* 41B9D0 802A6C40 24020004 */ addiu $v0, $zero, 4 -/* 41B9D4 802A6C44 3C01802B */ lui $at, %hi(D_802ACC6C) -/* 41B9D8 802A6C48 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at) -/* 41B9DC 802A6C4C 3C01802B */ lui $at, %hi(D_802AD607) -/* 41B9E0 802A6C50 A020D607 */ sb $zero, %lo(D_802AD607)($at) -/* 41B9E4 802A6C54 3C01802B */ lui $at, %hi(D_802ACC60) -/* 41B9E8 802A6C58 AC20CC60 */ sw $zero, %lo(D_802ACC60)($at) -/* 41B9EC 802A6C5C 080AA04F */ j .L802A813C -/* 41B9F0 802A6C60 24020001 */ addiu $v0, $zero, 1 -.L802A6C64_41B9F4: -/* 41B9F4 802A6C64 0C0A840C */ jal func_802A1030 -/* 41B9F8 802A6C68 00000000 */ nop -/* 41B9FC 802A6C6C 080AA04F */ j .L802A813C -/* 41BA00 802A6C70 2402000B */ addiu $v0, $zero, 0xb -.L802A6C74_41BA04: -/* 41BA04 802A6C74 0C0A846C */ jal func_802A11B0 -/* 41BA08 802A6C78 00000000 */ nop -/* 41BA0C 802A6C7C 8EC30214 */ lw $v1, 0x214($s6) -/* 41BA10 802A6C80 30634000 */ andi $v1, $v1, 0x4000 -/* 41BA14 802A6C84 10600007 */ beqz $v1, .L802A6CA4 -/* 41BA18 802A6C88 0040802D */ daddu $s0, $v0, $zero -/* 41BA1C 802A6C8C 16000007 */ bnez $s0, .L802A6CAC -/* 41BA20 802A6C90 00000000 */ nop -/* 41BA24 802A6C94 0C0A841E */ jal func_802A1078 -/* 41BA28 802A6C98 00000000 */ nop -/* 41BA2C 802A6C9C 080AA04F */ j .L802A813C -/* 41BA30 802A6CA0 2402000C */ addiu $v0, $zero, 0xc -.L802A6CA4: -/* 41BA34 802A6CA4 12000527 */ beqz $s0, .L802A8144_41CED4 -/* 41BA38 802A6CA8 00000000 */ nop -.L802A6CAC: -/* 41BA3C 802A6CAC 82C40048 */ lb $a0, 0x48($s6) -/* 41BA40 802A6CB0 2402000D */ addiu $v0, $zero, 0xd -/* 41BA44 802A6CB4 A6C2006C */ sh $v0, 0x6c($s6) -/* 41BA48 802A6CB8 2402000E */ addiu $v0, $zero, 0xe -/* 41BA4C 802A6CBC 10800006 */ beqz $a0, .L802A6CD8 -/* 41BA50 802A6CC0 A6C2006E */ sh $v0, 0x6e($s6) -/* 41BA54 802A6CC4 24020001 */ addiu $v0, $zero, 1 -/* 41BA58 802A6CC8 1082000C */ beq $a0, $v0, .L802A6CFC -/* 41BA5C 802A6CCC 00000000 */ nop -/* 41BA60 802A6CD0 080A9B56 */ j .L802A6D58_41BAE8 -/* 41BA64 802A6CD4 00000000 */ nop -.L802A6CD8: -/* 41BA68 802A6CD8 92A30000 */ lbu $v1, ($s5) -/* 41BA6C 802A6CDC A2C00178 */ sb $zero, 0x178($s6) -/* 41BA70 802A6CE0 92A20000 */ lbu $v0, ($s5) -/* 41BA74 802A6CE4 00031E00 */ sll $v1, $v1, 0x18 -/* 41BA78 802A6CE8 00031E03 */ sra $v1, $v1, 0x18 -/* 41BA7C 802A6CEC 00021600 */ sll $v0, $v0, 0x18 -/* 41BA80 802A6CF0 00021603 */ sra $v0, $v0, 0x18 -/* 41BA84 802A6CF4 080A9B47 */ j .L802A6D1C -/* 41BA88 802A6CF8 2442001A */ addiu $v0, $v0, 0x1a -.L802A6CFC: -/* 41BA8C 802A6CFC 92A30001 */ lbu $v1, 1($s5) -/* 41BA90 802A6D00 A2C40178 */ sb $a0, 0x178($s6) -/* 41BA94 802A6D04 92A20001 */ lbu $v0, 1($s5) -/* 41BA98 802A6D08 00031E00 */ sll $v1, $v1, 0x18 -/* 41BA9C 802A6D0C 00031E03 */ sra $v1, $v1, 0x18 -/* 41BAA0 802A6D10 00021600 */ sll $v0, $v0, 0x18 -/* 41BAA4 802A6D14 00021603 */ sra $v0, $v0, 0x18 -/* 41BAA8 802A6D18 24420003 */ addiu $v0, $v0, 3 -.L802A6D1C: -/* 41BAAC 802A6D1C A6C2017C */ sh $v0, 0x17c($s6) -/* 41BAB0 802A6D20 00021400 */ sll $v0, $v0, 0x10 -/* 41BAB4 802A6D24 00021403 */ sra $v0, $v0, 0x10 -/* 41BAB8 802A6D28 A6C3017A */ sh $v1, 0x17a($s6) -/* 41BABC 802A6D2C 00021880 */ sll $v1, $v0, 2 -/* 41BAC0 802A6D30 00621821 */ addu $v1, $v1, $v0 -/* 41BAC4 802A6D34 00031880 */ sll $v1, $v1, 2 -/* 41BAC8 802A6D38 3C028009 */ lui $v0, %hi(gMoveTable + 0x4) -/* 41BACC 802A6D3C 00431021 */ addu $v0, $v0, $v1 -/* 41BAD0 802A6D40 8C42F064 */ lw $v0, %lo(gMoveTable + 0x4)($v0) -/* 41BAD4 802A6D44 24040011 */ addiu $a0, $zero, 0x11 -/* 41BAD8 802A6D48 0C090464 */ jal btl_set_state -/* 41BADC 802A6D4C AEC20184 */ sw $v0, 0x184($s6) -/* 41BAE0 802A6D50 080AA051 */ j .L802A8144_41CED4 -/* 41BAE4 802A6D54 00000000 */ nop -.L802A6D58_41BAE8: -/* 41BAE8 802A6D58 0C0A846C */ jal func_802A11B0 -/* 41BAEC 802A6D5C 00000000 */ nop -/* 41BAF0 802A6D60 104004F8 */ beqz $v0, .L802A8144_41CED4 -/* 41BAF4 802A6D64 24020008 */ addiu $v0, $zero, 8 -/* 41BAF8 802A6D68 3C01802B */ lui $at, %hi(D_802ACC60) -/* 41BAFC 802A6D6C AC22CC60 */ sw $v0, %lo(D_802ACC60)($at) -/* 41BB00 802A6D70 24020004 */ addiu $v0, $zero, 4 -/* 41BB04 802A6D74 3C01802B */ lui $at, %hi(D_802ACC6C) -/* 41BB08 802A6D78 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at) -/* 41BB0C 802A6D7C 080AA04F */ j .L802A813C -/* 41BB10 802A6D80 24020001 */ addiu $v0, $zero, 1 -.L802A6D84_41BB14: -/* 41BB14 802A6D84 0C0A841E */ jal func_802A1078 -/* 41BB18 802A6D88 00000000 */ nop -/* 41BB1C 802A6D8C 080AA04F */ j .L802A813C -/* 41BB20 802A6D90 2402000C */ addiu $v0, $zero, 0xc -.L802A6D94_41BB24: -/* 41BB24 802A6D94 86C3017C */ lh $v1, 0x17c($s6) -/* 41BB28 802A6D98 24020035 */ addiu $v0, $zero, 0x35 -/* 41BB2C 802A6D9C 14620005 */ bne $v1, $v0, .L802A6DB4 -/* 41BB30 802A6DA0 24020036 */ addiu $v0, $zero, 0x36 -/* 41BB34 802A6DA4 24020002 */ addiu $v0, $zero, 2 -/* 41BB38 802A6DA8 A2C20088 */ sb $v0, 0x88($s6) -/* 41BB3C 802A6DAC 86C3017C */ lh $v1, 0x17c($s6) -/* 41BB40 802A6DB0 24020036 */ addiu $v0, $zero, 0x36 -.L802A6DB4: -/* 41BB44 802A6DB4 14620003 */ bne $v1, $v0, .L802A6DC4 -/* 41BB48 802A6DB8 0000A02D */ daddu $s4, $zero, $zero -/* 41BB4C 802A6DBC 24020003 */ addiu $v0, $zero, 3 -/* 41BB50 802A6DC0 A2C20088 */ sb $v0, 0x88($s6) -.L802A6DC4: -/* 41BB54 802A6DC4 0280982D */ daddu $s3, $s4, $zero -/* 41BB58 802A6DC8 241E0002 */ addiu $fp, $zero, 2 -/* 41BB5C 802A6DCC 02A0902D */ daddu $s2, $s5, $zero -/* 41BB60 802A6DD0 3C11802B */ lui $s1, %hi(D_802ACCD0) -/* 41BB64 802A6DD4 2631CCD0 */ addiu $s1, $s1, %lo(D_802ACCD0) -.L802A6DD8: -/* 41BB68 802A6DD8 864201B4 */ lh $v0, 0x1b4($s2) -/* 41BB6C 802A6DDC 50400027 */ beql $v0, $zero, .L802A6E7C -/* 41BB70 802A6DE0 26730001 */ addiu $s3, $s3, 1 -/* 41BB74 802A6DE4 00021140 */ sll $v0, $v0, 5 -/* 41BB78 802A6DE8 3C0E8008 */ lui $t6, %hi(gItemTable) -/* 41BB7C 802A6DEC 25CE78E0 */ addiu $t6, $t6, %lo(gItemTable) -/* 41BB80 802A6DF0 004E8021 */ addu $s0, $v0, $t6 -/* 41BB84 802A6DF4 3C0E8009 */ lui $t6, %hi(gItemHudScripts) -/* 41BB88 802A6DF8 25CEA680 */ addiu $t6, $t6, %lo(gItemHudScripts) -/* 41BB8C 802A6DFC 86020004 */ lh $v0, 4($s0) -/* 41BB90 802A6E00 96030018 */ lhu $v1, 0x18($s0) -/* 41BB94 802A6E04 000210C0 */ sll $v0, $v0, 3 -/* 41BB98 802A6E08 30630002 */ andi $v1, $v1, 2 -/* 41BB9C 802A6E0C 1060001A */ beqz $v1, .L802A6E78 -/* 41BBA0 802A6E10 004EA821 */ addu $s5, $v0, $t6 -/* 41BBA4 802A6E14 A2DE0178 */ sb $fp, 0x178($s6) -/* 41BBA8 802A6E18 964201B4 */ lhu $v0, 0x1b4($s2) -/* 41BBAC 802A6E1C A6C2017A */ sh $v0, 0x17a($s6) -/* 41BBB0 802A6E20 8E020008 */ lw $v0, 8($s0) -/* 41BBB4 802A6E24 02E0202D */ daddu $a0, $s7, $zero -/* 41BBB8 802A6E28 0C098C0B */ jal player_create_target_list -/* 41BBBC 802A6E2C AEC20184 */ sw $v0, 0x184($s6) -/* 41BBC0 802A6E30 8EA20000 */ lw $v0, ($s5) -/* 41BBC4 802A6E34 AE220000 */ sw $v0, ($s1) -/* 41BBC8 802A6E38 864301B4 */ lh $v1, 0x1b4($s2) -/* 41BBCC 802A6E3C 24020001 */ addiu $v0, $zero, 1 -/* 41BBD0 802A6E40 AE22018C */ sw $v0, 0x18c($s1) -/* 41BBD4 802A6E44 AE230108 */ sw $v1, 0x108($s1) -/* 41BBD8 802A6E48 8E020000 */ lw $v0, ($s0) -/* 41BBDC 802A6E4C AE220084 */ sw $v0, 0x84($s1) -/* 41BBE0 802A6E50 8E020014 */ lw $v0, 0x14($s0) -/* 41BBE4 802A6E54 AE220294 */ sw $v0, 0x294($s1) -/* 41BBE8 802A6E58 82E2040C */ lb $v0, 0x40c($s7) -/* 41BBEC 802A6E5C 54400005 */ bnel $v0, $zero, .L802A6E74 -/* 41BBF0 802A6E60 26310004 */ addiu $s1, $s1, 4 -/* 41BBF4 802A6E64 8EA20004 */ lw $v0, 4($s5) -/* 41BBF8 802A6E68 AE20018C */ sw $zero, 0x18c($s1) -/* 41BBFC 802A6E6C AE220000 */ sw $v0, ($s1) -/* 41BC00 802A6E70 26310004 */ addiu $s1, $s1, 4 -.L802A6E74: -/* 41BC04 802A6E74 26940001 */ addiu $s4, $s4, 1 -.L802A6E78: -/* 41BC08 802A6E78 26730001 */ addiu $s3, $s3, 1 -.L802A6E7C: -/* 41BC0C 802A6E7C 2A62000A */ slti $v0, $s3, 0xa -/* 41BC10 802A6E80 1440FFD5 */ bnez $v0, .L802A6DD8 -/* 41BC14 802A6E84 26520002 */ addiu $s2, $s2, 2 -/* 41BC18 802A6E88 3C01802B */ lui $at, %hi(D_802ACCD0+0x31C) -/* 41BC1C 802A6E8C AC20CFEC */ sw $zero, %lo(D_802ACCD0+0x31C)($at) -/* 41BC20 802A6E90 3C01802B */ lui $at, %hi(D_802ACCD0+0x320) -/* 41BC24 802A6E94 AC20CFF0 */ sw $zero, %lo(D_802ACCD0+0x320)($at) -/* 41BC28 802A6E98 86C3017C */ lh $v1, 0x17c($s6) -/* 41BC2C 802A6E9C 24020035 */ addiu $v0, $zero, 0x35 -/* 41BC30 802A6EA0 14620009 */ bne $v1, $v0, .L802A6EC8 -/* 41BC34 802A6EA4 24020036 */ addiu $v0, $zero, 0x36 -/* 41BC38 802A6EA8 82C30088 */ lb $v1, 0x88($s6) -/* 41BC3C 802A6EAC 24020001 */ addiu $v0, $zero, 1 -/* 41BC40 802A6EB0 3C01802B */ lui $at, %hi(D_802ACCD0+0x31C) -/* 41BC44 802A6EB4 AC22CFEC */ sw $v0, %lo(D_802ACCD0+0x31C)($at) -/* 41BC48 802A6EB8 3C01802B */ lui $at, %hi(D_802ACCD0+0x320) -/* 41BC4C 802A6EBC AC23CFF0 */ sw $v1, %lo(D_802ACCD0+0x320)($at) -/* 41BC50 802A6EC0 86C3017C */ lh $v1, 0x17c($s6) -/* 41BC54 802A6EC4 24020036 */ addiu $v0, $zero, 0x36 -.L802A6EC8: -/* 41BC58 802A6EC8 14620006 */ bne $v1, $v0, .L802A6EE4 -/* 41BC5C 802A6ECC 24020002 */ addiu $v0, $zero, 2 -/* 41BC60 802A6ED0 82C30088 */ lb $v1, 0x88($s6) -/* 41BC64 802A6ED4 3C01802B */ lui $at, %hi(D_802ACCD0+0x31C) -/* 41BC68 802A6ED8 AC22CFEC */ sw $v0, %lo(D_802ACCD0+0x31C)($at) -/* 41BC6C 802A6EDC 3C01802B */ lui $at, %hi(D_802ACCD0+0x320) -/* 41BC70 802A6EE0 AC23CFF0 */ sw $v1, %lo(D_802ACCD0+0x320)($at) -.L802A6EE4: -/* 41BC74 802A6EE4 82C20050 */ lb $v0, 0x50($s6) -/* 41BC78 802A6EE8 04420001 */ bltzl $v0, .L802A6EF0 -/* 41BC7C 802A6EEC A2C00050 */ sb $zero, 0x50($s6) -.L802A6EF0: -/* 41BC80 802A6EF0 82DE0050 */ lb $fp, 0x50($s6) -/* 41BC84 802A6EF4 3C04802B */ lui $a0, %hi(D_802ACCD0) -/* 41BC88 802A6EF8 2484CCD0 */ addiu $a0, $a0, %lo(D_802ACCD0) -/* 41BC8C 802A6EFC AC800318 */ sw $zero, 0x318($a0) -/* 41BC90 802A6F00 AC940324 */ sw $s4, 0x324($a0) -/* 41BC94 802A6F04 0C03D44F */ jal func_800F513C -/* 41BC98 802A6F08 AC9E0328 */ sw $fp, 0x328($a0) -/* 41BC9C 802A6F0C 0C03D4AF */ jal func_800F52BC -/* 41BCA0 802A6F10 00000000 */ nop -/* 41BCA4 802A6F14 080AA04F */ j .L802A813C -/* 41BCA8 802A6F18 24020015 */ addiu $v0, $zero, 0x15 -.L802A6F1C_41BCAC: -/* 41BCAC 802A6F1C 3C03802B */ lui $v1, %hi(D_802ACCD0+0x32C) -/* 41BCB0 802A6F20 8463CFFC */ lh $v1, %lo(D_802ACCD0+0x32C)($v1) -/* 41BCB4 802A6F24 10600487 */ beqz $v1, .L802A8144_41CED4 -/* 41BCB8 802A6F28 240200FF */ addiu $v0, $zero, 0xff -/* 41BCBC 802A6F2C 14620007 */ bne $v1, $v0, .L802A6F4C -/* 41BCC0 802A6F30 24020018 */ addiu $v0, $zero, 0x18 -/* 41BCC4 802A6F34 0C0A8A44 */ jal func_802A2910 -/* 41BCC8 802A6F38 00000000 */ nop -/* 41BCCC 802A6F3C 24020002 */ addiu $v0, $zero, 2 -/* 41BCD0 802A6F40 A6C0017C */ sh $zero, 0x17c($s6) -/* 41BCD4 802A6F44 080A9FE1 */ j .L802A7F84 -/* 41BCD8 802A6F48 A2C00088 */ sb $zero, 0x88($s6) -.L802A6F4C: -/* 41BCDC 802A6F4C 24030019 */ addiu $v1, $zero, 0x19 -/* 41BCE0 802A6F50 A6C2006C */ sh $v0, 0x6c($s6) -/* 41BCE4 802A6F54 3C02802B */ lui $v0, %hi(D_802ACCD0+0x32C) -/* 41BCE8 802A6F58 8442CFFC */ lh $v0, %lo(D_802ACCD0+0x32C)($v0) -/* 41BCEC 802A6F5C 3C0E802B */ lui $t6, %hi(D_802ACCD0) -/* 41BCF0 802A6F60 25CECCD0 */ addiu $t6, $t6, %lo(D_802ACCD0) -/* 41BCF4 802A6F64 A6C3006E */ sh $v1, 0x6e($s6) -/* 41BCF8 802A6F68 2442FFFF */ addiu $v0, $v0, -1 -/* 41BCFC 802A6F6C 00021080 */ sll $v0, $v0, 2 -/* 41BD00 802A6F70 01C21021 */ addu $v0, $t6, $v0 -/* 41BD04 802A6F74 9442010A */ lhu $v0, 0x10a($v0) -/* 41BD08 802A6F78 24030002 */ addiu $v1, $zero, 2 -/* 41BD0C 802A6F7C A2C30178 */ sb $v1, 0x178($s6) -/* 41BD10 802A6F80 A6C201AA */ sh $v0, 0x1aa($s6) -/* 41BD14 802A6F84 A6C2017A */ sh $v0, 0x17a($s6) -/* 41BD18 802A6F88 00021400 */ sll $v0, $v0, 0x10 -/* 41BD1C 802A6F8C 000212C3 */ sra $v0, $v0, 0xb -/* 41BD20 802A6F90 3C038008 */ lui $v1, %hi(gItemTable+0x8) -/* 41BD24 802A6F94 00621821 */ addu $v1, $v1, $v0 -/* 41BD28 802A6F98 8C6378E8 */ lw $v1, %lo(gItemTable+0x8)($v1) -/* 41BD2C 802A6F9C 3C02802B */ lui $v0, %hi(D_802ACCD0+0x32D) -/* 41BD30 802A6FA0 9042CFFD */ lbu $v0, %lo(D_802ACCD0+0x32D)($v0) -/* 41BD34 802A6FA4 AEC00188 */ sw $zero, 0x188($s6) -/* 41BD38 802A6FA8 2442FFFF */ addiu $v0, $v0, -1 -/* 41BD3C 802A6FAC 34638000 */ ori $v1, $v1, 0x8000 -/* 41BD40 802A6FB0 A2C20050 */ sb $v0, 0x50($s6) -/* 41BD44 802A6FB4 0C03C4EC */ jal hide_popup_menu -/* 41BD48 802A6FB8 AEC30184 */ sw $v1, 0x184($s6) -/* 41BD4C 802A6FBC 0C0A89F4 */ jal func_802A27D0 -/* 41BD50 802A6FC0 00000000 */ nop -/* 41BD54 802A6FC4 0C0A840C */ jal func_802A1030 -/* 41BD58 802A6FC8 00000000 */ nop -/* 41BD5C 802A6FCC 080AA04F */ j .L802A813C -/* 41BD60 802A6FD0 24020016 */ addiu $v0, $zero, 0x16 -.L802A6FD4_41BD64: -/* 41BD64 802A6FD4 8EC20214 */ lw $v0, 0x214($s6) -/* 41BD68 802A6FD8 30424000 */ andi $v0, $v0, 0x4000 -/* 41BD6C 802A6FDC 1040000E */ beqz $v0, .L802A7018 -/* 41BD70 802A6FE0 00000000 */ nop -/* 41BD74 802A6FE4 3C02802B */ lui $v0, %hi(D_802ACCD0+0x32C) -/* 41BD78 802A6FE8 8442CFFC */ lh $v0, %lo(D_802ACCD0+0x32C)($v0) -/* 41BD7C 802A6FEC 1440000A */ bnez $v0, .L802A7018 -/* 41BD80 802A6FF0 00000000 */ nop -/* 41BD84 802A6FF4 0C03C5B3 */ jal func_800F16CC -/* 41BD88 802A6FF8 00000000 */ nop -/* 41BD8C 802A6FFC 0C0A8B16 */ jal func_802A2C58 -/* 41BD90 802A7000 00000000 */ nop -/* 41BD94 802A7004 0C0A8426 */ jal func_802A1098 -/* 41BD98 802A7008 00000000 */ nop -/* 41BD9C 802A700C 24020017 */ addiu $v0, $zero, 0x17 -/* 41BDA0 802A7010 080AA04F */ j .L802A813C -/* 41BDA4 802A7014 A6C0017C */ sh $zero, 0x17c($s6) -.L802A7018: -/* 41BDA8 802A7018 0C0A8B21 */ jal func_802A2C84 -/* 41BDAC 802A701C 00000000 */ nop -.L802A7020: -/* 41BDB0 802A7020 0C0A846C */ jal func_802A11B0 -/* 41BDB4 802A7024 00000000 */ nop -/* 41BDB8 802A7028 10400446 */ beqz $v0, .L802A8144_41CED4 -/* 41BDBC 802A702C 00000000 */ nop -/* 41BDC0 802A7030 080A9E2B */ j .L802A78AC -/* 41BDC4 802A7034 00000000 */ nop -.L802A7038_41BDC8: -/* 41BDC8 802A7038 0C0A8B21 */ jal func_802A2C84 -/* 41BDCC 802A703C 00000000 */ nop -/* 41BDD0 802A7040 0C0A846C */ jal func_802A11B0 -/* 41BDD4 802A7044 00000000 */ nop -/* 41BDD8 802A7048 1040043E */ beqz $v0, .L802A8144_41CED4 -/* 41BDDC 802A704C 24020015 */ addiu $v0, $zero, 0x15 -/* 41BDE0 802A7050 080AA04F */ j .L802A813C -/* 41BDE4 802A7054 00000000 */ nop -.L802A7058_41BDE8: -/* 41BDE8 802A7058 0C03C5B3 */ jal func_800F16CC -/* 41BDEC 802A705C 00000000 */ nop -/* 41BDF0 802A7060 0C0A8B16 */ jal func_802A2C58 -/* 41BDF4 802A7064 00000000 */ nop -/* 41BDF8 802A7068 0C0A8426 */ jal func_802A1098 -/* 41BDFC 802A706C 00000000 */ nop -/* 41BE00 802A7070 0C0A8B21 */ jal func_802A2C84 -/* 41BE04 802A7074 00000000 */ nop -/* 41BE08 802A7078 080AA04F */ j .L802A813C -/* 41BE0C 802A707C 24020017 */ addiu $v0, $zero, 0x17 -.L802A7080_41BE10: -/* 41BE10 802A7080 0C03C54E */ jal destroy_popup_menu -/* 41BE14 802A7084 00000000 */ nop -/* 41BE18 802A7088 080A9D8B */ j .L802A762C_41C3BC -/* 41BE1C 802A708C 00000000 */ nop -.L802A7090_41BE20: -/* 41BE20 802A7090 0000A02D */ daddu $s4, $zero, $zero -/* 41BE24 802A7094 0280982D */ daddu $s3, $s4, $zero -/* 41BE28 802A7098 241E0002 */ addiu $fp, $zero, 2 -/* 41BE2C 802A709C 02A0902D */ daddu $s2, $s5, $zero -/* 41BE30 802A70A0 3C11802B */ lui $s1, %hi(D_802ACCD0) -/* 41BE34 802A70A4 2631CCD0 */ addiu $s1, $s1, %lo(D_802ACCD0) -.L802A70A8: -/* 41BE38 802A70A8 864201B4 */ lh $v0, 0x1b4($s2) -/* 41BE3C 802A70AC 50400027 */ beql $v0, $zero, .L802A714C -/* 41BE40 802A70B0 26730001 */ addiu $s3, $s3, 1 -/* 41BE44 802A70B4 00021140 */ sll $v0, $v0, 5 -/* 41BE48 802A70B8 3C0E8008 */ lui $t6, %hi(gItemTable) -/* 41BE4C 802A70BC 25CE78E0 */ addiu $t6, $t6, %lo(gItemTable) -/* 41BE50 802A70C0 004E8021 */ addu $s0, $v0, $t6 -/* 41BE54 802A70C4 3C0E8009 */ lui $t6, %hi(gItemHudScripts) -/* 41BE58 802A70C8 25CEA680 */ addiu $t6, $t6, %lo(gItemHudScripts) -/* 41BE5C 802A70CC 86020004 */ lh $v0, 4($s0) -/* 41BE60 802A70D0 96030018 */ lhu $v1, 0x18($s0) -/* 41BE64 802A70D4 000210C0 */ sll $v0, $v0, 3 -/* 41BE68 802A70D8 30630002 */ andi $v1, $v1, 2 -/* 41BE6C 802A70DC 1060001A */ beqz $v1, .L802A7148 -/* 41BE70 802A70E0 004EA821 */ addu $s5, $v0, $t6 -/* 41BE74 802A70E4 A2DE0178 */ sb $fp, 0x178($s6) -/* 41BE78 802A70E8 964201B4 */ lhu $v0, 0x1b4($s2) -/* 41BE7C 802A70EC A6C2017A */ sh $v0, 0x17a($s6) -/* 41BE80 802A70F0 8E020008 */ lw $v0, 8($s0) -/* 41BE84 802A70F4 02E0202D */ daddu $a0, $s7, $zero -/* 41BE88 802A70F8 0C098C0B */ jal player_create_target_list -/* 41BE8C 802A70FC AEC20184 */ sw $v0, 0x184($s6) -/* 41BE90 802A7100 8EA20000 */ lw $v0, ($s5) -/* 41BE94 802A7104 AE220000 */ sw $v0, ($s1) -/* 41BE98 802A7108 864301B4 */ lh $v1, 0x1b4($s2) -/* 41BE9C 802A710C 24020001 */ addiu $v0, $zero, 1 -/* 41BEA0 802A7110 AE22018C */ sw $v0, 0x18c($s1) -/* 41BEA4 802A7114 AE230108 */ sw $v1, 0x108($s1) -/* 41BEA8 802A7118 8E020000 */ lw $v0, ($s0) -/* 41BEAC 802A711C AE220084 */ sw $v0, 0x84($s1) -/* 41BEB0 802A7120 8E020014 */ lw $v0, 0x14($s0) -/* 41BEB4 802A7124 AE220294 */ sw $v0, 0x294($s1) -/* 41BEB8 802A7128 82E2040C */ lb $v0, 0x40c($s7) -/* 41BEBC 802A712C 54400005 */ bnel $v0, $zero, .L802A7144 -/* 41BEC0 802A7130 26310004 */ addiu $s1, $s1, 4 -/* 41BEC4 802A7134 8EA20004 */ lw $v0, 4($s5) -/* 41BEC8 802A7138 AE20018C */ sw $zero, 0x18c($s1) -/* 41BECC 802A713C AE220000 */ sw $v0, ($s1) -/* 41BED0 802A7140 26310004 */ addiu $s1, $s1, 4 -.L802A7144: -/* 41BED4 802A7144 26940001 */ addiu $s4, $s4, 1 -.L802A7148: -/* 41BED8 802A7148 26730001 */ addiu $s3, $s3, 1 -.L802A714C: -/* 41BEDC 802A714C 2A62000A */ slti $v0, $s3, 0xa -/* 41BEE0 802A7150 1440FFD5 */ bnez $v0, .L802A70A8 -/* 41BEE4 802A7154 26520002 */ addiu $s2, $s2, 2 -/* 41BEE8 802A7158 82C20050 */ lb $v0, 0x50($s6) -/* 41BEEC 802A715C 04420001 */ bltzl $v0, .L802A7164 -/* 41BEF0 802A7160 A2C00050 */ sb $zero, 0x50($s6) -.L802A7164: -/* 41BEF4 802A7164 82DE0050 */ lb $fp, 0x50($s6) -/* 41BEF8 802A7168 3C04802B */ lui $a0, %hi(D_802ACCD0) -/* 41BEFC 802A716C 2484CCD0 */ addiu $a0, $a0, %lo(D_802ACCD0) -/* 41BF00 802A7170 AC800318 */ sw $zero, 0x318($a0) -/* 41BF04 802A7174 AC940324 */ sw $s4, 0x324($a0) -/* 41BF08 802A7178 AC80031C */ sw $zero, 0x31c($a0) -/* 41BF0C 802A717C AC800320 */ sw $zero, 0x320($a0) -/* 41BF10 802A7180 0C03D44F */ jal func_800F513C -/* 41BF14 802A7184 AC9E0328 */ sw $fp, 0x328($a0) -/* 41BF18 802A7188 0C03D4AF */ jal func_800F52BC -/* 41BF1C 802A718C 00000000 */ nop -/* 41BF20 802A7190 080AA04F */ j .L802A813C -/* 41BF24 802A7194 24020029 */ addiu $v0, $zero, 0x29 -.L802A7198_41BF28: -/* 41BF28 802A7198 3C03802B */ lui $v1, %hi(D_802ACCD0+0x32C) -/* 41BF2C 802A719C 8463CFFC */ lh $v1, %lo(D_802ACCD0+0x32C)($v1) -/* 41BF30 802A71A0 106003E8 */ beqz $v1, .L802A8144_41CED4 -/* 41BF34 802A71A4 240200FF */ addiu $v0, $zero, 0xff -/* 41BF38 802A71A8 5462000B */ bnel $v1, $v0, .L802A71D8 -/* 41BF3C 802A71AC 2402002C */ addiu $v0, $zero, 0x2c -/* 41BF40 802A71B0 0C0A8414 */ jal func_802A1050 -/* 41BF44 802A71B4 00000000 */ nop -/* 41BF48 802A71B8 24020008 */ addiu $v0, $zero, 8 -/* 41BF4C 802A71BC 3C01802B */ lui $at, %hi(D_802ACC60) -/* 41BF50 802A71C0 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at) -/* 41BF54 802A71C4 24020004 */ addiu $v0, $zero, 4 -/* 41BF58 802A71C8 3C01802B */ lui $at, %hi(D_802ACC6C) -/* 41BF5C 802A71CC AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at) -/* 41BF60 802A71D0 080A9FE1 */ j .L802A7F84 -/* 41BF64 802A71D4 24020001 */ addiu $v0, $zero, 1 -.L802A71D8: -/* 41BF68 802A71D8 2403002D */ addiu $v1, $zero, 0x2d -/* 41BF6C 802A71DC A6C2006C */ sh $v0, 0x6c($s6) -/* 41BF70 802A71E0 3C02802B */ lui $v0, %hi(D_802ACCD0+0x32C) -/* 41BF74 802A71E4 8442CFFC */ lh $v0, %lo(D_802ACCD0+0x32C)($v0) -/* 41BF78 802A71E8 3C0E802B */ lui $t6, %hi(D_802ACCD0) -/* 41BF7C 802A71EC 25CECCD0 */ addiu $t6, $t6, %lo(D_802ACCD0) -/* 41BF80 802A71F0 A6C3006E */ sh $v1, 0x6e($s6) -/* 41BF84 802A71F4 2442FFFF */ addiu $v0, $v0, -1 -/* 41BF88 802A71F8 00021080 */ sll $v0, $v0, 2 -/* 41BF8C 802A71FC 01C21021 */ addu $v0, $t6, $v0 -/* 41BF90 802A7200 9442010A */ lhu $v0, 0x10a($v0) -/* 41BF94 802A7204 A6C201AA */ sh $v0, 0x1aa($s6) -/* 41BF98 802A7208 0040182D */ daddu $v1, $v0, $zero -/* 41BF9C 802A720C 24020002 */ addiu $v0, $zero, 2 -/* 41BFA0 802A7210 A2C20178 */ sb $v0, 0x178($s6) -/* 41BFA4 802A7214 A6C3017A */ sh $v1, 0x17a($s6) -/* 41BFA8 802A7218 86C2017A */ lh $v0, 0x17a($s6) -/* 41BFAC 802A721C 24030034 */ addiu $v1, $zero, 0x34 -/* 41BFB0 802A7220 A6C3017C */ sh $v1, 0x17c($s6) -/* 41BFB4 802A7224 00021140 */ sll $v0, $v0, 5 -/* 41BFB8 802A7228 3C038008 */ lui $v1, %hi(gItemTable+0x8) -/* 41BFBC 802A722C 00621821 */ addu $v1, $v1, $v0 -/* 41BFC0 802A7230 8C6378E8 */ lw $v1, %lo(gItemTable+0x8)($v1) -/* 41BFC4 802A7234 3C02802B */ lui $v0, %hi(D_802ACCD0+0x32D) -/* 41BFC8 802A7238 9042CFFD */ lbu $v0, %lo(D_802ACCD0+0x32D)($v0) -/* 41BFCC 802A723C AEC00188 */ sw $zero, 0x188($s6) -/* 41BFD0 802A7240 2442FFFF */ addiu $v0, $v0, -1 -/* 41BFD4 802A7244 34638000 */ ori $v1, $v1, 0x8000 -/* 41BFD8 802A7248 A2C20050 */ sb $v0, 0x50($s6) -/* 41BFDC 802A724C 0C03C4EC */ jal hide_popup_menu -/* 41BFE0 802A7250 AEC30184 */ sw $v1, 0x184($s6) -/* 41BFE4 802A7254 0C0A840C */ jal func_802A1030 -/* 41BFE8 802A7258 00000000 */ nop -/* 41BFEC 802A725C 080AA04F */ j .L802A813C -/* 41BFF0 802A7260 2402002A */ addiu $v0, $zero, 0x2a -.L802A7264_41BFF4: -/* 41BFF4 802A7264 8EC20214 */ lw $v0, 0x214($s6) -/* 41BFF8 802A7268 30424000 */ andi $v0, $v0, 0x4000 -/* 41BFFC 802A726C 1040FF6C */ beqz $v0, .L802A7020 -/* 41C000 802A7270 00000000 */ nop -/* 41C004 802A7274 3C02802B */ lui $v0, %hi(D_802ACCD0+0x32C) -/* 41C008 802A7278 8442CFFC */ lh $v0, %lo(D_802ACCD0+0x32C)($v0) -/* 41C00C 802A727C 1440FF68 */ bnez $v0, .L802A7020 -/* 41C010 802A7280 00000000 */ nop -/* 41C014 802A7284 0C03C5B3 */ jal func_800F16CC -/* 41C018 802A7288 00000000 */ nop -/* 41C01C 802A728C 0C0A8426 */ jal func_802A1098 -/* 41C020 802A7290 00000000 */ nop -/* 41C024 802A7294 080AA04F */ j .L802A813C -/* 41C028 802A7298 2402002B */ addiu $v0, $zero, 0x2b -.L802A729C_41C02C: -/* 41C02C 802A729C 0C0A846C */ jal func_802A11B0 -/* 41C030 802A72A0 00000000 */ nop -/* 41C034 802A72A4 104003A7 */ beqz $v0, .L802A8144_41CED4 -/* 41C038 802A72A8 24020029 */ addiu $v0, $zero, 0x29 -/* 41C03C 802A72AC 080AA04F */ j .L802A813C -/* 41C040 802A72B0 00000000 */ nop -.L802A72B4_41C044: -/* 41C044 802A72B4 0C03C5B3 */ jal func_800F16CC -/* 41C048 802A72B8 00000000 */ nop -/* 41C04C 802A72BC 0C0A8426 */ jal func_802A1098 -/* 41C050 802A72C0 00000000 */ nop -/* 41C054 802A72C4 080AA04F */ j .L802A813C -/* 41C058 802A72C8 2402002B */ addiu $v0, $zero, 0x2b -.L802A72CC_41C05C: -/* 41C05C 802A72CC 0C03C54E */ jal destroy_popup_menu -/* 41C060 802A72D0 00000000 */ nop -.L802A72D4_41C064: -/* 41C064 802A72D4 0C0A842E */ jal func_802A10B8 -/* 41C068 802A72D8 00000000 */ nop -/* 41C06C 802A72DC 080AA051 */ j .L802A8144_41CED4 -/* 41C070 802A72E0 00000000 */ nop -.L802A72E4_41C074: -/* 41C074 802A72E4 92C2020E */ lbu $v0, 0x20e($s6) -/* 41C078 802A72E8 1040005E */ beqz $v0, .L802A7464 -/* 41C07C 802A72EC 0000982D */ daddu $s3, $zero, $zero -/* 41C080 802A72F0 3C0D8009 */ lui $t5, %hi(gMoveTable) -/* 41C084 802A72F4 25ADF060 */ addiu $t5, $t5, %lo(gMoveTable) -/* 41C088 802A72F8 3C0C802B */ lui $t4, %hi(battle_menu_moveOptionCantUseTypes) -/* 41C08C 802A72FC 258CD5E8 */ addiu $t4, $t4, %lo(battle_menu_moveOptionCantUseTypes) -/* 41C090 802A7300 240BFFFF */ addiu $t3, $zero, -1 -/* 41C094 802A7304 24070048 */ addiu $a3, $zero, 0x48 -/* 41C098 802A7308 240AFFFE */ addiu $t2, $zero, -2 -/* 41C09C 802A730C 24090001 */ addiu $t1, $zero, 1 -/* 41C0A0 802A7310 3C08802B */ lui $t0, %hi(battle_menu_StarPowerMovesHudScripts) -/* 41C0A4 802A7314 2508B398 */ addiu $t0, $t0, %lo(battle_menu_StarPowerMovesHudScripts) -/* 41C0A8 802A7318 3C06802B */ lui $a2, %hi(battle_menu_moveOptionIconScripts) -/* 41C0AC 802A731C 24C6D260 */ addiu $a2, $a2, %lo(battle_menu_moveOptionIconScripts) -.L802A7320: -/* 41C0B0 802A7320 02D32021 */ addu $a0, $s6, $s3 -/* 41C0B4 802A7324 908201DE */ lbu $v0, 0x1de($a0) -/* 41C0B8 802A7328 026C2821 */ addu $a1, $s3, $t4 -/* 41C0BC 802A732C A0A00000 */ sb $zero, ($a1) -/* 41C0C0 802A7330 00021880 */ sll $v1, $v0, 2 -/* 41C0C4 802A7334 00621821 */ addu $v1, $v1, $v0 -/* 41C0C8 802A7338 00031880 */ sll $v1, $v1, 2 -/* 41C0CC 802A733C 808201F6 */ lb $v0, 0x1f6($a0) -/* 41C0D0 802A7340 14400003 */ bnez $v0, .L802A7350 -/* 41C0D4 802A7344 006D9021 */ addu $s2, $v1, $t5 -/* 41C0D8 802A7348 A0A00000 */ sb $zero, ($a1) -/* 41C0DC 802A734C 808201F6 */ lb $v0, 0x1f6($a0) -.L802A7350: -/* 41C0E0 802A7350 144B0004 */ bne $v0, $t3, .L802A7364 -/* 41C0E4 802A7354 00000000 */ nop -/* 41C0E8 802A7358 A08001F6 */ sb $zero, 0x1f6($a0) -/* 41C0EC 802A735C A0A70000 */ sb $a3, ($a1) -/* 41C0F0 802A7360 808201F6 */ lb $v0, 0x1f6($a0) -.L802A7364: -/* 41C0F4 802A7364 144A0003 */ bne $v0, $t2, .L802A7374 -/* 41C0F8 802A7368 00000000 */ nop -/* 41C0FC 802A736C A08001F6 */ sb $zero, 0x1f6($a0) -/* 41C100 802A7370 A0A70000 */ sb $a3, ($a1) -.L802A7374: -/* 41C104 802A7374 8EC20074 */ lw $v0, 0x74($s6) -/* 41C108 802A7378 02691804 */ sllv $v1, $t1, $s3 -/* 41C10C 802A737C 00431024 */ and $v0, $v0, $v1 -/* 41C110 802A7380 14400003 */ bnez $v0, .L802A7390 -/* 41C114 802A7384 00000000 */ nop -/* 41C118 802A7388 A08001F6 */ sb $zero, 0x1f6($a0) -/* 41C11C 802A738C A0A70000 */ sb $a3, ($a1) -.L802A7390: -/* 41C120 802A7390 908201DE */ lbu $v0, 0x1de($a0) -/* 41C124 802A7394 2442FF89 */ addiu $v0, $v0, -0x77 -/* 41C128 802A7398 000210C0 */ sll $v0, $v0, 3 -/* 41C12C 802A739C 00481021 */ addu $v0, $v0, $t0 -/* 41C130 802A73A0 8C420000 */ lw $v0, ($v0) -/* 41C134 802A73A4 ACC20000 */ sw $v0, ($a2) -/* 41C138 802A73A8 808201F6 */ lb $v0, 0x1f6($a0) -/* 41C13C 802A73AC 14400008 */ bnez $v0, .L802A73D0 -/* 41C140 802A73B0 00131880 */ sll $v1, $s3, 2 -/* 41C144 802A73B4 908201DE */ lbu $v0, 0x1de($a0) -/* 41C148 802A73B8 2442FF89 */ addiu $v0, $v0, -0x77 -/* 41C14C 802A73BC 000210C0 */ sll $v0, $v0, 3 -/* 41C150 802A73C0 34420004 */ ori $v0, $v0, 4 -/* 41C154 802A73C4 00481021 */ addu $v0, $v0, $t0 -/* 41C158 802A73C8 8C420000 */ lw $v0, ($v0) -/* 41C15C 802A73CC ACC20000 */ sw $v0, ($a2) -.L802A73D0: -/* 41C160 802A73D0 82420011 */ lb $v0, 0x11($s2) -/* 41C164 802A73D4 3C01802B */ lui $at, %hi(battle_menu_moveOptionDisplayCosts) -/* 41C168 802A73D8 00230821 */ addu $at, $at, $v1 -/* 41C16C 802A73DC AC22D320 */ sw $v0, %lo(battle_menu_moveOptionDisplayCosts)($at) -/* 41C170 802A73E0 82420012 */ lb $v0, 0x12($s2) -/* 41C174 802A73E4 3C01802B */ lui $at, %hi(battle_menu_moveOptionSortPriorities) -/* 41C178 802A73E8 00330821 */ addu $at, $at, $s3 -/* 41C17C 802A73EC A020D5D0 */ sb $zero, %lo(battle_menu_moveOptionSortPriorities)($at) -/* 41C180 802A73F0 3C01802B */ lui $at, %hi(battle_menu_moveIndices) -/* 41C184 802A73F4 00230821 */ addu $at, $at, $v1 -/* 41C188 802A73F8 AC33D4B0 */ sw $s3, %lo(battle_menu_moveIndices)($at) -/* 41C18C 802A73FC 3C01802B */ lui $at, %hi(battle_menu_moveOptionBPCosts) -/* 41C190 802A7400 00230821 */ addu $at, $at, $v1 -/* 41C194 802A7404 AC22D440 */ sw $v0, %lo(battle_menu_moveOptionBPCosts)($at) -/* 41C198 802A7408 808201F6 */ lb $v0, 0x1f6($a0) -/* 41C19C 802A740C 3C01802B */ lui $at, %hi(battle_menu_moveOptionsEnabled) -/* 41C1A0 802A7410 00230821 */ addu $at, $at, $v1 -/* 41C1A4 802A7414 AC22D510 */ sw $v0, %lo(battle_menu_moveOptionsEnabled)($at) -/* 41C1A8 802A7418 8E420000 */ lw $v0, ($s2) -/* 41C1AC 802A741C 3C01802B */ lui $at, %hi(battle_menu_moveOptionNames) -/* 41C1B0 802A7420 00230821 */ addu $at, $at, $v1 -/* 41C1B4 802A7424 AC22D2C0 */ sw $v0, %lo(battle_menu_moveOptionNames)($at) -/* 41C1B8 802A7428 8E420008 */ lw $v0, 8($s2) -/* 41C1BC 802A742C 3C01802B */ lui $at, %hi(battle_menu_moveOptionDisplayCostReductions) -/* 41C1C0 802A7430 00230821 */ addu $at, $at, $v1 -/* 41C1C4 802A7434 AC20D380 */ sw $zero, %lo(battle_menu_moveOptionDisplayCostReductions)($at) -/* 41C1C8 802A7438 3C01802B */ lui $at, %hi(battle_menu_moveOptionDisplayCostReductionColors) -/* 41C1CC 802A743C 00230821 */ addu $at, $at, $v1 -/* 41C1D0 802A7440 AC20D3E0 */ sw $zero, %lo(battle_menu_moveOptionDisplayCostReductionColors)($at) -/* 41C1D4 802A7444 3C01802B */ lui $at, %hi(battle_menu_moveOptionDescriptions) -/* 41C1D8 802A7448 00230821 */ addu $at, $at, $v1 -/* 41C1DC 802A744C AC22D570 */ sw $v0, %lo(battle_menu_moveOptionDescriptions)($at) -/* 41C1E0 802A7450 92C2020E */ lbu $v0, 0x20e($s6) -/* 41C1E4 802A7454 26730001 */ addiu $s3, $s3, 1 -/* 41C1E8 802A7458 0262102A */ slt $v0, $s3, $v0 -/* 41C1EC 802A745C 1440FFB0 */ bnez $v0, .L802A7320 -/* 41C1F0 802A7460 24C60004 */ addiu $a2, $a2, 4 -.L802A7464: -/* 41C1F4 802A7464 82C20052 */ lb $v0, 0x52($s6) -/* 41C1F8 802A7468 04420001 */ bltzl $v0, .L802A7470 -/* 41C1FC 802A746C A2C00052 */ sb $zero, 0x52($s6) -.L802A7470: -/* 41C200 802A7470 82DE0052 */ lb $fp, 0x52($s6) -/* 41C204 802A7474 92C2020E */ lbu $v0, 0x20e($s6) -/* 41C208 802A7478 24030001 */ addiu $v1, $zero, 1 -/* 41C20C 802A747C 3C01802B */ lui $at, %hi(battle_menu_hasSpiritsMenu) -/* 41C210 802A7480 AC23D4A0 */ sw $v1, %lo(battle_menu_hasSpiritsMenu)($at) -/* 41C214 802A7484 3C01802B */ lui $at, %hi(battle_menu_moveOptionCount) -/* 41C218 802A7488 AC22D4A4 */ sw $v0, %lo(battle_menu_moveOptionCount)($at) -/* 41C21C 802A748C 3C01802B */ lui $at, %hi(D_802AD4A8) -/* 41C220 802A7490 AC3ED4A8 */ sw $fp, %lo(D_802AD4A8)($at) -/* 41C224 802A7494 0C0A89A1 */ jal func_802A2684 -/* 41C228 802A7498 00000000 */ nop -/* 41C22C 802A749C 080AA04F */ j .L802A813C -/* 41C230 802A74A0 2402003D */ addiu $v0, $zero, 0x3d -.L802A74A4_41C234: -/* 41C234 802A74A4 0C0A8B21 */ jal func_802A2C84 -/* 41C238 802A74A8 00000000 */ nop -/* 41C23C 802A74AC 0040802D */ daddu $s0, $v0, $zero -/* 41C240 802A74B0 2402FFFF */ addiu $v0, $zero, -1 -/* 41C244 802A74B4 12020321 */ beq $s0, $v0, .L802A813C -/* 41C248 802A74B8 24020042 */ addiu $v0, $zero, 0x42 -/* 41C24C 802A74BC 12000321 */ beqz $s0, .L802A8144_41CED4 -/* 41C250 802A74C0 240200FF */ addiu $v0, $zero, 0xff -/* 41C254 802A74C4 5602000B */ bnel $s0, $v0, .L802A74F4 -/* 41C258 802A74C8 2602FFFF */ addiu $v0, $s0, -1 -/* 41C25C 802A74CC 0C0A8414 */ jal func_802A1050 -/* 41C260 802A74D0 00000000 */ nop -/* 41C264 802A74D4 24020008 */ addiu $v0, $zero, 8 -/* 41C268 802A74D8 3C01802B */ lui $at, %hi(D_802ACC60) -/* 41C26C 802A74DC AC22CC60 */ sw $v0, %lo(D_802ACC60)($at) -/* 41C270 802A74E0 24020004 */ addiu $v0, $zero, 4 -/* 41C274 802A74E4 3C01802B */ lui $at, %hi(D_802ACC6C) -/* 41C278 802A74E8 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at) -/* 41C27C 802A74EC 080A9FE1 */ j .L802A7F84 -/* 41C280 802A74F0 24020001 */ addiu $v0, $zero, 1 -.L802A74F4: -/* 41C284 802A74F4 00021080 */ sll $v0, $v0, 2 -/* 41C288 802A74F8 3C01802B */ lui $at, %hi(battle_menu_moveIndices+0x3) -/* 41C28C 802A74FC 00220821 */ addu $at, $at, $v0 -/* 41C290 802A7500 9022D4B3 */ lbu $v0, %lo(battle_menu_moveIndices+0x3)($at) -/* 41C294 802A7504 3C03802B */ lui $v1, %hi(battle_menu_moveOptionActive + 0x3) -/* 41C298 802A7508 9063D603 */ lbu $v1, %lo(battle_menu_moveOptionActive + 0x3)($v1) -/* 41C29C 802A750C A2C20049 */ sb $v0, 0x49($s6) -/* 41C2A0 802A7510 0C0A89F4 */ jal func_802A27D0 -/* 41C2A4 802A7514 A2C30052 */ sb $v1, 0x52($s6) -/* 41C2A8 802A7518 0C0A840C */ jal func_802A1030 -/* 41C2AC 802A751C 00000000 */ nop -/* 41C2B0 802A7520 080AA04F */ j .L802A813C -/* 41C2B4 802A7524 2402003E */ addiu $v0, $zero, 0x3e -.L802A7528_41C2B8: -/* 41C2B8 802A7528 0C0A8B21 */ jal func_802A2C84 -/* 41C2BC 802A752C 00000000 */ nop -/* 41C2C0 802A7530 8EC30214 */ lw $v1, 0x214($s6) -/* 41C2C4 802A7534 30634000 */ andi $v1, $v1, 0x4000 -/* 41C2C8 802A7538 10600009 */ beqz $v1, .L802A7560 -/* 41C2CC 802A753C 0040802D */ daddu $s0, $v0, $zero -/* 41C2D0 802A7540 16000007 */ bnez $s0, .L802A7560 -/* 41C2D4 802A7544 00000000 */ nop -/* 41C2D8 802A7548 0C0A8AAE */ jal func_802A2AB8 -/* 41C2DC 802A754C 00000000 */ nop -/* 41C2E0 802A7550 0C0A8426 */ jal func_802A1098 -/* 41C2E4 802A7554 00000000 */ nop -/* 41C2E8 802A7558 080AA04F */ j .L802A813C -/* 41C2EC 802A755C 2402003F */ addiu $v0, $zero, 0x3f -.L802A7560: -/* 41C2F0 802A7560 0C0A846C */ jal func_802A11B0 -/* 41C2F4 802A7564 00000000 */ nop -/* 41C2F8 802A7568 104002F6 */ beqz $v0, .L802A8144_41CED4 -/* 41C2FC 802A756C 24020040 */ addiu $v0, $zero, 0x40 -/* 41C300 802A7570 A6C2006C */ sh $v0, 0x6c($s6) -/* 41C304 802A7574 24020041 */ addiu $v0, $zero, 0x41 -/* 41C308 802A7578 A6C2006E */ sh $v0, 0x6e($s6) -/* 41C30C 802A757C 82C20049 */ lb $v0, 0x49($s6) -/* 41C310 802A7580 24030008 */ addiu $v1, $zero, 8 -/* 41C314 802A7584 A2C30178 */ sb $v1, 0x178($s6) -/* 41C318 802A7588 02C21021 */ addu $v0, $s6, $v0 -/* 41C31C 802A758C 904301DE */ lbu $v1, 0x1de($v0) -/* 41C320 802A7590 82C20049 */ lb $v0, 0x49($s6) -/* 41C324 802A7594 02C21021 */ addu $v0, $s6, $v0 -/* 41C328 802A7598 A6C3017C */ sh $v1, 0x17c($s6) -/* 41C32C 802A759C 904301DE */ lbu $v1, 0x1de($v0) -/* 41C330 802A75A0 00031080 */ sll $v0, $v1, 2 -/* 41C334 802A75A4 00431021 */ addu $v0, $v0, $v1 -/* 41C338 802A75A8 00021080 */ sll $v0, $v0, 2 -/* 41C33C 802A75AC 92C30049 */ lbu $v1, 0x49($s6) -/* 41C340 802A75B0 3C018009 */ lui $at, %hi(gMoveTable + 0x4) -/* 41C344 802A75B4 00220821 */ addu $at, $at, $v0 -/* 41C348 802A75B8 8C22F064 */ lw $v0, %lo(gMoveTable + 0x4)($at) -/* 41C34C 802A75BC 00031E00 */ sll $v1, $v1, 0x18 -/* 41C350 802A75C0 00032603 */ sra $a0, $v1, 0x18 -/* 41C354 802A75C4 A6C4017A */ sh $a0, 0x17a($s6) -/* 41C358 802A75C8 AEC20184 */ sw $v0, 0x184($s6) -/* 41C35C 802A75CC 82A30292 */ lb $v1, 0x292($s5) -/* 41C360 802A75D0 24020002 */ addiu $v0, $zero, 2 -/* 41C364 802A75D4 146200B5 */ bne $v1, $v0, .L802A78AC -/* 41C368 802A75D8 00041400 */ sll $v0, $a0, 0x10 -/* 41C36C 802A75DC 00021403 */ sra $v0, $v0, 0x10 -/* 41C370 802A75E0 24030008 */ addiu $v1, $zero, 8 -/* 41C374 802A75E4 144300B1 */ bne $v0, $v1, .L802A78AC -/* 41C378 802A75E8 24820001 */ addiu $v0, $a0, 1 -/* 41C37C 802A75EC 080A9E2B */ j .L802A78AC -/* 41C380 802A75F0 A6C2017A */ sh $v0, 0x17a($s6) -.L802A75F4_41C384: -/* 41C384 802A75F4 0C0A8B21 */ jal func_802A2C84 -/* 41C388 802A75F8 00000000 */ nop -/* 41C38C 802A75FC 0C0A846C */ jal func_802A11B0 -/* 41C390 802A7600 00000000 */ nop -/* 41C394 802A7604 104002CF */ beqz $v0, .L802A8144_41CED4 -/* 41C398 802A7608 2402003D */ addiu $v0, $zero, 0x3d -/* 41C39C 802A760C 080AA04F */ j .L802A813C -/* 41C3A0 802A7610 00000000 */ nop -.L802A7614_41C3A4: -/* 41C3A4 802A7614 0C0A8AAE */ jal func_802A2AB8 -/* 41C3A8 802A7618 00000000 */ nop -/* 41C3AC 802A761C 0C0A8426 */ jal func_802A1098 -/* 41C3B0 802A7620 00000000 */ nop -/* 41C3B4 802A7624 080AA04F */ j .L802A813C -/* 41C3B8 802A7628 2402003F */ addiu $v0, $zero, 0x3f -.L802A762C_41C3BC: -/* 41C3BC 802A762C 0C0A89F9 */ jal func_802A27E4 -/* 41C3C0 802A7630 00000000 */ nop -/* 41C3C4 802A7634 080A9CB5 */ j .L802A72D4_41C064 -/* 41C3C8 802A7638 00000000 */ nop -.L802A763C_41C3CC: -/* 41C3CC 802A763C 0C0A8B21 */ jal func_802A2C84 -/* 41C3D0 802A7640 00000000 */ nop -/* 41C3D4 802A7644 2403FFFF */ addiu $v1, $zero, -1 -/* 41C3D8 802A7648 104302BE */ beq $v0, $v1, .L802A8144_41CED4 -/* 41C3DC 802A764C 2402003D */ addiu $v0, $zero, 0x3d -/* 41C3E0 802A7650 080AA04F */ j .L802A813C -/* 41C3E4 802A7654 00000000 */ nop -.L802A7658_41C3E8: -/* 41C3E8 802A7658 0C0A9606 */ jal can_btl_state_update_switch_to_player -/* 41C3EC 802A765C 00000000 */ nop -/* 41C3F0 802A7660 14400004 */ bnez $v0, .L802A7674 -/* 41C3F4 802A7664 0000A02D */ daddu $s4, $zero, $zero -/* 41C3F8 802A7668 24020001 */ addiu $v0, $zero, 1 -/* 41C3FC 802A766C 080A9F5D */ j .L802A7D74 -/* 41C400 802A7670 A2C20088 */ sb $v0, 0x88($s6) -.L802A7674: -/* 41C404 802A7674 0280982D */ daddu $s3, $s4, $zero -/* 41C408 802A7678 241E0002 */ addiu $fp, $zero, 2 -/* 41C40C 802A767C 02A0902D */ daddu $s2, $s5, $zero -/* 41C410 802A7680 3C11802B */ lui $s1, %hi(D_802ACCD0) -/* 41C414 802A7684 2631CCD0 */ addiu $s1, $s1, %lo(D_802ACCD0) -.L802A7688: -/* 41C418 802A7688 864201B4 */ lh $v0, 0x1b4($s2) -/* 41C41C 802A768C 50400027 */ beql $v0, $zero, .L802A772C -/* 41C420 802A7690 26730001 */ addiu $s3, $s3, 1 -/* 41C424 802A7694 00021140 */ sll $v0, $v0, 5 -/* 41C428 802A7698 3C0E8008 */ lui $t6, %hi(gItemTable) -/* 41C42C 802A769C 25CE78E0 */ addiu $t6, $t6, %lo(gItemTable) -/* 41C430 802A76A0 004E8021 */ addu $s0, $v0, $t6 -/* 41C434 802A76A4 3C0E8009 */ lui $t6, %hi(gItemHudScripts) -/* 41C438 802A76A8 25CEA680 */ addiu $t6, $t6, %lo(gItemHudScripts) -/* 41C43C 802A76AC 86020004 */ lh $v0, 4($s0) -/* 41C440 802A76B0 96030018 */ lhu $v1, 0x18($s0) -/* 41C444 802A76B4 000210C0 */ sll $v0, $v0, 3 -/* 41C448 802A76B8 30630002 */ andi $v1, $v1, 2 -/* 41C44C 802A76BC 1060001A */ beqz $v1, .L802A7728 -/* 41C450 802A76C0 004EA821 */ addu $s5, $v0, $t6 -/* 41C454 802A76C4 A2DE0178 */ sb $fp, 0x178($s6) -/* 41C458 802A76C8 964201B4 */ lhu $v0, 0x1b4($s2) -/* 41C45C 802A76CC A6C2017A */ sh $v0, 0x17a($s6) -/* 41C460 802A76D0 8E020008 */ lw $v0, 8($s0) -/* 41C464 802A76D4 02E0202D */ daddu $a0, $s7, $zero -/* 41C468 802A76D8 0C098C0B */ jal player_create_target_list -/* 41C46C 802A76DC AEC20184 */ sw $v0, 0x184($s6) -/* 41C470 802A76E0 8EA20000 */ lw $v0, ($s5) -/* 41C474 802A76E4 AE220000 */ sw $v0, ($s1) -/* 41C478 802A76E8 864301B4 */ lh $v1, 0x1b4($s2) -/* 41C47C 802A76EC 24020001 */ addiu $v0, $zero, 1 -/* 41C480 802A76F0 AE22018C */ sw $v0, 0x18c($s1) -/* 41C484 802A76F4 AE230108 */ sw $v1, 0x108($s1) -/* 41C488 802A76F8 8E020000 */ lw $v0, ($s0) -/* 41C48C 802A76FC AE220084 */ sw $v0, 0x84($s1) -/* 41C490 802A7700 8E020014 */ lw $v0, 0x14($s0) -/* 41C494 802A7704 AE220294 */ sw $v0, 0x294($s1) -/* 41C498 802A7708 82E2040C */ lb $v0, 0x40c($s7) -/* 41C49C 802A770C 54400005 */ bnel $v0, $zero, .L802A7724 -/* 41C4A0 802A7710 26310004 */ addiu $s1, $s1, 4 -/* 41C4A4 802A7714 8EA20004 */ lw $v0, 4($s5) -/* 41C4A8 802A7718 AE20018C */ sw $zero, 0x18c($s1) -/* 41C4AC 802A771C AE220000 */ sw $v0, ($s1) -/* 41C4B0 802A7720 26310004 */ addiu $s1, $s1, 4 -.L802A7724: -/* 41C4B4 802A7724 26940001 */ addiu $s4, $s4, 1 -.L802A7728: -/* 41C4B8 802A7728 26730001 */ addiu $s3, $s3, 1 -.L802A772C: -/* 41C4BC 802A772C 2A62000A */ slti $v0, $s3, 0xa -/* 41C4C0 802A7730 1440FFD5 */ bnez $v0, .L802A7688 -/* 41C4C4 802A7734 26520002 */ addiu $s2, $s2, 2 -/* 41C4C8 802A7738 16800004 */ bnez $s4, .L802A774C -/* 41C4CC 802A773C 24020035 */ addiu $v0, $zero, 0x35 -/* 41C4D0 802A7740 24020001 */ addiu $v0, $zero, 1 -/* 41C4D4 802A7744 080A9F5D */ j .L802A7D74 -/* 41C4D8 802A7748 A2C20088 */ sb $v0, 0x88($s6) -.L802A774C: -/* 41C4DC 802A774C 3C01802B */ lui $at, %hi(D_802ACCD0+0x318) -/* 41C4E0 802A7750 AC20CFE8 */ sw $zero, %lo(D_802ACCD0+0x318)($at) -/* 41C4E4 802A7754 86C3017C */ lh $v1, 0x17c($s6) -/* 41C4E8 802A7758 1462000C */ bne $v1, $v0, .L802A778C -/* 41C4EC 802A775C 24020036 */ addiu $v0, $zero, 0x36 -/* 41C4F0 802A7760 24020064 */ addiu $v0, $zero, 0x64 -/* 41C4F4 802A7764 3C01802B */ lui $at, %hi(D_802ACCD0+0x318) -/* 41C4F8 802A7768 AC22CFE8 */ sw $v0, %lo(D_802ACCD0+0x318)($at) -/* 41C4FC 802A776C 82C30088 */ lb $v1, 0x88($s6) -/* 41C500 802A7770 24020001 */ addiu $v0, $zero, 1 -/* 41C504 802A7774 3C01802B */ lui $at, %hi(D_802ACCD0+0x31C) -/* 41C508 802A7778 AC22CFEC */ sw $v0, %lo(D_802ACCD0+0x31C)($at) -/* 41C50C 802A777C 3C01802B */ lui $at, %hi(D_802ACCD0+0x320) -/* 41C510 802A7780 AC23CFF0 */ sw $v1, %lo(D_802ACCD0+0x320)($at) -/* 41C514 802A7784 86C3017C */ lh $v1, 0x17c($s6) -/* 41C518 802A7788 24020036 */ addiu $v0, $zero, 0x36 -.L802A778C: -/* 41C51C 802A778C 1462000B */ bne $v1, $v0, .L802A77BC -/* 41C520 802A7790 24020002 */ addiu $v0, $zero, 2 -/* 41C524 802A7794 3C01802B */ lui $at, %hi(D_802ACCD0+0x31C) -/* 41C528 802A7798 AC22CFEC */ sw $v0, %lo(D_802ACCD0+0x31C)($at) -/* 41C52C 802A779C 3C02802B */ lui $v0, %hi(D_802ACCD0+0x318) -/* 41C530 802A77A0 8C42CFE8 */ lw $v0, %lo(D_802ACCD0+0x318)($v0) -/* 41C534 802A77A4 82C30088 */ lb $v1, 0x88($s6) -/* 41C538 802A77A8 244200C8 */ addiu $v0, $v0, 0xc8 -/* 41C53C 802A77AC 3C01802B */ lui $at, %hi(D_802ACCD0+0x318) -/* 41C540 802A77B0 AC22CFE8 */ sw $v0, %lo(D_802ACCD0+0x318)($at) -/* 41C544 802A77B4 3C01802B */ lui $at, %hi(D_802ACCD0+0x320) -/* 41C548 802A77B8 AC23CFF0 */ sw $v1, %lo(D_802ACCD0+0x320)($at) -.L802A77BC: -/* 41C54C 802A77BC 82C20050 */ lb $v0, 0x50($s6) -/* 41C550 802A77C0 04420001 */ bltzl $v0, .L802A77C8 -/* 41C554 802A77C4 A2C00050 */ sb $zero, 0x50($s6) -.L802A77C8: -/* 41C558 802A77C8 82DE0050 */ lb $fp, 0x50($s6) -/* 41C55C 802A77CC 3C04802B */ lui $a0, %hi(D_802ACCD0) -/* 41C560 802A77D0 2484CCD0 */ addiu $a0, $a0, %lo(D_802ACCD0) -/* 41C564 802A77D4 AC940324 */ sw $s4, 0x324($a0) -/* 41C568 802A77D8 0C03D44F */ jal func_800F513C -/* 41C56C 802A77DC AC9E0328 */ sw $fp, 0x328($a0) -/* 41C570 802A77E0 0C03D4AF */ jal func_800F52BC -/* 41C574 802A77E4 00000000 */ nop -/* 41C578 802A77E8 080AA04F */ j .L802A813C -/* 41C57C 802A77EC 24020047 */ addiu $v0, $zero, 0x47 -.L802A77F0_41C580: -/* 41C580 802A77F0 3C03802B */ lui $v1, %hi(D_802ACCD0+0x32C) -/* 41C584 802A77F4 8463CFFC */ lh $v1, %lo(D_802ACCD0+0x32C)($v1) -/* 41C588 802A77F8 10600252 */ beqz $v1, .L802A8144_41CED4 -/* 41C58C 802A77FC 240200FF */ addiu $v0, $zero, 0xff -/* 41C590 802A7800 14620004 */ bne $v1, $v0, .L802A7814 -/* 41C594 802A7804 2402004A */ addiu $v0, $zero, 0x4a -/* 41C598 802A7808 24020001 */ addiu $v0, $zero, 1 -/* 41C59C 802A780C 080A9F5D */ j .L802A7D74 -/* 41C5A0 802A7810 A2C20088 */ sb $v0, 0x88($s6) -.L802A7814: -/* 41C5A4 802A7814 2403004B */ addiu $v1, $zero, 0x4b -/* 41C5A8 802A7818 A6C2006C */ sh $v0, 0x6c($s6) -/* 41C5AC 802A781C 3C02802B */ lui $v0, %hi(D_802ACCD0+0x32C) -/* 41C5B0 802A7820 8442CFFC */ lh $v0, %lo(D_802ACCD0+0x32C)($v0) -/* 41C5B4 802A7824 3C0E802B */ lui $t6, %hi(D_802ACCD0) -/* 41C5B8 802A7828 25CECCD0 */ addiu $t6, $t6, %lo(D_802ACCD0) -/* 41C5BC 802A782C A6C3006E */ sh $v1, 0x6e($s6) -/* 41C5C0 802A7830 2442FFFF */ addiu $v0, $v0, -1 -/* 41C5C4 802A7834 00021080 */ sll $v0, $v0, 2 -/* 41C5C8 802A7838 01C21021 */ addu $v0, $t6, $v0 -/* 41C5CC 802A783C 9442010A */ lhu $v0, 0x10a($v0) -/* 41C5D0 802A7840 24030002 */ addiu $v1, $zero, 2 -/* 41C5D4 802A7844 A2C30178 */ sb $v1, 0x178($s6) -/* 41C5D8 802A7848 A6C201AA */ sh $v0, 0x1aa($s6) -/* 41C5DC 802A784C A6C2017A */ sh $v0, 0x17a($s6) -/* 41C5E0 802A7850 00021400 */ sll $v0, $v0, 0x10 -/* 41C5E4 802A7854 000212C3 */ sra $v0, $v0, 0xb -/* 41C5E8 802A7858 3C038008 */ lui $v1, %hi(gItemTable+0x8) -/* 41C5EC 802A785C 00621821 */ addu $v1, $v1, $v0 -/* 41C5F0 802A7860 8C6378E8 */ lw $v1, %lo(gItemTable+0x8)($v1) -/* 41C5F4 802A7864 3C02802B */ lui $v0, %hi(D_802ACCD0+0x32D) -/* 41C5F8 802A7868 9042CFFD */ lbu $v0, %lo(D_802ACCD0+0x32D)($v0) -/* 41C5FC 802A786C AEC00188 */ sw $zero, 0x188($s6) -/* 41C600 802A7870 2442FFFF */ addiu $v0, $v0, -1 -/* 41C604 802A7874 34638000 */ ori $v1, $v1, 0x8000 -/* 41C608 802A7878 A2C20050 */ sb $v0, 0x50($s6) -/* 41C60C 802A787C 0C03C4EC */ jal hide_popup_menu -/* 41C610 802A7880 AEC30184 */ sw $v1, 0x184($s6) -/* 41C614 802A7884 24020005 */ addiu $v0, $zero, 5 -/* 41C618 802A7888 3C01802B */ lui $at, %hi(D_802ACC60) -/* 41C61C 802A788C AC22CC60 */ sw $v0, %lo(D_802ACC60)($at) -/* 41C620 802A7890 080AA04F */ j .L802A813C -/* 41C624 802A7894 24020048 */ addiu $v0, $zero, 0x48 -.L802A7898_41C628: -/* 41C628 802A7898 3C03802B */ lui $v1, %hi(D_802ACC60) -/* 41C62C 802A789C 2463CC60 */ addiu $v1, $v1, %lo(D_802ACC60) -/* 41C630 802A78A0 8C620000 */ lw $v0, ($v1) -/* 41C634 802A78A4 1440000A */ bnez $v0, .L802A78D0 -/* 41C638 802A78A8 2442FFFF */ addiu $v0, $v0, -1 -.L802A78AC: -/* 41C63C 802A78AC 0C090464 */ jal btl_set_state -/* 41C640 802A78B0 24040011 */ addiu $a0, $zero, 0x11 -/* 41C644 802A78B4 080AA051 */ j .L802A8144_41CED4 -/* 41C648 802A78B8 00000000 */ nop -.L802A78BC_41C64C: -/* 41C64C 802A78BC 3C03802B */ lui $v1, %hi(D_802ACC60) -/* 41C650 802A78C0 2463CC60 */ addiu $v1, $v1, %lo(D_802ACC60) -/* 41C654 802A78C4 8C620000 */ lw $v0, ($v1) -/* 41C658 802A78C8 10400003 */ beqz $v0, .L802A78D8 -/* 41C65C 802A78CC 2442FFFF */ addiu $v0, $v0, -1 -.L802A78D0: -/* 41C660 802A78D0 080AA051 */ j .L802A8144_41CED4 -/* 41C664 802A78D4 AC620000 */ sw $v0, ($v1) -.L802A78D8: -/* 41C668 802A78D8 080AA04F */ j .L802A813C -/* 41C66C 802A78DC 24020047 */ addiu $v0, $zero, 0x47 -.L802A78E0_41C670: -/* 41C670 802A78E0 0C03C5B3 */ jal func_800F16CC -/* 41C674 802A78E4 00000000 */ nop -/* 41C678 802A78E8 24020005 */ addiu $v0, $zero, 5 -/* 41C67C 802A78EC 3C01802B */ lui $at, %hi(D_802ACC60) -/* 41C680 802A78F0 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at) -/* 41C684 802A78F4 080AA04F */ j .L802A813C -/* 41C688 802A78F8 24020049 */ addiu $v0, $zero, 0x49 -.L802A78FC_41C68C: -/* 41C68C 802A78FC 0C03C54E */ jal destroy_popup_menu -/* 41C690 802A7900 00000000 */ nop -/* 41C694 802A7904 080AA051 */ j .L802A8144_41CED4 -/* 41C698 802A7908 00000000 */ nop -.L802A790C_41C69C: -/* 41C69C 802A790C 82A20000 */ lb $v0, ($s5) -/* 41C6A0 802A7910 04400008 */ bltz $v0, .L802A7934 -/* 41C6A4 802A7914 02E0202D */ daddu $a0, $s7, $zero -/* 41C6A8 802A7918 3C028009 */ lui $v0, %hi(gMoveTable+0x25C) -/* 41C6AC 802A791C 8C42F2BC */ lw $v0, %lo(gMoveTable+0x25C)($v0) -/* 41C6B0 802A7920 0C098C0B */ jal player_create_target_list -/* 41C6B4 802A7924 AEC20184 */ sw $v0, 0x184($s6) -/* 41C6B8 802A7928 82F1040C */ lb $s1, 0x40c($s7) -/* 41C6BC 802A792C 080A9E4E */ j .L802A7938 -/* 41C6C0 802A7930 00000000 */ nop -.L802A7934: -/* 41C6C4 802A7934 0000882D */ daddu $s1, $zero, $zero -.L802A7938: -/* 41C6C8 802A7938 82A20001 */ lb $v0, 1($s5) -/* 41C6CC 802A793C 04400008 */ bltz $v0, .L802A7960 -/* 41C6D0 802A7940 02E0202D */ daddu $a0, $s7, $zero -/* 41C6D4 802A7944 3C028009 */ lui $v0, %hi(gMoveTable+0x90) -/* 41C6D8 802A7948 8C42F0F0 */ lw $v0, %lo(gMoveTable+0x90)($v0) -/* 41C6DC 802A794C 0C098C0B */ jal player_create_target_list -/* 41C6E0 802A7950 AEC20184 */ sw $v0, 0x184($s6) -/* 41C6E4 802A7954 82E2040C */ lb $v0, 0x40c($s7) -/* 41C6E8 802A7958 080A9E59 */ j .L802A7964 -/* 41C6EC 802A795C 00000000 */ nop -.L802A7960: -/* 41C6F0 802A7960 0000102D */ daddu $v0, $zero, $zero -.L802A7964: -/* 41C6F4 802A7964 1E200009 */ bgtz $s1, .L802A798C -/* 41C6F8 802A7968 00000000 */ nop -/* 41C6FC 802A796C 1C400007 */ bgtz $v0, .L802A798C -/* 41C700 802A7970 24040016 */ addiu $a0, $zero, 0x16 -/* 41C704 802A7974 24020009 */ addiu $v0, $zero, 9 -/* 41C708 802A7978 A2C20178 */ sb $v0, 0x178($s6) -/* 41C70C 802A797C 0C090464 */ jal btl_set_state -/* 41C710 802A7980 A2C00095 */ sb $zero, 0x95($s6) -/* 41C714 802A7984 080AA051 */ j .L802A8144_41CED4 -/* 41C718 802A7988 00000000 */ nop -.L802A798C: -/* 41C71C 802A798C 1E200002 */ bgtz $s1, .L802A7998 -/* 41C720 802A7990 24100032 */ addiu $s0, $zero, 0x32 -/* 41C724 802A7994 0000802D */ daddu $s0, $zero, $zero -.L802A7998: -/* 41C728 802A7998 58400001 */ blezl $v0, .L802A79A0 -/* 41C72C 802A799C 24100065 */ addiu $s0, $zero, 0x65 -.L802A79A0: -/* 41C730 802A79A0 0C00A67F */ jal rand_int -/* 41C734 802A79A4 24040064 */ addiu $a0, $zero, 0x64 -/* 41C738 802A79A8 0050102A */ slt $v0, $v0, $s0 -/* 41C73C 802A79AC 1040000C */ beqz $v0, .L802A79E0 -/* 41C740 802A79B0 02E0202D */ daddu $a0, $s7, $zero -/* 41C744 802A79B4 92A20000 */ lbu $v0, ($s5) -/* 41C748 802A79B8 2403001E */ addiu $v1, $zero, 0x1e -/* 41C74C 802A79BC A6C3017C */ sh $v1, 0x17c($s6) -/* 41C750 802A79C0 A2C00178 */ sb $zero, 0x178($s6) -/* 41C754 802A79C4 3C038009 */ lui $v1, %hi(gMoveTable+0x25C) -/* 41C758 802A79C8 8C63F2BC */ lw $v1, %lo(gMoveTable+0x25C)($v1) -/* 41C75C 802A79CC 00021600 */ sll $v0, $v0, 0x18 -/* 41C760 802A79D0 00021603 */ sra $v0, $v0, 0x18 -/* 41C764 802A79D4 AEC30184 */ sw $v1, 0x184($s6) -/* 41C768 802A79D8 080A9E83 */ j .L802A7A0C -/* 41C76C 802A79DC A6C2017A */ sh $v0, 0x17a($s6) -.L802A79E0: -/* 41C770 802A79E0 24020007 */ addiu $v0, $zero, 7 -/* 41C774 802A79E4 A6C2017C */ sh $v0, 0x17c($s6) -/* 41C778 802A79E8 92A30001 */ lbu $v1, 1($s5) -/* 41C77C 802A79EC 24020001 */ addiu $v0, $zero, 1 -/* 41C780 802A79F0 A2C20178 */ sb $v0, 0x178($s6) -/* 41C784 802A79F4 3C028009 */ lui $v0, %hi(gMoveTable+0x90) -/* 41C788 802A79F8 8C42F0F0 */ lw $v0, %lo(gMoveTable+0x90)($v0) -/* 41C78C 802A79FC 00031E00 */ sll $v1, $v1, 0x18 -/* 41C790 802A7A00 00031E03 */ sra $v1, $v1, 0x18 -/* 41C794 802A7A04 AEC20184 */ sw $v0, 0x184($s6) -/* 41C798 802A7A08 A6C3017A */ sh $v1, 0x17a($s6) -.L802A7A0C: -/* 41C79C 802A7A0C 0C098C0B */ jal player_create_target_list -/* 41C7A0 802A7A10 00000000 */ nop -/* 41C7A4 802A7A14 0C090464 */ jal btl_set_state -/* 41C7A8 802A7A18 24040012 */ addiu $a0, $zero, 0x12 -/* 41C7AC 802A7A1C 080AA051 */ j .L802A8144_41CED4 -/* 41C7B0 802A7A20 00000000 */ nop -.L802A7A24_41C7B4: -/* 41C7B4 802A7A24 0C098C9A */ jal func_80263268 -/* 41C7B8 802A7A28 0000A02D */ daddu $s4, $zero, $zero -/* 41C7BC 802A7A2C 82C2007C */ lb $v0, 0x7c($s6) -/* 41C7C0 802A7A30 04400023 */ bltz $v0, .L802A7AC0 -/* 41C7C4 802A7A34 3C05001D */ lui $a1, 0x1d -/* 41C7C8 802A7A38 34A500A1 */ ori $a1, $a1, 0xa1 -/* 41C7CC 802A7A3C 24020005 */ addiu $v0, $zero, 5 -/* 41C7D0 802A7A40 3C04802B */ lui $a0, %hi(battle_menu_leftJustfiedMessagesB) -/* 41C7D4 802A7A44 8C84B4A4 */ lw $a0, %lo(battle_menu_leftJustfiedMessagesB)($a0) -/* 41C7D8 802A7A48 82A30012 */ lb $v1, 0x12($s5) -/* 41C7DC 802A7A4C 3C06802B */ lui $a2, %hi(D_802AD690) -/* 41C7E0 802A7A50 24C6D690 */ addiu $a2, $a2, %lo(D_802AD690) -/* 41C7E4 802A7A54 3C01802B */ lui $at, %hi(D_802AD678) -/* 41C7E8 802A7A58 AC22D678 */ sw $v0, %lo(D_802AD678)($at) -/* 41C7EC 802A7A5C 00031880 */ sll $v1, $v1, 2 -/* 41C7F0 802A7A60 3C01802B */ lui $at, %hi(D_802AD658) -/* 41C7F4 802A7A64 AC24D658 */ sw $a0, %lo(D_802AD658)($at) -/* 41C7F8 802A7A68 3C01802B */ lui $at, %hi(battle_menu_PartnerHudScripts) -/* 41C7FC 802A7A6C 00230821 */ addu $at, $at, $v1 -/* 41C800 802A7A70 8C23B3F8 */ lw $v1, %lo(battle_menu_PartnerHudScripts)($at) -/* 41C804 802A7A74 24020001 */ addiu $v0, $zero, 1 -/* 41C808 802A7A78 ACC20000 */ sw $v0, ($a2) -/* 41C80C 802A7A7C 3C01802B */ lui $at, %hi(D_802AD6C0) -/* 41C810 802A7A80 AC25D6C0 */ sw $a1, %lo(D_802AD6C0)($at) -/* 41C814 802A7A84 82C2007C */ lb $v0, 0x7c($s6) -/* 41C818 802A7A88 3C04802B */ lui $a0, %hi(D_802AD640) -/* 41C81C 802A7A8C 2484D640 */ addiu $a0, $a0, %lo(D_802AD640) -/* 41C820 802A7A90 1C40000A */ bgtz $v0, .L802A7ABC -/* 41C824 802A7A94 AC830000 */ sw $v1, ($a0) -/* 41C828 802A7A98 82A20012 */ lb $v0, 0x12($s5) -/* 41C82C 802A7A9C 00021080 */ sll $v0, $v0, 2 -/* 41C830 802A7AA0 3C01802B */ lui $at, %hi(battle_menu_DisabledPartnerHudScripts) -/* 41C834 802A7AA4 00220821 */ addu $at, $at, $v0 -/* 41C838 802A7AA8 8C22B438 */ lw $v0, %lo(battle_menu_DisabledPartnerHudScripts)($at) -/* 41C83C 802A7AAC ACC00000 */ sw $zero, ($a2) -/* 41C840 802A7AB0 3C01802B */ lui $at, %hi(D_802AD6A8) -/* 41C844 802A7AB4 AC20D6A8 */ sw $zero, %lo(D_802AD6A8)($at) -/* 41C848 802A7AB8 AC820000 */ sw $v0, ($a0) -.L802A7ABC: -/* 41C84C 802A7ABC 24140001 */ addiu $s4, $zero, 1 -.L802A7AC0: -/* 41C850 802A7AC0 3C05001D */ lui $a1, 0x1d -/* 41C854 802A7AC4 34A500A2 */ ori $a1, $a1, 0xa2 -/* 41C858 802A7AC8 00141880 */ sll $v1, $s4, 2 -/* 41C85C 802A7ACC 26940001 */ addiu $s4, $s4, 1 -/* 41C860 802A7AD0 24020009 */ addiu $v0, $zero, 9 -/* 41C864 802A7AD4 24080001 */ addiu $t0, $zero, 1 -/* 41C868 802A7AD8 3C04802B */ lui $a0, %hi(battle_menu_DoNothingHudScripts) -/* 41C86C 802A7ADC 8C84B480 */ lw $a0, %lo(battle_menu_DoNothingHudScripts)($a0) -/* 41C870 802A7AE0 3C06001D */ lui $a2, 0x1d -/* 41C874 802A7AE4 3C01802B */ lui $at, %hi(D_802AD678) -/* 41C878 802A7AE8 00230821 */ addu $at, $at, $v1 -/* 41C87C 802A7AEC AC22D678 */ sw $v0, %lo(D_802AD678)($at) -/* 41C880 802A7AF0 3C01802B */ lui $at, %hi(D_802AD690) -/* 41C884 802A7AF4 00230821 */ addu $at, $at, $v1 -/* 41C888 802A7AF8 AC28D690 */ sw $t0, %lo(D_802AD690)($at) -/* 41C88C 802A7AFC 3C01802B */ lui $at, %hi(D_802AD640) -/* 41C890 802A7B00 00230821 */ addu $at, $at, $v1 -/* 41C894 802A7B04 AC24D640 */ sw $a0, %lo(D_802AD640)($at) -/* 41C898 802A7B08 3C04802B */ lui $a0, %hi(battle_menu_leftJustfiedMessagesA) -/* 41C89C 802A7B0C 2484B490 */ addiu $a0, $a0, %lo(battle_menu_leftJustfiedMessagesA) -/* 41C8A0 802A7B10 8C820024 */ lw $v0, 0x24($a0) -/* 41C8A4 802A7B14 3C09802B */ lui $t1, %hi(battle_menu_FleeHudScripts) -/* 41C8A8 802A7B18 2529B488 */ addiu $t1, $t1, %lo(battle_menu_FleeHudScripts) -/* 41C8AC 802A7B1C 3C01802B */ lui $at, %hi(D_802AD6C0) -/* 41C8B0 802A7B20 00230821 */ addu $at, $at, $v1 -/* 41C8B4 802A7B24 AC25D6C0 */ sw $a1, %lo(D_802AD6C0)($at) -/* 41C8B8 802A7B28 00142880 */ sll $a1, $s4, 2 -/* 41C8BC 802A7B2C 3C01802B */ lui $at, %hi(D_802AD658) -/* 41C8C0 802A7B30 00230821 */ addu $at, $at, $v1 -/* 41C8C4 802A7B34 AC22D658 */ sw $v0, %lo(D_802AD658)($at) -/* 41C8C8 802A7B38 3C03802B */ lui $v1, %hi(D_802AD640) -/* 41C8CC 802A7B3C 2463D640 */ addiu $v1, $v1, %lo(D_802AD640) -/* 41C8D0 802A7B40 8D220000 */ lw $v0, ($t1) -/* 41C8D4 802A7B44 00A33821 */ addu $a3, $a1, $v1 -/* 41C8D8 802A7B48 ACE20000 */ sw $v0, ($a3) -/* 41C8DC 802A7B4C 24020003 */ addiu $v0, $zero, 3 -/* 41C8E0 802A7B50 3C01802B */ lui $at, %hi(D_802AD678) -/* 41C8E4 802A7B54 00250821 */ addu $at, $at, $a1 -/* 41C8E8 802A7B58 AC22D678 */ sw $v0, %lo(D_802AD678)($at) -/* 41C8EC 802A7B5C 3C02802B */ lui $v0, %hi(D_802AD690) -/* 41C8F0 802A7B60 2442D690 */ addiu $v0, $v0, %lo(D_802AD690) -/* 41C8F4 802A7B64 00A21821 */ addu $v1, $a1, $v0 -/* 41C8F8 802A7B68 AC680000 */ sw $t0, ($v1) -/* 41C8FC 802A7B6C 8C82000C */ lw $v0, 0xc($a0) -/* 41C900 802A7B70 34C600A3 */ ori $a2, $a2, 0xa3 -/* 41C904 802A7B74 3C01802B */ lui $at, %hi(D_802AD6C0) -/* 41C908 802A7B78 00250821 */ addu $at, $at, $a1 -/* 41C90C 802A7B7C AC26D6C0 */ sw $a2, %lo(D_802AD6C0)($at) -/* 41C910 802A7B80 3C01802B */ lui $at, %hi(D_802AD658) -/* 41C914 802A7B84 00250821 */ addu $at, $at, $a1 -/* 41C918 802A7B88 AC22D658 */ sw $v0, %lo(D_802AD658)($at) -/* 41C91C 802A7B8C 3C02800E */ lui $v0, %hi(gBattleStatus+0x4) -/* 41C920 802A7B90 8C42C074 */ lw $v0, %lo(gBattleStatus+0x4)($v0) -/* 41C924 802A7B94 30420020 */ andi $v0, $v0, 0x20 -/* 41C928 802A7B98 14400007 */ bnez $v0, .L802A7BB8 -/* 41C92C 802A7B9C 00000000 */ nop -/* 41C930 802A7BA0 8D220004 */ lw $v0, 4($t1) -/* 41C934 802A7BA4 ACE20000 */ sw $v0, ($a3) -/* 41C938 802A7BA8 AC600000 */ sw $zero, ($v1) -/* 41C93C 802A7BAC 3C01802B */ lui $at, %hi(D_802AD6A8) -/* 41C940 802A7BB0 00250821 */ addu $at, $at, $a1 -/* 41C944 802A7BB4 AC28D6A8 */ sw $t0, %lo(D_802AD6A8)($at) -.L802A7BB8: -/* 41C948 802A7BB8 82C20053 */ lb $v0, 0x53($s6) -/* 41C94C 802A7BBC 04410002 */ bgez $v0, .L802A7BC8 -/* 41C950 802A7BC0 26940001 */ addiu $s4, $s4, 1 -/* 41C954 802A7BC4 A2C00053 */ sb $zero, 0x53($s6) -.L802A7BC8: -/* 41C958 802A7BC8 82DE0053 */ lb $fp, 0x53($s6) -/* 41C95C 802A7BCC 3C01802B */ lui $at, %hi(D_802AD66C) -/* 41C960 802A7BD0 AC34D66C */ sw $s4, %lo(D_802AD66C)($at) -/* 41C964 802A7BD4 3C01802B */ lui $at, %hi(D_802AD670) -/* 41C968 802A7BD8 AC3ED670 */ sw $fp, %lo(D_802AD670)($at) -/* 41C96C 802A7BDC 0C0A9176 */ jal func_802A45D8 -/* 41C970 802A7BE0 00000000 */ nop -/* 41C974 802A7BE4 080AA04F */ j .L802A813C -/* 41C978 802A7BE8 240200C9 */ addiu $v0, $zero, 0xc9 -.L802A7BEC_41C97C: -/* 41C97C 802A7BEC 0C0A9295 */ jal func_802A4A54 -/* 41C980 802A7BF0 00000000 */ nop -/* 41C984 802A7BF4 0040802D */ daddu $s0, $v0, $zero -/* 41C988 802A7BF8 2402FFFF */ addiu $v0, $zero, -1 -/* 41C98C 802A7BFC 1202014F */ beq $s0, $v0, .L802A813C -/* 41C990 802A7C00 240200CF */ addiu $v0, $zero, 0xcf -/* 41C994 802A7C04 1200014F */ beqz $s0, .L802A8144_41CED4 -/* 41C998 802A7C08 240200FF */ addiu $v0, $zero, 0xff -/* 41C99C 802A7C0C 1602000B */ bne $s0, $v0, .L802A7C3C -/* 41C9A0 802A7C10 2603FFFF */ addiu $v1, $s0, -1 -/* 41C9A4 802A7C14 0C0A8414 */ jal func_802A1050 -/* 41C9A8 802A7C18 00000000 */ nop -/* 41C9AC 802A7C1C 24020008 */ addiu $v0, $zero, 8 -/* 41C9B0 802A7C20 3C01802B */ lui $at, %hi(D_802ACC60) -/* 41C9B4 802A7C24 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at) -/* 41C9B8 802A7C28 24020004 */ addiu $v0, $zero, 4 -/* 41C9BC 802A7C2C 3C01802B */ lui $at, %hi(D_802ACC6C) -/* 41C9C0 802A7C30 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at) -/* 41C9C4 802A7C34 080A9FE1 */ j .L802A7F84 -/* 41C9C8 802A7C38 24020001 */ addiu $v0, $zero, 1 -.L802A7C3C: -/* 41C9CC 802A7C3C 00031080 */ sll $v0, $v1, 2 -/* 41C9D0 802A7C40 3C01802B */ lui $at, %hi(D_802AD678 + 0x3) -/* 41C9D4 802A7C44 00220821 */ addu $at, $at, $v0 -/* 41C9D8 802A7C48 9022D67B */ lbu $v0, %lo(D_802AD678 + 0x3)($at) -/* 41C9DC 802A7C4C A2C30053 */ sb $v1, 0x53($s6) -/* 41C9E0 802A7C50 A2C20048 */ sb $v0, 0x48($s6) -/* 41C9E4 802A7C54 82C30048 */ lb $v1, 0x48($s6) -/* 41C9E8 802A7C58 24020005 */ addiu $v0, $zero, 5 -/* 41C9EC 802A7C5C 106200C9 */ beq $v1, $v0, .L802A7F84 -/* 41C9F0 802A7C60 2402001E */ addiu $v0, $zero, 0x1e -/* 41C9F4 802A7C64 0C0A91C6 */ jal func_802A4718 -/* 41C9F8 802A7C68 00000000 */ nop -/* 41C9FC 802A7C6C 0C0A840C */ jal func_802A1030 -/* 41CA00 802A7C70 00000000 */ nop -/* 41CA04 802A7C74 080AA04F */ j .L802A813C -/* 41CA08 802A7C78 240200CA */ addiu $v0, $zero, 0xca -.L802A7C7C_41CA0C: -/* 41CA0C 802A7C7C 0C0A9295 */ jal func_802A4A54 -/* 41CA10 802A7C80 00000000 */ nop -/* 41CA14 802A7C84 8EC30214 */ lw $v1, 0x214($s6) -/* 41CA18 802A7C88 30634000 */ andi $v1, $v1, 0x4000 -/* 41CA1C 802A7C8C 10600009 */ beqz $v1, .L802A7CB4 -/* 41CA20 802A7C90 0040802D */ daddu $s0, $v0, $zero -/* 41CA24 802A7C94 16000007 */ bnez $s0, .L802A7CB4 -/* 41CA28 802A7C98 00000000 */ nop -/* 41CA2C 802A7C9C 0C0A923F */ jal func_802A48FC -/* 41CA30 802A7CA0 00000000 */ nop -/* 41CA34 802A7CA4 0C0A8426 */ jal func_802A1098 -/* 41CA38 802A7CA8 00000000 */ nop -/* 41CA3C 802A7CAC 080AA04F */ j .L802A813C -/* 41CA40 802A7CB0 240200CB */ addiu $v0, $zero, 0xcb -.L802A7CB4: -/* 41CA44 802A7CB4 0C0A846C */ jal func_802A11B0 -/* 41CA48 802A7CB8 00000000 */ nop -/* 41CA4C 802A7CBC 10400121 */ beqz $v0, .L802A8144_41CED4 -/* 41CA50 802A7CC0 240200CC */ addiu $v0, $zero, 0xcc -/* 41CA54 802A7CC4 82D00048 */ lb $s0, 0x48($s6) -/* 41CA58 802A7CC8 A6C2006C */ sh $v0, 0x6c($s6) -/* 41CA5C 802A7CCC 240200CD */ addiu $v0, $zero, 0xcd -/* 41CA60 802A7CD0 A6C2006E */ sh $v0, 0x6e($s6) -/* 41CA64 802A7CD4 24020004 */ addiu $v0, $zero, 4 -/* 41CA68 802A7CD8 1202002A */ beq $s0, $v0, .L802A7D84 -/* 41CA6C 802A7CDC 2A020005 */ slti $v0, $s0, 5 -/* 41CA70 802A7CE0 10400005 */ beqz $v0, .L802A7CF8 -/* 41CA74 802A7CE4 24020003 */ addiu $v0, $zero, 3 -/* 41CA78 802A7CE8 1202000A */ beq $s0, $v0, .L802A7D14 -/* 41CA7C 802A7CEC 240200CD */ addiu $v0, $zero, 0xcd -/* 41CA80 802A7CF0 080AA051 */ j .L802A8144_41CED4 -/* 41CA84 802A7CF4 00000000 */ nop -.L802A7CF8: -/* 41CA88 802A7CF8 24020009 */ addiu $v0, $zero, 9 -/* 41CA8C 802A7CFC 12020010 */ beq $s0, $v0, .L802A7D40 -/* 41CA90 802A7D00 2402000A */ addiu $v0, $zero, 0xa -/* 41CA94 802A7D04 1202002B */ beq $s0, $v0, .L802A7DB4 -/* 41CA98 802A7D08 240200CD */ addiu $v0, $zero, 0xcd -/* 41CA9C 802A7D0C 080AA051 */ j .L802A8144_41CED4 -/* 41CAA0 802A7D10 00000000 */ nop -.L802A7D14: -/* 41CAA4 802A7D14 3C01800E */ lui $at, %hi(gBattleSubState) -/* 41CAA8 802A7D18 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) -/* 41CAAC 802A7D1C 0C0A9662 */ jal btl_state_update_player_menu -/* 41CAB0 802A7D20 00000000 */ nop -/* 41CAB4 802A7D24 24040018 */ addiu $a0, $zero, 0x18 -/* 41CAB8 802A7D28 24020039 */ addiu $v0, $zero, 0x39 -/* 41CABC 802A7D2C A2D00178 */ sb $s0, 0x178($s6) -/* 41CAC0 802A7D30 0C090464 */ jal btl_set_state -/* 41CAC4 802A7D34 A6C2017C */ sh $v0, 0x17c($s6) -/* 41CAC8 802A7D38 080AA051 */ j .L802A8144_41CED4 -/* 41CACC 802A7D3C 00000000 */ nop -.L802A7D40: -/* 41CAD0 802A7D40 3C05FBFF */ lui $a1, 0xfbff -/* 41CAD4 802A7D44 34A5FFFF */ ori $a1, $a1, 0xffff -/* 41CAD8 802A7D48 3C03800E */ lui $v1, %hi(gBattleStatus) -/* 41CADC 802A7D4C 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) -/* 41CAE0 802A7D50 A2C0008B */ sb $zero, 0x8b($s6) -/* 41CAE4 802A7D54 8C620000 */ lw $v0, ($v1) -/* 41CAE8 802A7D58 86C4006E */ lh $a0, 0x6e($s6) -/* 41CAEC 802A7D5C 00451024 */ and $v0, $v0, $a1 -/* 41CAF0 802A7D60 AC620000 */ sw $v0, ($v1) -/* 41CAF4 802A7D64 3C01800E */ lui $at, %hi(gBattleSubState) -/* 41CAF8 802A7D68 AC24C4DC */ sw $a0, %lo(gBattleSubState)($at) -/* 41CAFC 802A7D6C 0C0A9662 */ jal btl_state_update_player_menu -/* 41CB00 802A7D70 00000000 */ nop -.L802A7D74: -/* 41CB04 802A7D74 0C090464 */ jal btl_set_state -/* 41CB08 802A7D78 24040016 */ addiu $a0, $zero, 0x16 -/* 41CB0C 802A7D7C 080AA051 */ j .L802A8144_41CED4 -/* 41CB10 802A7D80 00000000 */ nop -.L802A7D84: -/* 41CB14 802A7D84 240200CD */ addiu $v0, $zero, 0xcd -/* 41CB18 802A7D88 3C01800E */ lui $at, %hi(gBattleSubState) -/* 41CB1C 802A7D8C AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) -/* 41CB20 802A7D90 0C0A9662 */ jal btl_state_update_player_menu -/* 41CB24 802A7D94 00000000 */ nop -/* 41CB28 802A7D98 24040019 */ addiu $a0, $zero, 0x19 -/* 41CB2C 802A7D9C 24020031 */ addiu $v0, $zero, 0x31 -/* 41CB30 802A7DA0 A6C2017C */ sh $v0, 0x17c($s6) -.L802A7DA4: -/* 41CB34 802A7DA4 0C090464 */ jal btl_set_state -/* 41CB38 802A7DA8 A2D00178 */ sb $s0, 0x178($s6) -/* 41CB3C 802A7DAC 080AA051 */ j .L802A8144_41CED4 -/* 41CB40 802A7DB0 00000000 */ nop -.L802A7DB4: -/* 41CB44 802A7DB4 3C01800E */ lui $at, %hi(gBattleSubState) -/* 41CB48 802A7DB8 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) -/* 41CB4C 802A7DBC 0C0A9662 */ jal btl_state_update_player_menu -/* 41CB50 802A7DC0 00000000 */ nop -.L802A7DC4: -/* 41CB54 802A7DC4 0C090464 */ jal btl_set_state -/* 41CB58 802A7DC8 2404000B */ addiu $a0, $zero, 0xb -/* 41CB5C 802A7DCC 080AA051 */ j .L802A8144_41CED4 -/* 41CB60 802A7DD0 00000000 */ nop -.L802A7DD4_41CB64: -/* 41CB64 802A7DD4 0C0A9295 */ jal func_802A4A54 -/* 41CB68 802A7DD8 00000000 */ nop -/* 41CB6C 802A7DDC 0C0A846C */ jal func_802A11B0 -/* 41CB70 802A7DE0 00000000 */ nop -/* 41CB74 802A7DE4 104000D7 */ beqz $v0, .L802A8144_41CED4 -/* 41CB78 802A7DE8 24020008 */ addiu $v0, $zero, 8 -/* 41CB7C 802A7DEC 3C01802B */ lui $at, %hi(D_802ACC60) -/* 41CB80 802A7DF0 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at) -/* 41CB84 802A7DF4 24020004 */ addiu $v0, $zero, 4 -/* 41CB88 802A7DF8 3C01802B */ lui $at, %hi(D_802ACC6C) -/* 41CB8C 802A7DFC AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at) -/* 41CB90 802A7E00 080AA04F */ j .L802A813C -/* 41CB94 802A7E04 24020001 */ addiu $v0, $zero, 1 -.L802A7E08_41CB98: -/* 41CB98 802A7E08 0C0A923F */ jal func_802A48FC -/* 41CB9C 802A7E0C 00000000 */ nop -/* 41CBA0 802A7E10 0C0A8426 */ jal func_802A1098 -/* 41CBA4 802A7E14 00000000 */ nop -/* 41CBA8 802A7E18 080AA04F */ j .L802A813C -/* 41CBAC 802A7E1C 240200CB */ addiu $v0, $zero, 0xcb -.L802A7E20_41CBB0: -/* 41CBB0 802A7E20 0C0A9295 */ jal func_802A4A54 -/* 41CBB4 802A7E24 00000000 */ nop -/* 41CBB8 802A7E28 2403FFFF */ addiu $v1, $zero, -1 -/* 41CBBC 802A7E2C 104300C5 */ beq $v0, $v1, .L802A8144_41CED4 -/* 41CBC0 802A7E30 240200C9 */ addiu $v0, $zero, 0xc9 -/* 41CBC4 802A7E34 080AA04F */ j .L802A813C -/* 41CBC8 802A7E38 00000000 */ nop -.L802A7E3C_41CBCC: -/* 41CBCC 802A7E3C 0000A02D */ daddu $s4, $zero, $zero -/* 41CBD0 802A7E40 24130001 */ addiu $s3, $zero, 1 -/* 41CBD4 802A7E44 3C0C8009 */ lui $t4, %hi(gPartnerPopupProperties) -/* 41CBD8 802A7E48 258CEF20 */ addiu $t4, $t4, %lo(gPartnerPopupProperties) -/* 41CBDC 802A7E4C 3C0B802B */ lui $t3, %hi(battle_menu_PartnerHudScripts) -/* 41CBE0 802A7E50 256BB3F8 */ addiu $t3, $t3, %lo(battle_menu_PartnerHudScripts) -/* 41CBE4 802A7E54 0260502D */ daddu $t2, $s3, $zero -/* 41CBE8 802A7E58 3C09802B */ lui $t1, %hi(battle_menu_DisabledPartnerHudScripts) -/* 41CBEC 802A7E5C 2529B438 */ addiu $t1, $t1, %lo(battle_menu_DisabledPartnerHudScripts) -/* 41CBF0 802A7E60 3C088009 */ lui $t0, %hi(D_8008EEC0 + 4) -/* 41CBF4 802A7E64 2508EEC4 */ addiu $t0, $t0, %lo(D_8008EEC0 + 4) -/* 41CBF8 802A7E68 3C04802B */ lui $a0, %hi(D_802ACCD0) -/* 41CBFC 802A7E6C 2484CCD0 */ addiu $a0, $a0, %lo(D_802ACCD0) -.L802A7E70: -/* 41CC00 802A7E70 8D050000 */ lw $a1, ($t0) -/* 41CC04 802A7E74 000510C0 */ sll $v0, $a1, 3 -/* 41CC08 802A7E78 02A23021 */ addu $a2, $s5, $v0 -/* 41CC0C 802A7E7C 90C20014 */ lbu $v0, 0x14($a2) -/* 41CC10 802A7E80 50400019 */ beql $v0, $zero, .L802A7EE8 -/* 41CC14 802A7E84 26730001 */ addiu $s3, $s3, 1 -/* 41CC18 802A7E88 00053880 */ sll $a3, $a1, 2 -/* 41CC1C 802A7E8C 00EB1021 */ addu $v0, $a3, $t3 -/* 41CC20 802A7E90 00051900 */ sll $v1, $a1, 4 -/* 41CC24 802A7E94 8C420000 */ lw $v0, ($v0) -/* 41CC28 802A7E98 006C1821 */ addu $v1, $v1, $t4 -/* 41CC2C 802A7E9C AC850108 */ sw $a1, 0x108($a0) -/* 41CC30 802A7EA0 AC8A018C */ sw $t2, 0x18c($a0) -/* 41CC34 802A7EA4 AC820000 */ sw $v0, ($a0) -/* 41CC38 802A7EA8 8C620000 */ lw $v0, ($v1) -/* 41CC3C 802A7EAC AC820084 */ sw $v0, 0x84($a0) -/* 41CC40 802A7EB0 8C62000C */ lw $v0, 0xc($v1) -/* 41CC44 802A7EB4 AC820294 */ sw $v0, 0x294($a0) -/* 41CC48 802A7EB8 80C20015 */ lb $v0, 0x15($a2) -/* 41CC4C 802A7EBC AC820210 */ sw $v0, 0x210($a0) -/* 41CC50 802A7EC0 82A20012 */ lb $v0, 0x12($s5) -/* 41CC54 802A7EC4 54450006 */ bnel $v0, $a1, .L802A7EE0 -/* 41CC58 802A7EC8 24840004 */ addiu $a0, $a0, 4 -/* 41CC5C 802A7ECC 00E91021 */ addu $v0, $a3, $t1 -/* 41CC60 802A7ED0 AC80018C */ sw $zero, 0x18c($a0) -/* 41CC64 802A7ED4 8C420000 */ lw $v0, ($v0) -/* 41CC68 802A7ED8 AC820000 */ sw $v0, ($a0) -/* 41CC6C 802A7EDC 24840004 */ addiu $a0, $a0, 4 -.L802A7EE0: -/* 41CC70 802A7EE0 26940001 */ addiu $s4, $s4, 1 -/* 41CC74 802A7EE4 26730001 */ addiu $s3, $s3, 1 -.L802A7EE8: -/* 41CC78 802A7EE8 2A62000C */ slti $v0, $s3, 0xc -/* 41CC7C 802A7EEC 1440FFE0 */ bnez $v0, .L802A7E70 -/* 41CC80 802A7EF0 25080004 */ addiu $t0, $t0, 4 -/* 41CC84 802A7EF4 82C20051 */ lb $v0, 0x51($s6) -/* 41CC88 802A7EF8 04420001 */ bltzl $v0, .L802A7F00 -/* 41CC8C 802A7EFC A2C00051 */ sb $zero, 0x51($s6) -.L802A7F00: -/* 41CC90 802A7F00 82A30012 */ lb $v1, 0x12($s5) -/* 41CC94 802A7F04 24020001 */ addiu $v0, $zero, 1 -/* 41CC98 802A7F08 3C01802B */ lui $at, %hi(D_802ACCD0+0x318) -/* 41CC9C 802A7F0C AC22CFE8 */ sw $v0, %lo(D_802ACCD0+0x318)($at) -/* 41CCA0 802A7F10 3C01802B */ lui $at, %hi(D_802ACCD0+0x324) -/* 41CCA4 802A7F14 AC34CFF4 */ sw $s4, %lo(D_802ACCD0+0x324)($at) -/* 41CCA8 802A7F18 00031880 */ sll $v1, $v1, 2 -/* 41CCAC 802A7F1C 3C028009 */ lui $v0, %hi(D_8008EEF0) -/* 41CCB0 802A7F20 00431021 */ addu $v0, $v0, $v1 -/* 41CCB4 802A7F24 8C42EEF0 */ lw $v0, %lo(D_8008EEF0)($v0) -/* 41CCB8 802A7F28 3C04802B */ lui $a0, %hi(D_802ACCD0) -/* 41CCBC 802A7F2C 2484CCD0 */ addiu $a0, $a0, %lo(D_802ACCD0) -/* 41CCC0 802A7F30 AC80031C */ sw $zero, 0x31c($a0) -/* 41CCC4 802A7F34 AC800320 */ sw $zero, 0x320($a0) -/* 41CCC8 802A7F38 2442FFFF */ addiu $v0, $v0, -1 -/* 41CCCC 802A7F3C 0C03D44F */ jal func_800F513C -/* 41CCD0 802A7F40 AC820328 */ sw $v0, 0x328($a0) -/* 41CCD4 802A7F44 0C03D4AF */ jal func_800F52BC -/* 41CCD8 802A7F48 00000000 */ nop -/* 41CCDC 802A7F4C 080AA04F */ j .L802A813C -/* 41CCE0 802A7F50 2402001F */ addiu $v0, $zero, 0x1f -.L802A7F54_41CCE4: -/* 41CCE4 802A7F54 3C03802B */ lui $v1, %hi(D_802ACCD0+0x32C) -/* 41CCE8 802A7F58 8463CFFC */ lh $v1, %lo(D_802ACCD0+0x32C)($v1) -/* 41CCEC 802A7F5C 2402FFFF */ addiu $v0, $zero, -1 -/* 41CCF0 802A7F60 10620076 */ beq $v1, $v0, .L802A813C -/* 41CCF4 802A7F64 24020024 */ addiu $v0, $zero, 0x24 -/* 41CCF8 802A7F68 10600076 */ beqz $v1, .L802A8144_41CED4 -/* 41CCFC 802A7F6C 240200FF */ addiu $v0, $zero, 0xff -/* 41CD00 802A7F70 1462000C */ bne $v1, $v0, .L802A7FA4 -/* 41CD04 802A7F74 24020022 */ addiu $v0, $zero, 0x22 -/* 41CD08 802A7F78 0C0A91F8 */ jal func_802A47E0 -/* 41CD0C 802A7F7C 00000000 */ nop -/* 41CD10 802A7F80 240200C9 */ addiu $v0, $zero, 0xc9 -.L802A7F84: -/* 41CD14 802A7F84 3C01800E */ lui $at, %hi(gBattleSubState) -/* 41CD18 802A7F88 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) -/* 41CD1C 802A7F8C 0C0A9662 */ jal btl_state_update_player_menu -/* 41CD20 802A7F90 00000000 */ nop -/* 41CD24 802A7F94 0C0A9662 */ jal btl_state_update_player_menu -/* 41CD28 802A7F98 00000000 */ nop -/* 41CD2C 802A7F9C 080AA051 */ j .L802A8144_41CED4 -/* 41CD30 802A7FA0 00000000 */ nop -.L802A7FA4: -/* 41CD34 802A7FA4 24030023 */ addiu $v1, $zero, 0x23 -/* 41CD38 802A7FA8 A6C2006C */ sh $v0, 0x6c($s6) -/* 41CD3C 802A7FAC 3C02802B */ lui $v0, %hi(D_802ACCD0+0x32C) -/* 41CD40 802A7FB0 8442CFFC */ lh $v0, %lo(D_802ACCD0+0x32C)($v0) -/* 41CD44 802A7FB4 3C0E802B */ lui $t6, %hi(D_802ACCD0) -/* 41CD48 802A7FB8 25CECCD0 */ addiu $t6, $t6, %lo(D_802ACCD0) -/* 41CD4C 802A7FBC A6C3006E */ sh $v1, 0x6e($s6) -/* 41CD50 802A7FC0 2442FFFF */ addiu $v0, $v0, -1 -/* 41CD54 802A7FC4 00021080 */ sll $v0, $v0, 2 -/* 41CD58 802A7FC8 01C21021 */ addu $v0, $t6, $v0 -/* 41CD5C 802A7FCC 9043010B */ lbu $v1, 0x10b($v0) -/* 41CD60 802A7FD0 24020005 */ addiu $v0, $zero, 5 -/* 41CD64 802A7FD4 A2C20178 */ sb $v0, 0x178($s6) -/* 41CD68 802A7FD8 24020037 */ addiu $v0, $zero, 0x37 -/* 41CD6C 802A7FDC A6C2017C */ sh $v0, 0x17c($s6) -/* 41CD70 802A7FE0 24020002 */ addiu $v0, $zero, 2 -/* 41CD74 802A7FE4 AEC20184 */ sw $v0, 0x184($s6) -/* 41CD78 802A7FE8 A2C301AC */ sb $v1, 0x1ac($s6) -/* 41CD7C 802A7FEC 00031E00 */ sll $v1, $v1, 0x18 -/* 41CD80 802A7FF0 3C02802B */ lui $v0, %hi(D_802ACCD0+0x32D) -/* 41CD84 802A7FF4 9042CFFD */ lbu $v0, %lo(D_802ACCD0+0x32D)($v0) -/* 41CD88 802A7FF8 00031E03 */ sra $v1, $v1, 0x18 -/* 41CD8C 802A7FFC A6C3017A */ sh $v1, 0x17a($s6) -/* 41CD90 802A8000 2442FFFF */ addiu $v0, $v0, -1 -/* 41CD94 802A8004 0C03C4EC */ jal hide_popup_menu -/* 41CD98 802A8008 A2C20051 */ sb $v0, 0x51($s6) -/* 41CD9C 802A800C 0C0A91C6 */ jal func_802A4718 -/* 41CDA0 802A8010 00000000 */ nop -/* 41CDA4 802A8014 0C0A840C */ jal func_802A1030 -/* 41CDA8 802A8018 00000000 */ nop -/* 41CDAC 802A801C 080AA04F */ j .L802A813C -/* 41CDB0 802A8020 24020020 */ addiu $v0, $zero, 0x20 -.L802A8024_41CDB4: -/* 41CDB4 802A8024 8EC20214 */ lw $v0, 0x214($s6) -/* 41CDB8 802A8028 30424000 */ andi $v0, $v0, 0x4000 -/* 41CDBC 802A802C 1040000D */ beqz $v0, .L802A8064 -/* 41CDC0 802A8030 00000000 */ nop -/* 41CDC4 802A8034 3C02802B */ lui $v0, %hi(D_802ACCD0+0x32C) -/* 41CDC8 802A8038 8442CFFC */ lh $v0, %lo(D_802ACCD0+0x32C)($v0) -/* 41CDCC 802A803C 14400009 */ bnez $v0, .L802A8064 -/* 41CDD0 802A8040 00000000 */ nop -/* 41CDD4 802A8044 0C03C5B3 */ jal func_800F16CC -/* 41CDD8 802A8048 00000000 */ nop -/* 41CDDC 802A804C 0C0A9284 */ jal func_802A4A10 -/* 41CDE0 802A8050 00000000 */ nop -/* 41CDE4 802A8054 0C0A8426 */ jal func_802A1098 -/* 41CDE8 802A8058 00000000 */ nop -/* 41CDEC 802A805C 080AA04F */ j .L802A813C -/* 41CDF0 802A8060 24020021 */ addiu $v0, $zero, 0x21 -.L802A8064: -/* 41CDF4 802A8064 0C0A9295 */ jal func_802A4A54 -/* 41CDF8 802A8068 00000000 */ nop -/* 41CDFC 802A806C 0C0A846C */ jal func_802A11B0 -/* 41CE00 802A8070 00000000 */ nop -/* 41CE04 802A8074 10400033 */ beqz $v0, .L802A8144_41CED4 -/* 41CE08 802A8078 00000000 */ nop -/* 41CE0C 802A807C 86C2006E */ lh $v0, 0x6e($s6) -/* 41CE10 802A8080 3C01800E */ lui $at, %hi(gBattleSubState) -/* 41CE14 802A8084 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) -/* 41CE18 802A8088 0C0A9662 */ jal btl_state_update_player_menu -/* 41CE1C 802A808C 00000000 */ nop -/* 41CE20 802A8090 0C090464 */ jal btl_set_state -/* 41CE24 802A8094 2404001D */ addiu $a0, $zero, 0x1d -/* 41CE28 802A8098 080AA051 */ j .L802A8144_41CED4 -/* 41CE2C 802A809C 00000000 */ nop -.L802A80A0_41CE30: -/* 41CE30 802A80A0 0C0A9295 */ jal func_802A4A54 -/* 41CE34 802A80A4 00000000 */ nop -/* 41CE38 802A80A8 0C0A846C */ jal func_802A11B0 -/* 41CE3C 802A80AC 00000000 */ nop -/* 41CE40 802A80B0 10400024 */ beqz $v0, .L802A8144_41CED4 -/* 41CE44 802A80B4 2402001F */ addiu $v0, $zero, 0x1f -/* 41CE48 802A80B8 080AA04F */ j .L802A813C -/* 41CE4C 802A80BC 00000000 */ nop -.L802A80C0_41CE50: -/* 41CE50 802A80C0 0C03C5B3 */ jal func_800F16CC -/* 41CE54 802A80C4 00000000 */ nop -/* 41CE58 802A80C8 0C0A9284 */ jal func_802A4A10 -/* 41CE5C 802A80CC 00000000 */ nop -/* 41CE60 802A80D0 0C0A8426 */ jal func_802A1098 -/* 41CE64 802A80D4 00000000 */ nop -/* 41CE68 802A80D8 080AA04F */ j .L802A813C -/* 41CE6C 802A80DC 24020021 */ addiu $v0, $zero, 0x21 -.L802A80E0_41CE70: -/* 41CE70 802A80E0 0C03C54E */ jal destroy_popup_menu -/* 41CE74 802A80E4 00000000 */ nop -.L802A80E8_41CE78: -/* 41CE78 802A80E8 0C0A91CB */ jal func_802A472C -/* 41CE7C 802A80EC 00000000 */ nop -/* 41CE80 802A80F0 080A9CB5 */ j .L802A72D4_41C064 -/* 41CE84 802A80F4 00000000 */ nop -.L802A80F8_41CE88: -/* 41CE88 802A80F8 24040006 */ addiu $a0, $zero, 6 -/* 41CE8C 802A80FC 0C051F9F */ jal set_window_update -/* 41CE90 802A8100 24050002 */ addiu $a1, $zero, 2 -/* 41CE94 802A8104 24040007 */ addiu $a0, $zero, 7 -/* 41CE98 802A8108 0C051F9F */ jal set_window_update -/* 41CE9C 802A810C 24050002 */ addiu $a1, $zero, 2 -/* 41CEA0 802A8110 3C03802B */ lui $v1, %hi(D_802ACCD0+0x32C) -/* 41CEA4 802A8114 8463CFFC */ lh $v1, %lo(D_802ACCD0+0x32C)($v1) -/* 41CEA8 802A8118 2402FFFF */ addiu $v0, $zero, -1 -/* 41CEAC 802A811C 10620009 */ beq $v1, $v0, .L802A8144_41CED4 -/* 41CEB0 802A8120 24040006 */ addiu $a0, $zero, 6 -/* 41CEB4 802A8124 0C051F9F */ jal set_window_update -/* 41CEB8 802A8128 24050009 */ addiu $a1, $zero, 9 -/* 41CEBC 802A812C 24040007 */ addiu $a0, $zero, 7 -/* 41CEC0 802A8130 0C051F9F */ jal set_window_update -/* 41CEC4 802A8134 24050009 */ addiu $a1, $zero, 9 -/* 41CEC8 802A8138 2402001F */ addiu $v0, $zero, 0x1f -.L802A813C: -/* 41CECC 802A813C 3C01800E */ lui $at, %hi(gBattleSubState) -/* 41CED0 802A8140 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) -.L802A8144_41CED4: -/* 41CED4 802A8144 8FBF0034 */ lw $ra, 0x34($sp) -/* 41CED8 802A8148 8FBE0030 */ lw $fp, 0x30($sp) -/* 41CEDC 802A814C 8FB7002C */ lw $s7, 0x2c($sp) -/* 41CEE0 802A8150 8FB60028 */ lw $s6, 0x28($sp) -/* 41CEE4 802A8154 8FB50024 */ lw $s5, 0x24($sp) -/* 41CEE8 802A8158 8FB40020 */ lw $s4, 0x20($sp) -/* 41CEEC 802A815C 8FB3001C */ lw $s3, 0x1c($sp) -/* 41CEF0 802A8160 8FB20018 */ lw $s2, 0x18($sp) -/* 41CEF4 802A8164 8FB10014 */ lw $s1, 0x14($sp) -/* 41CEF8 802A8168 8FB00010 */ lw $s0, 0x10($sp) -/* 41CEFC 802A816C D7B80048 */ ldc1 $f24, 0x48($sp) -/* 41CF00 802A8170 D7B60040 */ ldc1 $f22, 0x40($sp) -/* 41CF04 802A8174 D7B40038 */ ldc1 $f20, 0x38($sp) -/* 41CF08 802A8178 03E00008 */ jr $ra -/* 41CF0C 802A817C 27BD0050 */ addiu $sp, $sp, 0x50