5 more funcs (#858)

This commit is contained in:
Unnunu 2022-11-15 15:03:50 +03:00 committed by GitHub
parent 17e4bff020
commit 57c03b158a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 357 additions and 2684 deletions

View File

@ -50,4 +50,67 @@ s32 func_E0200044(s32 arg0, s32 arg1) {
return temp_v0 % (arg0 + 1);
}
#ifdef NON_EQUIVALENT
void func_E02000AC(s32 arg0, s32 arg1) {
s32 i, j;
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 128, 128, 128, 255);
for (i = 0; i < 10; i++) {
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, nuGfxCfb_ptr);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
(((((79)-(0)+1) * G_IM_SIZ_16b_TILE_BYTES)+7)>>3), 0,
G_TX_LOADTILE, 0,
G_TX_WRAP, 6, G_TX_NOLOD,
G_TX_WRAP, 7, G_TX_NOLOD);
gDPLoadSync(gMasterGfxPos++);
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE,
(0)<<G_TEXTURE_IMAGE_FRAC,
(i * 6)<<G_TEXTURE_IMAGE_FRAC,
(79)<<G_TEXTURE_IMAGE_FRAC,
(i * 6 + 5)<<G_TEXTURE_IMAGE_FRAC);
gDPPipeSync(gMasterGfxPos++);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
(((((79)-(0)+1) * G_IM_SIZ_16b_TILE_BYTES)+7)>>3), 0,
G_TX_RENDERTILE, 0,
G_TX_WRAP, 6, G_TX_NOLOD,
G_TX_WRAP, 7, G_TX_NOLOD);
gDPLoadTile(gMasterGfxPos++, G_TX_RENDERTILE,
(arg0)<<G_TEXTURE_IMAGE_FRAC,
(arg1 + i * 6)<<G_TEXTURE_IMAGE_FRAC,
(arg0 + 79)<<G_TEXTURE_IMAGE_FRAC,
(arg1 + i * 6 + 5)<<G_TEXTURE_IMAGE_FRAC);
gDPLoadTile(gMasterGfxPos++, G_TX_RENDERTILE + 1,
(arg0)<<G_TEXTURE_IMAGE_FRAC,
(arg1 + i * 6)<<G_TEXTURE_IMAGE_FRAC,
(arg0 + 79)<<G_TEXTURE_IMAGE_FRAC,
(arg1 + i * 6 + 5)<<G_TEXTURE_IMAGE_FRAC);
for (j = 0; j < 1; j++) {
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, nuGfxCfb_ptr);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
(((((320)-(0)+1) * G_IM_SIZ_16b_TILE_BYTES)+7)>>3), 0x100,
G_TX_LOADTILE, 0,
G_TX_WRAP, 6, G_TX_NOLOD,
G_TX_WRAP, 7, G_TX_NOLOD);
gDPLoadSync(gMasterGfxPos++);
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE,
(arg0)<<G_TEXTURE_IMAGE_FRAC,
(arg1 + i * 6)<<G_TEXTURE_IMAGE_FRAC,
(arg0 + 80 - 1)<<G_TEXTURE_IMAGE_FRAC,
(arg1 + i * 6 + 5)<<G_TEXTURE_IMAGE_FRAC);
gDPPipeSync(gMasterGfxPos++);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
(((((320)-(0)+1) * G_IM_SIZ_16b_TILE_BYTES)+7)>>3), 0,
G_TX_RENDERTILE + 1, 0,
G_TX_WRAP, 6, G_TX_NOLOD,
G_TX_WRAP, 7, G_TX_NOLOD);
gDPTextureRectangle(gMasterGfxPos++, arg0 * 4, (arg1 + i * 6) * 4, (arg0 + 80) * 4, (arg1 + i * 6 + 6) * 4, 0, arg0 * 32, arg1 * 32, 0x400, 0x400);
}
gDPPipeSync(gMasterGfxPos++);
}
}
#else
INCLUDE_ASM(s32, "325AD0", func_E02000AC);
#endif

View File

@ -12,6 +12,7 @@
#include "sprite/npc/BattleWatt.h"
#include "sprite/npc/BattleSushie.h"
#include "sprite/npc/BattleLakilester.h"
#include "sprite/npc/Twink.h"
extern HudScript HES_YellowArrow;
@ -436,16 +437,13 @@ void func_802A10B8(void) {
hud_element_free(D_802AD058);
}
s32 func_802A11B0(void);
// so close
#ifdef NON_MATCHING
s32 func_802A11B0(void) {
BattleStatus* battleStatus = &gBattleStatus;
f32 var_f20;
f32 theta;
s32 id;
s32 i;
f32 x, y;
f32 x2, y2;
s32 l, t;
switch (D_802AD000) {
case 0:
@ -496,7 +494,7 @@ s32 func_802A11B0(void) {
hud_element_set_render_depth(id, 2);
hud_element_set_render_pos(id, 39, 212);
hud_element_set_tint(id, 0, 91, 127);
hud_element_set_transform_rotation_pivot(id, 0x10, -0x10);
hud_element_set_transform_rotation_pivot(id, 16, -16);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX);
hud_element_set_alpha(id, 240);
@ -541,7 +539,7 @@ s32 func_802A11B0(void) {
D_802AD00A = 100;
D_802AD001 = 3;
D_802AD000 = 1;
D_802AD06C = var_f20 = D_802AD100 * 28;
D_802AD06C = theta = D_802AD100 * 28;
break;
case 1:
D_802AD00A = (D_802AD001 * 100) / 3;
@ -550,7 +548,7 @@ s32 func_802A11B0(void) {
case 1:
if (D_802AD001 == 1) {
id = D_802AD04C;
hud_element_clear_flags(id, 2);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
}
default:
D_802AD001--;
@ -558,36 +556,36 @@ s32 func_802A11B0(void) {
case 0:
D_802AD002 = 0;
D_802AD003 = 0;
D_802AD06C = var_f20 = D_802AD100 * 28;
for (i = 0; i < main_menu_numOptions; i++, var_f20 += 28.0f) {
s32 id;
D_802AD06C = theta = D_802AD100 * 28;
for (i = 0; i < main_menu_numOptions; i++, theta += 28.0f) {
x = 0.0f;
y = 0.0f;
add_vec2D_polar(&x, &y, 87.0f, var_f20);
add_vec2D_polar(&x, &y, 87.0f, theta);
x2 = D_802AD060 + x;
y2 = D_802AD064 + y;
l = D_802AD060 + x;
t = D_802AD064 + y;
id = D_802AD010[i];
hud_element_set_render_pos(id, x2, y2);
hud_element_clear_flags(id, 2);
hud_element_set_render_pos(id, l, t);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
id = D_802AD028[i];
hud_element_set_render_pos(id, x2, y2);
hud_element_set_render_pos(id, l, t);
hud_element_set_alpha(id, 100);
hud_element_clear_flags(id, 2);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
}
x = 0.0f;
y = 0.0f;
add_vec2D_polar(&x, &y, 87.0f, D_802AD100 * 28);
theta = D_802AD100 * 28;
add_vec2D_polar(&x, &y, 87.0f, theta);
l = D_802AD060 + x;
t = D_802AD064 + y;
id = D_802AD040;
hud_element_set_render_pos(id, D_802AD060 + x, D_802AD064 + y);
hud_element_set_render_pos(id, l, t);
hud_element_set_alpha(id, 180);
hud_element_set_scale(id, 0.85f);
hud_element_clear_flags(id, 2);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
D_802AD000 = 2;
break;
}
@ -606,12 +604,12 @@ s32 func_802A11B0(void) {
D_802AD003 = D_802AD002;
if (D_802AD004 == 0) {
if ((battleStatus->currentButtonsHeld & (BUTTON_STICK_LEFT | BUTTON_STICK_UP)) &&
(D_802AD069 < D_802AD002))
D_802AD069 < D_802AD002)
{
D_802AD002--;
}
if ((battleStatus->currentButtonsHeld & (BUTTON_STICK_RIGHT | BUTTON_STICK_DOWN)) &&
(D_802AD002 < D_802AD06A))
D_802AD002 < D_802AD06A)
{
D_802AD002++;
}
@ -656,37 +654,16 @@ s32 func_802A11B0(void) {
}
return 0;
}
#else
INCLUDE_ASM(s32, "415D90", func_802A11B0);
#endif
void btl_draw_menu_wheel(void);
// various issues
#ifdef NON_MATCHING
extern s8 D_802AD002;
extern s8 D_802AD004;
extern s16 D_802AD00A;
extern s32 D_802AD060;
extern s32 D_802AD064;
extern s8 D_802AD06B;
extern f32 D_802AD06C;
extern f32 D_802AD070;
void btl_draw_menu_wheel(void) {
s32 id;
s32 opacity;
f32 temp_f24;
f32 theta;
s32 cond;
f32 x;
f32 y;
f32 x, y;
f32 scale;
s32 i;
s32 new_var;
s32 l, t;
switch (D_802AD000) {
case 1:
@ -708,19 +685,19 @@ void btl_draw_menu_wheel(void) {
case 30:
opacity = (D_802AD006 * D_802AD008) / 255;
func_80144218(-1);
temp_f24 = (D_802AD100 - D_802AD002) * 28;
theta = (D_802AD100 - D_802AD002) * 28;
cond = FALSE;
if (D_802AD06C > temp_f24) {
if (D_802AD06C > theta) {
D_802AD06C -= D_802AD070;
if (D_802AD06C < temp_f24) {
D_802AD06C = temp_f24;
if (D_802AD06C < theta) {
D_802AD06C = theta;
cond = TRUE;
}
} else if (D_802AD06C < temp_f24) {
} else if (D_802AD06C < theta) {
D_802AD06C += D_802AD070;
if (D_802AD06C > temp_f24) {
D_802AD06C = temp_f24;
if (D_802AD06C > theta) {
D_802AD06C = theta;
cond = TRUE;
}
} else {
@ -772,8 +749,8 @@ void btl_draw_menu_wheel(void) {
func_80144238(id);
}
}
scale = (fabsf(fabsf((D_802AD06C - ((D_802AD100 - D_802AD002) * 28)) * (45.0 / 28.0)) - 22.5) / 22.5) + 0.01;
theta = (D_802AD100 - D_802AD002) * 28;
scale = (fabsf(fabsf((D_802AD06C - theta) * (45.0 / 28.0)) - 22.5) / 22.5) + 0.01;
if (cond) {
scale = 1.0f;
}
@ -788,7 +765,8 @@ void btl_draw_menu_wheel(void) {
func_80144238(id);
id = D_802AD048;
scale = (D_802AD06C - ((D_802AD100 - D_802AD002) * 28)) * (45.0 / 28.0);
theta = (D_802AD100 - D_802AD002) * 28;
scale = (D_802AD06C - theta) * (45.0 / 28.0);
hud_element_set_transform_rotation(id, 0.0f, 0.0f, -scale);
hud_element_set_transform_rotation_pivot(id, 18, -20);
hud_element_set_scale(id, 0.95f);
@ -804,18 +782,11 @@ void btl_draw_menu_wheel(void) {
theta = D_802AD06C;
for (i = 0; i < main_menu_numOptions; i++, theta += 28.0f) {
s32 l;
s32 t;
s32 new_var;
x = 0.0f;
y = 0.0f;
add_vec2D_polar(&x, &y, 87.0f, theta);
x = D_802AD060 + x;
l = x;
y = D_802AD064 + y;
t = y;
l = x = D_802AD060 + x;
t = y = D_802AD064 + y;
btl_draw_prim_quad(0, 0, 0, 0, l - 12, t - 12, 24, 24);
id = D_802AD010[i];
hud_element_set_render_pos(id, l, t);
@ -827,19 +798,13 @@ void btl_draw_menu_wheel(void) {
}
if (cond) {
s32 msgX;
s32 msgY;
msgX = D_802AD060 + 20;
msgY = D_802AD064;
msgY -= 34;
btl_draw_prim_quad(0, 0, 0, 0, D_802AD060 + 46, msgY, 48, 16);
draw_msg(battle_menu_messageIDs[D_802AD002 + D_802AD06B], msgX, msgY, opacity, MSG_PAL_35, 0);
l = D_802AD060 + 20;
t = D_802AD064 - 34;
btl_draw_prim_quad(0, 0, 0, 0, l + 26, t, 48, 16);
draw_msg(battle_menu_messageIDs[D_802AD002 + D_802AD06B], l, t, opacity, MSG_PAL_35, 0);
}
if ((gBattleStatus.flags1 & BS_FLAGS1_2000000) || (gBattleStatus.flags2 & 0x40)) {
if ((gBattleStatus.flags1 & BS_FLAGS1_2000000) || (gBattleStatus.flags2 & BS_FLAGS2_40)) {
D_802AD104 = 0;
}
@ -860,9 +825,6 @@ void btl_draw_menu_wheel(void) {
break;
}
}
#else
INCLUDE_ASM(s32, "415D90", btl_draw_menu_wheel);
#endif
// Very similar to func_802A45D8 - maybe can be used to reduce fake matches there
void func_802A2684(void) {
@ -3635,33 +3597,31 @@ s32 func_802A9B30(void) {
return (gBattleStatus.flags2 & BS_FLAGS2_4) <= 0;
}
// Ordering shenanigans
#ifdef NON_MATCHING
void btl_state_update_peach_menu(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor;
Actor* partner = battleStatus->partnerActor;
s32 temp_s0_2;
s32 phi_v0;
s32 s1;
s32 s0;
switch (gBattleState2) {
case 0:
case BATTLE_STATE2_UNK_0:
btl_cam_use_preset(BTL_CAM_PRESET_C);
btl_cam_move(0xA);
if (!(gBattleStatus.flags1 & 0x100000)) {
gBattleState2 = 0xB;
btl_cam_move(10);
if (!(gBattleStatus.flags1 & BS_FLAGS1_100000)) {
gBattleState2 = BATTLE_STATE2_UNK_B;
break;
}
player->state.currentPos.x = player->homePos.x;
player->state.currentPos.z = player->homePos.z;
gBattleState2 = 0xA;
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
player->state.goalPos.x = partner->homePos.x;
player->state.goalPos.z = partner->homePos.z;
player->state.moveTime = 4;
player->state.angle = 0.0f;
break;
case 10:
case BATTLE_STATE2_PLAYER_DEFEATED:
if (player->state.moveTime != 0) {
player->currentPos.x += (player->state.goalPos.x - player->currentPos.x) / player->state.moveTime;
player->currentPos.z += (player->state.goalPos.z - player->currentPos.z) / player->state.moveTime;
@ -3688,105 +3648,94 @@ void btl_state_update_peach_menu(void) {
player->homePos.z = player->currentPos.z;
partner->homePos.x = partner->currentPos.x;
partner->homePos.z = partner->currentPos.z;
gBattleStatus.flags1 &= ~0x100000;
case 11:
gBattleStatus.flags1 |= 2;
player->flags &= ~0x4000000;
player->flags |= 0x08000000;
gBattleStatus.flags1 &= ~BS_FLAGS1_100000;
case BATTLE_STATE2_UNK_B:
gBattleStatus.flags1 |= BS_FLAGS1_2;
player->flags &= ~ACTOR_FLAG_4000000;
player->flags |= ACTOR_FLAG_8000000;
if (partner != NULL) {
partner->flags |= 0x4000000;
partner->flags |= 0x08000000;
partner->flags |= ACTOR_FLAG_4000000;
partner->flags |= ACTOR_FLAG_8000000;
}
temp_s0_2 = 8;
battleStatus->selectedMoveID = 0;
battle_menu_submenuIDs[0] = temp_s0_2;
battle_menu_submenuIDs[0] = 8;
battle_menu_isEnabled[0] = TRUE;
battle_menu_isMessageDisabled[0] = 0;
main_battle_menu_JumpHudScripts[0] = battle_menu_PeachStarPowerHudScripts.enabled;
battle_menu_messageIDs[0] = D_802AB728[0];
s1 = 0;
if (!(battleStatus->menuDisableFlags & 0x100)) {
battle_menu_isEnabled[0] = FALSE;
battle_menu_isMessageDisabled[0] = 0x48;
main_battle_menu_JumpHudScripts[0] = battle_menu_PeachStarPowerHudScripts.disabled;
}
phi_v0 = 2;
if (func_802A9B30()) {
s1 = 0;
s0 = 1;
if (func_802A9B30() != 0) {
D_802AD104 = 1;
phi_v0 = 2 - s1;
main_menu_numOptions = 1;
D_802AD0A8 = 0;
D_802AD0B0 = 0;
D_802AD100 = phi_v0;
} else {
D_802AD104 = 0;
phi_v0 = 2 - s1;
main_menu_numOptions = 1;
D_802AD0A8 = 0;
D_802AD0B0 = 0;
D_802AD100 = phi_v0;
}
main_menu_numOptions = s0;
D_802AD0A8 = 0;
D_802AD0B0 = s1;
D_802AD100 = 2 - s1;
func_802A1000();
D_802ACC60 = 8;
gBattleState2 = 1;
gBattleState2 = BATTLE_STATE2_UNK_1;
break;
case 1:
set_animation(0, 0, 0xC0009);
case BATTLE_STATE2_UNK_1:
set_animation(ACTOR_PLAYER, 0, ANIM_Peach_C0009);
temp_s0_2 = func_802A11B0();
if (D_802ACC60 != 0) {
D_802ACC60--;
break;
}
if (temp_s0_2 != 0) {
set_animation(0, 0, 0xA0002);
set_animation(ACTOR_PLAYER, 0, ANIM_Peach_A0002);
battleStatus->currentSubmenu = battle_menu_submenuIDs[temp_s0_2 - 1];
func_802A1030();
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleState2 = 2;
gBattleState2 = BATTLE_STATE2_UNK_2;
}
break;
case 2:
case BATTLE_STATE2_UNK_2:
if (func_802A11B0() != 0) {
battleStatus->unk_6C = 4;
battleStatus->unk_6E = 5;
battleStatus->moveCategory = 8;
battleStatus->selectedMoveID = MOVE_PEACH_FOCUS;
battleStatus->selectedItemID = 0xA;
battleStatus->selectedItemID = ITEM_FIRST_DEGREE_CARD;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_PEACH_FOCUS].flags;
btl_set_state(BATTLE_STATE_SELECT_TARGET);
}
break;
case 4:
case BATTLE_STATE2_UNK_4:
func_802A1050();
gBattleState2 = 1;
gBattleState2 = BATTLE_STATE2_UNK_1;
btl_state_update_peach_menu();
btl_state_update_peach_menu();
break;
case 5:
case BATTLE_STATE2_BEGIN_LEVEL_UP:
func_802A10B8();
break;
case 8:
case BATTLE_STATE2_UNK_8:
btl_show_variable_battle_message(0x50, 60, 0);
D_802AD607 = 1;
gBattleState2 = 9;
gBattleState2 = BATTLE_STATE2_UNK_9;
break;
case 9:
case BATTLE_STATE2_UNK_9:
if (!btl_is_popup_displayed()) {
D_802AD607 = 0;
D_802ACC60 = 0;
gBattleState2 = 1;
gBattleState2 = BATTLE_STATE2_UNK_1;
}
break;
}
}
#else
INCLUDE_ASM(s32, "415D90", btl_state_update_peach_menu);
#endif
void btl_state_draw_peach_menu(void) {
switch (gBattleState2) {
@ -3819,16 +3768,16 @@ s32 func_802AA0A4(void) {
return (gBattleStatus.flags2 & 2) <= 0;
}
// weird sub stuff
#ifdef NON_MATCHING
void btl_state_update_twink_menu(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor;
Actor* partner = battleStatus->partnerActor;
s32 s1;
s32 temp_s0_2;
s32 var_v0_2;
s32 cond;
s32 z;
s32 s0;
switch (gBattleState2) {
case BATTLE_STATE2_UNK_0:
@ -3884,9 +3833,9 @@ void btl_state_update_twink_menu(void) {
partner->currentPos.x += (player->state.currentPos.x - partner->currentPos.x) / player->state.moveTime;
partner->currentPos.z += (player->state.currentPos.z - partner->currentPos.z) / player->state.moveTime;
}
player->currentPos.z += sin_rad(DEG_TO_RAD(player->state.angle)) * 16.0f;
player->currentPos.z += sin_rad((player->state.angle * TAU) / 360.0f) * 16.0f;
player->yaw = clamp_angle(-player->state.angle);
partner->currentPos.z -= sin_rad(DEG_TO_RAD(player->state.angle)) * 16.0f;
partner->currentPos.z -= sin_rad((player->state.angle * TAU) / 360.0f) * 16.0f;
partner->yaw = clamp_angle(-player->state.angle);
player->state.angle += 90.0f;
if (player->state.moveTime != 0) {
@ -3911,44 +3860,44 @@ void btl_state_update_twink_menu(void) {
partner->flags |= ACTOR_FLAG_8000000;
}
battleStatus->selectedMoveID = MOVE_NONE;
battle_menu_submenuIDs = 8;
battle_menu_submenuIDs[0] = 8;
battle_menu_isEnabled[0] = TRUE;
battle_menu_isMessageDisabled[0] = 0;
main_battle_menu_JumpHudScripts[0] = battle_menu_TwinkStarPowerHudScripts[0];
battle_menu_messageIDs[0] = D_802AB734[0];
battle_menu_isEnabled = TRUE;
battle_menu_isMessageDisabled = 0;
main_battle_menu_JumpHudScripts = battle_menu_TwinkStarPowerHudScripts[0];
battle_menu_messageIDs[0] = *D_802AB734;
if (!(battleStatus->menuDisableFlags & 0x100)) {
battle_menu_isEnabled = FALSE;
battle_menu_isMessageDisabled = 0x48;
main_battle_menu_JumpHudScripts = battle_menu_TwinkStarPowerHudScripts[1];
battle_menu_isEnabled[0] = FALSE;
battle_menu_isMessageDisabled[0] = 0x48;
main_battle_menu_JumpHudScripts[0] = battle_menu_TwinkStarPowerHudScripts[1];
}
z = 0;
s0 = 1;
if (func_802AA0A4() != 0) {
D_802AD104 = 1;
var_v0_2 = 2 - z;
} else {
D_802AD104 = 0;
var_v0_2 = 2 - z;
}
main_menu_numOptions = 1;
main_menu_numOptions = s0;
D_802AD0A8 = 0;
D_802AD0B0 = 0;
D_802AD100 = var_v0_2;
D_802AD0B0 = z;
D_802AD100 = 2 - z;
func_802A1000();
D_802ACC60 = 8;
gBattleState2 = BATTLE_STATE2_UNK_1;
break;
case BATTLE_STATE2_UNK_1:
set_animation(ACTOR_PARTNER, 0, 0x200001);
set_animation(ACTOR_PARTNER, 0, ANIM_Twink_Idle);
temp_s0_2 = func_802A11B0();
if (D_802ACC60 != 0) {
D_802ACC60--;
break;
}
if (temp_s0_2 != 0) {
set_animation(ACTOR_PARTNER, 0, 0x200008);
set_animation(ACTOR_PARTNER, 0, ANIM_Twink_Angry);
battleStatus->currentSubmenu = battle_menu_submenuIDs[temp_s0_2 - 1];
func_802A1030();
D_802ACC60 = 8;
@ -3990,9 +3939,6 @@ void btl_state_update_twink_menu(void) {
break;
}
}
#else
INCLUDE_ASM(s32, "415D90", btl_state_update_twink_menu); // look into m2c bug
#endif
void btl_state_draw_twink_menu(void) {
switch (gBattleState2) {

View File

@ -3666,14 +3666,13 @@ void load_data_for_models(ModelNode* model, s32 romOffset, s32 size) {
}
}
// tiny reg swap in the first loop
#ifdef NON_EQUIVALENT
void load_model_transforms(ModelNode* model, ModelNode* parent, Matrix4f mdlTxMtx, s32 treeDepth) {
Matrix4f sp10;
Matrix4f sp50;
Mtx sp50;
ModelBlueprint modelBP;
ModelBlueprint* modelBPptr = &modelBP;
ModelNodeProperty* groupTypeProperty;
ModelNode* modelTemp;
s32 i;
if (model->groupData != NULL && model->groupData->numChildren != 0) {
@ -3695,18 +3694,8 @@ void load_model_transforms(ModelNode* model, ModelNode* parent, Matrix4f mdlTxMt
if (model->type != 5 || groupType == 0) {
for (i = 0; i < model->groupData->numChildren; i++) {
ModelNode** modelTemp;
Matrix4f* txMtx;
modelTemp = &model->groupData->childList[i];
if (model->groupData->transformMatrix != NULL) {
txMtx = sp10;
} else {
txMtx = mdlTxMtx;
}
load_model_transforms(*modelTemp, model, txMtx, treeDepth + 1);
load_model_transforms(model->groupData->childList[i], model,
model->groupData->transformMatrix != NULL ? sp10 : mdlTxMtx, treeDepth + 1);
}
(*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].modelIndex = -1;
@ -3716,11 +3705,11 @@ void load_model_transforms(ModelNode* model, ModelNode* parent, Matrix4f mdlTxMt
}
}
guMtxF2L(mdlTxMtx, sp50);
guMtxF2L(mdlTxMtx, &sp50);
modelBPptr->flags = 0;
modelBPptr->mdlNode = model;
modelBPptr->groupData = parent->groupData;
modelBPptr->mtx = sp50;
modelBPptr->mtx = &sp50;
if (model->type == 5) {
s32 childCount = mdl_get_child_count(model);
@ -3736,9 +3725,6 @@ void load_model_transforms(ModelNode* model, ModelNode* parent, Matrix4f mdlTxMt
(*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].treeDepth = treeDepth;
mdl_treeIterPos += 1;
}
#else
INCLUDE_ASM(s32, "a5dd0_len_114e0", load_model_transforms);
#endif
s32 get_model_list_index_from_tree_index(s32 treeIndex) {
s32 i;

View File

@ -24,227 +24,220 @@ void func_80028838(void) {
D_8009A6A6 = 0;
}
// Backwards jump hall of shame
#ifdef NON_MATCHING
void update_input(void) {
OSContPad* cont = &D_8009A5B8;
s8 update;
s8 cond;
OSContPad* contData = &D_8009A5B8;
s16 handleInput = FALSE;
s16 cond1;
s32 buttons;
s16 stickX;
s16 stickY;
s32 buttons;
update = FALSE;
if (gGameStatusPtr->contBitPattern & 1) {
update = TRUE;
nuContDataGet(cont, 0);
handleInput = TRUE;
nuContDataGet(contData, 0);
}
if (gGameStatusPtr->demoState != 0) {
if (gGameStatusPtr->demoState < 2 &&
(cont->button & (BUTTON_A | BUTTON_B | BUTTON_Z | BUTTON_START)) &&
update)
(contData->button & (BUTTON_A | BUTTON_B | BUTTON_Z | BUTTON_START)) &&
handleInput)
{
gGameStatusPtr->demoState = 2;
}
cont->button = gGameStatusPtr->demoButtonInput;
cont->stick_x = gGameStatusPtr->demoStickX;
cont->stick_y = gGameStatusPtr->demoStickY;
update = TRUE;
contData->button = gGameStatusPtr->demoButtonInput;
contData->stick_x = gGameStatusPtr->demoStickX;
contData->stick_y = gGameStatusPtr->demoStickY;
handleInput = TRUE;
}
if (update) {
stickX = cont->stick_x;
stickY = cont->stick_y;
if (stickX > 0) {
stickX -= 4;
if (stickX < 0) {
stickX = 0;
}
}
if (!handleInput) {
return;
}
stickX = contData->stick_x;
stickY = contData->stick_y;
if (stickX > 0) {
stickX -= 4;
if (stickX < 0) {
stickX += 4;
if (stickX > 0) {
stickX = 0;
}
stickX = 0;
}
}
if (stickX < 0) {
stickX += 4;
if (stickX > 0) {
stickX = 0;
}
}
if (stickY > 0) {
stickY -= 4;
if (stickY < 0) {
stickY = 0;
}
}
if (stickY > 0) {
stickY -= 4;
if (stickY < 0) {
stickY += 4;
if (stickY > 0) {
stickY = 0;
}
stickY = 0;
}
gGameStatusPtr->stickX[0] = stickX;
gGameStatusPtr->stickY[0] = stickY;
buttons = cont->button;
cond = FALSE;
if (stickX > 0x20) {
cond = TRUE;
buttons |= BUTTON_STICK_RIGHT;
if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_RIGHT)) {
D_8009A6A0 = stickX;
} else {
if (D_8009A6A4 == 0) {
if (D_8009A6A0 < stickX) {
D_8009A6A0 = stickX;
}
} else {
if (D_8009A6A0 > stickX) {
D_8009A6A0 = stickX;
}
}
}
}
if (stickY < 0) {
stickY += 4;
if (stickY > 0) {
stickY = 0;
}
if (stickX < -0x20) {
cond = TRUE;
buttons |= BUTTON_STICK_LEFT;
if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_LEFT)) {
D_8009A6A0 = stickX;
} else {
if (D_8009A6A4 == 0) {
if (D_8009A6A0 > stickX) {
D_8009A6A0 = stickX;
}
} else {
if (D_8009A6A0 < stickX) {
D_8009A6A0 = stickX;
}
}
}
}
if (!cond) {
D_8009A6A4 = 0;
}
gGameStatusPtr->stickX[0] = stickX;
gGameStatusPtr->stickY[0] = stickY;
buttons = contData->button;
cond1 = FALSE;
if (stickX > 0x20) {
cond1 = TRUE;
buttons |= BUTTON_STICK_RIGHT;
if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_RIGHT)) {
D_8009A6A0 = stickX;
}
cond = FALSE;
if (stickY > 0x20) {
cond = TRUE;
buttons |= BUTTON_STICK_UP;
if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_UP)) {
D_8009A6A2 = stickY;
} else {
if (!D_8009A6A6) {
if (D_8009A6A2 < stickY) {
D_8009A6A2 = stickY;
}
} else {
if (D_8009A6A2 > stickY) {
D_8009A6A2 = stickY;
}
}
}
}
if (stickY < -0x20) {
cond = TRUE;
buttons |= BUTTON_STICK_DOWN;
if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_DOWN)) {
D_8009A6A2 = stickY;
} else {
if (!D_8009A6A6) {
if (D_8009A6A2 > stickY) {
D_8009A6A2 = stickY;
}
} else {
if (D_8009A6A2 < stickY) {
D_8009A6A2 = stickY;
}
}
}
}
if (!cond) {
D_8009A6A6 = FALSE;
D_8009A6A2 = stickY;
}
if (stickX > 0x20) {
if (D_8009A6A4 == TRUE && (stickX - D_8009A6A0 > 0x10)) {
buttons &= ~BUTTON_STICK_RIGHT;
D_8009A6A4 = FALSE;
}
if (D_8009A6A0 - stickX > 0x10) {
D_8009A6A4 = TRUE;
}
}
if (stickX < -0x20) {
if (D_8009A6A4 == TRUE) {
if (D_8009A6A0 - stickX > 0x10) {
buttons &= ~BUTTON_STICK_LEFT;
D_8009A6A4 = FALSE;
}
}
if (stickX - D_8009A6A0 > 0x10) {
D_8009A6A4 = TRUE;
}
}
if (stickY > 0x20) {
if (D_8009A6A6 == TRUE && (stickY - D_8009A6A2 > 0x10)) {
buttons &= ~BUTTON_STICK_UP;
D_8009A6A6 = FALSE;
}
if (D_8009A6A2 - stickY > 0x10) {
D_8009A6A6 = TRUE;
}
}
if (stickY < -0x20) {
if (D_8009A6A6 == TRUE) {
if (D_8009A6A2 - stickY > 0x10) {
buttons &= ~BUTTON_STICK_DOWN;
D_8009A6A6 = FALSE;
}
}
if (stickY - D_8009A6A2 > 0x10) {
D_8009A6A6 = TRUE;
}
}
gGameStatusPtr->currentButtons[0] = buttons;
gGameStatusPtr->pressedButtons[0] = gGameStatusPtr->currentButtons[0] ^ gGameStatusPtr->prevButtons[0];
gGameStatusPtr->pressedButtons[0] &= gGameStatusPtr->currentButtons[0];
if (buttons != 0) {
if (gGameStatusPtr->prevButtons[0] != buttons) {
gGameStatusPtr->heldButtons[0] = buttons;
gGameStatusPtr->unk_60 = -1;
gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0] ^ gGameStatusPtr->prevButtons[0];
gGameStatusPtr->heldButtons[0] &= gGameStatusPtr->currentButtons[0];
gGameStatusPtr->unk_58 = gGameStatusPtr->unk_48[0];
} else {
if (gGameStatusPtr->unk_60 >= 0) {
gGameStatusPtr->unk_60--;
if (gGameStatusPtr->unk_60 == 0) {
gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0];
gGameStatusPtr->unk_60 = gGameStatusPtr->unk_50[0];
} else {
gGameStatusPtr->heldButtons[0] = 0;
}
} else {
gGameStatusPtr->unk_58--;
if (gGameStatusPtr->unk_58 == 0) {
gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0];
gGameStatusPtr->unk_60 = gGameStatusPtr->unk_50[0];
} else {
gGameStatusPtr->heldButtons[0] = 0;
}
}
} else if (D_8009A6A4 == 0) {
if (D_8009A6A0 < stickX) {
D_8009A6A0 = stickX;
}
} else {
gGameStatusPtr->heldButtons[0] = 0;
if (D_8009A6A0 > stickX) {
D_8009A6A0 = stickX;
}
}
gGameStatusPtr->prevButtons[0] = gGameStatusPtr->currentButtons[0];
}
if (stickX < -0x20) {
cond1 = TRUE;
buttons |= BUTTON_STICK_LEFT;
if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_LEFT)) {
D_8009A6A0 = stickX;
} else if (D_8009A6A4 == 0) {
if (D_8009A6A0 > stickX) {
D_8009A6A0 = stickX;
}
} else {
if (D_8009A6A0 < stickX)
{
D_8009A6A0 = stickX;
}
}
}
if (!cond1) {
D_8009A6A4 = 0;
D_8009A6A0 = stickX;
}
cond1 = FALSE;
if (stickY > 0x20) {
cond1 = TRUE;
buttons |= BUTTON_STICK_UP;
if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_UP)) {
D_8009A6A2 = stickY;
} else if (D_8009A6A6 == 0) {
if (D_8009A6A2 < stickY) {
D_8009A6A2 = stickY;
}
} else {
if (D_8009A6A2 > stickY) {
D_8009A6A2 = stickY;
}
}
}
if (stickY < -0x20) {
cond1 = TRUE;
buttons |= BUTTON_STICK_DOWN;
if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_DOWN)) {
D_8009A6A2 = stickY;
} else if (D_8009A6A6 == 0) {
if (D_8009A6A2 > stickY) {
D_8009A6A2 = stickY;
}
} else {
if (D_8009A6A2 < stickY) {
D_8009A6A2 = stickY;
}
}
}
if (!cond1) {
D_8009A6A6 = 0;
D_8009A6A2 = stickY;
}
if (stickX > 0x20) {
if (D_8009A6A4 == 1 && stickX - D_8009A6A0 > 0x10) {
buttons &= ~BUTTON_STICK_RIGHT;
D_8009A6A4 = 0;
}
if (D_8009A6A0 - stickX > 0x10) {
D_8009A6A4 = 1;
}
}
if (stickX < -0x20) {
if (D_8009A6A4 == 1 && D_8009A6A0 - stickX > 0x10) {
buttons &= ~BUTTON_STICK_LEFT;
D_8009A6A4 = 0;
}
if (stickX - D_8009A6A0 > 0x10) {
D_8009A6A4 = 1;
}
}
if (stickY > 0x20) {
if (D_8009A6A6 == 1 && stickY - D_8009A6A2 > 0x10) {
buttons &= ~BUTTON_STICK_UP;
D_8009A6A6 = 0;
}
if (D_8009A6A2 - stickY > 0x10) {
D_8009A6A6 = 1;
}
}
if (stickY < -0x20) {
if (D_8009A6A6 == 1 && D_8009A6A2 - stickY > 0x10) {
buttons &= ~BUTTON_STICK_DOWN;
D_8009A6A6 = 0;
}
if (stickY - D_8009A6A2 > 0x10) {
D_8009A6A6 = 1;
}
}
do {
gGameStatusPtr->pressedButtons[0] = buttons ^ gGameStatusPtr->prevButtons[0];
gGameStatusPtr->currentButtons[0] = buttons;
gGameStatusPtr->pressedButtons[0] &= buttons;
if (gGameStatusPtr->currentButtons[0] == 0) {
gGameStatusPtr->heldButtons[0] = 0;
} else if (gGameStatusPtr->prevButtons[0] != gGameStatusPtr->currentButtons[0]) {
gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0];
gGameStatusPtr->unk_60 = -1;
gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0] ^ gGameStatusPtr->prevButtons[0];
gGameStatusPtr->heldButtons[0] &= gGameStatusPtr->currentButtons[0];
gGameStatusPtr->unk_58 = gGameStatusPtr->unk_48[0];
} else {
if (gGameStatusPtr->unk_60 >= 0) {
gGameStatusPtr->unk_60--;
if (gGameStatusPtr->unk_60 != 0) {
gGameStatusPtr->heldButtons[0] = 0;
} else {
gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0];
gGameStatusPtr->unk_60 = gGameStatusPtr->unk_50[0];
}
} else {
gGameStatusPtr->unk_58--;
if (gGameStatusPtr->unk_58 != 0) {
gGameStatusPtr->heldButtons[0] = 0;
} else {
gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0];
gGameStatusPtr->unk_60 = gGameStatusPtr->unk_50[0];
}
}
}
} while (0);
gGameStatusPtr->prevButtons[0] = gGameStatusPtr->currentButtons[0];
}
#else
INCLUDE_ASM(s32, "input", update_input);

View File

@ -1,693 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_802AB770
.word .L802A1DB4_416B44, .L802A2644_4173D4, .L802A1CC4_416A54, .L802A1DB4_416B44, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A1DB4_416B44, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A1DB4_416B44, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A2644_4173D4, .L802A1DB4_416B44
dlabel D_802AB7F0
.double 1.6071428571428572
dlabel D_802AB7F8
.double 22.5
dlabel D_802AB800
.double 0.01
.section .text
glabel btl_draw_menu_wheel
/* 4169E4 802A1C54 3C02802B */ lui $v0, %hi(D_802AD000)
/* 4169E8 802A1C58 9042D000 */ lbu $v0, %lo(D_802AD000)($v0)
/* 4169EC 802A1C5C 27BDFF88 */ addiu $sp, $sp, -0x78
/* 4169F0 802A1C60 AFBF0054 */ sw $ra, 0x54($sp)
/* 4169F4 802A1C64 AFBE0050 */ sw $fp, 0x50($sp)
/* 4169F8 802A1C68 AFB7004C */ sw $s7, 0x4c($sp)
/* 4169FC 802A1C6C AFB60048 */ sw $s6, 0x48($sp)
/* 416A00 802A1C70 AFB50044 */ sw $s5, 0x44($sp)
/* 416A04 802A1C74 AFB40040 */ sw $s4, 0x40($sp)
/* 416A08 802A1C78 AFB3003C */ sw $s3, 0x3c($sp)
/* 416A0C 802A1C7C AFB20038 */ sw $s2, 0x38($sp)
/* 416A10 802A1C80 AFB10034 */ sw $s1, 0x34($sp)
/* 416A14 802A1C84 AFB00030 */ sw $s0, 0x30($sp)
/* 416A18 802A1C88 F7BA0070 */ sdc1 $f26, 0x70($sp)
/* 416A1C 802A1C8C F7B80068 */ sdc1 $f24, 0x68($sp)
/* 416A20 802A1C90 F7B60060 */ sdc1 $f22, 0x60($sp)
/* 416A24 802A1C94 F7B40058 */ sdc1 $f20, 0x58($sp)
/* 416A28 802A1C98 24420001 */ addiu $v0, $v0, 1
/* 416A2C 802A1C9C 00021600 */ sll $v0, $v0, 0x18
/* 416A30 802A1CA0 00021E03 */ sra $v1, $v0, 0x18
/* 416A34 802A1CA4 2C620020 */ sltiu $v0, $v1, 0x20
/* 416A38 802A1CA8 10400266 */ beqz $v0, .L802A2644_4173D4
/* 416A3C 802A1CAC 00031080 */ sll $v0, $v1, 2
/* 416A40 802A1CB0 3C01802B */ lui $at, %hi(jtbl_802AB770)
/* 416A44 802A1CB4 00220821 */ addu $at, $at, $v0
/* 416A48 802A1CB8 8C22B770 */ lw $v0, %lo(jtbl_802AB770)($at)
/* 416A4C 802A1CBC 00400008 */ jr $v0
/* 416A50 802A1CC0 00000000 */ nop
.L802A1CC4_416A54:
/* 416A54 802A1CC4 0C051086 */ jal func_80144218
/* 416A58 802A1CC8 2404FFFF */ addiu $a0, $zero, -1
/* 416A5C 802A1CCC 3C128080 */ lui $s2, 0x8080
/* 416A60 802A1CD0 44800000 */ mtc1 $zero, $f0
/* 416A64 802A1CD4 3C13802B */ lui $s3, %hi(D_802AD048)
/* 416A68 802A1CD8 8E73D048 */ lw $s3, %lo(D_802AD048)($s3)
/* 416A6C 802A1CDC 44050000 */ mfc1 $a1, $f0
/* 416A70 802A1CE0 0260202D */ daddu $a0, $s3, $zero
/* 416A74 802A1CE4 00A0302D */ daddu $a2, $a1, $zero
/* 416A78 802A1CE8 0C051489 */ jal hud_element_set_transform_rotation
/* 416A7C 802A1CEC 00A0382D */ daddu $a3, $a1, $zero
/* 416A80 802A1CF0 3C11802B */ lui $s1, %hi(D_802AD006)
/* 416A84 802A1CF4 2631D006 */ addiu $s1, $s1, %lo(D_802AD006)
/* 416A88 802A1CF8 86220000 */ lh $v0, ($s1)
/* 416A8C 802A1CFC 36528081 */ ori $s2, $s2, 0x8081
/* 416A90 802A1D00 000229C0 */ sll $a1, $v0, 7
/* 416A94 802A1D04 00A22823 */ subu $a1, $a1, $v0
/* 416A98 802A1D08 00052840 */ sll $a1, $a1, 1
/* 416A9C 802A1D0C 00B20018 */ mult $a1, $s2
/* 416AA0 802A1D10 0260202D */ daddu $a0, $s3, $zero
/* 416AA4 802A1D14 00004010 */ mfhi $t0
/* 416AA8 802A1D18 01051021 */ addu $v0, $t0, $a1
/* 416AAC 802A1D1C 000211C3 */ sra $v0, $v0, 7
/* 416AB0 802A1D20 00052FC3 */ sra $a1, $a1, 0x1f
/* 416AB4 802A1D24 0C0513AC */ jal hud_element_set_alpha
/* 416AB8 802A1D28 00452823 */ subu $a1, $v0, $a1
/* 416ABC 802A1D2C 0260202D */ daddu $a0, $s3, $zero
/* 416AC0 802A1D30 3C10802B */ lui $s0, %hi(D_802AD00A)
/* 416AC4 802A1D34 2610D00A */ addiu $s0, $s0, %lo(D_802AD00A)
/* 416AC8 802A1D38 86060000 */ lh $a2, ($s0)
/* 416ACC 802A1D3C 24050F64 */ addiu $a1, $zero, 0xf64
/* 416AD0 802A1D40 00A62823 */ subu $a1, $a1, $a2
/* 416AD4 802A1D44 0C051261 */ jal hud_element_set_render_pos
/* 416AD8 802A1D48 24C600D4 */ addiu $a2, $a2, 0xd4
/* 416ADC 802A1D4C 0C05108E */ jal func_80144238
/* 416AE0 802A1D50 0260202D */ daddu $a0, $s3, $zero
/* 416AE4 802A1D54 86220000 */ lh $v0, ($s1)
/* 416AE8 802A1D58 000229C0 */ sll $a1, $v0, 7
/* 416AEC 802A1D5C 00A22823 */ subu $a1, $a1, $v0
/* 416AF0 802A1D60 00052840 */ sll $a1, $a1, 1
/* 416AF4 802A1D64 00B20018 */ mult $a1, $s2
/* 416AF8 802A1D68 3C13802B */ lui $s3, %hi(D_802AD044)
/* 416AFC 802A1D6C 8E73D044 */ lw $s3, %lo(D_802AD044)($s3)
/* 416B00 802A1D70 0260202D */ daddu $a0, $s3, $zero
/* 416B04 802A1D74 00004010 */ mfhi $t0
/* 416B08 802A1D78 01051021 */ addu $v0, $t0, $a1
/* 416B0C 802A1D7C 000211C3 */ sra $v0, $v0, 7
/* 416B10 802A1D80 00052FC3 */ sra $a1, $a1, 0x1f
/* 416B14 802A1D84 0C0513AC */ jal hud_element_set_alpha
/* 416B18 802A1D88 00452823 */ subu $a1, $v0, $a1
/* 416B1C 802A1D8C 0260202D */ daddu $a0, $s3, $zero
/* 416B20 802A1D90 86060000 */ lh $a2, ($s0)
/* 416B24 802A1D94 24050028 */ addiu $a1, $zero, 0x28
/* 416B28 802A1D98 00A62823 */ subu $a1, $a1, $a2
/* 416B2C 802A1D9C 0C051261 */ jal hud_element_set_render_pos
/* 416B30 802A1DA0 24C600D4 */ addiu $a2, $a2, 0xd4
/* 416B34 802A1DA4 0C05108E */ jal func_80144238
/* 416B38 802A1DA8 0260202D */ daddu $a0, $s3, $zero
/* 416B3C 802A1DAC 080A8991 */ j .L802A2644_4173D4
/* 416B40 802A1DB0 00000000 */ nop
.L802A1DB4_416B44:
/* 416B44 802A1DB4 3C03802B */ lui $v1, %hi(D_802AD006)
/* 416B48 802A1DB8 8463D006 */ lh $v1, %lo(D_802AD006)($v1)
/* 416B4C 802A1DBC 3C02802B */ lui $v0, %hi(D_802AD008)
/* 416B50 802A1DC0 8442D008 */ lh $v0, %lo(D_802AD008)($v0)
/* 416B54 802A1DC4 00620018 */ mult $v1, $v0
/* 416B58 802A1DC8 00001812 */ mflo $v1
/* 416B5C 802A1DCC 3C028080 */ lui $v0, 0x8080
/* 416B60 802A1DD0 34428081 */ ori $v0, $v0, 0x8081
/* 416B64 802A1DD4 00620018 */ mult $v1, $v0
/* 416B68 802A1DD8 2404FFFF */ addiu $a0, $zero, -1
/* 416B6C 802A1DDC 00001010 */ mfhi $v0
/* 416B70 802A1DE0 00431021 */ addu $v0, $v0, $v1
/* 416B74 802A1DE4 000211C3 */ sra $v0, $v0, 7
/* 416B78 802A1DE8 00031FC3 */ sra $v1, $v1, 0x1f
/* 416B7C 802A1DEC 0C051086 */ jal func_80144218
/* 416B80 802A1DF0 0043A823 */ subu $s5, $v0, $v1
/* 416B84 802A1DF4 3C03802B */ lui $v1, %hi(D_802AD002)
/* 416B88 802A1DF8 8063D002 */ lb $v1, %lo(D_802AD002)($v1)
/* 416B8C 802A1DFC 3C02802B */ lui $v0, %hi(D_802AD100)
/* 416B90 802A1E00 8C42D100 */ lw $v0, %lo(D_802AD100)($v0)
/* 416B94 802A1E04 00431023 */ subu $v0, $v0, $v1
/* 416B98 802A1E08 000218C0 */ sll $v1, $v0, 3
/* 416B9C 802A1E0C 00621823 */ subu $v1, $v1, $v0
/* 416BA0 802A1E10 00031880 */ sll $v1, $v1, 2
/* 416BA4 802A1E14 3C02802B */ lui $v0, %hi(D_802AD06C)
/* 416BA8 802A1E18 2442D06C */ addiu $v0, $v0, %lo(D_802AD06C)
/* 416BAC 802A1E1C C4420000 */ lwc1 $f2, ($v0)
/* 416BB0 802A1E20 4483C000 */ mtc1 $v1, $f24
/* 416BB4 802A1E24 00000000 */ nop
/* 416BB8 802A1E28 4680C620 */ cvt.s.w $f24, $f24
/* 416BBC 802A1E2C 4602C03C */ c.lt.s $f24, $f2
/* 416BC0 802A1E30 00000000 */ nop
/* 416BC4 802A1E34 45000007 */ bc1f .L802A1E54
/* 416BC8 802A1E38 0000B82D */ daddu $s7, $zero, $zero
/* 416BCC 802A1E3C 3C01802B */ lui $at, %hi(D_802AD070)
/* 416BD0 802A1E40 C420D070 */ lwc1 $f0, %lo(D_802AD070)($at)
/* 416BD4 802A1E44 46001001 */ sub.s $f0, $f2, $f0
/* 416BD8 802A1E48 4618003C */ c.lt.s $f0, $f24
/* 416BDC 802A1E4C 080A879F */ j .L802A1E7C
/* 416BE0 802A1E50 E4400000 */ swc1 $f0, ($v0)
.L802A1E54:
/* 416BE4 802A1E54 4618103C */ c.lt.s $f2, $f24
/* 416BE8 802A1E58 00000000 */ nop
/* 416BEC 802A1E5C 4502000B */ bc1fl .L802A1E8C
/* 416BF0 802A1E60 24170001 */ addiu $s7, $zero, 1
/* 416BF4 802A1E64 3C01802B */ lui $at, %hi(D_802AD070)
/* 416BF8 802A1E68 C420D070 */ lwc1 $f0, %lo(D_802AD070)($at)
/* 416BFC 802A1E6C 46001000 */ add.s $f0, $f2, $f0
/* 416C00 802A1E70 E4400000 */ swc1 $f0, ($v0)
/* 416C04 802A1E74 4600C03C */ c.lt.s $f24, $f0
/* 416C08 802A1E78 00000000 */ nop
.L802A1E7C:
/* 416C0C 802A1E7C 45000003 */ bc1f .L802A1E8C
/* 416C10 802A1E80 00000000 */ nop
/* 416C14 802A1E84 E4580000 */ swc1 $f24, ($v0)
/* 416C18 802A1E88 24170001 */ addiu $s7, $zero, 1
.L802A1E8C:
/* 416C1C 802A1E8C 16E00010 */ bnez $s7, .L802A1ED0
/* 416C20 802A1E90 00000000 */ nop
/* 416C24 802A1E94 3C02802B */ lui $v0, %hi(D_802AD070)
/* 416C28 802A1E98 2442D070 */ addiu $v0, $v0, %lo(D_802AD070)
/* 416C2C 802A1E9C C4400000 */ lwc1 $f0, ($v0)
/* 416C30 802A1EA0 3C013FF0 */ lui $at, 0x3ff0
/* 416C34 802A1EA4 44811800 */ mtc1 $at, $f3
/* 416C38 802A1EA8 44801000 */ mtc1 $zero, $f2
/* 416C3C 802A1EAC 46000021 */ cvt.d.s $f0, $f0
/* 416C40 802A1EB0 46220080 */ add.d $f2, $f0, $f2
/* 416C44 802A1EB4 46220002 */ mul.d $f0, $f0, $f2
/* 416C48 802A1EB8 00000000 */ nop
/* 416C4C 802A1EBC 46220002 */ mul.d $f0, $f0, $f2
/* 416C50 802A1EC0 00000000 */ nop
/* 416C54 802A1EC4 46200020 */ cvt.s.d $f0, $f0
/* 416C58 802A1EC8 080A87BB */ j .L802A1EEC
/* 416C5C 802A1ECC E4400000 */ swc1 $f0, ($v0)
.L802A1ED0:
/* 416C60 802A1ED0 3C013E99 */ lui $at, 0x3e99
/* 416C64 802A1ED4 3421999A */ ori $at, $at, 0x999a
/* 416C68 802A1ED8 44810000 */ mtc1 $at, $f0
/* 416C6C 802A1EDC 3C01802B */ lui $at, %hi(D_802AD004)
/* 416C70 802A1EE0 A020D004 */ sb $zero, %lo(D_802AD004)($at)
/* 416C74 802A1EE4 3C01802B */ lui $at, %hi(D_802AD070)
/* 416C78 802A1EE8 E420D070 */ swc1 $f0, %lo(D_802AD070)($at)
.L802A1EEC:
/* 416C7C 802A1EEC 3C02802B */ lui $v0, %hi(main_menu_numOptions)
/* 416C80 802A1EF0 8C42D0AC */ lw $v0, %lo(main_menu_numOptions)($v0)
/* 416C84 802A1EF4 3C01802B */ lui $at, %hi(D_802AD06C)
/* 416C88 802A1EF8 C438D06C */ lwc1 $f24, %lo(D_802AD06C)($at)
/* 416C8C 802A1EFC 1840008A */ blez $v0, .L802A2128
/* 416C90 802A1F00 0000A02D */ daddu $s4, $zero, $zero
/* 416C94 802A1F04 3C118080 */ lui $s1, 0x8080
/* 416C98 802A1F08 36318081 */ ori $s1, $s1, 0x8081
/* 416C9C 802A1F0C 00151080 */ sll $v0, $s5, 2
/* 416CA0 802A1F10 00551021 */ addu $v0, $v0, $s5
/* 416CA4 802A1F14 00021900 */ sll $v1, $v0, 4
/* 416CA8 802A1F18 00621823 */ subu $v1, $v1, $v0
/* 416CAC 802A1F1C 00031840 */ sll $v1, $v1, 1
/* 416CB0 802A1F20 00710018 */ mult $v1, $s1
/* 416CB4 802A1F24 4480A000 */ mtc1 $zero, $f20
/* 416CB8 802A1F28 0003B7C3 */ sra $s6, $v1, 0x1f
/* 416CBC 802A1F2C 00151040 */ sll $v0, $s5, 1
/* 416CC0 802A1F30 00558021 */ addu $s0, $v0, $s5
/* 416CC4 802A1F34 00004010 */ mfhi $t0
/* 416CC8 802A1F38 01031821 */ addu $v1, $t0, $v1
/* 416CCC 802A1F3C 000391C3 */ sra $s2, $v1, 7
.L802A1F40:
/* 416CD0 802A1F40 27A40020 */ addiu $a0, $sp, 0x20
/* 416CD4 802A1F44 3C0642AE */ lui $a2, 0x42ae
/* 416CD8 802A1F48 4407C000 */ mfc1 $a3, $f24
/* 416CDC 802A1F4C 27A50024 */ addiu $a1, $sp, 0x24
/* 416CE0 802A1F50 E7B40020 */ swc1 $f20, 0x20($sp)
/* 416CE4 802A1F54 0C00A7E7 */ jal add_vec2D_polar
/* 416CE8 802A1F58 E7B40024 */ swc1 $f20, 0x24($sp)
/* 416CEC 802A1F5C 00141080 */ sll $v0, $s4, 2
/* 416CF0 802A1F60 C7A00020 */ lwc1 $f0, 0x20($sp)
/* 416CF4 802A1F64 3C01802B */ lui $at, %hi(D_802AD060)
/* 416CF8 802A1F68 C422D060 */ lwc1 $f2, %lo(D_802AD060)($at)
/* 416CFC 802A1F6C 468010A0 */ cvt.s.w $f2, $f2
/* 416D00 802A1F70 46001080 */ add.s $f2, $f2, $f0
/* 416D04 802A1F74 C7A40024 */ lwc1 $f4, 0x24($sp)
/* 416D08 802A1F78 3C01802B */ lui $at, %hi(D_802AD064)
/* 416D0C 802A1F7C C420D064 */ lwc1 $f0, %lo(D_802AD064)($at)
/* 416D10 802A1F80 46800020 */ cvt.s.w $f0, $f0
/* 416D14 802A1F84 46040000 */ add.s $f0, $f0, $f4
/* 416D18 802A1F88 3C13802B */ lui $s3, %hi(D_802AD028)
/* 416D1C 802A1F8C 02629821 */ addu $s3, $s3, $v0
/* 416D20 802A1F90 8E73D028 */ lw $s3, %lo(D_802AD028)($s3)
/* 416D24 802A1F94 4407A000 */ mfc1 $a3, $f20
/* 416D28 802A1F98 46000187 */ neg.s $f6, $f0
/* 416D2C 802A1F9C 44051000 */ mfc1 $a1, $f2
/* 416D30 802A1FA0 44063000 */ mfc1 $a2, $f6
/* 416D34 802A1FA4 0260202D */ daddu $a0, $s3, $zero
/* 416D38 802A1FA8 E7A00024 */ swc1 $f0, 0x24($sp)
/* 416D3C 802A1FAC 0C051461 */ jal hud_element_set_transform_pos
/* 416D40 802A1FB0 AFA50020 */ sw $a1, 0x20($sp)
/* 416D44 802A1FB4 0260202D */ daddu $a0, $s3, $zero
/* 416D48 802A1FB8 0000282D */ daddu $a1, $zero, $zero
/* 416D4C 802A1FBC 0C051261 */ jal hud_element_set_render_pos
/* 416D50 802A1FC0 00A0302D */ daddu $a2, $a1, $zero
/* 416D54 802A1FC4 0260202D */ daddu $a0, $s3, $zero
/* 416D58 802A1FC8 0C0513AC */ jal hud_element_set_alpha
/* 416D5C 802A1FCC 02562823 */ subu $a1, $s2, $s6
/* 416D60 802A1FD0 3C014260 */ lui $at, 0x4260
/* 416D64 802A1FD4 44810000 */ mtc1 $at, $f0
/* 416D68 802A1FD8 00000000 */ nop
/* 416D6C 802A1FDC 4600C032 */ c.eq.s $f24, $f0
/* 416D70 802A1FE0 3C053F80 */ lui $a1, 0x3f80
/* 416D74 802A1FE4 45000005 */ bc1f .L802A1FFC
/* 416D78 802A1FE8 24020001 */ addiu $v0, $zero, 1
/* 416D7C 802A1FEC 16E20003 */ bne $s7, $v0, .L802A1FFC
/* 416D80 802A1FF0 00000000 */ nop
/* 416D84 802A1FF4 3C053FCC */ lui $a1, 0x3fcc
/* 416D88 802A1FF8 34A5CCCD */ ori $a1, $a1, 0xcccd
.L802A1FFC:
/* 416D8C 802A1FFC 0C051308 */ jal hud_element_set_scale
/* 416D90 802A2000 0260202D */ daddu $a0, $s3, $zero
/* 416D94 802A2004 0C05108E */ jal func_80144238
/* 416D98 802A2008 0260202D */ daddu $a0, $s3, $zero
/* 416D9C 802A200C 3C02802B */ lui $v0, %hi(D_802AD06B)
/* 416DA0 802A2010 8042D06B */ lb $v0, %lo(D_802AD06B)($v0)
/* 416DA4 802A2014 3C03802B */ lui $v1, %hi(D_802AD002)
/* 416DA8 802A2018 8063D002 */ lb $v1, %lo(D_802AD002)($v1)
/* 416DAC 802A201C 00431021 */ addu $v0, $v0, $v1
/* 416DB0 802A2020 5682003A */ bnel $s4, $v0, .L802A210C
/* 416DB4 802A2024 26940001 */ addiu $s4, $s4, 1
/* 416DB8 802A2028 27A40020 */ addiu $a0, $sp, 0x20
/* 416DBC 802A202C 3C0642AE */ lui $a2, 0x42ae
/* 416DC0 802A2030 3C074260 */ lui $a3, 0x4260
/* 416DC4 802A2034 27A50024 */ addiu $a1, $sp, 0x24
/* 416DC8 802A2038 AFA00020 */ sw $zero, 0x20($sp)
/* 416DCC 802A203C 0C00A7E7 */ jal add_vec2D_polar
/* 416DD0 802A2040 AFA00024 */ sw $zero, 0x24($sp)
/* 416DD4 802A2044 C7A00020 */ lwc1 $f0, 0x20($sp)
/* 416DD8 802A2048 3C01802B */ lui $at, %hi(D_802AD060)
/* 416DDC 802A204C C422D060 */ lwc1 $f2, %lo(D_802AD060)($at)
/* 416DE0 802A2050 468010A0 */ cvt.s.w $f2, $f2
/* 416DE4 802A2054 46001080 */ add.s $f2, $f2, $f0
/* 416DE8 802A2058 C7A40024 */ lwc1 $f4, 0x24($sp)
/* 416DEC 802A205C 3C01802B */ lui $at, %hi(D_802AD064)
/* 416DF0 802A2060 C420D064 */ lwc1 $f0, %lo(D_802AD064)($at)
/* 416DF4 802A2064 46800020 */ cvt.s.w $f0, $f0
/* 416DF8 802A2068 46040000 */ add.s $f0, $f0, $f4
/* 416DFC 802A206C 0000382D */ daddu $a3, $zero, $zero
/* 416E00 802A2070 3C13802B */ lui $s3, %hi(D_802AD040)
/* 416E04 802A2074 8E73D040 */ lw $s3, %lo(D_802AD040)($s3)
/* 416E08 802A2078 46000187 */ neg.s $f6, $f0
/* 416E0C 802A207C 44051000 */ mfc1 $a1, $f2
/* 416E10 802A2080 44063000 */ mfc1 $a2, $f6
/* 416E14 802A2084 0260202D */ daddu $a0, $s3, $zero
/* 416E18 802A2088 E7A00024 */ swc1 $f0, 0x24($sp)
/* 416E1C 802A208C 0C051461 */ jal hud_element_set_transform_pos
/* 416E20 802A2090 AFA50020 */ sw $a1, 0x20($sp)
/* 416E24 802A2094 0260202D */ daddu $a0, $s3, $zero
/* 416E28 802A2098 0000282D */ daddu $a1, $zero, $zero
/* 416E2C 802A209C 0C051261 */ jal hud_element_set_render_pos
/* 416E30 802A20A0 00A0302D */ daddu $a2, $a1, $zero
/* 416E34 802A20A4 00102900 */ sll $a1, $s0, 4
/* 416E38 802A20A8 00B02823 */ subu $a1, $a1, $s0
/* 416E3C 802A20AC 00052880 */ sll $a1, $a1, 2
/* 416E40 802A20B0 00B10018 */ mult $a1, $s1
/* 416E44 802A20B4 0260202D */ daddu $a0, $s3, $zero
/* 416E48 802A20B8 00004010 */ mfhi $t0
/* 416E4C 802A20BC 01051021 */ addu $v0, $t0, $a1
/* 416E50 802A20C0 000211C3 */ sra $v0, $v0, 7
/* 416E54 802A20C4 00052FC3 */ sra $a1, $a1, 0x1f
/* 416E58 802A20C8 0C0513AC */ jal hud_element_set_alpha
/* 416E5C 802A20CC 00452823 */ subu $a1, $v0, $a1
/* 416E60 802A20D0 3C053F99 */ lui $a1, 0x3f99
/* 416E64 802A20D4 34A5999A */ ori $a1, $a1, 0x999a
/* 416E68 802A20D8 0C051308 */ jal hud_element_set_scale
/* 416E6C 802A20DC 0260202D */ daddu $a0, $s3, $zero
/* 416E70 802A20E0 16E00005 */ bnez $s7, .L802A20F8
/* 416E74 802A20E4 0260202D */ daddu $a0, $s3, $zero
/* 416E78 802A20E8 0C051280 */ jal hud_element_set_flags
/* 416E7C 802A20EC 24050002 */ addiu $a1, $zero, 2
/* 416E80 802A20F0 080A8840 */ j .L802A2100
/* 416E84 802A20F4 00000000 */ nop
.L802A20F8:
/* 416E88 802A20F8 0C05128B */ jal hud_element_clear_flags
/* 416E8C 802A20FC 24050002 */ addiu $a1, $zero, 2
.L802A2100:
/* 416E90 802A2100 0C05108E */ jal func_80144238
/* 416E94 802A2104 0260202D */ daddu $a0, $s3, $zero
/* 416E98 802A2108 26940001 */ addiu $s4, $s4, 1
.L802A210C:
/* 416E9C 802A210C 3C02802B */ lui $v0, %hi(main_menu_numOptions)
/* 416EA0 802A2110 8C42D0AC */ lw $v0, %lo(main_menu_numOptions)($v0)
/* 416EA4 802A2114 3C0141E0 */ lui $at, 0x41e0
/* 416EA8 802A2118 44810000 */ mtc1 $at, $f0
/* 416EAC 802A211C 0282102A */ slt $v0, $s4, $v0
/* 416EB0 802A2120 1440FF87 */ bnez $v0, .L802A1F40
/* 416EB4 802A2124 4600C600 */ add.s $f24, $f24, $f0
.L802A2128:
/* 416EB8 802A2128 3C11802B */ lui $s1, %hi(D_802AD100)
/* 416EBC 802A212C 2631D100 */ addiu $s1, $s1, %lo(D_802AD100)
/* 416EC0 802A2130 3C10802B */ lui $s0, %hi(D_802AD002)
/* 416EC4 802A2134 2610D002 */ addiu $s0, $s0, %lo(D_802AD002)
/* 416EC8 802A2138 82030000 */ lb $v1, ($s0)
/* 416ECC 802A213C 8E220000 */ lw $v0, ($s1)
/* 416ED0 802A2140 3C01802B */ lui $at, %hi(D_802AD06C)
/* 416ED4 802A2144 C420D06C */ lwc1 $f0, %lo(D_802AD06C)($at)
/* 416ED8 802A2148 00431023 */ subu $v0, $v0, $v1
/* 416EDC 802A214C 000218C0 */ sll $v1, $v0, 3
/* 416EE0 802A2150 00621823 */ subu $v1, $v1, $v0
/* 416EE4 802A2154 00031880 */ sll $v1, $v1, 2
/* 416EE8 802A2158 4483C000 */ mtc1 $v1, $f24
/* 416EEC 802A215C 00000000 */ nop
/* 416EF0 802A2160 4680C620 */ cvt.s.w $f24, $f24
/* 416EF4 802A2164 46180001 */ sub.s $f0, $f0, $f24
/* 416EF8 802A2168 3C01802B */ lui $at, %hi(D_802AB7F0)
/* 416EFC 802A216C D43AB7F0 */ ldc1 $f26, %lo(D_802AB7F0)($at)
/* 416F00 802A2170 46000021 */ cvt.d.s $f0, $f0
/* 416F04 802A2174 463A0002 */ mul.d $f0, $f0, $f26
/* 416F08 802A2178 00000000 */ nop
/* 416F0C 802A217C 3C01802B */ lui $at, %hi(D_802AB7F8)
/* 416F10 802A2180 D424B7F8 */ ldc1 $f4, %lo(D_802AB7F8)($at)
/* 416F14 802A2184 46200020 */ cvt.s.d $f0, $f0
/* 416F18 802A2188 46000005 */ abs.s $f0, $f0
/* 416F1C 802A218C 46000021 */ cvt.d.s $f0, $f0
/* 416F20 802A2190 46240001 */ sub.d $f0, $f0, $f4
/* 416F24 802A2194 3C01802B */ lui $at, %hi(D_802AB800)
/* 416F28 802A2198 D422B800 */ ldc1 $f2, %lo(D_802AB800)($at)
/* 416F2C 802A219C 46200020 */ cvt.s.d $f0, $f0
/* 416F30 802A21A0 46000005 */ abs.s $f0, $f0
/* 416F34 802A21A4 46000021 */ cvt.d.s $f0, $f0
/* 416F38 802A21A8 46240003 */ div.d $f0, $f0, $f4
/* 416F3C 802A21AC 46220000 */ add.d $f0, $f0, $f2
/* 416F40 802A21B0 12E00003 */ beqz $s7, .L802A21C0
/* 416F44 802A21B4 46200620 */ cvt.s.d $f24, $f0
/* 416F48 802A21B8 3C013F80 */ lui $at, 0x3f80
/* 416F4C 802A21BC 4481C000 */ mtc1 $at, $f24
.L802A21C0:
/* 416F50 802A21C0 0000282D */ daddu $a1, $zero, $zero
/* 416F54 802A21C4 00A0302D */ daddu $a2, $a1, $zero
/* 416F58 802A21C8 3C1E8080 */ lui $fp, 0x8080
/* 416F5C 802A21CC 37DE8081 */ ori $fp, $fp, 0x8081
/* 416F60 802A21D0 3C13802B */ lui $s3, %hi(D_802AD04C)
/* 416F64 802A21D4 8E73D04C */ lw $s3, %lo(D_802AD04C)($s3)
/* 416F68 802A21D8 4480A000 */ mtc1 $zero, $f20
/* 416F6C 802A21DC 0C05149D */ jal hud_element_set_transform_rotation_pivot
/* 416F70 802A21E0 0260202D */ daddu $a0, $s3, $zero
/* 416F74 802A21E4 4405A000 */ mfc1 $a1, $f20
/* 416F78 802A21E8 4406A000 */ mfc1 $a2, $f20
/* 416F7C 802A21EC 3C07C22C */ lui $a3, 0xc22c
/* 416F80 802A21F0 0C051489 */ jal hud_element_set_transform_rotation
/* 416F84 802A21F4 0260202D */ daddu $a0, $s3, $zero
/* 416F88 802A21F8 4405C000 */ mfc1 $a1, $f24
/* 416F8C 802A21FC 3C013F80 */ lui $at, 0x3f80
/* 416F90 802A2200 4481B000 */ mtc1 $at, $f22
/* 416F94 802A2204 0C051308 */ jal hud_element_set_scale
/* 416F98 802A2208 0260202D */ daddu $a0, $s3, $zero
/* 416F9C 802A220C 4405B000 */ mfc1 $a1, $f22
/* 416FA0 802A2210 3C063FE6 */ lui $a2, 0x3fe6
/* 416FA4 802A2214 34C66666 */ ori $a2, $a2, 0x6666
/* 416FA8 802A2218 4407B000 */ mfc1 $a3, $f22
/* 416FAC 802A221C 0C051475 */ jal hud_element_set_transform_scale
/* 416FB0 802A2220 0260202D */ daddu $a0, $s3, $zero
/* 416FB4 802A2224 00151040 */ sll $v0, $s5, 1
/* 416FB8 802A2228 0055B021 */ addu $s6, $v0, $s5
/* 416FBC 802A222C 001628C0 */ sll $a1, $s6, 3
/* 416FC0 802A2230 00B52821 */ addu $a1, $a1, $s5
/* 416FC4 802A2234 000528C0 */ sll $a1, $a1, 3
/* 416FC8 802A2238 00BE0018 */ mult $a1, $fp
/* 416FCC 802A223C 0260202D */ daddu $a0, $s3, $zero
/* 416FD0 802A2240 00004010 */ mfhi $t0
/* 416FD4 802A2244 01051021 */ addu $v0, $t0, $a1
/* 416FD8 802A2248 000211C3 */ sra $v0, $v0, 7
/* 416FDC 802A224C 00052FC3 */ sra $a1, $a1, 0x1f
/* 416FE0 802A2250 0C0513AC */ jal hud_element_set_alpha
/* 416FE4 802A2254 00452823 */ subu $a1, $v0, $a1
/* 416FE8 802A2258 0260202D */ daddu $a0, $s3, $zero
/* 416FEC 802A225C 2405004F */ addiu $a1, $zero, 0x4f
/* 416FF0 802A2260 0C051261 */ jal hud_element_set_render_pos
/* 416FF4 802A2264 240600B0 */ addiu $a2, $zero, 0xb0
/* 416FF8 802A2268 0C05108E */ jal func_80144238
/* 416FFC 802A226C 0260202D */ daddu $a0, $s3, $zero
/* 417000 802A2270 82030000 */ lb $v1, ($s0)
/* 417004 802A2274 8E220000 */ lw $v0, ($s1)
/* 417008 802A2278 3C01802B */ lui $at, %hi(D_802AD06C)
/* 41700C 802A227C C420D06C */ lwc1 $f0, %lo(D_802AD06C)($at)
/* 417010 802A2280 00431023 */ subu $v0, $v0, $v1
/* 417014 802A2284 000218C0 */ sll $v1, $v0, 3
/* 417018 802A2288 00621823 */ subu $v1, $v1, $v0
/* 41701C 802A228C 00031880 */ sll $v1, $v1, 2
/* 417020 802A2290 4483C000 */ mtc1 $v1, $f24
/* 417024 802A2294 00000000 */ nop
/* 417028 802A2298 4680C620 */ cvt.s.w $f24, $f24
/* 41702C 802A229C 46180001 */ sub.s $f0, $f0, $f24
/* 417030 802A22A0 46000021 */ cvt.d.s $f0, $f0
/* 417034 802A22A4 463A0002 */ mul.d $f0, $f0, $f26
/* 417038 802A22A8 00000000 */ nop
/* 41703C 802A22AC 4405A000 */ mfc1 $a1, $f20
/* 417040 802A22B0 3C13802B */ lui $s3, %hi(D_802AD048)
/* 417044 802A22B4 8E73D048 */ lw $s3, %lo(D_802AD048)($s3)
/* 417048 802A22B8 00A0302D */ daddu $a2, $a1, $zero
/* 41704C 802A22BC 46200620 */ cvt.s.d $f24, $f0
/* 417050 802A22C0 4600C607 */ neg.s $f24, $f24
/* 417054 802A22C4 4407C000 */ mfc1 $a3, $f24
/* 417058 802A22C8 0C051489 */ jal hud_element_set_transform_rotation
/* 41705C 802A22CC 0260202D */ daddu $a0, $s3, $zero
/* 417060 802A22D0 0260202D */ daddu $a0, $s3, $zero
/* 417064 802A22D4 24050012 */ addiu $a1, $zero, 0x12
/* 417068 802A22D8 0C05149D */ jal hud_element_set_transform_rotation_pivot
/* 41706C 802A22DC 2406FFEC */ addiu $a2, $zero, -0x14
/* 417070 802A22E0 3C053F73 */ lui $a1, 0x3f73
/* 417074 802A22E4 34A53333 */ ori $a1, $a1, 0x3333
/* 417078 802A22E8 0C051308 */ jal hud_element_set_scale
/* 41707C 802A22EC 0260202D */ daddu $a0, $s3, $zero
/* 417080 802A22F0 001511C0 */ sll $v0, $s5, 7
/* 417084 802A22F4 00551023 */ subu $v0, $v0, $s5
/* 417088 802A22F8 00021040 */ sll $v0, $v0, 1
/* 41708C 802A22FC 005E0018 */ mult $v0, $fp
/* 417090 802A2300 0000A02D */ daddu $s4, $zero, $zero
/* 417094 802A2304 0260202D */ daddu $a0, $s3, $zero
/* 417098 802A2308 00004010 */ mfhi $t0
/* 41709C 802A230C 01028021 */ addu $s0, $t0, $v0
/* 4170A0 802A2310 001081C3 */ sra $s0, $s0, 7
/* 4170A4 802A2314 000217C3 */ sra $v0, $v0, 0x1f
/* 4170A8 802A2318 02028023 */ subu $s0, $s0, $v0
/* 4170AC 802A231C 0C0513AC */ jal hud_element_set_alpha
/* 4170B0 802A2320 0200282D */ daddu $a1, $s0, $zero
/* 4170B4 802A2324 0260202D */ daddu $a0, $s3, $zero
/* 4170B8 802A2328 3C11802B */ lui $s1, %hi(D_802AD00A)
/* 4170BC 802A232C 2631D00A */ addiu $s1, $s1, %lo(D_802AD00A)
/* 4170C0 802A2330 86260000 */ lh $a2, ($s1)
/* 4170C4 802A2334 24120028 */ addiu $s2, $zero, 0x28
/* 4170C8 802A2338 02462823 */ subu $a1, $s2, $a2
/* 4170CC 802A233C 0C051261 */ jal hud_element_set_render_pos
/* 4170D0 802A2340 24C600D4 */ addiu $a2, $a2, 0xd4
/* 4170D4 802A2344 0C05108E */ jal func_80144238
/* 4170D8 802A2348 0260202D */ daddu $a0, $s3, $zero
/* 4170DC 802A234C 3C13802B */ lui $s3, %hi(D_802AD044)
/* 4170E0 802A2350 8E73D044 */ lw $s3, %lo(D_802AD044)($s3)
/* 4170E4 802A2354 0200282D */ daddu $a1, $s0, $zero
/* 4170E8 802A2358 0C0513AC */ jal hud_element_set_alpha
/* 4170EC 802A235C 0260202D */ daddu $a0, $s3, $zero
/* 4170F0 802A2360 86260000 */ lh $a2, ($s1)
/* 4170F4 802A2364 0260202D */ daddu $a0, $s3, $zero
/* 4170F8 802A2368 02462823 */ subu $a1, $s2, $a2
/* 4170FC 802A236C 0C051261 */ jal hud_element_set_render_pos
/* 417100 802A2370 24C600D4 */ addiu $a2, $a2, 0xd4
/* 417104 802A2374 4405B000 */ mfc1 $a1, $f22
/* 417108 802A2378 0C051308 */ jal hud_element_set_scale
/* 41710C 802A237C 0260202D */ daddu $a0, $s3, $zero
/* 417110 802A2380 0C05108E */ jal func_80144238
/* 417114 802A2384 0260202D */ daddu $a0, $s3, $zero
/* 417118 802A2388 3C02802B */ lui $v0, %hi(main_menu_numOptions)
/* 41711C 802A238C 8C42D0AC */ lw $v0, %lo(main_menu_numOptions)($v0)
/* 417120 802A2390 3C01802B */ lui $at, %hi(D_802AD06C)
/* 417124 802A2394 C438D06C */ lwc1 $f24, %lo(D_802AD06C)($at)
/* 417128 802A2398 1840004D */ blez $v0, .L802A24D0
/* 41712C 802A239C 00161100 */ sll $v0, $s6, 4
/* 417130 802A23A0 00561023 */ subu $v0, $v0, $s6
/* 417134 802A23A4 00021080 */ sll $v0, $v0, 2
/* 417138 802A23A8 005E0018 */ mult $v0, $fp
/* 41713C 802A23AC 24160018 */ addiu $s6, $zero, 0x18
/* 417140 802A23B0 000247C3 */ sra $t0, $v0, 0x1f
/* 417144 802A23B4 AFA80028 */ sw $t0, 0x28($sp)
/* 417148 802A23B8 3C12802B */ lui $s2, %hi(D_802AD010)
/* 41714C 802A23BC 2652D010 */ addiu $s2, $s2, %lo(D_802AD010)
/* 417150 802A23C0 00004010 */ mfhi $t0
/* 417154 802A23C4 01021021 */ addu $v0, $t0, $v0
/* 417158 802A23C8 0002F1C3 */ sra $fp, $v0, 7
.L802A23CC:
/* 41715C 802A23CC 27A40020 */ addiu $a0, $sp, 0x20
/* 417160 802A23D0 3C0642AE */ lui $a2, 0x42ae
/* 417164 802A23D4 4407C000 */ mfc1 $a3, $f24
/* 417168 802A23D8 27A50024 */ addiu $a1, $sp, 0x24
/* 41716C 802A23DC AFA00020 */ sw $zero, 0x20($sp)
/* 417170 802A23E0 0C00A7E7 */ jal add_vec2D_polar
/* 417174 802A23E4 AFA00024 */ sw $zero, 0x24($sp)
/* 417178 802A23E8 0000202D */ daddu $a0, $zero, $zero
/* 41717C 802A23EC 0080282D */ daddu $a1, $a0, $zero
/* 417180 802A23F0 0080302D */ daddu $a2, $a0, $zero
/* 417184 802A23F4 C7A00020 */ lwc1 $f0, 0x20($sp)
/* 417188 802A23F8 3C01802B */ lui $at, %hi(D_802AD060)
/* 41718C 802A23FC C424D060 */ lwc1 $f4, %lo(D_802AD060)($at)
/* 417190 802A2400 46802120 */ cvt.s.w $f4, $f4
/* 417194 802A2404 46002100 */ add.s $f4, $f4, $f0
/* 417198 802A2408 C7A20024 */ lwc1 $f2, 0x24($sp)
/* 41719C 802A240C 3C01802B */ lui $at, %hi(D_802AD064)
/* 4171A0 802A2410 C420D064 */ lwc1 $f0, %lo(D_802AD064)($at)
/* 4171A4 802A2414 46800020 */ cvt.s.w $f0, $f0
/* 4171A8 802A2418 46020000 */ add.s $f0, $f0, $f2
/* 4171AC 802A241C 0080382D */ daddu $a3, $a0, $zero
/* 4171B0 802A2420 4600218D */ trunc.w.s $f6, $f4
/* 4171B4 802A2424 44113000 */ mfc1 $s1, $f6
/* 4171B8 802A2428 4600018D */ trunc.w.s $f6, $f0
/* 4171BC 802A242C 44103000 */ mfc1 $s0, $f6
/* 4171C0 802A2430 2622FFF4 */ addiu $v0, $s1, -0xc
/* 4171C4 802A2434 3042FFFF */ andi $v0, $v0, 0xffff
/* 4171C8 802A2438 E7A40020 */ swc1 $f4, 0x20($sp)
/* 4171CC 802A243C E7A00024 */ swc1 $f0, 0x24($sp)
/* 4171D0 802A2440 AFA20010 */ sw $v0, 0x10($sp)
/* 4171D4 802A2444 2602FFF4 */ addiu $v0, $s0, -0xc
/* 4171D8 802A2448 3042FFFF */ andi $v0, $v0, 0xffff
/* 4171DC 802A244C AFA20014 */ sw $v0, 0x14($sp)
/* 4171E0 802A2450 AFB60018 */ sw $s6, 0x18($sp)
/* 4171E4 802A2454 0C099E8F */ jal btl_draw_prim_quad
/* 4171E8 802A2458 AFB6001C */ sw $s6, 0x1c($sp)
/* 4171EC 802A245C 0220282D */ daddu $a1, $s1, $zero
/* 4171F0 802A2460 8E530000 */ lw $s3, ($s2)
/* 4171F4 802A2464 0200302D */ daddu $a2, $s0, $zero
/* 4171F8 802A2468 0C051261 */ jal hud_element_set_render_pos
/* 4171FC 802A246C 0260202D */ daddu $a0, $s3, $zero
/* 417200 802A2470 8FA80028 */ lw $t0, 0x28($sp)
/* 417204 802A2474 0260202D */ daddu $a0, $s3, $zero
/* 417208 802A2478 0C0513AC */ jal hud_element_set_alpha
/* 41720C 802A247C 03C82823 */ subu $a1, $fp, $t0
/* 417210 802A2480 3C02802B */ lui $v0, %hi(D_802AD06B)
/* 417214 802A2484 8042D06B */ lb $v0, %lo(D_802AD06B)($v0)
/* 417218 802A2488 3C03802B */ lui $v1, %hi(D_802AD002)
/* 41721C 802A248C 8063D002 */ lb $v1, %lo(D_802AD002)($v1)
/* 417220 802A2490 00431021 */ addu $v0, $v0, $v1
/* 417224 802A2494 16820003 */ bne $s4, $v0, .L802A24A4
/* 417228 802A2498 0260202D */ daddu $a0, $s3, $zero
/* 41722C 802A249C 0C0513AC */ jal hud_element_set_alpha
/* 417230 802A24A0 02A0282D */ daddu $a1, $s5, $zero
.L802A24A4:
/* 417234 802A24A4 0C0511EA */ jal hud_element_draw_clipped
/* 417238 802A24A8 0260202D */ daddu $a0, $s3, $zero
/* 41723C 802A24AC 26520004 */ addiu $s2, $s2, 4
/* 417240 802A24B0 26940001 */ addiu $s4, $s4, 1
/* 417244 802A24B4 3C02802B */ lui $v0, %hi(main_menu_numOptions)
/* 417248 802A24B8 8C42D0AC */ lw $v0, %lo(main_menu_numOptions)($v0)
/* 41724C 802A24BC 3C0141E0 */ lui $at, 0x41e0
/* 417250 802A24C0 44810000 */ mtc1 $at, $f0
/* 417254 802A24C4 0282102A */ slt $v0, $s4, $v0
/* 417258 802A24C8 1440FFC0 */ bnez $v0, .L802A23CC
/* 41725C 802A24CC 4600C600 */ add.s $f24, $f24, $f0
.L802A24D0:
/* 417260 802A24D0 12E00024 */ beqz $s7, .L802A2564
/* 417264 802A24D4 0000202D */ daddu $a0, $zero, $zero
/* 417268 802A24D8 0080282D */ daddu $a1, $a0, $zero
/* 41726C 802A24DC 0080302D */ daddu $a2, $a0, $zero
/* 417270 802A24E0 0080382D */ daddu $a3, $a0, $zero
/* 417274 802A24E4 24020030 */ addiu $v0, $zero, 0x30
/* 417278 802A24E8 AFA20018 */ sw $v0, 0x18($sp)
/* 41727C 802A24EC 24020010 */ addiu $v0, $zero, 0x10
/* 417280 802A24F0 AFA2001C */ sw $v0, 0x1c($sp)
/* 417284 802A24F4 3C02802B */ lui $v0, %hi(D_802AD060)
/* 417288 802A24F8 8C42D060 */ lw $v0, %lo(D_802AD060)($v0)
/* 41728C 802A24FC 3C03802B */ lui $v1, %hi(D_802AD064)
/* 417290 802A2500 8C63D064 */ lw $v1, %lo(D_802AD064)($v1)
/* 417294 802A2504 24510014 */ addiu $s1, $v0, 0x14
/* 417298 802A2508 2470FFDE */ addiu $s0, $v1, -0x22
/* 41729C 802A250C 2442002E */ addiu $v0, $v0, 0x2e
/* 4172A0 802A2510 3042FFFF */ andi $v0, $v0, 0xffff
/* 4172A4 802A2514 AFA20010 */ sw $v0, 0x10($sp)
/* 4172A8 802A2518 3202FFFF */ andi $v0, $s0, 0xffff
/* 4172AC 802A251C 0C099E8F */ jal btl_draw_prim_quad
/* 4172B0 802A2520 AFA20014 */ sw $v0, 0x14($sp)
/* 4172B4 802A2524 0220282D */ daddu $a1, $s1, $zero
/* 4172B8 802A2528 0200302D */ daddu $a2, $s0, $zero
/* 4172BC 802A252C 3C03802B */ lui $v1, %hi(D_802AD002)
/* 4172C0 802A2530 8063D002 */ lb $v1, %lo(D_802AD002)($v1)
/* 4172C4 802A2534 3C04802B */ lui $a0, %hi(D_802AD06B)
/* 4172C8 802A2538 8084D06B */ lb $a0, %lo(D_802AD06B)($a0)
/* 4172CC 802A253C 24020035 */ addiu $v0, $zero, 0x35
/* 4172D0 802A2540 AFA20010 */ sw $v0, 0x10($sp)
/* 4172D4 802A2544 AFA00014 */ sw $zero, 0x14($sp)
/* 4172D8 802A2548 00641821 */ addu $v1, $v1, $a0
/* 4172DC 802A254C 00031880 */ sll $v1, $v1, 2
/* 4172E0 802A2550 3C04802B */ lui $a0, %hi(battle_menu_messageIDs)
/* 4172E4 802A2554 00832021 */ addu $a0, $a0, $v1
/* 4172E8 802A2558 8C84D090 */ lw $a0, %lo(battle_menu_messageIDs)($a0)
/* 4172EC 802A255C 0C04993B */ jal draw_msg
/* 4172F0 802A2560 02A0382D */ daddu $a3, $s5, $zero
.L802A2564:
/* 4172F4 802A2564 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 4172F8 802A2568 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 4172FC 802A256C 8C820000 */ lw $v0, ($a0)
/* 417300 802A2570 3C030200 */ lui $v1, 0x200
/* 417304 802A2574 00431024 */ and $v0, $v0, $v1
/* 417308 802A2578 14400005 */ bnez $v0, .L802A2590
/* 41730C 802A257C 00000000 */ nop
/* 417310 802A2580 8C820004 */ lw $v0, 4($a0)
/* 417314 802A2584 30420040 */ andi $v0, $v0, 0x40
/* 417318 802A2588 10400003 */ beqz $v0, .L802A2598
/* 41731C 802A258C 00000000 */ nop
.L802A2590:
/* 417320 802A2590 3C01802B */ lui $at, %hi(D_802AD104)
/* 417324 802A2594 AC20D104 */ sw $zero, %lo(D_802AD104)($at)
.L802A2598:
/* 417328 802A2598 3C02802B */ lui $v0, %hi(D_802AD104)
/* 41732C 802A259C 8C42D104 */ lw $v0, %lo(D_802AD104)($v0)
/* 417330 802A25A0 10400028 */ beqz $v0, .L802A2644_4173D4
/* 417334 802A25A4 3C028080 */ lui $v0, 0x8080
/* 417338 802A25A8 34428081 */ ori $v0, $v0, 0x8081
/* 41733C 802A25AC 00152840 */ sll $a1, $s5, 1
/* 417340 802A25B0 00B52821 */ addu $a1, $a1, $s5
/* 417344 802A25B4 000528C0 */ sll $a1, $a1, 3
/* 417348 802A25B8 00B52821 */ addu $a1, $a1, $s5
/* 41734C 802A25BC 000528C0 */ sll $a1, $a1, 3
/* 417350 802A25C0 00A20018 */ mult $a1, $v0
/* 417354 802A25C4 3C13802B */ lui $s3, %hi(D_802AD05C)
/* 417358 802A25C8 8E73D05C */ lw $s3, %lo(D_802AD05C)($s3)
/* 41735C 802A25CC 0260202D */ daddu $a0, $s3, $zero
/* 417360 802A25D0 00004010 */ mfhi $t0
/* 417364 802A25D4 01051021 */ addu $v0, $t0, $a1
/* 417368 802A25D8 000211C3 */ sra $v0, $v0, 7
/* 41736C 802A25DC 00052FC3 */ sra $a1, $a1, 0x1f
/* 417370 802A25E0 0C0513AC */ jal hud_element_set_alpha
/* 417374 802A25E4 00452823 */ subu $a1, $v0, $a1
/* 417378 802A25E8 0C0511EA */ jal hud_element_draw_clipped
/* 41737C 802A25EC 0260202D */ daddu $a0, $s3, $zero
/* 417380 802A25F0 3C13802B */ lui $s3, %hi(D_802AD050)
/* 417384 802A25F4 8E73D050 */ lw $s3, %lo(D_802AD050)($s3)
/* 417388 802A25F8 02A0282D */ daddu $a1, $s5, $zero
/* 41738C 802A25FC 0C0513AC */ jal hud_element_set_alpha
/* 417390 802A2600 0260202D */ daddu $a0, $s3, $zero
/* 417394 802A2604 0C0511EA */ jal hud_element_draw_clipped
/* 417398 802A2608 0260202D */ daddu $a0, $s3, $zero
/* 41739C 802A260C 3C13802B */ lui $s3, %hi(D_802AD054)
/* 4173A0 802A2610 8E73D054 */ lw $s3, %lo(D_802AD054)($s3)
/* 4173A4 802A2614 02A0282D */ daddu $a1, $s5, $zero
/* 4173A8 802A2618 0C0513AC */ jal hud_element_set_alpha
/* 4173AC 802A261C 0260202D */ daddu $a0, $s3, $zero
/* 4173B0 802A2620 0C0511EA */ jal hud_element_draw_clipped
/* 4173B4 802A2624 0260202D */ daddu $a0, $s3, $zero
/* 4173B8 802A2628 3C13802B */ lui $s3, %hi(D_802AD058)
/* 4173BC 802A262C 8E73D058 */ lw $s3, %lo(D_802AD058)($s3)
/* 4173C0 802A2630 02A0282D */ daddu $a1, $s5, $zero
/* 4173C4 802A2634 0C0513AC */ jal hud_element_set_alpha
/* 4173C8 802A2638 0260202D */ daddu $a0, $s3, $zero
/* 4173CC 802A263C 0C0511EA */ jal hud_element_draw_clipped
/* 4173D0 802A2640 0260202D */ daddu $a0, $s3, $zero
.L802A2644_4173D4:
/* 4173D4 802A2644 8FBF0054 */ lw $ra, 0x54($sp)
/* 4173D8 802A2648 8FBE0050 */ lw $fp, 0x50($sp)
/* 4173DC 802A264C 8FB7004C */ lw $s7, 0x4c($sp)
/* 4173E0 802A2650 8FB60048 */ lw $s6, 0x48($sp)
/* 4173E4 802A2654 8FB50044 */ lw $s5, 0x44($sp)
/* 4173E8 802A2658 8FB40040 */ lw $s4, 0x40($sp)
/* 4173EC 802A265C 8FB3003C */ lw $s3, 0x3c($sp)
/* 4173F0 802A2660 8FB20038 */ lw $s2, 0x38($sp)
/* 4173F4 802A2664 8FB10034 */ lw $s1, 0x34($sp)
/* 4173F8 802A2668 8FB00030 */ lw $s0, 0x30($sp)
/* 4173FC 802A266C D7BA0070 */ ldc1 $f26, 0x70($sp)
/* 417400 802A2670 D7B80068 */ ldc1 $f24, 0x68($sp)
/* 417404 802A2674 D7B60060 */ ldc1 $f22, 0x60($sp)
/* 417408 802A2678 D7B40058 */ ldc1 $f20, 0x58($sp)
/* 41740C 802A267C 03E00008 */ jr $ra
/* 417410 802A2680 27BD0078 */ addiu $sp, $sp, 0x78

View File

@ -1,356 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_802ACBB0
.word .L802A9B9C_41E92C, .L802A9ED4_41EC64, .L802A9F60_41ECF0, .L802AA038_41EDC8, .L802A9FB0_41ED40, .L802A9FDC_41ED6C, .L802AA038_41EDC8, .L802AA038_41EDC8, .L802A9FEC_41ED7C, .L802AA010_41EDA0, .L802A9C04_41E994, .L802A9DAC_41EB3C
.section .text
glabel btl_state_update_peach_menu
/* 41E8D4 802A9B44 3C03800E */ lui $v1, %hi(gBattleState2)
/* 41E8D8 802A9B48 8C63C4DC */ lw $v1, %lo(gBattleState2)($v1)
/* 41E8DC 802A9B4C 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 41E8E0 802A9B50 AFB20018 */ sw $s2, 0x18($sp)
/* 41E8E4 802A9B54 3C12800E */ lui $s2, %hi(gBattleStatus)
/* 41E8E8 802A9B58 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus)
/* 41E8EC 802A9B5C AFBF001C */ sw $ra, 0x1c($sp)
/* 41E8F0 802A9B60 AFB10014 */ sw $s1, 0x14($sp)
/* 41E8F4 802A9B64 AFB00010 */ sw $s0, 0x10($sp)
/* 41E8F8 802A9B68 F7B80030 */ sdc1 $f24, 0x30($sp)
/* 41E8FC 802A9B6C F7B60028 */ sdc1 $f22, 0x28($sp)
/* 41E900 802A9B70 F7B40020 */ sdc1 $f20, 0x20($sp)
/* 41E904 802A9B74 8E5000D8 */ lw $s0, 0xd8($s2)
/* 41E908 802A9B78 8E5100DC */ lw $s1, 0xdc($s2)
/* 41E90C 802A9B7C 2C62000C */ sltiu $v0, $v1, 0xc
/* 41E910 802A9B80 1040012D */ beqz $v0, .L802AA038_41EDC8
/* 41E914 802A9B84 00031080 */ sll $v0, $v1, 2
/* 41E918 802A9B88 3C01802B */ lui $at, %hi(jtbl_802ACBB0)
/* 41E91C 802A9B8C 00220821 */ addu $at, $at, $v0
/* 41E920 802A9B90 8C22CBB0 */ lw $v0, %lo(jtbl_802ACBB0)($at)
/* 41E924 802A9B94 00400008 */ jr $v0
/* 41E928 802A9B98 00000000 */ nop
.L802A9B9C_41E92C:
/* 41E92C 802A9B9C 0C093903 */ jal btl_cam_use_preset
/* 41E930 802A9BA0 24040002 */ addiu $a0, $zero, 2
/* 41E934 802A9BA4 0C093936 */ jal btl_cam_move
/* 41E938 802A9BA8 2404000A */ addiu $a0, $zero, 0xa
/* 41E93C 802A9BAC 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 41E940 802A9BB0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 41E944 802A9BB4 3C030010 */ lui $v1, 0x10
/* 41E948 802A9BB8 00431024 */ and $v0, $v0, $v1
/* 41E94C 802A9BBC 14400003 */ bnez $v0, .L802A9BCC
/* 41E950 802A9BC0 2402000A */ addiu $v0, $zero, 0xa
/* 41E954 802A9BC4 080AA80C */ j .L802AA030
/* 41E958 802A9BC8 2402000B */ addiu $v0, $zero, 0xb
.L802A9BCC:
/* 41E95C 802A9BCC C6000138 */ lwc1 $f0, 0x138($s0)
/* 41E960 802A9BD0 C6020140 */ lwc1 $f2, 0x140($s0)
/* 41E964 802A9BD4 E600000C */ swc1 $f0, 0xc($s0)
/* 41E968 802A9BD8 E6020014 */ swc1 $f2, 0x14($s0)
/* 41E96C 802A9BDC C6200138 */ lwc1 $f0, 0x138($s1)
/* 41E970 802A9BE0 3C01800E */ lui $at, %hi(gBattleState2)
/* 41E974 802A9BE4 AC22C4DC */ sw $v0, %lo(gBattleState2)($at)
/* 41E978 802A9BE8 E6000018 */ swc1 $f0, 0x18($s0)
/* 41E97C 802A9BEC C6200140 */ lwc1 $f0, 0x140($s1)
/* 41E980 802A9BF0 24020004 */ addiu $v0, $zero, 4
/* 41E984 802A9BF4 A6020070 */ sh $v0, 0x70($s0)
/* 41E988 802A9BF8 AE000054 */ sw $zero, 0x54($s0)
/* 41E98C 802A9BFC 080AA80E */ j .L802AA038_41EDC8
/* 41E990 802A9C00 E6000020 */ swc1 $f0, 0x20($s0)
.L802A9C04_41E994:
/* 41E994 802A9C04 86020070 */ lh $v0, 0x70($s0)
/* 41E998 802A9C08 10400022 */ beqz $v0, .L802A9C94
/* 41E99C 802A9C0C 00000000 */ nop
/* 41E9A0 802A9C10 C6000018 */ lwc1 $f0, 0x18($s0)
/* 41E9A4 802A9C14 C6080144 */ lwc1 $f8, 0x144($s0)
/* 41E9A8 802A9C18 C6020020 */ lwc1 $f2, 0x20($s0)
/* 41E9AC 802A9C1C 46080001 */ sub.s $f0, $f0, $f8
/* 41E9B0 802A9C20 C604014C */ lwc1 $f4, 0x14c($s0)
/* 41E9B4 802A9C24 46041081 */ sub.s $f2, $f2, $f4
/* 41E9B8 802A9C28 44823000 */ mtc1 $v0, $f6
/* 41E9BC 802A9C2C 00000000 */ nop
/* 41E9C0 802A9C30 468031A0 */ cvt.s.w $f6, $f6
/* 41E9C4 802A9C34 46060003 */ div.s $f0, $f0, $f6
/* 41E9C8 802A9C38 46004200 */ add.s $f8, $f8, $f0
/* 41E9CC 802A9C3C 46003006 */ mov.s $f0, $f6
/* 41E9D0 802A9C40 46061083 */ div.s $f2, $f2, $f6
/* 41E9D4 802A9C44 C600000C */ lwc1 $f0, 0xc($s0)
/* 41E9D8 802A9C48 46022100 */ add.s $f4, $f4, $f2
/* 41E9DC 802A9C4C E6080144 */ swc1 $f8, 0x144($s0)
/* 41E9E0 802A9C50 E604014C */ swc1 $f4, 0x14c($s0)
/* 41E9E4 802A9C54 C6240144 */ lwc1 $f4, 0x144($s1)
/* 41E9E8 802A9C58 46040001 */ sub.s $f0, $f0, $f4
/* 41E9EC 802A9C5C 46003086 */ mov.s $f2, $f6
/* 41E9F0 802A9C60 46060003 */ div.s $f0, $f0, $f6
/* 41E9F4 802A9C64 46002100 */ add.s $f4, $f4, $f0
/* 41E9F8 802A9C68 E6240144 */ swc1 $f4, 0x144($s1)
/* 41E9FC 802A9C6C C6000014 */ lwc1 $f0, 0x14($s0)
/* 41EA00 802A9C70 C624014C */ lwc1 $f4, 0x14c($s1)
/* 41EA04 802A9C74 86020070 */ lh $v0, 0x70($s0)
/* 41EA08 802A9C78 46040001 */ sub.s $f0, $f0, $f4
/* 41EA0C 802A9C7C 44821000 */ mtc1 $v0, $f2
/* 41EA10 802A9C80 00000000 */ nop
/* 41EA14 802A9C84 468010A0 */ cvt.s.w $f2, $f2
/* 41EA18 802A9C88 46020003 */ div.s $f0, $f0, $f2
/* 41EA1C 802A9C8C 46002100 */ add.s $f4, $f4, $f0
/* 41EA20 802A9C90 E624014C */ swc1 $f4, 0x14c($s1)
.L802A9C94:
/* 41EA24 802A9C94 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 41EA28 802A9C98 3C0140C9 */ lui $at, 0x40c9
/* 41EA2C 802A9C9C 34210FD0 */ ori $at, $at, 0xfd0
/* 41EA30 802A9CA0 4481B000 */ mtc1 $at, $f22
/* 41EA34 802A9CA4 00000000 */ nop
/* 41EA38 802A9CA8 46166302 */ mul.s $f12, $f12, $f22
/* 41EA3C 802A9CAC 00000000 */ nop
/* 41EA40 802A9CB0 3C0143B4 */ lui $at, 0x43b4
/* 41EA44 802A9CB4 4481C000 */ mtc1 $at, $f24
/* 41EA48 802A9CB8 3C014180 */ lui $at, 0x4180
/* 41EA4C 802A9CBC 4481A000 */ mtc1 $at, $f20
/* 41EA50 802A9CC0 0C00A85B */ jal sin_rad
/* 41EA54 802A9CC4 46186303 */ div.s $f12, $f12, $f24
/* 41EA58 802A9CC8 46140002 */ mul.s $f0, $f0, $f20
/* 41EA5C 802A9CCC 00000000 */ nop
/* 41EA60 802A9CD0 C602014C */ lwc1 $f2, 0x14c($s0)
/* 41EA64 802A9CD4 46001081 */ sub.s $f2, $f2, $f0
/* 41EA68 802A9CD8 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 41EA6C 802A9CDC 46006307 */ neg.s $f12, $f12
/* 41EA70 802A9CE0 0C00A6C9 */ jal clamp_angle
/* 41EA74 802A9CE4 E602014C */ swc1 $f2, 0x14c($s0)
/* 41EA78 802A9CE8 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 41EA7C 802A9CEC 46166302 */ mul.s $f12, $f12, $f22
/* 41EA80 802A9CF0 00000000 */ nop
/* 41EA84 802A9CF4 E600018C */ swc1 $f0, 0x18c($s0)
/* 41EA88 802A9CF8 0C00A85B */ jal sin_rad
/* 41EA8C 802A9CFC 46186303 */ div.s $f12, $f12, $f24
/* 41EA90 802A9D00 46140002 */ mul.s $f0, $f0, $f20
/* 41EA94 802A9D04 00000000 */ nop
/* 41EA98 802A9D08 C622014C */ lwc1 $f2, 0x14c($s1)
/* 41EA9C 802A9D0C 46001080 */ add.s $f2, $f2, $f0
/* 41EAA0 802A9D10 E622014C */ swc1 $f2, 0x14c($s1)
/* 41EAA4 802A9D14 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 41EAA8 802A9D18 0C00A6C9 */ jal clamp_angle
/* 41EAAC 802A9D1C 46006307 */ neg.s $f12, $f12
/* 41EAB0 802A9D20 E620018C */ swc1 $f0, 0x18c($s1)
/* 41EAB4 802A9D24 C6000054 */ lwc1 $f0, 0x54($s0)
/* 41EAB8 802A9D28 3C0142B4 */ lui $at, 0x42b4
/* 41EABC 802A9D2C 44811000 */ mtc1 $at, $f2
/* 41EAC0 802A9D30 86020070 */ lh $v0, 0x70($s0)
/* 41EAC4 802A9D34 46020000 */ add.s $f0, $f0, $f2
/* 41EAC8 802A9D38 96030070 */ lhu $v1, 0x70($s0)
/* 41EACC 802A9D3C 10400004 */ beqz $v0, .L802A9D50
/* 41EAD0 802A9D40 E6000054 */ swc1 $f0, 0x54($s0)
/* 41EAD4 802A9D44 2462FFFF */ addiu $v0, $v1, -1
/* 41EAD8 802A9D48 080AA80E */ j .L802AA038_41EDC8
/* 41EADC 802A9D4C A6020070 */ sh $v0, 0x70($s0)
.L802A9D50:
/* 41EAE0 802A9D50 C6000018 */ lwc1 $f0, 0x18($s0)
/* 41EAE4 802A9D54 C6020020 */ lwc1 $f2, 0x20($s0)
/* 41EAE8 802A9D58 C604000C */ lwc1 $f4, 0xc($s0)
/* 41EAEC 802A9D5C E6000144 */ swc1 $f0, 0x144($s0)
/* 41EAF0 802A9D60 E602014C */ swc1 $f2, 0x14c($s0)
/* 41EAF4 802A9D64 E6240144 */ swc1 $f4, 0x144($s1)
/* 41EAF8 802A9D68 C6000014 */ lwc1 $f0, 0x14($s0)
/* 41EAFC 802A9D6C E620014C */ swc1 $f0, 0x14c($s1)
/* 41EB00 802A9D70 C6000144 */ lwc1 $f0, 0x144($s0)
/* 41EB04 802A9D74 C602014C */ lwc1 $f2, 0x14c($s0)
/* 41EB08 802A9D78 3C04FFEF */ lui $a0, 0xffef
/* 41EB0C 802A9D7C E6000138 */ swc1 $f0, 0x138($s0)
/* 41EB10 802A9D80 E6020140 */ swc1 $f2, 0x140($s0)
/* 41EB14 802A9D84 C6200144 */ lwc1 $f0, 0x144($s1)
/* 41EB18 802A9D88 C622014C */ lwc1 $f2, 0x14c($s1)
/* 41EB1C 802A9D8C 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 41EB20 802A9D90 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 41EB24 802A9D94 E6200138 */ swc1 $f0, 0x138($s1)
/* 41EB28 802A9D98 E6220140 */ swc1 $f2, 0x140($s1)
/* 41EB2C 802A9D9C 8C620000 */ lw $v0, ($v1)
/* 41EB30 802A9DA0 3484FFFF */ ori $a0, $a0, 0xffff
/* 41EB34 802A9DA4 00441024 */ and $v0, $v0, $a0
/* 41EB38 802A9DA8 AC620000 */ sw $v0, ($v1)
.L802A9DAC_41EB3C:
/* 41EB3C 802A9DAC 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 41EB40 802A9DB0 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 41EB44 802A9DB4 8C620000 */ lw $v0, ($v1)
/* 41EB48 802A9DB8 3C04FBFF */ lui $a0, 0xfbff
/* 41EB4C 802A9DBC 34420002 */ ori $v0, $v0, 2
/* 41EB50 802A9DC0 AC620000 */ sw $v0, ($v1)
/* 41EB54 802A9DC4 8E020000 */ lw $v0, ($s0)
/* 41EB58 802A9DC8 3484FFFF */ ori $a0, $a0, 0xffff
/* 41EB5C 802A9DCC 00441024 */ and $v0, $v0, $a0
/* 41EB60 802A9DD0 3C040800 */ lui $a0, 0x800
/* 41EB64 802A9DD4 00441025 */ or $v0, $v0, $a0
/* 41EB68 802A9DD8 12200006 */ beqz $s1, .L802A9DF4
/* 41EB6C 802A9DDC AE020000 */ sw $v0, ($s0)
/* 41EB70 802A9DE0 8E220000 */ lw $v0, ($s1)
/* 41EB74 802A9DE4 3C030400 */ lui $v1, 0x400
/* 41EB78 802A9DE8 00431025 */ or $v0, $v0, $v1
/* 41EB7C 802A9DEC 00441025 */ or $v0, $v0, $a0
/* 41EB80 802A9DF0 AE220000 */ sw $v0, ($s1)
.L802A9DF4:
/* 41EB84 802A9DF4 24020008 */ addiu $v0, $zero, 8
/* 41EB88 802A9DF8 3C07802B */ lui $a3, %hi(battle_menu_isEnabled)
/* 41EB8C 802A9DFC 24E7D0D0 */ addiu $a3, $a3, %lo(battle_menu_isEnabled)
/* 41EB90 802A9E00 A640017C */ sh $zero, 0x17c($s2)
/* 41EB94 802A9E04 3C01802B */ lui $at, %hi(battle_menu_submenuIDs)
/* 41EB98 802A9E08 AC22D0B8 */ sw $v0, %lo(battle_menu_submenuIDs)($at)
/* 41EB9C 802A9E0C 24020001 */ addiu $v0, $zero, 1
/* 41EBA0 802A9E10 3C08802B */ lui $t0, %hi(battle_menu_isMessageDisabled)
/* 41EBA4 802A9E14 2508D0E8 */ addiu $t0, $t0, %lo(battle_menu_isMessageDisabled)
/* 41EBA8 802A9E18 3C06802B */ lui $a2, %hi(battle_menu_PeachStarPowerHudScripts)
/* 41EBAC 802A9E1C 24C6B720 */ addiu $a2, $a2, %lo(battle_menu_PeachStarPowerHudScripts)
/* 41EBB0 802A9E20 3C05802B */ lui $a1, %hi(main_battle_menu_JumpHudScripts)
/* 41EBB4 802A9E24 24A5D078 */ addiu $a1, $a1, %lo(main_battle_menu_JumpHudScripts)
/* 41EBB8 802A9E28 ACE20000 */ sw $v0, ($a3)
/* 41EBBC 802A9E2C AD000000 */ sw $zero, ($t0)
/* 41EBC0 802A9E30 8CC30000 */ lw $v1, ($a2)
/* 41EBC4 802A9E34 96420070 */ lhu $v0, 0x70($s2)
/* 41EBC8 802A9E38 3C04802B */ lui $a0, %hi(D_802AB728)
/* 41EBCC 802A9E3C 8C84B728 */ lw $a0, %lo(D_802AB728)($a0)
/* 41EBD0 802A9E40 30420100 */ andi $v0, $v0, 0x100
/* 41EBD4 802A9E44 ACA30000 */ sw $v1, ($a1)
/* 41EBD8 802A9E48 3C01802B */ lui $at, %hi(battle_menu_messageIDs)
/* 41EBDC 802A9E4C AC24D090 */ sw $a0, %lo(battle_menu_messageIDs)($at)
/* 41EBE0 802A9E50 14400006 */ bnez $v0, .L802A9E6C
/* 41EBE4 802A9E54 0000882D */ daddu $s1, $zero, $zero
/* 41EBE8 802A9E58 ACE00000 */ sw $zero, ($a3)
/* 41EBEC 802A9E5C 8CC30004 */ lw $v1, 4($a2)
/* 41EBF0 802A9E60 24020048 */ addiu $v0, $zero, 0x48
/* 41EBF4 802A9E64 AD020000 */ sw $v0, ($t0)
/* 41EBF8 802A9E68 ACA30000 */ sw $v1, ($a1)
.L802A9E6C:
/* 41EBFC 802A9E6C 0C0AA6CC */ jal func_802A9B30
/* 41EC00 802A9E70 24100001 */ addiu $s0, $zero, 1
/* 41EC04 802A9E74 10400005 */ beqz $v0, .L802A9E8C
/* 41EC08 802A9E78 24020002 */ addiu $v0, $zero, 2
/* 41EC0C 802A9E7C 3C01802B */ lui $at, %hi(D_802AD104)
/* 41EC10 802A9E80 AC30D104 */ sw $s0, %lo(D_802AD104)($at)
/* 41EC14 802A9E84 080AA7A6 */ j .L802A9E98
/* 41EC18 802A9E88 00511023 */ subu $v0, $v0, $s1
.L802A9E8C:
/* 41EC1C 802A9E8C 3C01802B */ lui $at, %hi(D_802AD104)
/* 41EC20 802A9E90 AC20D104 */ sw $zero, %lo(D_802AD104)($at)
/* 41EC24 802A9E94 00511023 */ subu $v0, $v0, $s1
.L802A9E98:
/* 41EC28 802A9E98 3C01802B */ lui $at, %hi(main_menu_numOptions)
/* 41EC2C 802A9E9C AC30D0AC */ sw $s0, %lo(main_menu_numOptions)($at)
/* 41EC30 802A9EA0 3C01802B */ lui $at, %hi(D_802AD0A8)
/* 41EC34 802A9EA4 AC20D0A8 */ sw $zero, %lo(D_802AD0A8)($at)
/* 41EC38 802A9EA8 3C01802B */ lui $at, %hi(D_802AD0B0)
/* 41EC3C 802A9EAC AC20D0B0 */ sw $zero, %lo(D_802AD0B0)($at)
/* 41EC40 802A9EB0 3C01802B */ lui $at, %hi(D_802AD100)
/* 41EC44 802A9EB4 AC22D100 */ sw $v0, %lo(D_802AD100)($at)
/* 41EC48 802A9EB8 0C0A8400 */ jal func_802A1000
/* 41EC4C 802A9EBC 00000000 */ nop
/* 41EC50 802A9EC0 24020008 */ addiu $v0, $zero, 8
/* 41EC54 802A9EC4 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41EC58 802A9EC8 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41EC5C 802A9ECC 080AA80C */ j .L802AA030
/* 41EC60 802A9ED0 24020001 */ addiu $v0, $zero, 1
.L802A9ED4_41EC64:
/* 41EC64 802A9ED4 0000202D */ daddu $a0, $zero, $zero
/* 41EC68 802A9ED8 0080282D */ daddu $a1, $a0, $zero
/* 41EC6C 802A9EDC 3C06000C */ lui $a2, 0xc
/* 41EC70 802A9EE0 0C098F3F */ jal set_animation
/* 41EC74 802A9EE4 34C60009 */ ori $a2, $a2, 9
/* 41EC78 802A9EE8 0C0A846C */ jal func_802A11B0
/* 41EC7C 802A9EEC 00000000 */ nop
/* 41EC80 802A9EF0 3C11802B */ lui $s1, %hi(D_802ACC60)
/* 41EC84 802A9EF4 2631CC60 */ addiu $s1, $s1, %lo(D_802ACC60)
/* 41EC88 802A9EF8 8E230000 */ lw $v1, ($s1)
/* 41EC8C 802A9EFC 10600004 */ beqz $v1, .L802A9F10
/* 41EC90 802A9F00 0040802D */ daddu $s0, $v0, $zero
/* 41EC94 802A9F04 2462FFFF */ addiu $v0, $v1, -1
/* 41EC98 802A9F08 080AA80E */ j .L802AA038_41EDC8
/* 41EC9C 802A9F0C AE220000 */ sw $v0, ($s1)
.L802A9F10:
/* 41ECA0 802A9F10 12000049 */ beqz $s0, .L802AA038_41EDC8
/* 41ECA4 802A9F14 0000202D */ daddu $a0, $zero, $zero
/* 41ECA8 802A9F18 0080282D */ daddu $a1, $a0, $zero
/* 41ECAC 802A9F1C 3C06000A */ lui $a2, 0xa
/* 41ECB0 802A9F20 0C098F3F */ jal set_animation
/* 41ECB4 802A9F24 34C60002 */ ori $a2, $a2, 2
/* 41ECB8 802A9F28 2602FFFF */ addiu $v0, $s0, -1
/* 41ECBC 802A9F2C 00021080 */ sll $v0, $v0, 2
/* 41ECC0 802A9F30 3C01802B */ lui $at, %hi(battle_menu_submenuIDs+0x3)
/* 41ECC4 802A9F34 00220821 */ addu $at, $at, $v0
/* 41ECC8 802A9F38 9022D0BB */ lbu $v0, %lo(battle_menu_submenuIDs+0x3)($at)
/* 41ECCC 802A9F3C 0C0A840C */ jal func_802A1030
/* 41ECD0 802A9F40 A2420048 */ sb $v0, 0x48($s2)
/* 41ECD4 802A9F44 24020008 */ addiu $v0, $zero, 8
/* 41ECD8 802A9F48 AE220000 */ sw $v0, ($s1)
/* 41ECDC 802A9F4C 24020004 */ addiu $v0, $zero, 4
/* 41ECE0 802A9F50 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41ECE4 802A9F54 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41ECE8 802A9F58 080AA80C */ j .L802AA030
/* 41ECEC 802A9F5C 24020002 */ addiu $v0, $zero, 2
.L802A9F60_41ECF0:
/* 41ECF0 802A9F60 0C0A846C */ jal func_802A11B0
/* 41ECF4 802A9F64 00000000 */ nop
/* 41ECF8 802A9F68 10400033 */ beqz $v0, .L802AA038_41EDC8
/* 41ECFC 802A9F6C 24040011 */ addiu $a0, $zero, 0x11
/* 41ED00 802A9F70 24020004 */ addiu $v0, $zero, 4
/* 41ED04 802A9F74 A642006C */ sh $v0, 0x6c($s2)
/* 41ED08 802A9F78 24020005 */ addiu $v0, $zero, 5
/* 41ED0C 802A9F7C A642006E */ sh $v0, 0x6e($s2)
/* 41ED10 802A9F80 24020008 */ addiu $v0, $zero, 8
/* 41ED14 802A9F84 A2420178 */ sb $v0, 0x178($s2)
/* 41ED18 802A9F88 24020081 */ addiu $v0, $zero, 0x81
/* 41ED1C 802A9F8C A642017C */ sh $v0, 0x17c($s2)
/* 41ED20 802A9F90 3C038009 */ lui $v1, %hi(gMoveTable+0xA18)
/* 41ED24 802A9F94 8C63FA78 */ lw $v1, %lo(gMoveTable+0xA18)($v1)
/* 41ED28 802A9F98 2402000A */ addiu $v0, $zero, 0xa
/* 41ED2C 802A9F9C A642017A */ sh $v0, 0x17a($s2)
/* 41ED30 802A9FA0 0C090464 */ jal btl_set_state
/* 41ED34 802A9FA4 AE430184 */ sw $v1, 0x184($s2)
/* 41ED38 802A9FA8 080AA80E */ j .L802AA038_41EDC8
/* 41ED3C 802A9FAC 00000000 */ nop
.L802A9FB0_41ED40:
/* 41ED40 802A9FB0 0C0A8414 */ jal func_802A1050
/* 41ED44 802A9FB4 00000000 */ nop
/* 41ED48 802A9FB8 24020001 */ addiu $v0, $zero, 1
/* 41ED4C 802A9FBC 3C01800E */ lui $at, %hi(gBattleState2)
/* 41ED50 802A9FC0 AC22C4DC */ sw $v0, %lo(gBattleState2)($at)
/* 41ED54 802A9FC4 0C0AA6D1 */ jal btl_state_update_peach_menu
/* 41ED58 802A9FC8 00000000 */ nop
/* 41ED5C 802A9FCC 0C0AA6D1 */ jal btl_state_update_peach_menu
/* 41ED60 802A9FD0 00000000 */ nop
/* 41ED64 802A9FD4 080AA80E */ j .L802AA038_41EDC8
/* 41ED68 802A9FD8 00000000 */ nop
.L802A9FDC_41ED6C:
/* 41ED6C 802A9FDC 0C0A842E */ jal func_802A10B8
/* 41ED70 802A9FE0 00000000 */ nop
/* 41ED74 802A9FE4 080AA80E */ j .L802AA038_41EDC8
/* 41ED78 802A9FE8 00000000 */ nop
.L802A9FEC_41ED7C:
/* 41ED7C 802A9FEC 24040050 */ addiu $a0, $zero, 0x50
/* 41ED80 802A9FF0 2405003C */ addiu $a1, $zero, 0x3c
/* 41ED84 802A9FF4 0C093E81 */ jal btl_show_variable_battle_message
/* 41ED88 802A9FF8 0000302D */ daddu $a2, $zero, $zero
/* 41ED8C 802A9FFC 24020001 */ addiu $v0, $zero, 1
/* 41ED90 802AA000 3C01802B */ lui $at, %hi(D_802AD607)
/* 41ED94 802AA004 A022D607 */ sb $v0, %lo(D_802AD607)($at)
/* 41ED98 802AA008 080AA80C */ j .L802AA030
/* 41ED9C 802AA00C 24020009 */ addiu $v0, $zero, 9
.L802AA010_41EDA0:
/* 41EDA0 802AA010 0C093EAD */ jal btl_is_popup_displayed
/* 41EDA4 802AA014 00000000 */ nop
/* 41EDA8 802AA018 14400007 */ bnez $v0, .L802AA038_41EDC8
/* 41EDAC 802AA01C 24020001 */ addiu $v0, $zero, 1
/* 41EDB0 802AA020 3C01802B */ lui $at, %hi(D_802AD607)
/* 41EDB4 802AA024 A020D607 */ sb $zero, %lo(D_802AD607)($at)
/* 41EDB8 802AA028 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41EDBC 802AA02C AC20CC60 */ sw $zero, %lo(D_802ACC60)($at)
.L802AA030:
/* 41EDC0 802AA030 3C01800E */ lui $at, %hi(gBattleState2)
/* 41EDC4 802AA034 AC22C4DC */ sw $v0, %lo(gBattleState2)($at)
.L802AA038_41EDC8:
/* 41EDC8 802AA038 8FBF001C */ lw $ra, 0x1c($sp)
/* 41EDCC 802AA03C 8FB20018 */ lw $s2, 0x18($sp)
/* 41EDD0 802AA040 8FB10014 */ lw $s1, 0x14($sp)
/* 41EDD4 802AA044 8FB00010 */ lw $s0, 0x10($sp)
/* 41EDD8 802AA048 D7B80030 */ ldc1 $f24, 0x30($sp)
/* 41EDDC 802AA04C D7B60028 */ ldc1 $f22, 0x28($sp)
/* 41EDE0 802AA050 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 41EDE4 802AA054 03E00008 */ jr $ra
/* 41EDE8 802AA058 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -1,391 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_802ACC08
.word .L802AA110_41EEA0, .L802AA4BC_41F24C, .L802AA548_41F2D8, .L802AA61C_41F3AC, .L802AA594_41F324, .L802AA5C0_41F350, .L802AA61C_41F3AC, .L802AA61C_41F3AC, .L802AA5D0_41F360, .L802AA5F4_41F384, .L802AA1F0_41EF80, .L802AA394_41F124
.section .text
glabel btl_state_update_twink_menu
/* 41EE48 802AA0B8 3C03800E */ lui $v1, %hi(gBattleState2)
/* 41EE4C 802AA0BC 8C63C4DC */ lw $v1, %lo(gBattleState2)($v1)
/* 41EE50 802AA0C0 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 41EE54 802AA0C4 AFB20018 */ sw $s2, 0x18($sp)
/* 41EE58 802AA0C8 3C12800E */ lui $s2, %hi(gBattleStatus)
/* 41EE5C 802AA0CC 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus)
/* 41EE60 802AA0D0 AFBF001C */ sw $ra, 0x1c($sp)
/* 41EE64 802AA0D4 AFB10014 */ sw $s1, 0x14($sp)
/* 41EE68 802AA0D8 AFB00010 */ sw $s0, 0x10($sp)
/* 41EE6C 802AA0DC F7B80030 */ sdc1 $f24, 0x30($sp)
/* 41EE70 802AA0E0 F7B60028 */ sdc1 $f22, 0x28($sp)
/* 41EE74 802AA0E4 F7B40020 */ sdc1 $f20, 0x20($sp)
/* 41EE78 802AA0E8 8E5000D8 */ lw $s0, 0xd8($s2)
/* 41EE7C 802AA0EC 8E5100DC */ lw $s1, 0xdc($s2)
/* 41EE80 802AA0F0 2C62000C */ sltiu $v0, $v1, 0xc
/* 41EE84 802AA0F4 10400149 */ beqz $v0, .L802AA61C_41F3AC
/* 41EE88 802AA0F8 00031080 */ sll $v0, $v1, 2
/* 41EE8C 802AA0FC 3C01802B */ lui $at, %hi(jtbl_802ACC08)
/* 41EE90 802AA100 00220821 */ addu $at, $at, $v0
/* 41EE94 802AA104 8C22CC08 */ lw $v0, %lo(jtbl_802ACC08)($at)
/* 41EE98 802AA108 00400008 */ jr $v0
/* 41EE9C 802AA10C 00000000 */ nop
.L802AA110_41EEA0:
/* 41EEA0 802AA110 82030210 */ lb $v1, 0x210($s0)
/* 41EEA4 802AA114 38620006 */ xori $v0, $v1, 6
/* 41EEA8 802AA118 2C440001 */ sltiu $a0, $v0, 1
/* 41EEAC 802AA11C 24020003 */ addiu $v0, $zero, 3
/* 41EEB0 802AA120 50620001 */ beql $v1, $v0, .L802AA128
/* 41EEB4 802AA124 24040001 */ addiu $a0, $zero, 1
.L802AA128:
/* 41EEB8 802AA128 24120004 */ addiu $s2, $zero, 4
/* 41EEBC 802AA12C 50720001 */ beql $v1, $s2, .L802AA134
/* 41EEC0 802AA130 24040001 */ addiu $a0, $zero, 1
.L802AA134:
/* 41EEC4 802AA134 24020005 */ addiu $v0, $zero, 5
/* 41EEC8 802AA138 50620001 */ beql $v1, $v0, .L802AA140
/* 41EECC 802AA13C 24040001 */ addiu $a0, $zero, 1
.L802AA140:
/* 41EED0 802AA140 24020007 */ addiu $v0, $zero, 7
/* 41EED4 802AA144 50620001 */ beql $v1, $v0, .L802AA14C
/* 41EED8 802AA148 24040001 */ addiu $a0, $zero, 1
.L802AA14C:
/* 41EEDC 802AA14C 24020008 */ addiu $v0, $zero, 8
/* 41EEE0 802AA150 50620001 */ beql $v1, $v0, .L802AA158
/* 41EEE4 802AA154 24040001 */ addiu $a0, $zero, 1
.L802AA158:
/* 41EEE8 802AA158 82030214 */ lb $v1, 0x214($s0)
/* 41EEEC 802AA15C 2402000C */ addiu $v0, $zero, 0xc
/* 41EEF0 802AA160 50620001 */ beql $v1, $v0, .L802AA168
/* 41EEF4 802AA164 24040001 */ addiu $a0, $zero, 1
.L802AA168:
/* 41EEF8 802AA168 82030216 */ lb $v1, 0x216($s0)
/* 41EEFC 802AA16C 2402000D */ addiu $v0, $zero, 0xd
/* 41EF00 802AA170 50620001 */ beql $v1, $v0, .L802AA178
/* 41EF04 802AA174 24040001 */ addiu $a0, $zero, 1
.L802AA178:
/* 41EF08 802AA178 10800005 */ beqz $a0, .L802AA190
/* 41EF0C 802AA17C 00000000 */ nop
/* 41EF10 802AA180 0C090464 */ jal btl_set_state
/* 41EF14 802AA184 24040016 */ addiu $a0, $zero, 0x16
/* 41EF18 802AA188 080AA987 */ j .L802AA61C_41F3AC
/* 41EF1C 802AA18C 00000000 */ nop
.L802AA190:
/* 41EF20 802AA190 0C093903 */ jal btl_cam_use_preset
/* 41EF24 802AA194 24040002 */ addiu $a0, $zero, 2
/* 41EF28 802AA198 0C093936 */ jal btl_cam_move
/* 41EF2C 802AA19C 2404000A */ addiu $a0, $zero, 0xa
/* 41EF30 802AA1A0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 41EF34 802AA1A4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 41EF38 802AA1A8 3C030010 */ lui $v1, 0x10
/* 41EF3C 802AA1AC 00431024 */ and $v0, $v0, $v1
/* 41EF40 802AA1B0 14400118 */ bnez $v0, .L802AA614
/* 41EF44 802AA1B4 2402000B */ addiu $v0, $zero, 0xb
/* 41EF48 802AA1B8 C6000138 */ lwc1 $f0, 0x138($s0)
/* 41EF4C 802AA1BC C6020140 */ lwc1 $f2, 0x140($s0)
/* 41EF50 802AA1C0 E600000C */ swc1 $f0, 0xc($s0)
/* 41EF54 802AA1C4 E6020014 */ swc1 $f2, 0x14($s0)
/* 41EF58 802AA1C8 C6200138 */ lwc1 $f0, 0x138($s1)
/* 41EF5C 802AA1CC E6000018 */ swc1 $f0, 0x18($s0)
/* 41EF60 802AA1D0 C6200140 */ lwc1 $f0, 0x140($s1)
/* 41EF64 802AA1D4 2402000A */ addiu $v0, $zero, 0xa
/* 41EF68 802AA1D8 3C01800E */ lui $at, %hi(gBattleState2)
/* 41EF6C 802AA1DC AC22C4DC */ sw $v0, %lo(gBattleState2)($at)
/* 41EF70 802AA1E0 A6120070 */ sh $s2, 0x70($s0)
/* 41EF74 802AA1E4 AE000054 */ sw $zero, 0x54($s0)
/* 41EF78 802AA1E8 080AA987 */ j .L802AA61C_41F3AC
/* 41EF7C 802AA1EC E6000020 */ swc1 $f0, 0x20($s0)
.L802AA1F0_41EF80:
/* 41EF80 802AA1F0 86020070 */ lh $v0, 0x70($s0)
/* 41EF84 802AA1F4 10400022 */ beqz $v0, .L802AA280
/* 41EF88 802AA1F8 00000000 */ nop
/* 41EF8C 802AA1FC C6000018 */ lwc1 $f0, 0x18($s0)
/* 41EF90 802AA200 C6080144 */ lwc1 $f8, 0x144($s0)
/* 41EF94 802AA204 C6020020 */ lwc1 $f2, 0x20($s0)
/* 41EF98 802AA208 46080001 */ sub.s $f0, $f0, $f8
/* 41EF9C 802AA20C C604014C */ lwc1 $f4, 0x14c($s0)
/* 41EFA0 802AA210 46041081 */ sub.s $f2, $f2, $f4
/* 41EFA4 802AA214 44823000 */ mtc1 $v0, $f6
/* 41EFA8 802AA218 00000000 */ nop
/* 41EFAC 802AA21C 468031A0 */ cvt.s.w $f6, $f6
/* 41EFB0 802AA220 46060003 */ div.s $f0, $f0, $f6
/* 41EFB4 802AA224 46004200 */ add.s $f8, $f8, $f0
/* 41EFB8 802AA228 46003006 */ mov.s $f0, $f6
/* 41EFBC 802AA22C 46061083 */ div.s $f2, $f2, $f6
/* 41EFC0 802AA230 C600000C */ lwc1 $f0, 0xc($s0)
/* 41EFC4 802AA234 46022100 */ add.s $f4, $f4, $f2
/* 41EFC8 802AA238 E6080144 */ swc1 $f8, 0x144($s0)
/* 41EFCC 802AA23C E604014C */ swc1 $f4, 0x14c($s0)
/* 41EFD0 802AA240 C6240144 */ lwc1 $f4, 0x144($s1)
/* 41EFD4 802AA244 46040001 */ sub.s $f0, $f0, $f4
/* 41EFD8 802AA248 46003086 */ mov.s $f2, $f6
/* 41EFDC 802AA24C 46060003 */ div.s $f0, $f0, $f6
/* 41EFE0 802AA250 46002100 */ add.s $f4, $f4, $f0
/* 41EFE4 802AA254 E6240144 */ swc1 $f4, 0x144($s1)
/* 41EFE8 802AA258 C6000014 */ lwc1 $f0, 0x14($s0)
/* 41EFEC 802AA25C C624014C */ lwc1 $f4, 0x14c($s1)
/* 41EFF0 802AA260 86020070 */ lh $v0, 0x70($s0)
/* 41EFF4 802AA264 46040001 */ sub.s $f0, $f0, $f4
/* 41EFF8 802AA268 44821000 */ mtc1 $v0, $f2
/* 41EFFC 802AA26C 00000000 */ nop
/* 41F000 802AA270 468010A0 */ cvt.s.w $f2, $f2
/* 41F004 802AA274 46020003 */ div.s $f0, $f0, $f2
/* 41F008 802AA278 46002100 */ add.s $f4, $f4, $f0
/* 41F00C 802AA27C E624014C */ swc1 $f4, 0x14c($s1)
.L802AA280:
/* 41F010 802AA280 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 41F014 802AA284 3C0140C9 */ lui $at, 0x40c9
/* 41F018 802AA288 34210FD0 */ ori $at, $at, 0xfd0
/* 41F01C 802AA28C 4481B000 */ mtc1 $at, $f22
/* 41F020 802AA290 00000000 */ nop
/* 41F024 802AA294 46166302 */ mul.s $f12, $f12, $f22
/* 41F028 802AA298 00000000 */ nop
/* 41F02C 802AA29C 3C0143B4 */ lui $at, 0x43b4
/* 41F030 802AA2A0 4481C000 */ mtc1 $at, $f24
/* 41F034 802AA2A4 3C014180 */ lui $at, 0x4180
/* 41F038 802AA2A8 4481A000 */ mtc1 $at, $f20
/* 41F03C 802AA2AC 0C00A85B */ jal sin_rad
/* 41F040 802AA2B0 46186303 */ div.s $f12, $f12, $f24
/* 41F044 802AA2B4 46140002 */ mul.s $f0, $f0, $f20
/* 41F048 802AA2B8 00000000 */ nop
/* 41F04C 802AA2BC C602014C */ lwc1 $f2, 0x14c($s0)
/* 41F050 802AA2C0 46001080 */ add.s $f2, $f2, $f0
/* 41F054 802AA2C4 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 41F058 802AA2C8 46006307 */ neg.s $f12, $f12
/* 41F05C 802AA2CC 0C00A6C9 */ jal clamp_angle
/* 41F060 802AA2D0 E602014C */ swc1 $f2, 0x14c($s0)
/* 41F064 802AA2D4 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 41F068 802AA2D8 46166302 */ mul.s $f12, $f12, $f22
/* 41F06C 802AA2DC 00000000 */ nop
/* 41F070 802AA2E0 E600018C */ swc1 $f0, 0x18c($s0)
/* 41F074 802AA2E4 0C00A85B */ jal sin_rad
/* 41F078 802AA2E8 46186303 */ div.s $f12, $f12, $f24
/* 41F07C 802AA2EC 46140002 */ mul.s $f0, $f0, $f20
/* 41F080 802AA2F0 00000000 */ nop
/* 41F084 802AA2F4 C622014C */ lwc1 $f2, 0x14c($s1)
/* 41F088 802AA2F8 46001081 */ sub.s $f2, $f2, $f0
/* 41F08C 802AA2FC E622014C */ swc1 $f2, 0x14c($s1)
/* 41F090 802AA300 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 41F094 802AA304 0C00A6C9 */ jal clamp_angle
/* 41F098 802AA308 46006307 */ neg.s $f12, $f12
/* 41F09C 802AA30C E620018C */ swc1 $f0, 0x18c($s1)
/* 41F0A0 802AA310 C6000054 */ lwc1 $f0, 0x54($s0)
/* 41F0A4 802AA314 3C0142B4 */ lui $at, 0x42b4
/* 41F0A8 802AA318 44811000 */ mtc1 $at, $f2
/* 41F0AC 802AA31C 86020070 */ lh $v0, 0x70($s0)
/* 41F0B0 802AA320 46020000 */ add.s $f0, $f0, $f2
/* 41F0B4 802AA324 96030070 */ lhu $v1, 0x70($s0)
/* 41F0B8 802AA328 10400004 */ beqz $v0, .L802AA33C
/* 41F0BC 802AA32C E6000054 */ swc1 $f0, 0x54($s0)
/* 41F0C0 802AA330 2462FFFF */ addiu $v0, $v1, -1
/* 41F0C4 802AA334 080AA987 */ j .L802AA61C_41F3AC
/* 41F0C8 802AA338 A6020070 */ sh $v0, 0x70($s0)
.L802AA33C:
/* 41F0CC 802AA33C C6000018 */ lwc1 $f0, 0x18($s0)
/* 41F0D0 802AA340 C6020020 */ lwc1 $f2, 0x20($s0)
/* 41F0D4 802AA344 C604000C */ lwc1 $f4, 0xc($s0)
/* 41F0D8 802AA348 E6000144 */ swc1 $f0, 0x144($s0)
/* 41F0DC 802AA34C E602014C */ swc1 $f2, 0x14c($s0)
/* 41F0E0 802AA350 E6240144 */ swc1 $f4, 0x144($s1)
/* 41F0E4 802AA354 C6000014 */ lwc1 $f0, 0x14($s0)
/* 41F0E8 802AA358 E620014C */ swc1 $f0, 0x14c($s1)
/* 41F0EC 802AA35C C6000144 */ lwc1 $f0, 0x144($s0)
/* 41F0F0 802AA360 C602014C */ lwc1 $f2, 0x14c($s0)
/* 41F0F4 802AA364 E6000138 */ swc1 $f0, 0x138($s0)
/* 41F0F8 802AA368 E6020140 */ swc1 $f2, 0x140($s0)
/* 41F0FC 802AA36C C6200144 */ lwc1 $f0, 0x144($s1)
/* 41F100 802AA370 C622014C */ lwc1 $f2, 0x14c($s1)
/* 41F104 802AA374 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 41F108 802AA378 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 41F10C 802AA37C E6200138 */ swc1 $f0, 0x138($s1)
/* 41F110 802AA380 E6220140 */ swc1 $f2, 0x140($s1)
/* 41F114 802AA384 8C820000 */ lw $v0, ($a0)
/* 41F118 802AA388 3C030010 */ lui $v1, 0x10
/* 41F11C 802AA38C 00431025 */ or $v0, $v0, $v1
/* 41F120 802AA390 AC820000 */ sw $v0, ($a0)
.L802AA394_41F124:
/* 41F124 802AA394 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 41F128 802AA398 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 41F12C 802AA39C 8C620000 */ lw $v0, ($v1)
/* 41F130 802AA3A0 3C04FBFF */ lui $a0, 0xfbff
/* 41F134 802AA3A4 34420002 */ ori $v0, $v0, 2
/* 41F138 802AA3A8 AC620000 */ sw $v0, ($v1)
/* 41F13C 802AA3AC 8E020000 */ lw $v0, ($s0)
/* 41F140 802AA3B0 3484FFFF */ ori $a0, $a0, 0xffff
/* 41F144 802AA3B4 00441024 */ and $v0, $v0, $a0
/* 41F148 802AA3B8 3C040800 */ lui $a0, 0x800
/* 41F14C 802AA3BC 00441025 */ or $v0, $v0, $a0
/* 41F150 802AA3C0 12200006 */ beqz $s1, .L802AA3DC
/* 41F154 802AA3C4 AE020000 */ sw $v0, ($s0)
/* 41F158 802AA3C8 8E220000 */ lw $v0, ($s1)
/* 41F15C 802AA3CC 3C030400 */ lui $v1, 0x400
/* 41F160 802AA3D0 00431025 */ or $v0, $v0, $v1
/* 41F164 802AA3D4 00441025 */ or $v0, $v0, $a0
/* 41F168 802AA3D8 AE220000 */ sw $v0, ($s1)
.L802AA3DC:
/* 41F16C 802AA3DC 24020008 */ addiu $v0, $zero, 8
/* 41F170 802AA3E0 3C07802B */ lui $a3, %hi(battle_menu_isEnabled)
/* 41F174 802AA3E4 24E7D0D0 */ addiu $a3, $a3, %lo(battle_menu_isEnabled)
/* 41F178 802AA3E8 A640017C */ sh $zero, 0x17c($s2)
/* 41F17C 802AA3EC 3C01802B */ lui $at, %hi(battle_menu_submenuIDs)
/* 41F180 802AA3F0 AC22D0B8 */ sw $v0, %lo(battle_menu_submenuIDs)($at)
/* 41F184 802AA3F4 24020001 */ addiu $v0, $zero, 1
/* 41F188 802AA3F8 3C08802B */ lui $t0, %hi(battle_menu_isMessageDisabled)
/* 41F18C 802AA3FC 2508D0E8 */ addiu $t0, $t0, %lo(battle_menu_isMessageDisabled)
/* 41F190 802AA400 3C06802B */ lui $a2, %hi(battle_menu_TwinkStarPowerHudScripts)
/* 41F194 802AA404 24C6B72C */ addiu $a2, $a2, %lo(battle_menu_TwinkStarPowerHudScripts)
/* 41F198 802AA408 3C05802B */ lui $a1, %hi(main_battle_menu_JumpHudScripts)
/* 41F19C 802AA40C 24A5D078 */ addiu $a1, $a1, %lo(main_battle_menu_JumpHudScripts)
/* 41F1A0 802AA410 ACE20000 */ sw $v0, ($a3)
/* 41F1A4 802AA414 AD000000 */ sw $zero, ($t0)
/* 41F1A8 802AA418 8CC30000 */ lw $v1, ($a2)
/* 41F1AC 802AA41C 96420070 */ lhu $v0, 0x70($s2)
/* 41F1B0 802AA420 3C04802B */ lui $a0, %hi(D_802AB734)
/* 41F1B4 802AA424 8C84B734 */ lw $a0, %lo(D_802AB734)($a0)
/* 41F1B8 802AA428 30420100 */ andi $v0, $v0, 0x100
/* 41F1BC 802AA42C ACA30000 */ sw $v1, ($a1)
/* 41F1C0 802AA430 3C01802B */ lui $at, %hi(battle_menu_messageIDs)
/* 41F1C4 802AA434 AC24D090 */ sw $a0, %lo(battle_menu_messageIDs)($at)
/* 41F1C8 802AA438 14400006 */ bnez $v0, .L802AA454
/* 41F1CC 802AA43C 0000882D */ daddu $s1, $zero, $zero
/* 41F1D0 802AA440 ACE00000 */ sw $zero, ($a3)
/* 41F1D4 802AA444 8CC30004 */ lw $v1, 4($a2)
/* 41F1D8 802AA448 24020048 */ addiu $v0, $zero, 0x48
/* 41F1DC 802AA44C AD020000 */ sw $v0, ($t0)
/* 41F1E0 802AA450 ACA30000 */ sw $v1, ($a1)
.L802AA454:
/* 41F1E4 802AA454 0C0AA829 */ jal func_802AA0A4
/* 41F1E8 802AA458 24100001 */ addiu $s0, $zero, 1
/* 41F1EC 802AA45C 10400005 */ beqz $v0, .L802AA474
/* 41F1F0 802AA460 24020002 */ addiu $v0, $zero, 2
/* 41F1F4 802AA464 3C01802B */ lui $at, %hi(D_802AD104)
/* 41F1F8 802AA468 AC30D104 */ sw $s0, %lo(D_802AD104)($at)
/* 41F1FC 802AA46C 080AA920 */ j .L802AA480
/* 41F200 802AA470 00511023 */ subu $v0, $v0, $s1
.L802AA474:
/* 41F204 802AA474 3C01802B */ lui $at, %hi(D_802AD104)
/* 41F208 802AA478 AC20D104 */ sw $zero, %lo(D_802AD104)($at)
/* 41F20C 802AA47C 00511023 */ subu $v0, $v0, $s1
.L802AA480:
/* 41F210 802AA480 3C01802B */ lui $at, %hi(main_menu_numOptions)
/* 41F214 802AA484 AC30D0AC */ sw $s0, %lo(main_menu_numOptions)($at)
/* 41F218 802AA488 3C01802B */ lui $at, %hi(D_802AD0A8)
/* 41F21C 802AA48C AC20D0A8 */ sw $zero, %lo(D_802AD0A8)($at)
/* 41F220 802AA490 3C01802B */ lui $at, %hi(D_802AD0B0)
/* 41F224 802AA494 AC20D0B0 */ sw $zero, %lo(D_802AD0B0)($at)
/* 41F228 802AA498 3C01802B */ lui $at, %hi(D_802AD100)
/* 41F22C 802AA49C AC22D100 */ sw $v0, %lo(D_802AD100)($at)
/* 41F230 802AA4A0 0C0A8400 */ jal func_802A1000
/* 41F234 802AA4A4 00000000 */ nop
/* 41F238 802AA4A8 24020008 */ addiu $v0, $zero, 8
/* 41F23C 802AA4AC 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41F240 802AA4B0 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41F244 802AA4B4 080AA985 */ j .L802AA614
/* 41F248 802AA4B8 24020001 */ addiu $v0, $zero, 1
.L802AA4BC_41F24C:
/* 41F24C 802AA4BC 24040100 */ addiu $a0, $zero, 0x100
/* 41F250 802AA4C0 0000282D */ daddu $a1, $zero, $zero
/* 41F254 802AA4C4 3C060020 */ lui $a2, 0x20
/* 41F258 802AA4C8 0C098F3F */ jal set_animation
/* 41F25C 802AA4CC 34C60001 */ ori $a2, $a2, 1
/* 41F260 802AA4D0 0C0A846C */ jal func_802A11B0
/* 41F264 802AA4D4 00000000 */ nop
/* 41F268 802AA4D8 3C11802B */ lui $s1, %hi(D_802ACC60)
/* 41F26C 802AA4DC 2631CC60 */ addiu $s1, $s1, %lo(D_802ACC60)
/* 41F270 802AA4E0 8E230000 */ lw $v1, ($s1)
/* 41F274 802AA4E4 10600004 */ beqz $v1, .L802AA4F8
/* 41F278 802AA4E8 0040802D */ daddu $s0, $v0, $zero
/* 41F27C 802AA4EC 2462FFFF */ addiu $v0, $v1, -1
/* 41F280 802AA4F0 080AA987 */ j .L802AA61C_41F3AC
/* 41F284 802AA4F4 AE220000 */ sw $v0, ($s1)
.L802AA4F8:
/* 41F288 802AA4F8 12000048 */ beqz $s0, .L802AA61C_41F3AC
/* 41F28C 802AA4FC 24040100 */ addiu $a0, $zero, 0x100
/* 41F290 802AA500 0000282D */ daddu $a1, $zero, $zero
/* 41F294 802AA504 3C060020 */ lui $a2, 0x20
/* 41F298 802AA508 0C098F3F */ jal set_animation
/* 41F29C 802AA50C 34C60008 */ ori $a2, $a2, 8
/* 41F2A0 802AA510 2602FFFF */ addiu $v0, $s0, -1
/* 41F2A4 802AA514 00021080 */ sll $v0, $v0, 2
/* 41F2A8 802AA518 3C01802B */ lui $at, %hi(battle_menu_submenuIDs+0x3)
/* 41F2AC 802AA51C 00220821 */ addu $at, $at, $v0
/* 41F2B0 802AA520 9022D0BB */ lbu $v0, %lo(battle_menu_submenuIDs+0x3)($at)
/* 41F2B4 802AA524 0C0A840C */ jal func_802A1030
/* 41F2B8 802AA528 A2420048 */ sb $v0, 0x48($s2)
/* 41F2BC 802AA52C 24020008 */ addiu $v0, $zero, 8
/* 41F2C0 802AA530 AE220000 */ sw $v0, ($s1)
/* 41F2C4 802AA534 24020004 */ addiu $v0, $zero, 4
/* 41F2C8 802AA538 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41F2CC 802AA53C AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41F2D0 802AA540 080AA985 */ j .L802AA614
/* 41F2D4 802AA544 24020002 */ addiu $v0, $zero, 2
.L802AA548_41F2D8:
/* 41F2D8 802AA548 0C0A846C */ jal func_802A11B0
/* 41F2DC 802AA54C 00000000 */ nop
/* 41F2E0 802AA550 10400032 */ beqz $v0, .L802AA61C_41F3AC
/* 41F2E4 802AA554 24040011 */ addiu $a0, $zero, 0x11
/* 41F2E8 802AA558 24020004 */ addiu $v0, $zero, 4
/* 41F2EC 802AA55C A642006C */ sh $v0, 0x6c($s2)
/* 41F2F0 802AA560 24020005 */ addiu $v0, $zero, 5
/* 41F2F4 802AA564 A642006E */ sh $v0, 0x6e($s2)
/* 41F2F8 802AA568 24020008 */ addiu $v0, $zero, 8
/* 41F2FC 802AA56C A2420178 */ sb $v0, 0x178($s2)
/* 41F300 802AA570 3C038009 */ lui $v1, %hi(gMoveTable+0xA2C)
/* 41F304 802AA574 8C63FA8C */ lw $v1, %lo(gMoveTable+0xA2C)($v1)
/* 41F308 802AA578 24020082 */ addiu $v0, $zero, 0x82
/* 41F30C 802AA57C A642017C */ sh $v0, 0x17c($s2)
/* 41F310 802AA580 A640017A */ sh $zero, 0x17a($s2)
/* 41F314 802AA584 0C090464 */ jal btl_set_state
/* 41F318 802AA588 AE430184 */ sw $v1, 0x184($s2)
/* 41F31C 802AA58C 080AA987 */ j .L802AA61C_41F3AC
/* 41F320 802AA590 00000000 */ nop
.L802AA594_41F324:
/* 41F324 802AA594 0C0A8414 */ jal func_802A1050
/* 41F328 802AA598 00000000 */ nop
/* 41F32C 802AA59C 24020001 */ addiu $v0, $zero, 1
/* 41F330 802AA5A0 3C01800E */ lui $at, %hi(gBattleState2)
/* 41F334 802AA5A4 AC22C4DC */ sw $v0, %lo(gBattleState2)($at)
/* 41F338 802AA5A8 0C0AA82E */ jal btl_state_update_twink_menu
/* 41F33C 802AA5AC 00000000 */ nop
/* 41F340 802AA5B0 0C0AA82E */ jal btl_state_update_twink_menu
/* 41F344 802AA5B4 00000000 */ nop
/* 41F348 802AA5B8 080AA987 */ j .L802AA61C_41F3AC
/* 41F34C 802AA5BC 00000000 */ nop
.L802AA5C0_41F350:
/* 41F350 802AA5C0 0C0A842E */ jal func_802A10B8
/* 41F354 802AA5C4 00000000 */ nop
/* 41F358 802AA5C8 080AA987 */ j .L802AA61C_41F3AC
/* 41F35C 802AA5CC 00000000 */ nop
.L802AA5D0_41F360:
/* 41F360 802AA5D0 24040050 */ addiu $a0, $zero, 0x50
/* 41F364 802AA5D4 2405003C */ addiu $a1, $zero, 0x3c
/* 41F368 802AA5D8 0C093E81 */ jal btl_show_variable_battle_message
/* 41F36C 802AA5DC 0000302D */ daddu $a2, $zero, $zero
/* 41F370 802AA5E0 24020001 */ addiu $v0, $zero, 1
/* 41F374 802AA5E4 3C01802B */ lui $at, %hi(D_802AD607)
/* 41F378 802AA5E8 A022D607 */ sb $v0, %lo(D_802AD607)($at)
/* 41F37C 802AA5EC 080AA985 */ j .L802AA614
/* 41F380 802AA5F0 24020009 */ addiu $v0, $zero, 9
.L802AA5F4_41F384:
/* 41F384 802AA5F4 0C093EAD */ jal btl_is_popup_displayed
/* 41F388 802AA5F8 00000000 */ nop
/* 41F38C 802AA5FC 14400007 */ bnez $v0, .L802AA61C_41F3AC
/* 41F390 802AA600 24020001 */ addiu $v0, $zero, 1
/* 41F394 802AA604 3C01802B */ lui $at, %hi(D_802AD607)
/* 41F398 802AA608 A020D607 */ sb $zero, %lo(D_802AD607)($at)
/* 41F39C 802AA60C 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41F3A0 802AA610 AC20CC60 */ sw $zero, %lo(D_802ACC60)($at)
.L802AA614:
/* 41F3A4 802AA614 3C01800E */ lui $at, %hi(gBattleState2)
/* 41F3A8 802AA618 AC22C4DC */ sw $v0, %lo(gBattleState2)($at)
.L802AA61C_41F3AC:
/* 41F3AC 802AA61C 8FBF001C */ lw $ra, 0x1c($sp)
/* 41F3B0 802AA620 8FB20018 */ lw $s2, 0x18($sp)
/* 41F3B4 802AA624 8FB10014 */ lw $s1, 0x14($sp)
/* 41F3B8 802AA628 8FB00010 */ lw $s0, 0x10($sp)
/* 41F3BC 802AA62C D7B80030 */ ldc1 $f24, 0x30($sp)
/* 41F3C0 802AA630 D7B60028 */ ldc1 $f22, 0x28($sp)
/* 41F3C4 802AA634 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 41F3C8 802AA638 03E00008 */ jr $ra
/* 41F3CC 802AA63C 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -1,713 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802A11B0
/* 415F40 802A11B0 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 415F44 802A11B4 3C06800E */ lui $a2, %hi(gBattleStatus)
/* 415F48 802A11B8 24C6C070 */ addiu $a2, $a2, %lo(gBattleStatus)
/* 415F4C 802A11BC AFB00018 */ sw $s0, 0x18($sp)
/* 415F50 802A11C0 3C10802B */ lui $s0, %hi(D_802AD000)
/* 415F54 802A11C4 2610D000 */ addiu $s0, $s0, %lo(D_802AD000)
/* 415F58 802A11C8 AFBF0030 */ sw $ra, 0x30($sp)
/* 415F5C 802A11CC AFB5002C */ sw $s5, 0x2c($sp)
/* 415F60 802A11D0 AFB40028 */ sw $s4, 0x28($sp)
/* 415F64 802A11D4 AFB30024 */ sw $s3, 0x24($sp)
/* 415F68 802A11D8 AFB20020 */ sw $s2, 0x20($sp)
/* 415F6C 802A11DC AFB1001C */ sw $s1, 0x1c($sp)
/* 415F70 802A11E0 F7B60040 */ sdc1 $f22, 0x40($sp)
/* 415F74 802A11E4 F7B40038 */ sdc1 $f20, 0x38($sp)
/* 415F78 802A11E8 82030000 */ lb $v1, ($s0)
/* 415F7C 802A11EC 2402000A */ addiu $v0, $zero, 0xa
/* 415F80 802A11F0 10620257 */ beq $v1, $v0, .L802A1B50
/* 415F84 802A11F4 00000000 */ nop
/* 415F88 802A11F8 2862000B */ slti $v0, $v1, 0xb
/* 415F8C 802A11FC 50400010 */ beql $v0, $zero, .L802A1240
/* 415F90 802A1200 2402001E */ addiu $v0, $zero, 0x1e
/* 415F94 802A1204 10600021 */ beqz $v1, .L802A128C
/* 415F98 802A1208 24020036 */ addiu $v0, $zero, 0x36
/* 415F9C 802A120C 1C600006 */ bgtz $v1, .L802A1228
/* 415FA0 802A1210 24050001 */ addiu $a1, $zero, 1
/* 415FA4 802A1214 2402FFFF */ addiu $v0, $zero, -1
/* 415FA8 802A1218 10620245 */ beq $v1, $v0, .L802A1B30
/* 415FAC 802A121C 24030064 */ addiu $v1, $zero, 0x64
/* 415FB0 802A1220 080A870A */ j .L802A1C28
/* 415FB4 802A1224 0000102D */ daddu $v0, $zero, $zero
.L802A1228:
/* 415FB8 802A1228 10650159 */ beq $v1, $a1, .L802A1790
/* 415FBC 802A122C 24020002 */ addiu $v0, $zero, 2
/* 415FC0 802A1230 106201EC */ beq $v1, $v0, .L802A19E4
/* 415FC4 802A1234 0000102D */ daddu $v0, $zero, $zero
/* 415FC8 802A1238 080A870A */ j .L802A1C28
/* 415FCC 802A123C 00000000 */ nop
.L802A1240:
/* 415FD0 802A1240 10620262 */ beq $v1, $v0, .L802A1BCC
/* 415FD4 802A1244 24020003 */ addiu $v0, $zero, 3
/* 415FD8 802A1248 2862001F */ slti $v0, $v1, 0x1f
/* 415FDC 802A124C 10400008 */ beqz $v0, .L802A1270
/* 415FE0 802A1250 2402000B */ addiu $v0, $zero, 0xb
/* 415FE4 802A1254 10620248 */ beq $v1, $v0, .L802A1B78
/* 415FE8 802A1258 00000000 */ nop
/* 415FEC 802A125C 24020014 */ addiu $v0, $zero, 0x14
/* 415FF0 802A1260 1062024C */ beq $v1, $v0, .L802A1B94
/* 415FF4 802A1264 24020003 */ addiu $v0, $zero, 3
/* 415FF8 802A1268 080A870A */ j .L802A1C28
/* 415FFC 802A126C 0000102D */ daddu $v0, $zero, $zero
.L802A1270:
/* 416000 802A1270 24020064 */ addiu $v0, $zero, 0x64
/* 416004 802A1274 1062025C */ beq $v1, $v0, .L802A1BE8
/* 416008 802A1278 24020065 */ addiu $v0, $zero, 0x65
/* 41600C 802A127C 10620260 */ beq $v1, $v0, .L802A1C00
/* 416010 802A1280 0000102D */ daddu $v0, $zero, $zero
/* 416014 802A1284 080A870A */ j .L802A1C28
/* 416018 802A1288 00000000 */ nop
.L802A128C:
/* 41601C 802A128C 3C01802B */ lui $at, %hi(D_802AD060)
/* 416020 802A1290 AC22D060 */ sw $v0, %lo(D_802AD060)($at)
/* 416024 802A1294 240200AD */ addiu $v0, $zero, 0xad
/* 416028 802A1298 3C013E99 */ lui $at, 0x3e99
/* 41602C 802A129C 3421999A */ ori $at, $at, 0x999a
/* 416030 802A12A0 44810000 */ mtc1 $at, $f0
/* 416034 802A12A4 3C04802B */ lui $a0, %hi(D_802AD0B0+0x3)
/* 416038 802A12A8 9084D0B3 */ lbu $a0, %lo(D_802AD0B0+0x3)($a0)
/* 41603C 802A12AC 3C05802B */ lui $a1, %hi(main_menu_numOptions)
/* 416040 802A12B0 24A5D0AC */ addiu $a1, $a1, %lo(main_menu_numOptions)
/* 416044 802A12B4 3C01802B */ lui $at, %hi(D_802AD064)
/* 416048 802A12B8 AC22D064 */ sw $v0, %lo(D_802AD064)($at)
/* 41604C 802A12BC 3C01802B */ lui $at, %hi(D_802AD004)
/* 416050 802A12C0 A020D004 */ sb $zero, %lo(D_802AD004)($at)
/* 416054 802A12C4 3C01802B */ lui $at, %hi(D_802AD070)
/* 416058 802A12C8 E420D070 */ swc1 $f0, %lo(D_802AD070)($at)
/* 41605C 802A12CC 3C01802B */ lui $at, %hi(D_802AD06B)
/* 416060 802A12D0 A024D06B */ sb $a0, %lo(D_802AD06B)($at)
/* 416064 802A12D4 90A20003 */ lbu $v0, 3($a1)
/* 416068 802A12D8 00041823 */ negu $v1, $a0
/* 41606C 802A12DC 3C01802B */ lui $at, %hi(D_802AD069)
/* 416070 802A12E0 A023D069 */ sb $v1, %lo(D_802AD069)($at)
/* 416074 802A12E4 8CA30000 */ lw $v1, ($a1)
/* 416078 802A12E8 2442FFFF */ addiu $v0, $v0, -1
/* 41607C 802A12EC 00441023 */ subu $v0, $v0, $a0
/* 416080 802A12F0 3C01802B */ lui $at, %hi(D_802AD06A)
/* 416084 802A12F4 A022D06A */ sb $v0, %lo(D_802AD06A)($at)
/* 416088 802A12F8 18600036 */ blez $v1, .L802A13D4
/* 41608C 802A12FC 0000982D */ daddu $s3, $zero, $zero
/* 416090 802A1300 3C14802B */ lui $s4, %hi(D_802AD028)
/* 416094 802A1304 2694D028 */ addiu $s4, $s4, %lo(D_802AD028)
/* 416098 802A1308 3C12802B */ lui $s2, %hi(D_802AD010)
/* 41609C 802A130C 2652D010 */ addiu $s2, $s2, %lo(D_802AD010)
/* 4160A0 802A1310 3C10802B */ lui $s0, %hi(main_battle_menu_JumpHudScripts)
/* 4160A4 802A1314 2610D078 */ addiu $s0, $s0, %lo(main_battle_menu_JumpHudScripts)
.L802A1318:
/* 4160A8 802A1318 8E040000 */ lw $a0, ($s0)
/* 4160AC 802A131C 26100004 */ addiu $s0, $s0, 4
/* 4160B0 802A1320 0C050529 */ jal hud_element_create
/* 4160B4 802A1324 26730001 */ addiu $s3, $s3, 1
/* 4160B8 802A1328 0040882D */ daddu $s1, $v0, $zero
/* 4160BC 802A132C 0220202D */ daddu $a0, $s1, $zero
/* 4160C0 802A1330 24050005 */ addiu $a1, $zero, 5
/* 4160C4 802A1334 0C051277 */ jal hud_element_set_render_depth
/* 4160C8 802A1338 AE510000 */ sw $s1, ($s2)
/* 4160CC 802A133C 0220202D */ daddu $a0, $s1, $zero
/* 4160D0 802A1340 0C051280 */ jal hud_element_set_flags
/* 4160D4 802A1344 34058000 */ ori $a1, $zero, 0x8000
/* 4160D8 802A1348 0220202D */ daddu $a0, $s1, $zero
/* 4160DC 802A134C 0C051280 */ jal hud_element_set_flags
/* 4160E0 802A1350 24050080 */ addiu $a1, $zero, 0x80
/* 4160E4 802A1354 0220202D */ daddu $a0, $s1, $zero
/* 4160E8 802A1358 0C051280 */ jal hud_element_set_flags
/* 4160EC 802A135C 24050002 */ addiu $a1, $zero, 2
/* 4160F0 802A1360 0220202D */ daddu $a0, $s1, $zero
/* 4160F4 802A1364 3C053F40 */ lui $a1, 0x3f40
/* 4160F8 802A1368 0C051308 */ jal hud_element_set_scale
/* 4160FC 802A136C 26520004 */ addiu $s2, $s2, 4
/* 416100 802A1370 3C048029 */ lui $a0, %hi(HES_ProjectorSpot)
/* 416104 802A1374 24842C00 */ addiu $a0, $a0, %lo(HES_ProjectorSpot)
/* 416108 802A1378 0C050529 */ jal hud_element_create
/* 41610C 802A137C 00000000 */ nop
/* 416110 802A1380 0040882D */ daddu $s1, $v0, $zero
/* 416114 802A1384 0220202D */ daddu $a0, $s1, $zero
/* 416118 802A1388 0C0513F6 */ jal hud_element_create_transform_B
/* 41611C 802A138C AE910000 */ sw $s1, ($s4)
/* 416120 802A1390 0220202D */ daddu $a0, $s1, $zero
/* 416124 802A1394 0C051277 */ jal hud_element_set_render_depth
/* 416128 802A1398 2405000A */ addiu $a1, $zero, 0xa
/* 41612C 802A139C 0220202D */ daddu $a0, $s1, $zero
/* 416130 802A13A0 0C051280 */ jal hud_element_set_flags
/* 416134 802A13A4 24050080 */ addiu $a1, $zero, 0x80
/* 416138 802A13A8 0220202D */ daddu $a0, $s1, $zero
/* 41613C 802A13AC 0C051280 */ jal hud_element_set_flags
/* 416140 802A13B0 34058000 */ ori $a1, $zero, 0x8000
/* 416144 802A13B4 0220202D */ daddu $a0, $s1, $zero
/* 416148 802A13B8 0C051280 */ jal hud_element_set_flags
/* 41614C 802A13BC 24050002 */ addiu $a1, $zero, 2
/* 416150 802A13C0 3C02802B */ lui $v0, %hi(main_menu_numOptions)
/* 416154 802A13C4 8C42D0AC */ lw $v0, %lo(main_menu_numOptions)($v0)
/* 416158 802A13C8 0262102A */ slt $v0, $s3, $v0
/* 41615C 802A13CC 1440FFD2 */ bnez $v0, .L802A1318
/* 416160 802A13D0 26940004 */ addiu $s4, $s4, 4
.L802A13D4:
/* 416164 802A13D4 3C048029 */ lui $a0, %hi(HES_ProjectorSpot)
/* 416168 802A13D8 24842C00 */ addiu $a0, $a0, %lo(HES_ProjectorSpot)
/* 41616C 802A13DC 0C050529 */ jal hud_element_create
/* 416170 802A13E0 00000000 */ nop
/* 416174 802A13E4 0040882D */ daddu $s1, $v0, $zero
/* 416178 802A13E8 3C01802B */ lui $at, %hi(D_802AD040)
/* 41617C 802A13EC AC31D040 */ sw $s1, %lo(D_802AD040)($at)
/* 416180 802A13F0 0C0513F6 */ jal hud_element_create_transform_B
/* 416184 802A13F4 0220202D */ daddu $a0, $s1, $zero
/* 416188 802A13F8 0220202D */ daddu $a0, $s1, $zero
/* 41618C 802A13FC 0C051277 */ jal hud_element_set_render_depth
/* 416190 802A1400 24050007 */ addiu $a1, $zero, 7
/* 416194 802A1404 0220202D */ daddu $a0, $s1, $zero
/* 416198 802A1408 0C051280 */ jal hud_element_set_flags
/* 41619C 802A140C 24050080 */ addiu $a1, $zero, 0x80
/* 4161A0 802A1410 0220202D */ daddu $a0, $s1, $zero
/* 4161A4 802A1414 0C051280 */ jal hud_element_set_flags
/* 4161A8 802A1418 34058000 */ ori $a1, $zero, 0x8000
/* 4161AC 802A141C 0220202D */ daddu $a0, $s1, $zero
/* 4161B0 802A1420 0C051280 */ jal hud_element_set_flags
/* 4161B4 802A1424 24050002 */ addiu $a1, $zero, 2
/* 4161B8 802A1428 3C108029 */ lui $s0, %hi(HES_ProjectorReel)
/* 4161BC 802A142C 26102BD8 */ addiu $s0, $s0, %lo(HES_ProjectorReel)
/* 4161C0 802A1430 0C050529 */ jal hud_element_create
/* 4161C4 802A1434 0200202D */ daddu $a0, $s0, $zero
/* 4161C8 802A1438 0040882D */ daddu $s1, $v0, $zero
/* 4161CC 802A143C 3C01802B */ lui $at, %hi(D_802AD044)
/* 4161D0 802A1440 AC31D044 */ sw $s1, %lo(D_802AD044)($at)
/* 4161D4 802A1444 0C0513F6 */ jal hud_element_create_transform_B
/* 4161D8 802A1448 0220202D */ daddu $a0, $s1, $zero
/* 4161DC 802A144C 0220202D */ daddu $a0, $s1, $zero
/* 4161E0 802A1450 0C051277 */ jal hud_element_set_render_depth
/* 4161E4 802A1454 0000282D */ daddu $a1, $zero, $zero
/* 4161E8 802A1458 0220202D */ daddu $a0, $s1, $zero
/* 4161EC 802A145C 24050028 */ addiu $a1, $zero, 0x28
/* 4161F0 802A1460 0C051261 */ jal hud_element_set_render_pos
/* 4161F4 802A1464 240600D4 */ addiu $a2, $zero, 0xd4
/* 4161F8 802A1468 0220202D */ daddu $a0, $s1, $zero
/* 4161FC 802A146C 0000282D */ daddu $a1, $zero, $zero
/* 416200 802A1470 2406005B */ addiu $a2, $zero, 0x5b
/* 416204 802A1474 0C0513BF */ jal hud_element_set_tint
/* 416208 802A1478 2407007F */ addiu $a3, $zero, 0x7f
/* 41620C 802A147C 0220202D */ daddu $a0, $s1, $zero
/* 416210 802A1480 24050010 */ addiu $a1, $zero, 0x10
/* 416214 802A1484 0C05149D */ jal hud_element_set_transform_rotation_pivot
/* 416218 802A1488 2406FFF0 */ addiu $a2, $zero, -0x10
/* 41621C 802A148C 0220202D */ daddu $a0, $s1, $zero
/* 416220 802A1490 0C051280 */ jal hud_element_set_flags
/* 416224 802A1494 24050080 */ addiu $a1, $zero, 0x80
/* 416228 802A1498 0220202D */ daddu $a0, $s1, $zero
/* 41622C 802A149C 0C05128B */ jal hud_element_clear_flags
/* 416230 802A14A0 34058000 */ ori $a1, $zero, 0x8000
/* 416234 802A14A4 0220202D */ daddu $a0, $s1, $zero
/* 416238 802A14A8 0C0513AC */ jal hud_element_set_alpha
/* 41623C 802A14AC 240500F0 */ addiu $a1, $zero, 0xf0
/* 416240 802A14B0 0C050529 */ jal hud_element_create
/* 416244 802A14B4 0200202D */ daddu $a0, $s0, $zero
/* 416248 802A14B8 0040882D */ daddu $s1, $v0, $zero
/* 41624C 802A14BC 3C01802B */ lui $at, %hi(D_802AD048)
/* 416250 802A14C0 AC31D048 */ sw $s1, %lo(D_802AD048)($at)
/* 416254 802A14C4 0C0513F6 */ jal hud_element_create_transform_B
/* 416258 802A14C8 0220202D */ daddu $a0, $s1, $zero
/* 41625C 802A14CC 0220202D */ daddu $a0, $s1, $zero
/* 416260 802A14D0 0C051277 */ jal hud_element_set_render_depth
/* 416264 802A14D4 24050002 */ addiu $a1, $zero, 2
/* 416268 802A14D8 0220202D */ daddu $a0, $s1, $zero
/* 41626C 802A14DC 24050027 */ addiu $a1, $zero, 0x27
/* 416270 802A14E0 0C051261 */ jal hud_element_set_render_pos
/* 416274 802A14E4 240600D4 */ addiu $a2, $zero, 0xd4
/* 416278 802A14E8 0220202D */ daddu $a0, $s1, $zero
/* 41627C 802A14EC 0000282D */ daddu $a1, $zero, $zero
/* 416280 802A14F0 2406005B */ addiu $a2, $zero, 0x5b
/* 416284 802A14F4 0C0513BF */ jal hud_element_set_tint
/* 416288 802A14F8 2407007F */ addiu $a3, $zero, 0x7f
/* 41628C 802A14FC 0220202D */ daddu $a0, $s1, $zero
/* 416290 802A1500 24050010 */ addiu $a1, $zero, 0x10
/* 416294 802A1504 0C05149D */ jal hud_element_set_transform_rotation_pivot
/* 416298 802A1508 2406FFF0 */ addiu $a2, $zero, -0x10
/* 41629C 802A150C 0220202D */ daddu $a0, $s1, $zero
/* 4162A0 802A1510 0C051280 */ jal hud_element_set_flags
/* 4162A4 802A1514 24050080 */ addiu $a1, $zero, 0x80
/* 4162A8 802A1518 0220202D */ daddu $a0, $s1, $zero
/* 4162AC 802A151C 0C05128B */ jal hud_element_clear_flags
/* 4162B0 802A1520 34058000 */ ori $a1, $zero, 0x8000
/* 4162B4 802A1524 0220202D */ daddu $a0, $s1, $zero
/* 4162B8 802A1528 0C0513AC */ jal hud_element_set_alpha
/* 4162BC 802A152C 240500F0 */ addiu $a1, $zero, 0xf0
/* 4162C0 802A1530 3C048029 */ lui $a0, %hi(HES_ProjectorBeam)
/* 4162C4 802A1534 24842C28 */ addiu $a0, $a0, %lo(HES_ProjectorBeam)
/* 4162C8 802A1538 0C050529 */ jal hud_element_create
/* 4162CC 802A153C 00000000 */ nop
/* 4162D0 802A1540 0040882D */ daddu $s1, $v0, $zero
/* 4162D4 802A1544 3C01802B */ lui $at, %hi(D_802AD04C)
/* 4162D8 802A1548 AC31D04C */ sw $s1, %lo(D_802AD04C)($at)
/* 4162DC 802A154C 0C0513F6 */ jal hud_element_create_transform_B
/* 4162E0 802A1550 0220202D */ daddu $a0, $s1, $zero
/* 4162E4 802A1554 0220202D */ daddu $a0, $s1, $zero
/* 4162E8 802A1558 0C051277 */ jal hud_element_set_render_depth
/* 4162EC 802A155C 24050014 */ addiu $a1, $zero, 0x14
/* 4162F0 802A1560 0220202D */ daddu $a0, $s1, $zero
/* 4162F4 802A1564 2405004E */ addiu $a1, $zero, 0x4e
/* 4162F8 802A1568 0C051261 */ jal hud_element_set_render_pos
/* 4162FC 802A156C 240600B2 */ addiu $a2, $zero, 0xb2
/* 416300 802A1570 0220202D */ daddu $a0, $s1, $zero
/* 416304 802A1574 240500FF */ addiu $a1, $zero, 0xff
/* 416308 802A1578 00A0302D */ daddu $a2, $a1, $zero
/* 41630C 802A157C 0C0513BF */ jal hud_element_set_tint
/* 416310 802A1580 00A0382D */ daddu $a3, $a1, $zero
/* 416314 802A1584 0220202D */ daddu $a0, $s1, $zero
/* 416318 802A1588 0000282D */ daddu $a1, $zero, $zero
/* 41631C 802A158C 0C05149D */ jal hud_element_set_transform_rotation_pivot
/* 416320 802A1590 00A0302D */ daddu $a2, $a1, $zero
/* 416324 802A1594 44800000 */ mtc1 $zero, $f0
/* 416328 802A1598 0220202D */ daddu $a0, $s1, $zero
/* 41632C 802A159C 44050000 */ mfc1 $a1, $f0
/* 416330 802A15A0 3C07C234 */ lui $a3, 0xc234
/* 416334 802A15A4 0C051489 */ jal hud_element_set_transform_rotation
/* 416338 802A15A8 00A0302D */ daddu $a2, $a1, $zero
/* 41633C 802A15AC 0220202D */ daddu $a0, $s1, $zero
/* 416340 802A15B0 0C0513AC */ jal hud_element_set_alpha
/* 416344 802A15B4 240500C8 */ addiu $a1, $zero, 0xc8
/* 416348 802A15B8 0220202D */ daddu $a0, $s1, $zero
/* 41634C 802A15BC 0C051280 */ jal hud_element_set_flags
/* 416350 802A15C0 24050080 */ addiu $a1, $zero, 0x80
/* 416354 802A15C4 0220202D */ daddu $a0, $s1, $zero
/* 416358 802A15C8 0C051280 */ jal hud_element_set_flags
/* 41635C 802A15CC 34058000 */ ori $a1, $zero, 0x8000
/* 416360 802A15D0 0220202D */ daddu $a0, $s1, $zero
/* 416364 802A15D4 0C051280 */ jal hud_element_set_flags
/* 416368 802A15D8 24050002 */ addiu $a1, $zero, 2
/* 41636C 802A15DC 3C048029 */ lui $a0, %hi(HES_SwapBackground)
/* 416370 802A15E0 24842CF4 */ addiu $a0, $a0, %lo(HES_SwapBackground)
/* 416374 802A15E4 0C050529 */ jal hud_element_create
/* 416378 802A15E8 00000000 */ nop
/* 41637C 802A15EC 0040882D */ daddu $s1, $v0, $zero
/* 416380 802A15F0 0220202D */ daddu $a0, $s1, $zero
/* 416384 802A15F4 3C01802B */ lui $at, %hi(D_802AD05C)
/* 416388 802A15F8 AC31D05C */ sw $s1, %lo(D_802AD05C)($at)
/* 41638C 802A15FC 0C051277 */ jal hud_element_set_render_depth
/* 416390 802A1600 0000282D */ daddu $a1, $zero, $zero
/* 416394 802A1604 0220202D */ daddu $a0, $s1, $zero
/* 416398 802A1608 24050061 */ addiu $a1, $zero, 0x61
/* 41639C 802A160C 0C051261 */ jal hud_element_set_render_pos
/* 4163A0 802A1610 240600D0 */ addiu $a2, $zero, 0xd0
/* 4163A4 802A1614 0220202D */ daddu $a0, $s1, $zero
/* 4163A8 802A1618 240500FF */ addiu $a1, $zero, 0xff
/* 4163AC 802A161C 00A0302D */ daddu $a2, $a1, $zero
/* 4163B0 802A1620 0C0513BF */ jal hud_element_set_tint
/* 4163B4 802A1624 00A0382D */ daddu $a3, $a1, $zero
/* 4163B8 802A1628 0220202D */ daddu $a0, $s1, $zero
/* 4163BC 802A162C 0C051280 */ jal hud_element_set_flags
/* 4163C0 802A1630 24050080 */ addiu $a1, $zero, 0x80
/* 4163C4 802A1634 0220202D */ daddu $a0, $s1, $zero
/* 4163C8 802A1638 0C05128B */ jal hud_element_clear_flags
/* 4163CC 802A163C 34058000 */ ori $a1, $zero, 0x8000
/* 4163D0 802A1640 0220202D */ daddu $a0, $s1, $zero
/* 4163D4 802A1644 0C0513AC */ jal hud_element_set_alpha
/* 4163D8 802A1648 240500E6 */ addiu $a1, $zero, 0xe6
/* 4163DC 802A164C 3C048029 */ lui $a0, %hi(HES_SwapZ)
/* 4163E0 802A1650 24842C50 */ addiu $a0, $a0, %lo(HES_SwapZ)
/* 4163E4 802A1654 0C050529 */ jal hud_element_create
/* 4163E8 802A1658 00000000 */ nop
/* 4163EC 802A165C 0040882D */ daddu $s1, $v0, $zero
/* 4163F0 802A1660 0220202D */ daddu $a0, $s1, $zero
/* 4163F4 802A1664 3C01802B */ lui $at, %hi(D_802AD050)
/* 4163F8 802A1668 AC31D050 */ sw $s1, %lo(D_802AD050)($at)
/* 4163FC 802A166C 0C051277 */ jal hud_element_set_render_depth
/* 416400 802A1670 24050005 */ addiu $a1, $zero, 5
/* 416404 802A1674 0220202D */ daddu $a0, $s1, $zero
/* 416408 802A1678 0C05128B */ jal hud_element_clear_flags
/* 41640C 802A167C 34058000 */ ori $a1, $zero, 0x8000
/* 416410 802A1680 0220202D */ daddu $a0, $s1, $zero
/* 416414 802A1684 0C051280 */ jal hud_element_set_flags
/* 416418 802A1688 24050080 */ addiu $a1, $zero, 0x80
/* 41641C 802A168C 0220202D */ daddu $a0, $s1, $zero
/* 416420 802A1690 2405005E */ addiu $a1, $zero, 0x5e
/* 416424 802A1694 0C051261 */ jal hud_element_set_render_pos
/* 416428 802A1698 240600D1 */ addiu $a2, $zero, 0xd1
/* 41642C 802A169C 3C048029 */ lui $a0, %hi(HES_SwapArrowLeft)
/* 416430 802A16A0 24842C7C */ addiu $a0, $a0, %lo(HES_SwapArrowLeft)
/* 416434 802A16A4 0C050529 */ jal hud_element_create
/* 416438 802A16A8 00000000 */ nop
/* 41643C 802A16AC 0040882D */ daddu $s1, $v0, $zero
/* 416440 802A16B0 0220202D */ daddu $a0, $s1, $zero
/* 416444 802A16B4 3C01802B */ lui $at, %hi(D_802AD054)
/* 416448 802A16B8 AC31D054 */ sw $s1, %lo(D_802AD054)($at)
/* 41644C 802A16BC 0C051277 */ jal hud_element_set_render_depth
/* 416450 802A16C0 24050005 */ addiu $a1, $zero, 5
/* 416454 802A16C4 0220202D */ daddu $a0, $s1, $zero
/* 416458 802A16C8 0C05128B */ jal hud_element_clear_flags
/* 41645C 802A16CC 34058000 */ ori $a1, $zero, 0x8000
/* 416460 802A16D0 0220202D */ daddu $a0, $s1, $zero
/* 416464 802A16D4 0C051280 */ jal hud_element_set_flags
/* 416468 802A16D8 24050080 */ addiu $a1, $zero, 0x80
/* 41646C 802A16DC 0220202D */ daddu $a0, $s1, $zero
/* 416470 802A16E0 24050051 */ addiu $a1, $zero, 0x51
/* 416474 802A16E4 0C051261 */ jal hud_element_set_render_pos
/* 416478 802A16E8 240600D2 */ addiu $a2, $zero, 0xd2
/* 41647C 802A16EC 3C048029 */ lui $a0, %hi(HES_SwapArrowRight)
/* 416480 802A16F0 24842CB8 */ addiu $a0, $a0, %lo(HES_SwapArrowRight)
/* 416484 802A16F4 0C050529 */ jal hud_element_create
/* 416488 802A16F8 00000000 */ nop
/* 41648C 802A16FC 0040882D */ daddu $s1, $v0, $zero
/* 416490 802A1700 0220202D */ daddu $a0, $s1, $zero
/* 416494 802A1704 3C01802B */ lui $at, %hi(D_802AD058)
/* 416498 802A1708 AC31D058 */ sw $s1, %lo(D_802AD058)($at)
/* 41649C 802A170C 0C051277 */ jal hud_element_set_render_depth
/* 4164A0 802A1710 24050005 */ addiu $a1, $zero, 5
/* 4164A4 802A1714 0220202D */ daddu $a0, $s1, $zero
/* 4164A8 802A1718 0C05128B */ jal hud_element_clear_flags
/* 4164AC 802A171C 34058000 */ ori $a1, $zero, 0x8000
/* 4164B0 802A1720 0220202D */ daddu $a0, $s1, $zero
/* 4164B4 802A1724 0C051280 */ jal hud_element_set_flags
/* 4164B8 802A1728 24050080 */ addiu $a1, $zero, 0x80
/* 4164BC 802A172C 0220202D */ daddu $a0, $s1, $zero
/* 4164C0 802A1730 24050066 */ addiu $a1, $zero, 0x66
/* 4164C4 802A1734 0C051261 */ jal hud_element_set_render_pos
/* 4164C8 802A1738 240600D2 */ addiu $a2, $zero, 0xd2
/* 4164CC 802A173C 3C03802B */ lui $v1, %hi(D_802AD100)
/* 4164D0 802A1740 8C63D100 */ lw $v1, %lo(D_802AD100)($v1)
/* 4164D4 802A1744 24020064 */ addiu $v0, $zero, 0x64
/* 4164D8 802A1748 3C01802B */ lui $at, %hi(D_802AD00A)
/* 4164DC 802A174C A422D00A */ sh $v0, %lo(D_802AD00A)($at)
/* 4164E0 802A1750 24020003 */ addiu $v0, $zero, 3
/* 4164E4 802A1754 3C01802B */ lui $at, %hi(D_802AD001)
/* 4164E8 802A1758 A022D001 */ sb $v0, %lo(D_802AD001)($at)
/* 4164EC 802A175C 24020001 */ addiu $v0, $zero, 1
/* 4164F0 802A1760 3C01802B */ lui $at, %hi(D_802AD000)
/* 4164F4 802A1764 A022D000 */ sb $v0, %lo(D_802AD000)($at)
/* 4164F8 802A1768 000310C0 */ sll $v0, $v1, 3
/* 4164FC 802A176C 00431023 */ subu $v0, $v0, $v1
/* 416500 802A1770 00021080 */ sll $v0, $v0, 2
/* 416504 802A1774 4482A000 */ mtc1 $v0, $f20
/* 416508 802A1778 00000000 */ nop
/* 41650C 802A177C 4680A520 */ cvt.s.w $f20, $f20
/* 416510 802A1780 3C01802B */ lui $at, %hi(D_802AD06C)
/* 416514 802A1784 E434D06C */ swc1 $f20, %lo(D_802AD06C)($at)
/* 416518 802A1788 080A870A */ j .L802A1C28
/* 41651C 802A178C 0000102D */ daddu $v0, $zero, $zero
.L802A1790:
/* 416520 802A1790 3C035555 */ lui $v1, 0x5555
/* 416524 802A1794 3C10802B */ lui $s0, %hi(D_802AD001)
/* 416528 802A1798 2610D001 */ addiu $s0, $s0, %lo(D_802AD001)
/* 41652C 802A179C 82040000 */ lb $a0, ($s0)
/* 416530 802A17A0 34635556 */ ori $v1, $v1, 0x5556
/* 416534 802A17A4 00041040 */ sll $v0, $a0, 1
/* 416538 802A17A8 00441021 */ addu $v0, $v0, $a0
/* 41653C 802A17AC 000210C0 */ sll $v0, $v0, 3
/* 416540 802A17B0 00441021 */ addu $v0, $v0, $a0
/* 416544 802A17B4 00021080 */ sll $v0, $v0, 2
/* 416548 802A17B8 00430018 */ mult $v0, $v1
/* 41654C 802A17BC 000217C3 */ sra $v0, $v0, 0x1f
/* 416550 802A17C0 00004010 */ mfhi $t0
/* 416554 802A17C4 01021023 */ subu $v0, $t0, $v0
/* 416558 802A17C8 3C01802B */ lui $at, %hi(D_802AD00A)
/* 41655C 802A17CC A422D00A */ sh $v0, %lo(D_802AD00A)($at)
/* 416560 802A17D0 1080000A */ beqz $a0, .L802A17FC
/* 416564 802A17D4 00000000 */ nop
/* 416568 802A17D8 14850005 */ bne $a0, $a1, .L802A17F0
/* 41656C 802A17DC 00000000 */ nop
/* 416570 802A17E0 3C04802B */ lui $a0, %hi(D_802AD04C)
/* 416574 802A17E4 8C84D04C */ lw $a0, %lo(D_802AD04C)($a0)
/* 416578 802A17E8 0C05128B */ jal hud_element_clear_flags
/* 41657C 802A17EC 24050002 */ addiu $a1, $zero, 2
.L802A17F0:
/* 416580 802A17F0 92020000 */ lbu $v0, ($s0)
/* 416584 802A17F4 080A8708 */ j .L802A1C20
/* 416588 802A17F8 2442FFFF */ addiu $v0, $v0, -1
.L802A17FC:
/* 41658C 802A17FC 3C02802B */ lui $v0, %hi(D_802AD100)
/* 416590 802A1800 8C42D100 */ lw $v0, %lo(D_802AD100)($v0)
/* 416594 802A1804 3C01802B */ lui $at, %hi(D_802AD002)
/* 416598 802A1808 A020D002 */ sb $zero, %lo(D_802AD002)($at)
/* 41659C 802A180C 3C01802B */ lui $at, %hi(D_802AD003)
/* 4165A0 802A1810 A020D003 */ sb $zero, %lo(D_802AD003)($at)
/* 4165A4 802A1814 000218C0 */ sll $v1, $v0, 3
/* 4165A8 802A1818 00621823 */ subu $v1, $v1, $v0
/* 4165AC 802A181C 00031880 */ sll $v1, $v1, 2
/* 4165B0 802A1820 3C02802B */ lui $v0, %hi(main_menu_numOptions)
/* 4165B4 802A1824 8C42D0AC */ lw $v0, %lo(main_menu_numOptions)($v0)
/* 4165B8 802A1828 4483A000 */ mtc1 $v1, $f20
/* 4165BC 802A182C 00000000 */ nop
/* 4165C0 802A1830 4680A520 */ cvt.s.w $f20, $f20
/* 4165C4 802A1834 3C01802B */ lui $at, %hi(D_802AD06C)
/* 4165C8 802A1838 E434D06C */ swc1 $f20, %lo(D_802AD06C)($at)
/* 4165CC 802A183C 18400039 */ blez $v0, .L802A1924
/* 4165D0 802A1840 0000982D */ daddu $s3, $zero, $zero
/* 4165D4 802A1844 4480B000 */ mtc1 $zero, $f22
/* 4165D8 802A1848 3C15802B */ lui $s5, %hi(D_802AD028)
/* 4165DC 802A184C 26B5D028 */ addiu $s5, $s5, %lo(D_802AD028)
/* 4165E0 802A1850 3C14802B */ lui $s4, %hi(D_802AD010)
/* 4165E4 802A1854 2694D010 */ addiu $s4, $s4, %lo(D_802AD010)
.L802A1858:
/* 4165E8 802A1858 27A40010 */ addiu $a0, $sp, 0x10
/* 4165EC 802A185C 27A50014 */ addiu $a1, $sp, 0x14
/* 4165F0 802A1860 3C0642AE */ lui $a2, 0x42ae
/* 4165F4 802A1864 4407A000 */ mfc1 $a3, $f20
/* 4165F8 802A1868 26730001 */ addiu $s3, $s3, 1
/* 4165FC 802A186C E7B60010 */ swc1 $f22, 0x10($sp)
/* 416600 802A1870 0C00A7E7 */ jal add_vec2D_polar
/* 416604 802A1874 E7B60014 */ swc1 $f22, 0x14($sp)
/* 416608 802A1878 8E910000 */ lw $s1, ($s4)
/* 41660C 802A187C 26940004 */ addiu $s4, $s4, 4
/* 416610 802A1880 3C01802B */ lui $at, %hi(D_802AD060)
/* 416614 802A1884 C422D060 */ lwc1 $f2, %lo(D_802AD060)($at)
/* 416618 802A1888 468010A0 */ cvt.s.w $f2, $f2
/* 41661C 802A188C C7A00010 */ lwc1 $f0, 0x10($sp)
/* 416620 802A1890 C7A40014 */ lwc1 $f4, 0x14($sp)
/* 416624 802A1894 46001080 */ add.s $f2, $f2, $f0
/* 416628 802A1898 0220202D */ daddu $a0, $s1, $zero
/* 41662C 802A189C 3C01802B */ lui $at, %hi(D_802AD064)
/* 416630 802A18A0 C420D064 */ lwc1 $f0, %lo(D_802AD064)($at)
/* 416634 802A18A4 46800020 */ cvt.s.w $f0, $f0
/* 416638 802A18A8 46040000 */ add.s $f0, $f0, $f4
/* 41663C 802A18AC 4600118D */ trunc.w.s $f6, $f2
/* 416640 802A18B0 44123000 */ mfc1 $s2, $f6
/* 416644 802A18B4 00000000 */ nop
/* 416648 802A18B8 0240282D */ daddu $a1, $s2, $zero
/* 41664C 802A18BC 4600018D */ trunc.w.s $f6, $f0
/* 416650 802A18C0 44103000 */ mfc1 $s0, $f6
/* 416654 802A18C4 0C051261 */ jal hud_element_set_render_pos
/* 416658 802A18C8 0200302D */ daddu $a2, $s0, $zero
/* 41665C 802A18CC 0220202D */ daddu $a0, $s1, $zero
/* 416660 802A18D0 0C05128B */ jal hud_element_clear_flags
/* 416664 802A18D4 24050002 */ addiu $a1, $zero, 2
/* 416668 802A18D8 0240282D */ daddu $a1, $s2, $zero
/* 41666C 802A18DC 0200302D */ daddu $a2, $s0, $zero
/* 416670 802A18E0 8EB10000 */ lw $s1, ($s5)
/* 416674 802A18E4 26B50004 */ addiu $s5, $s5, 4
/* 416678 802A18E8 0C051261 */ jal hud_element_set_render_pos
/* 41667C 802A18EC 0220202D */ daddu $a0, $s1, $zero
/* 416680 802A18F0 0220202D */ daddu $a0, $s1, $zero
/* 416684 802A18F4 0C0513AC */ jal hud_element_set_alpha
/* 416688 802A18F8 24050064 */ addiu $a1, $zero, 0x64
/* 41668C 802A18FC 0220202D */ daddu $a0, $s1, $zero
/* 416690 802A1900 0C05128B */ jal hud_element_clear_flags
/* 416694 802A1904 24050002 */ addiu $a1, $zero, 2
/* 416698 802A1908 3C02802B */ lui $v0, %hi(main_menu_numOptions)
/* 41669C 802A190C 8C42D0AC */ lw $v0, %lo(main_menu_numOptions)($v0)
/* 4166A0 802A1910 3C0141E0 */ lui $at, 0x41e0
/* 4166A4 802A1914 44810000 */ mtc1 $at, $f0
/* 4166A8 802A1918 0262102A */ slt $v0, $s3, $v0
/* 4166AC 802A191C 1440FFCE */ bnez $v0, .L802A1858
/* 4166B0 802A1920 4600A500 */ add.s $f20, $f20, $f0
.L802A1924:
/* 4166B4 802A1924 27A40010 */ addiu $a0, $sp, 0x10
/* 4166B8 802A1928 3C03802B */ lui $v1, %hi(D_802AD100)
/* 4166BC 802A192C 8C63D100 */ lw $v1, %lo(D_802AD100)($v1)
/* 4166C0 802A1930 3C0642AE */ lui $a2, 0x42ae
/* 4166C4 802A1934 000310C0 */ sll $v0, $v1, 3
/* 4166C8 802A1938 00431023 */ subu $v0, $v0, $v1
/* 4166CC 802A193C 00021080 */ sll $v0, $v0, 2
/* 4166D0 802A1940 44823000 */ mtc1 $v0, $f6
/* 4166D4 802A1944 00000000 */ nop
/* 4166D8 802A1948 468031A0 */ cvt.s.w $f6, $f6
/* 4166DC 802A194C 44073000 */ mfc1 $a3, $f6
/* 4166E0 802A1950 27A50014 */ addiu $a1, $sp, 0x14
/* 4166E4 802A1954 AFA00010 */ sw $zero, 0x10($sp)
/* 4166E8 802A1958 0C00A7E7 */ jal add_vec2D_polar
/* 4166EC 802A195C AFA00014 */ sw $zero, 0x14($sp)
/* 4166F0 802A1960 3C01802B */ lui $at, %hi(D_802AD060)
/* 4166F4 802A1964 C422D060 */ lwc1 $f2, %lo(D_802AD060)($at)
/* 4166F8 802A1968 468010A0 */ cvt.s.w $f2, $f2
/* 4166FC 802A196C C7A00010 */ lwc1 $f0, 0x10($sp)
/* 416700 802A1970 3C11802B */ lui $s1, %hi(D_802AD040)
/* 416704 802A1974 8E31D040 */ lw $s1, %lo(D_802AD040)($s1)
/* 416708 802A1978 46001080 */ add.s $f2, $f2, $f0
/* 41670C 802A197C C7A40014 */ lwc1 $f4, 0x14($sp)
/* 416710 802A1980 3C01802B */ lui $at, %hi(D_802AD064)
/* 416714 802A1984 C420D064 */ lwc1 $f0, %lo(D_802AD064)($at)
/* 416718 802A1988 46800020 */ cvt.s.w $f0, $f0
/* 41671C 802A198C 46040000 */ add.s $f0, $f0, $f4
/* 416720 802A1990 4600118D */ trunc.w.s $f6, $f2
/* 416724 802A1994 44053000 */ mfc1 $a1, $f6
/* 416728 802A1998 4600018D */ trunc.w.s $f6, $f0
/* 41672C 802A199C 44063000 */ mfc1 $a2, $f6
/* 416730 802A19A0 0C051261 */ jal hud_element_set_render_pos
/* 416734 802A19A4 0220202D */ daddu $a0, $s1, $zero
/* 416738 802A19A8 0220202D */ daddu $a0, $s1, $zero
/* 41673C 802A19AC 0C0513AC */ jal hud_element_set_alpha
/* 416740 802A19B0 240500B4 */ addiu $a1, $zero, 0xb4
/* 416744 802A19B4 3C053F59 */ lui $a1, 0x3f59
/* 416748 802A19B8 34A5999A */ ori $a1, $a1, 0x999a
/* 41674C 802A19BC 0C051308 */ jal hud_element_set_scale
/* 416750 802A19C0 0220202D */ daddu $a0, $s1, $zero
/* 416754 802A19C4 0220202D */ daddu $a0, $s1, $zero
/* 416758 802A19C8 0C05128B */ jal hud_element_clear_flags
/* 41675C 802A19CC 24050002 */ addiu $a1, $zero, 2
/* 416760 802A19D0 24020002 */ addiu $v0, $zero, 2
/* 416764 802A19D4 3C01802B */ lui $at, %hi(D_802AD000)
/* 416768 802A19D8 A022D000 */ sb $v0, %lo(D_802AD000)($at)
/* 41676C 802A19DC 080A870A */ j .L802A1C28
/* 416770 802A19E0 0000102D */ daddu $v0, $zero, $zero
.L802A19E4:
/* 416774 802A19E4 8CC20214 */ lw $v0, 0x214($a2)
/* 416778 802A19E8 30428000 */ andi $v0, $v0, 0x8000
/* 41677C 802A19EC 10400021 */ beqz $v0, .L802A1A74
/* 416780 802A19F0 00000000 */ nop
/* 416784 802A19F4 3C11802B */ lui $s1, %hi(D_802AD002)
/* 416788 802A19F8 2631D002 */ addiu $s1, $s1, %lo(D_802AD002)
/* 41678C 802A19FC 3C12802B */ lui $s2, %hi(D_802AD06B)
/* 416790 802A1A00 2652D06B */ addiu $s2, $s2, %lo(D_802AD06B)
/* 416794 802A1A04 82220000 */ lb $v0, ($s1)
/* 416798 802A1A08 82430000 */ lb $v1, ($s2)
/* 41679C 802A1A0C 00431021 */ addu $v0, $v0, $v1
/* 4167A0 802A1A10 00021080 */ sll $v0, $v0, 2
/* 4167A4 802A1A14 3C01802B */ lui $at, %hi(battle_menu_isEnabled)
/* 4167A8 802A1A18 00220821 */ addu $at, $at, $v0
/* 4167AC 802A1A1C 8C22D0D0 */ lw $v0, %lo(battle_menu_isEnabled)($at)
/* 4167B0 802A1A20 14450005 */ bne $v0, $a1, .L802A1A38
/* 4167B4 802A1A24 00000000 */ nop
/* 4167B8 802A1A28 0C05272D */ jal sfx_play_sound
/* 4167BC 802A1A2C 240400C9 */ addiu $a0, $zero, 0xc9
/* 4167C0 802A1A30 080A8708 */ j .L802A1C20
/* 4167C4 802A1A34 2402FFFF */ addiu $v0, $zero, -1
.L802A1A38:
/* 4167C8 802A1A38 0C05272D */ jal sfx_play_sound
/* 4167CC 802A1A3C 2404021D */ addiu $a0, $zero, 0x21d
/* 4167D0 802A1A40 82220000 */ lb $v0, ($s1)
/* 4167D4 802A1A44 82430000 */ lb $v1, ($s2)
/* 4167D8 802A1A48 00431021 */ addu $v0, $v0, $v1
/* 4167DC 802A1A4C 00021080 */ sll $v0, $v0, 2
/* 4167E0 802A1A50 3C03802B */ lui $v1, %hi(battle_menu_isMessageDisabled+0x3)
/* 4167E4 802A1A54 00621821 */ addu $v1, $v1, $v0
/* 4167E8 802A1A58 9063D0EB */ lbu $v1, %lo(battle_menu_isMessageDisabled+0x3)($v1)
/* 4167EC 802A1A5C 24020064 */ addiu $v0, $zero, 0x64
/* 4167F0 802A1A60 A2020000 */ sb $v0, ($s0)
/* 4167F4 802A1A64 3C01802B */ lui $at, %hi(D_802AD068)
/* 4167F8 802A1A68 A023D068 */ sb $v1, %lo(D_802AD068)($at)
/* 4167FC 802A1A6C 080A870A */ j .L802A1C28
/* 416800 802A1A70 0000102D */ daddu $v0, $zero, $zero
.L802A1A74:
/* 416804 802A1A74 3C05802B */ lui $a1, %hi(D_802AD002)
/* 416808 802A1A78 24A5D002 */ addiu $a1, $a1, %lo(D_802AD002)
/* 41680C 802A1A7C 90A40000 */ lbu $a0, ($a1)
/* 416810 802A1A80 3C02802B */ lui $v0, %hi(D_802AD004)
/* 416814 802A1A84 8042D004 */ lb $v0, %lo(D_802AD004)($v0)
/* 416818 802A1A88 3C01802B */ lui $at, %hi(D_802AD003)
/* 41681C 802A1A8C A024D003 */ sb $a0, %lo(D_802AD003)($at)
/* 416820 802A1A90 1440001B */ bnez $v0, .L802A1B00
/* 416824 802A1A94 3C030005 */ lui $v1, 5
/* 416828 802A1A98 8CC20218 */ lw $v0, 0x218($a2)
/* 41682C 802A1A9C 00431024 */ and $v0, $v0, $v1
/* 416830 802A1AA0 10400008 */ beqz $v0, .L802A1AC4
/* 416834 802A1AA4 00041600 */ sll $v0, $a0, 0x18
/* 416838 802A1AA8 3C03802B */ lui $v1, %hi(D_802AD069)
/* 41683C 802A1AAC 8063D069 */ lb $v1, %lo(D_802AD069)($v1)
/* 416840 802A1AB0 00021603 */ sra $v0, $v0, 0x18
/* 416844 802A1AB4 0062182A */ slt $v1, $v1, $v0
/* 416848 802A1AB8 10600002 */ beqz $v1, .L802A1AC4
/* 41684C 802A1ABC 2482FFFF */ addiu $v0, $a0, -1
/* 416850 802A1AC0 A0A20000 */ sb $v0, ($a1)
.L802A1AC4:
/* 416854 802A1AC4 8CC20218 */ lw $v0, 0x218($a2)
/* 416858 802A1AC8 3C03000A */ lui $v1, 0xa
/* 41685C 802A1ACC 00431024 */ and $v0, $v0, $v1
/* 416860 802A1AD0 1040000B */ beqz $v0, .L802A1B00
/* 416864 802A1AD4 00000000 */ nop
/* 416868 802A1AD8 3C04802B */ lui $a0, %hi(D_802AD002)
/* 41686C 802A1ADC 2484D002 */ addiu $a0, $a0, %lo(D_802AD002)
/* 416870 802A1AE0 80820000 */ lb $v0, ($a0)
/* 416874 802A1AE4 3C03802B */ lui $v1, %hi(D_802AD06A)
/* 416878 802A1AE8 8063D06A */ lb $v1, %lo(D_802AD06A)($v1)
/* 41687C 802A1AEC 0043102A */ slt $v0, $v0, $v1
/* 416880 802A1AF0 90830000 */ lbu $v1, ($a0)
/* 416884 802A1AF4 10400002 */ beqz $v0, .L802A1B00
/* 416888 802A1AF8 24620001 */ addiu $v0, $v1, 1
/* 41688C 802A1AFC A0820000 */ sb $v0, ($a0)
.L802A1B00:
/* 416890 802A1B00 3C03802B */ lui $v1, %hi(D_802AD003)
/* 416894 802A1B04 8063D003 */ lb $v1, %lo(D_802AD003)($v1)
/* 416898 802A1B08 3C02802B */ lui $v0, %hi(D_802AD002)
/* 41689C 802A1B0C 8042D002 */ lb $v0, %lo(D_802AD002)($v0)
/* 4168A0 802A1B10 10620044 */ beq $v1, $v0, .L802A1C24
/* 4168A4 802A1B14 24020001 */ addiu $v0, $zero, 1
/* 4168A8 802A1B18 3C01802B */ lui $at, %hi(D_802AD004)
/* 4168AC 802A1B1C A022D004 */ sb $v0, %lo(D_802AD004)($at)
/* 4168B0 802A1B20 0C05272D */ jal sfx_play_sound
/* 4168B4 802A1B24 240400C8 */ addiu $a0, $zero, 0xc8
/* 4168B8 802A1B28 080A870A */ j .L802A1C28
/* 4168BC 802A1B2C 0000102D */ daddu $v0, $zero, $zero
.L802A1B30:
/* 4168C0 802A1B30 3C02802B */ lui $v0, %hi(D_802AD002)
/* 4168C4 802A1B34 8042D002 */ lb $v0, %lo(D_802AD002)($v0)
/* 4168C8 802A1B38 3C04802B */ lui $a0, %hi(D_802AD06B)
/* 4168CC 802A1B3C 8084D06B */ lb $a0, %lo(D_802AD06B)($a0)
/* 4168D0 802A1B40 3C01802B */ lui $at, %hi(D_802AD008)
/* 4168D4 802A1B44 A423D008 */ sh $v1, %lo(D_802AD008)($at)
/* 4168D8 802A1B48 080A86F1 */ j .L802A1BC4
/* 4168DC 802A1B4C 00441021 */ addu $v0, $v0, $a0
.L802A1B50:
/* 4168E0 802A1B50 3C02802B */ lui $v0, %hi(D_802AD002)
/* 4168E4 802A1B54 8042D002 */ lb $v0, %lo(D_802AD002)($v0)
/* 4168E8 802A1B58 3C04802B */ lui $a0, %hi(D_802AD06B)
/* 4168EC 802A1B5C 8084D06B */ lb $a0, %lo(D_802AD06B)($a0)
/* 4168F0 802A1B60 3C01802B */ lui $at, %hi(D_802AD001)
/* 4168F4 802A1B64 A020D001 */ sb $zero, %lo(D_802AD001)($at)
/* 4168F8 802A1B68 3C01802B */ lui $at, %hi(D_802AD006)
/* 4168FC 802A1B6C A420D006 */ sh $zero, %lo(D_802AD006)($at)
/* 416900 802A1B70 080A86EF */ j .L802A1BBC
/* 416904 802A1B74 2403000B */ addiu $v1, $zero, 0xb
.L802A1B78:
/* 416908 802A1B78 3C02802B */ lui $v0, %hi(D_802AD002)
/* 41690C 802A1B7C 8042D002 */ lb $v0, %lo(D_802AD002)($v0)
/* 416910 802A1B80 3C03802B */ lui $v1, %hi(D_802AD06B)
/* 416914 802A1B84 8063D06B */ lb $v1, %lo(D_802AD06B)($v1)
/* 416918 802A1B88 00431021 */ addu $v0, $v0, $v1
/* 41691C 802A1B8C 080A870A */ j .L802A1C28
/* 416920 802A1B90 24420001 */ addiu $v0, $v0, 1
.L802A1B94:
/* 416924 802A1B94 3C01802B */ lui $at, %hi(D_802AD001)
/* 416928 802A1B98 A022D001 */ sb $v0, %lo(D_802AD001)($at)
/* 41692C 802A1B9C 240200FF */ addiu $v0, $zero, 0xff
/* 416930 802A1BA0 3C01802B */ lui $at, %hi(D_802AD006)
/* 416934 802A1BA4 A422D006 */ sh $v0, %lo(D_802AD006)($at)
/* 416938 802A1BA8 3C02802B */ lui $v0, %hi(D_802AD002)
/* 41693C 802A1BAC 8042D002 */ lb $v0, %lo(D_802AD002)($v0)
/* 416940 802A1BB0 3C04802B */ lui $a0, %hi(D_802AD06B)
/* 416944 802A1BB4 8084D06B */ lb $a0, %lo(D_802AD06B)($a0)
/* 416948 802A1BB8 24030002 */ addiu $v1, $zero, 2
.L802A1BBC:
/* 41694C 802A1BBC A2030000 */ sb $v1, ($s0)
/* 416950 802A1BC0 00441021 */ addu $v0, $v0, $a0
.L802A1BC4:
/* 416954 802A1BC4 080A870A */ j .L802A1C28
/* 416958 802A1BC8 24420001 */ addiu $v0, $v0, 1
.L802A1BCC:
/* 41695C 802A1BCC 3C01802B */ lui $at, %hi(D_802AD001)
/* 416960 802A1BD0 A022D001 */ sb $v0, %lo(D_802AD001)($at)
/* 416964 802A1BD4 240200FF */ addiu $v0, $zero, 0xff
/* 416968 802A1BD8 3C01802B */ lui $at, %hi(D_802AD006)
/* 41696C 802A1BDC A422D006 */ sh $v0, %lo(D_802AD006)($at)
/* 416970 802A1BE0 080A8708 */ j .L802A1C20
/* 416974 802A1BE4 2402FFFF */ addiu $v0, $zero, -1
.L802A1BE8:
/* 416978 802A1BE8 3C04802B */ lui $a0, %hi(D_802AD068)
/* 41697C 802A1BEC 8084D068 */ lb $a0, %lo(D_802AD068)($a0)
/* 416980 802A1BF0 0C093E58 */ jal btl_show_battle_message
/* 416984 802A1BF4 2405005A */ addiu $a1, $zero, 0x5a
/* 416988 802A1BF8 080A8708 */ j .L802A1C20
/* 41698C 802A1BFC 24020065 */ addiu $v0, $zero, 0x65
.L802A1C00:
/* 416990 802A1C00 0C093EAD */ jal btl_is_popup_displayed
/* 416994 802A1C04 00000000 */ nop
/* 416998 802A1C08 14400007 */ bnez $v0, .L802A1C28
/* 41699C 802A1C0C 0000102D */ daddu $v0, $zero, $zero
/* 4169A0 802A1C10 2402FFFF */ addiu $v0, $zero, -1
/* 4169A4 802A1C14 3C01802B */ lui $at, %hi(D_802AD068)
/* 4169A8 802A1C18 A022D068 */ sb $v0, %lo(D_802AD068)($at)
/* 4169AC 802A1C1C 24020002 */ addiu $v0, $zero, 2
.L802A1C20:
/* 4169B0 802A1C20 A2020000 */ sb $v0, ($s0)
.L802A1C24:
/* 4169B4 802A1C24 0000102D */ daddu $v0, $zero, $zero
.L802A1C28:
/* 4169B8 802A1C28 8FBF0030 */ lw $ra, 0x30($sp)
/* 4169BC 802A1C2C 8FB5002C */ lw $s5, 0x2c($sp)
/* 4169C0 802A1C30 8FB40028 */ lw $s4, 0x28($sp)
/* 4169C4 802A1C34 8FB30024 */ lw $s3, 0x24($sp)
/* 4169C8 802A1C38 8FB20020 */ lw $s2, 0x20($sp)
/* 4169CC 802A1C3C 8FB1001C */ lw $s1, 0x1c($sp)
/* 4169D0 802A1C40 8FB00018 */ lw $s0, 0x18($sp)
/* 4169D4 802A1C44 D7B60040 */ ldc1 $f22, 0x40($sp)
/* 4169D8 802A1C48 D7B40038 */ ldc1 $f20, 0x38($sp)
/* 4169DC 802A1C4C 03E00008 */ jr $ra
/* 4169E0 802A1C50 27BD0048 */ addiu $sp, $sp, 0x48

View File

@ -1,162 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel load_model_transforms
/* B14C8 8011ADC8 27BDFF00 */ addiu $sp, $sp, -0x100
/* B14CC 8011ADCC AFB100E4 */ sw $s1, 0xe4($sp)
/* B14D0 8011ADD0 0080882D */ daddu $s1, $a0, $zero
/* B14D4 8011ADD4 AFB500F4 */ sw $s5, 0xf4($sp)
/* B14D8 8011ADD8 00A0A82D */ daddu $s5, $a1, $zero
/* B14DC 8011ADDC AFB300EC */ sw $s3, 0xec($sp)
/* B14E0 8011ADE0 00C0982D */ daddu $s3, $a2, $zero
/* B14E4 8011ADE4 AFB400F0 */ sw $s4, 0xf0($sp)
/* B14E8 8011ADE8 00E0A02D */ daddu $s4, $a3, $zero
/* B14EC 8011ADEC AFBF00F8 */ sw $ra, 0xf8($sp)
/* B14F0 8011ADF0 AFB200E8 */ sw $s2, 0xe8($sp)
/* B14F4 8011ADF4 AFB000E0 */ sw $s0, 0xe0($sp)
/* B14F8 8011ADF8 8E250010 */ lw $a1, 0x10($s1)
/* B14FC 8011ADFC 10A00041 */ beqz $a1, .L8011AF04
/* B1500 8011AE00 27B20090 */ addiu $s2, $sp, 0x90
/* B1504 8011AE04 8CA2000C */ lw $v0, 0xc($a1)
/* B1508 8011AE08 5040003F */ beql $v0, $zero, .L8011AF08
/* B150C 8011AE0C 0260202D */ daddu $a0, $s3, $zero
/* B1510 8011AE10 8CA50000 */ lw $a1, ($a1)
/* B1514 8011AE14 10A00007 */ beqz $a1, .L8011AE34
/* B1518 8011AE18 27B000A0 */ addiu $s0, $sp, 0xa0
/* B151C 8011AE1C 0C019D60 */ jal guMtxL2F
/* B1520 8011AE20 0200202D */ daddu $a0, $s0, $zero
/* B1524 8011AE24 0200202D */ daddu $a0, $s0, $zero
/* B1528 8011AE28 0260282D */ daddu $a1, $s3, $zero
/* B152C 8011AE2C 0C019D80 */ jal guMtxCatF
/* B1530 8011AE30 27A60010 */ addiu $a2, $sp, 0x10
.L8011AE34:
/* B1534 8011AE34 0220202D */ daddu $a0, $s1, $zero
/* B1538 8011AE38 0C0456C3 */ jal get_model_property
/* B153C 8011AE3C 24050060 */ addiu $a1, $zero, 0x60
/* B1540 8011AE40 10400002 */ beqz $v0, .L8011AE4C
/* B1544 8011AE44 0000202D */ daddu $a0, $zero, $zero
/* B1548 8011AE48 8C440008 */ lw $a0, 8($v0)
.L8011AE4C:
/* B154C 8011AE4C 8E230000 */ lw $v1, ($s1)
/* B1550 8011AE50 24020005 */ addiu $v0, $zero, 5
/* B1554 8011AE54 14620003 */ bne $v1, $v0, .L8011AE64
/* B1558 8011AE58 00000000 */ nop
/* B155C 8011AE5C 1480002A */ bnez $a0, .L8011AF08
/* B1560 8011AE60 0260202D */ daddu $a0, $s3, $zero
.L8011AE64:
/* B1564 8011AE64 8E240010 */ lw $a0, 0x10($s1)
/* B1568 8011AE68 8C82000C */ lw $v0, 0xc($a0)
/* B156C 8011AE6C 18400012 */ blez $v0, .L8011AEB8
/* B1570 8011AE70 0000802D */ daddu $s0, $zero, $zero
/* B1574 8011AE74 0260302D */ daddu $a2, $s3, $zero
.L8011AE78:
/* B1578 8011AE78 00101080 */ sll $v0, $s0, 2
/* B157C 8011AE7C 8C830010 */ lw $v1, 0x10($a0)
/* B1580 8011AE80 8C840000 */ lw $a0, ($a0)
/* B1584 8011AE84 10800002 */ beqz $a0, .L8011AE90
/* B1588 8011AE88 00431021 */ addu $v0, $v0, $v1
/* B158C 8011AE8C 27A60010 */ addiu $a2, $sp, 0x10
.L8011AE90:
/* B1590 8011AE90 0220282D */ daddu $a1, $s1, $zero
/* B1594 8011AE94 8C440000 */ lw $a0, ($v0)
/* B1598 8011AE98 0C046B72 */ jal load_model_transforms
/* B159C 8011AE9C 26870001 */ addiu $a3, $s4, 1
/* B15A0 8011AEA0 8E240010 */ lw $a0, 0x10($s1)
/* B15A4 8011AEA4 8C82000C */ lw $v0, 0xc($a0)
/* B15A8 8011AEA8 26100001 */ addiu $s0, $s0, 1
/* B15AC 8011AEAC 0202102A */ slt $v0, $s0, $v0
/* B15B0 8011AEB0 1440FFF1 */ bnez $v0, .L8011AE78
/* B15B4 8011AEB4 0260302D */ daddu $a2, $s3, $zero
.L8011AEB8:
/* B15B8 8011AEB8 3C048015 */ lui $a0, %hi(mdl_treeIterPos)
/* B15BC 8011AEBC 24843224 */ addiu $a0, $a0, %lo(mdl_treeIterPos)
/* B15C0 8011AEC0 3C05800A */ lui $a1, %hi(mdl_currentModelTreeNodeInfo)
/* B15C4 8011AEC4 24A5A5F4 */ addiu $a1, $a1, %lo(mdl_currentModelTreeNodeInfo)
/* B15C8 8011AEC8 8C820000 */ lw $v0, ($a0)
/* B15CC 8011AECC 8CA30000 */ lw $v1, ($a1)
/* B15D0 8011AED0 00021080 */ sll $v0, $v0, 2
/* B15D4 8011AED4 00431021 */ addu $v0, $v0, $v1
/* B15D8 8011AED8 240300FF */ addiu $v1, $zero, 0xff
/* B15DC 8011AEDC A0430000 */ sb $v1, ($v0)
/* B15E0 8011AEE0 8C820000 */ lw $v0, ($a0)
/* B15E4 8011AEE4 8CA30000 */ lw $v1, ($a1)
/* B15E8 8011AEE8 00021080 */ sll $v0, $v0, 2
/* B15EC 8011AEEC 00431021 */ addu $v0, $v0, $v1
/* B15F0 8011AEF0 A0540001 */ sb $s4, 1($v0)
/* B15F4 8011AEF4 8C820000 */ lw $v0, ($a0)
/* B15F8 8011AEF8 24420001 */ addiu $v0, $v0, 1
/* B15FC 8011AEFC 08046BFB */ j .L8011AFEC
/* B1600 8011AF00 AC820000 */ sw $v0, ($a0)
.L8011AF04:
/* B1604 8011AF04 0260202D */ daddu $a0, $s3, $zero
.L8011AF08:
/* B1608 8011AF08 27B00050 */ addiu $s0, $sp, 0x50
/* B160C 8011AF0C 0C019D40 */ jal guMtxF2L
/* B1610 8011AF10 0200282D */ daddu $a1, $s0, $zero
/* B1614 8011AF14 A6400000 */ sh $zero, ($s2)
/* B1618 8011AF18 AE510004 */ sw $s1, 4($s2)
/* B161C 8011AF1C 8EA20010 */ lw $v0, 0x10($s5)
/* B1620 8011AF20 AE50000C */ sw $s0, 0xc($s2)
/* B1624 8011AF24 AE420008 */ sw $v0, 8($s2)
/* B1628 8011AF28 8E230000 */ lw $v1, ($s1)
/* B162C 8011AF2C 24020005 */ addiu $v0, $zero, 5
/* B1630 8011AF30 14620021 */ bne $v1, $v0, .L8011AFB8
/* B1634 8011AF34 0240202D */ daddu $a0, $s2, $zero
/* B1638 8011AF38 0C04572A */ jal mdl_get_child_count
/* B163C 8011AF3C 0220202D */ daddu $a0, $s1, $zero
/* B1640 8011AF40 3C078015 */ lui $a3, %hi(mdl_treeIterPos)
/* B1644 8011AF44 24E73224 */ addiu $a3, $a3, %lo(mdl_treeIterPos)
/* B1648 8011AF48 8CF00000 */ lw $s0, ($a3)
/* B164C 8011AF4C 0040202D */ daddu $a0, $v0, $zero
/* B1650 8011AF50 02041021 */ addu $v0, $s0, $a0
/* B1654 8011AF54 0202102A */ slt $v0, $s0, $v0
/* B1658 8011AF58 10400011 */ beqz $v0, .L8011AFA0
/* B165C 8011AF5C 240800FF */ addiu $t0, $zero, 0xff
/* B1660 8011AF60 3C05800A */ lui $a1, %hi(mdl_currentModelTreeNodeInfo)
/* B1664 8011AF64 24A5A5F4 */ addiu $a1, $a1, %lo(mdl_currentModelTreeNodeInfo)
/* B1668 8011AF68 26860001 */ addiu $a2, $s4, 1
.L8011AF6C:
/* B166C 8011AF6C 8CA20000 */ lw $v0, ($a1)
/* B1670 8011AF70 00101880 */ sll $v1, $s0, 2
/* B1674 8011AF74 00621021 */ addu $v0, $v1, $v0
/* B1678 8011AF78 A0480000 */ sb $t0, ($v0)
/* B167C 8011AF7C 8CA20000 */ lw $v0, ($a1)
/* B1680 8011AF80 00621821 */ addu $v1, $v1, $v0
/* B1684 8011AF84 A0660001 */ sb $a2, 1($v1)
/* B1688 8011AF88 8CE20000 */ lw $v0, ($a3)
/* B168C 8011AF8C 26100001 */ addiu $s0, $s0, 1
/* B1690 8011AF90 00441021 */ addu $v0, $v0, $a0
/* B1694 8011AF94 0202102A */ slt $v0, $s0, $v0
/* B1698 8011AF98 1440FFF4 */ bnez $v0, .L8011AF6C
/* B169C 8011AF9C 00000000 */ nop
.L8011AFA0:
/* B16A0 8011AFA0 3C038015 */ lui $v1, %hi(mdl_treeIterPos)
/* B16A4 8011AFA4 24633224 */ addiu $v1, $v1, %lo(mdl_treeIterPos)
/* B16A8 8011AFA8 8C620000 */ lw $v0, ($v1)
/* B16AC 8011AFAC 00441021 */ addu $v0, $v0, $a0
/* B16B0 8011AFB0 AC620000 */ sw $v0, ($v1)
/* B16B4 8011AFB4 0240202D */ daddu $a0, $s2, $zero
.L8011AFB8:
/* B16B8 8011AFB8 0C045883 */ jal mdl_create_model
/* B16BC 8011AFBC 24050004 */ addiu $a1, $zero, 4
/* B16C0 8011AFC0 3C038015 */ lui $v1, %hi(mdl_treeIterPos)
/* B16C4 8011AFC4 24633224 */ addiu $v1, $v1, %lo(mdl_treeIterPos)
/* B16C8 8011AFC8 8C620000 */ lw $v0, ($v1)
/* B16CC 8011AFCC 3C04800A */ lui $a0, %hi(mdl_currentModelTreeNodeInfo)
/* B16D0 8011AFD0 8C84A5F4 */ lw $a0, %lo(mdl_currentModelTreeNodeInfo)($a0)
/* B16D4 8011AFD4 00021080 */ sll $v0, $v0, 2
/* B16D8 8011AFD8 00441021 */ addu $v0, $v0, $a0
/* B16DC 8011AFDC A0540001 */ sb $s4, 1($v0)
/* B16E0 8011AFE0 8C620000 */ lw $v0, ($v1)
/* B16E4 8011AFE4 24420001 */ addiu $v0, $v0, 1
/* B16E8 8011AFE8 AC620000 */ sw $v0, ($v1)
.L8011AFEC:
/* B16EC 8011AFEC 8FBF00F8 */ lw $ra, 0xf8($sp)
/* B16F0 8011AFF0 8FB500F4 */ lw $s5, 0xf4($sp)
/* B16F4 8011AFF4 8FB400F0 */ lw $s4, 0xf0($sp)
/* B16F8 8011AFF8 8FB300EC */ lw $s3, 0xec($sp)
/* B16FC 8011AFFC 8FB200E8 */ lw $s2, 0xe8($sp)
/* B1700 8011B000 8FB100E4 */ lw $s1, 0xe4($sp)
/* B1704 8011B004 8FB000E0 */ lw $s0, 0xe0($sp)
/* B1708 8011B008 03E00008 */ jr $ra
/* B170C 8011B00C 27BD0100 */ addiu $sp, $sp, 0x100