From 486dbfda39a9e899a564885d1ed35ba24943dd87 Mon Sep 17 00:00:00 2001 From: Unnunu Date: Mon, 10 Jan 2022 18:55:26 +0300 Subject: [PATCH] Match status_icons (#612) --- include/functions.h | 11 +- src/190B20.c | 18 +- src/20ec0_len_5040.c | 577 -------- src/common/RemoveChillOut.inc.c | 2 +- src/status_icons.c | 1288 +++++++++++++++++ .../btl_state_update_begin_player_turn.s | 2 +- .../asm/nonmatchings/182B30/func_80255FE0.s | 18 +- .../asm/nonmatchings/182B30/func_80257DA4.s | 24 +- .../20ec0_len_5040/create_status_icon_set.s | 68 - .../20ec0_len_5040/draw_all_status_icons.s | 1094 -------------- .../20ec0_len_5040/func_80045FB4.s | 38 - .../20ec0_len_5040/func_80046030.s | 427 ------ .../set_status_icons_properties.s | 30 - ver/us/splat.yaml | 4 +- ver/us/symbol_addrs.txt | 22 +- 15 files changed, 1342 insertions(+), 2281 deletions(-) delete mode 100644 src/20ec0_len_5040.c create mode 100644 src/status_icons.c delete mode 100644 ver/us/asm/nonmatchings/20ec0_len_5040/create_status_icon_set.s delete mode 100644 ver/us/asm/nonmatchings/20ec0_len_5040/draw_all_status_icons.s delete mode 100644 ver/us/asm/nonmatchings/20ec0_len_5040/func_80045FB4.s delete mode 100644 ver/us/asm/nonmatchings/20ec0_len_5040/func_80046030.s delete mode 100644 ver/us/asm/nonmatchings/20ec0_len_5040/set_status_icons_properties.s diff --git a/include/functions.h b/include/functions.h index fe6a134b1f..dd0c7b192d 100644 --- a/include/functions.h +++ b/include/functions.h @@ -437,7 +437,10 @@ void reset_all_actor_sounds(Actor*); void decrement_status_menu_disabled(void); void increment_status_menu_disabled(void); void btl_delete_actor(Actor* actor); -void remove_status_4(s32); +void create_status_debuff(s32, s32); +void create_status_static(s32, s32); +void create_status_transparent(s32, s32); +void remove_status_chill_out(s32); void remove_status_debuff(s32); void remove_status_icon_boost_hammer(s32); void remove_status_icon_boost_jump(s32); @@ -447,6 +450,8 @@ void remove_status_icon_peril(s32); void remove_status_icon_surprise(s32); void remove_status_static(s32); void remove_status_transparent(s32); +void remove_all_status_icons(s32); +s32 create_status_icon_set(void); s32 find_item(s32); void enable_background_wave(void); @@ -691,7 +696,6 @@ void update_encounters_neutral(void); void update_encounters_pre_battle(void); void update_encounters_conversation(void); void update_encounters_post_battle(void); -void update_merlee_messages(void); void reset_background_settings(void); void func_80138188(void); void func_80268770(s32, s32, s32); @@ -703,7 +707,10 @@ void remove_consumable(void); void delete_shadow(s32); void repartner_set_tether_distance(void); void save_tattle_flags(s32); +void update_merlee_messages(void); void draw_merlee_messages(void); +void show_merlee_message(s16, s16); +s32 is_merlee_message_done(void); void draw_encounters_conversation(void); void draw_encounters_post_battle(void); void draw_encounters_pre_battle(void); diff --git a/src/190B20.c b/src/190B20.c index a3142cf5d7..ad8d218804 100644 --- a/src/190B20.c +++ b/src/190B20.c @@ -2436,30 +2436,30 @@ s32 inflict_status(Actor* target, s32 statusTypeKey, s32 duration) { } target->unk_228 = playFX_81(0, target->currentPos.x, target->currentPos.y, target->currentPos.z, 1.0f, 0); - func_80047820(target->hudElementDataIndex, STATUS_FROZEN); + create_status_debuff(target->hudElementDataIndex, STATUS_FROZEN); } return TRUE; case STATUS_SLEEP: func_80266DAC(target, 3); - func_80047820(target->hudElementDataIndex, STATUS_SLEEP); + create_status_debuff(target->hudElementDataIndex, STATUS_SLEEP); return TRUE; case STATUS_PARALYZE: func_80266DAC(target, 7); - func_80047820(target->hudElementDataIndex, STATUS_PARALYZE); + create_status_debuff(target->hudElementDataIndex, STATUS_PARALYZE); return TRUE; case STATUS_DIZZY: - func_80047820(target->hudElementDataIndex, STATUS_DIZZY); + create_status_debuff(target->hudElementDataIndex, STATUS_DIZZY); return TRUE; case STATUS_FEAR: func_80266DAC(target, 5); - func_80047820(target->hudElementDataIndex, STATUS_FEAR); + create_status_debuff(target->hudElementDataIndex, STATUS_FEAR); return TRUE; case STATUS_POISON: func_80266DAC(target, 6); - func_80047820(target->hudElementDataIndex, STATUS_POISON); + create_status_debuff(target->hudElementDataIndex, STATUS_POISON); return TRUE; case STATUS_SHRINK: - func_80047820(target->hudElementDataIndex, STATUS_SHRINK); + create_status_debuff(target->hudElementDataIndex, STATUS_SHRINK); return TRUE; } } @@ -2477,7 +2477,7 @@ s32 inflict_status(Actor* target, s32 statusTypeKey, s32 duration) { } target->status = STATUS_STATIC; func_80266DAC(target, 4); - func_80047928(target->hudElementDataIndex, STATUS_STATIC); + create_status_static(target->hudElementDataIndex, STATUS_STATIC); } return TRUE; case STATUS_STONE: @@ -2508,7 +2508,7 @@ s32 inflict_status(Actor* target, s32 statusTypeKey, s32 duration) { target->transDuration = 9; } target->status = STATUS_E; - func_80047A30(target->hudElementDataIndex, STATUS_E); + create_status_transparent(target->hudElementDataIndex, STATUS_E); } return TRUE; case STATUS_END: diff --git a/src/20ec0_len_5040.c b/src/20ec0_len_5040.c deleted file mode 100644 index 1fd99e4720..0000000000 --- a/src/20ec0_len_5040.c +++ /dev/null @@ -1,577 +0,0 @@ -#include "common.h" -#include "npc.h" -#include "hud_element.h" - -enum StatusIconFlag { - STATUS_ICON_FLAG_DEBUFF = 0x004, - STATUS_ICON_FLAG_STATIC = 0x008, - STATUS_ICON_FLAG_TRANSPARENT = 0x010, - STATUS_ICON_FLAG_STATUS_4 = 0x020, - STATUS_ICON_FLAG_BOOST_JUMP = 0x040, - STATUS_ICON_FLAG_BOOST_HAMMER = 0x080, - STATUS_ICON_FLAG_BOOST_PARTNER = 0x100, - STATUS_ICON_FLAG_SURPRISE = 0x200, - STATUS_ICON_FLAG_PERIL = 0x400, - STATUS_ICON_FLAG_DANGER = 0x800, -}; - -typedef struct HudComplexStatusIcon { - /* 0x0 */ s8 active; - /* 0x1 */ s8 removing; - /* 0x2 */ s8 unk_02; - /* 0x3 */ s8 unk_03; - /* 0x4 */ s8 unk_04; - /* 0x5 */ s8 unk_05; - /* 0x8 */ s32 hudElemIndex; - /* 0xC */ s32 unk_0C; -} HudComplexStatusIcon; // size = 0x10 - -typedef struct HudSimpleStatusIcon { - /* 0x0 */ s8 active; - /* 0x1 */ s8 removing; - /* 0x4 */ s32 hudElemIndex; -} HudSimpleStatusIcon; // size = 0x8 - -typedef struct HudStatusIcon { - /* 0x00 */ s32 flags; - /* 0x04 */ Vec3f worldPos; - /* 0x10 */ f32 status1Radius; - /* 0x14 */ f32 status1OffsetY; - /* 0x18 */ f32 status2Radius; - /* 0x1C */ f32 status2OffsetY; - /* 0x20 */ f32 status3Radius; - /* 0x24 */ f32 status3OffsetY; - /* 0x28 */ f32 status4Radius; - /* 0x2C */ f32 status4OffsetY; - /* 0x30 */ f32 offsetY; - /* 0x34 */ f32 unk_34; - /* 0x38 */ HudComplexStatusIcon status1; - /* 0x48 */ HudComplexStatusIcon status2; - /* 0x58 */ HudComplexStatusIcon status3; - /* 0x68 */ HudComplexStatusIcon status4; - /* 0x78 */ HudSimpleStatusIcon boostJump; - /* 0x80 */ s32 prevIndexBoostJump; - /* 0x84 */ HudSimpleStatusIcon boostHammer; - /* 0x8C */ s32 prevIndexBoostHammer; - /* 0x90 */ HudSimpleStatusIcon boostPartner; - /* 0x98 */ HudSimpleStatusIcon surprise; - /* 0xA0 */ HudSimpleStatusIcon peril; - /* 0xA8 */ HudSimpleStatusIcon danger; -} HudStatusIcon; // size = 0xB0 - -extern HudStatusIcon *D_800A0F44; -extern HudElementAnim D_80108A14[]; -extern HudElementAnim D_801089C4[]; -extern HudElementAnim D_8010760C[]; -extern HudElementAnim D_801075E0[]; -extern HudElementAnim D_80107314[]; -extern HudElementAnim D_8010701C[]; -extern HudElementAnim D_8010717C[]; -extern HudElementAnim D_80107474[]; - -extern s32 D_800A0F40; -extern PopupMessage D_800A0BC0[32]; -extern s16 D_80078160[]; -extern s16 D_80078164[]; -extern s32 D_80078168[]; - -void update_merlee_message(PopupMessage* popup); -void draw_merlee_message(PopupMessage* popup); -void func_80045BC8(void); -void func_80045FB4(void); - -void func_80045AC0(void) { - s32 i; - - for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { - PopupMessage* popup = &D_800A0BC0[i]; - popup->active = FALSE; - popup->message = NULL; - } - - create_generic_entity_world(NULL, func_80045BC8); - func_80045FB4(); -} - -void func_80045B10(void) { - s32 i; - - for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { - PopupMessage* popup = &D_800A0BC0[i]; - if (popup->message != NULL) { - heap_free(popup->message); - } - popup->active = FALSE; - } -} - -void update_merlee_messages(void) { - s32 i; - - for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { - PopupMessage* popup = &D_800A0BC0[i]; - if (popup->active && popup->updateFunc != NULL) { - popup->updateFunc(popup); - } - } -} - -void func_80045BC8(void) { - s32 i; - - for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { - PopupMessage* popup = &D_800A0BC0[i]; - if (popup->active && popup->unk_08 != NULL) { - popup->unk_08(popup); - } - } -} - -void draw_merlee_messages(void) { - s32 i; - - for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { - PopupMessage* popup = &D_800A0BC0[i]; - if (popup->active && popup->drawFunc != NULL) { - popup->drawFunc(popup); - } - } -} - -PopupMessage* get_current_merlee_message(void) { - s32 i; - - for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { - PopupMessage* popup = &D_800A0BC0[i]; - if (!popup->active) { - popup->active = TRUE; - return popup; - } - } - - return NULL; -} - -void dispose_merlee_message(PopupMessage* popup) { - if (popup->message != NULL) { - heap_free(popup->message); - popup->message = NULL; - } - popup->active = FALSE; -} - -void show_merlee_message(s16 messageIndex, s16 duration) { - PopupMessage* popup = get_current_merlee_message(); - - if (popup != NULL) { - popup->updateFunc = update_merlee_message; - popup->drawFunc = draw_merlee_message; - popup->unk_17 = 1; - popup->unk_00 = 0; - popup->unk_08 = NULL; - popup->messageIndex = messageIndex; - popup->duration = duration; - popup->unk_16 = 0; - D_800A0F40 = 1; - } -} - -void update_merlee_message(PopupMessage* popup) { - s32 closeMessage = FALSE; - - switch (popup->unk_16) { - case 0: - popup->unk_16 = 1; - break; - case 1: - popup->unk_16 = 2; - break; - case 2: - if (gGameStatusPtr->pressedButtons & 0xC000) { - popup->duration = 0; - } - if (popup->duration != 0) { - popup->duration--; - } else { - popup->unk_16 = 3; - } - break; - case 3: - popup->unk_16 = 4; - break; - case 4: - closeMessage = TRUE; - break; - } - - if (closeMessage) { - set_window_update(9, 2); - D_800A0F40 = 0; - dispose_merlee_message(popup); - } -} - -// TODO remove once all other functions in this file are matched -const static f32 padding = 0.0f; - -void draw_merlee_message_string(PopupMessage* popup, s32 posX, s32 posY) { - s32 messageID = D_80078168[popup->messageIndex]; - - posY += 6; - posX += 15; - - posY += D_80078164[get_msg_lines(messageID) - 1]; - - draw_msg(messageID, posX, posY, 255, 15, 0); -} - -void draw_merlee_message(PopupMessage* popup) { - s32 messageID; - s32 xPos; - s32 width; - - if (popup->unk_17 != 0) { - popup->unk_17 = 0; - messageID = D_80078168[popup->messageIndex]; - width = get_msg_width(messageID, 0) + 30; - xPos = 160 - (width / 2); - set_window_properties(9, xPos, 80, width, D_80078160[get_msg_lines(messageID) - 1], 0, draw_merlee_message_string, popup, -1); - set_window_update(9, 1); - } -} - -s32 is_merlee_message_done(void) { - return D_800A0F40; -} - -INCLUDE_ASM(s32, "20ec0_len_5040", func_80045FB4); - -INCLUDE_ASM(s32, "20ec0_len_5040", func_80046030); - -INCLUDE_ASM(s32, "20ec0_len_5040", draw_all_status_icons); - -INCLUDE_ASM(s32, "20ec0_len_5040", create_status_icon_set); - -void remove_all_status_icons(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - remove_status_debuff(iconID); - remove_status_static(iconID); - remove_status_transparent(iconID); - remove_status_4(iconID); - remove_status_icon_boost_jump(iconID); - remove_status_icon_boost_hammer(iconID); - remove_status_icon_boost_partner(iconID); - remove_status_icon_surprise(iconID); - remove_status_icon_peril(iconID); - remove_status_icon_danger(iconID); - statusIcon->flags = 0; -} - -INCLUDE_ASM(s32, "20ec0_len_5040", set_status_icons_properties); - -void func_800477F4(s32 iconID, f32 offsetY, f32 arg2) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->offsetY = offsetY; - statusIcon->unk_34 = arg2; -} - -void func_80047820(s32 iconID, s32 arg1) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags &= ~STATUS_ICON_FLAG_DEBUFF; - if (statusIcon->status1.active != arg1) { - remove_status_debuff(iconID); - statusIcon->status1.active = arg1; - statusIcon->status1.unk_02 = 1; - } -} - -void remove_status_debuff(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - if (statusIcon->status1.active && !statusIcon->status1.removing) { - statusIcon->status1.removing = statusIcon->status1.active; - statusIcon->status1.unk_03 = TRUE; - statusIcon->status1.active = FALSE; - statusIcon->status1.unk_02 = FALSE; - statusIcon->status1.unk_05 = 10; - statusIcon->status1.unk_0C = statusIcon->status1.hudElemIndex; - } -} - -void enable_status_1(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags |= STATUS_ICON_FLAG_DEBUFF; -} - -void func_80047928(s32 iconID, s32 arg1) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags &= ~STATUS_ICON_FLAG_STATIC; - if (statusIcon->status2.active != arg1) { - remove_status_static(iconID); - statusIcon->status2.active = arg1; - statusIcon->status2.unk_02 = 1; - } -} - -void remove_status_static(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - if (statusIcon->status2.active && !statusIcon->status2.removing) { - statusIcon->status2.removing = statusIcon->status2.active; - statusIcon->status2.unk_03 = TRUE; - statusIcon->status2.active = FALSE; - statusIcon->status2.unk_02 = FALSE; - statusIcon->status2.unk_05 = 10; - statusIcon->status2.unk_0C = statusIcon->status2.hudElemIndex; - } -} - -void enable_status_2(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags |= STATUS_ICON_FLAG_STATIC; -} - -void func_80047A30(s32 iconID, s32 arg1) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags &= ~STATUS_ICON_FLAG_TRANSPARENT; - if (statusIcon->status3.active != arg1) { - remove_status_transparent(iconID); - statusIcon->status3.active = arg1; - statusIcon->status3.unk_02 = 1; - } -} - -void remove_status_transparent(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - if (statusIcon->status3.active && !statusIcon->status3.removing) { - statusIcon->status3.removing = statusIcon->status3.active; - statusIcon->status3.unk_03 = TRUE; - statusIcon->status3.active = FALSE; - statusIcon->status3.unk_02 = FALSE; - statusIcon->status3.unk_05 = 10; - statusIcon->status3.unk_0C = statusIcon->status3.hudElemIndex; - } -} - -void enable_status_3(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags |= STATUS_ICON_FLAG_TRANSPARENT; -} - -void func_80047B38(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags &= ~STATUS_ICON_FLAG_STATUS_4; - if (!statusIcon->status4.active) { - statusIcon->status4.active = TRUE; - statusIcon->status4.unk_02 = TRUE; - } -} - -void remove_status_4(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - if (statusIcon->status4.active && !statusIcon->status4.removing) { - statusIcon->status4.removing = statusIcon->status4.active; - statusIcon->status4.unk_03 = TRUE; - statusIcon->status4.active = FALSE; - statusIcon->status4.unk_02 = FALSE; - statusIcon->status4.unk_05 = 10; - statusIcon->status4.unk_0C = statusIcon->status4.hudElemIndex; - } -} - -void enable_status_4(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags |= STATUS_ICON_FLAG_STATUS_4; -} - -void create_status_icon_boost_jump(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - s32 hudElement; - - statusIcon->flags &= ~STATUS_ICON_FLAG_BOOST_JUMP; - if (!statusIcon->boostJump.active) { - statusIcon->boostJump.active = TRUE; - hudElement = create_hud_element(D_8010701C); - set_hud_element_flags(hudElement, 2); - set_hud_element_flags(hudElement, 0x80); - statusIcon->boostJump.hudElemIndex = hudElement; - } -} - -void remove_status_icon_boost_jump(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - if (statusIcon->boostJump.active) { - s32 hudElemIndex = statusIcon->boostJump.hudElemIndex; - statusIcon->boostJump.active = FALSE; - statusIcon->boostJump.removing = TRUE; - statusIcon->prevIndexBoostJump = hudElemIndex; - set_hud_element_anim(hudElemIndex, &D_8010717C[0]); - } -} - -void enable_status_icon_boost_jump(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags |= STATUS_ICON_FLAG_BOOST_JUMP; -} - -void create_status_icon_boost_hammer(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - s32 hudElement; - - statusIcon->flags &= ~STATUS_ICON_FLAG_BOOST_HAMMER; - if (!statusIcon->boostHammer.active) { - statusIcon->boostHammer.active = TRUE; - hudElement = create_hud_element(D_80107314); - set_hud_element_flags(hudElement, 2); - set_hud_element_flags(hudElement, 0x80); - statusIcon->boostHammer.hudElemIndex = hudElement; - } -} - -void remove_status_icon_boost_hammer(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - if (statusIcon->boostHammer.active) { - s32 hudElemIndex = statusIcon->boostHammer.hudElemIndex; - statusIcon->boostHammer.active = FALSE; - statusIcon->boostHammer.removing = FALSE; - statusIcon->prevIndexBoostHammer = hudElemIndex; - set_hud_element_anim(hudElemIndex, &D_80107474[0]); - } -} - -void enable_status_icon_boost_hammer(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags |= STATUS_ICON_FLAG_BOOST_HAMMER; -} - -void create_status_icon_boost_partner(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - s32 hudElement; - - statusIcon->flags &= ~STATUS_ICON_FLAG_BOOST_PARTNER; - if (!statusIcon->boostPartner.active) { - statusIcon->boostPartner.active = TRUE; - hudElement = create_hud_element(D_801075E0); - set_hud_element_flags(hudElement, 2); - set_hud_element_flags(hudElement, 0x80); - statusIcon->boostPartner.hudElemIndex = hudElement; - } -} - -void remove_status_icon_boost_partner(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - if (statusIcon->boostPartner.active) { - statusIcon->boostPartner.active = FALSE; - free_hud_element(statusIcon->boostPartner.hudElemIndex); - } -} - -void enable_status_icon_boost_partner(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags |= STATUS_ICON_FLAG_BOOST_PARTNER; -} - -void create_status_icon_surprise(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - s32 hudElement; - - statusIcon->flags &= ~STATUS_ICON_FLAG_SURPRISE; - if (!statusIcon->surprise.active) { - statusIcon->surprise.active = TRUE; - hudElement = create_hud_element(D_8010760C); - set_hud_element_flags(hudElement, 2); - set_hud_element_flags(hudElement, 0x80); - statusIcon->surprise.hudElemIndex = hudElement; - } -} - -void remove_status_icon_surprise(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - if (statusIcon->surprise.active) { - statusIcon->surprise.active = FALSE; - free_hud_element(statusIcon->surprise.hudElemIndex); - } -} - -void enable_status_icon_surprise(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags |= STATUS_ICON_FLAG_SURPRISE; -} - -void create_status_icon_peril(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - s32 hudElement; - - statusIcon->flags &= ~STATUS_ICON_FLAG_PERIL; - if (!statusIcon->peril.active) { - statusIcon->peril.active = TRUE; - hudElement = create_hud_element(D_801089C4); - set_hud_element_flags(hudElement, 2); - set_hud_element_flags(hudElement, 0x80); - statusIcon->peril.hudElemIndex = hudElement; - } -} - -void remove_status_icon_peril(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - if (statusIcon->peril.active) { - statusIcon->peril.active = FALSE; - free_hud_element(statusIcon->peril.hudElemIndex); - } -} - -void enable_status_icon_peril(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags |= STATUS_ICON_FLAG_PERIL; -} - -void create_status_icon_danger(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - s32 hudElement; - - statusIcon->flags &= ~STATUS_ICON_FLAG_DANGER; - if (!statusIcon->danger.active) { - statusIcon->danger.active = TRUE; - hudElement = create_hud_element(D_80108A14); - set_hud_element_flags(hudElement, 2); - set_hud_element_flags(hudElement, 0x80); - statusIcon->danger.hudElemIndex = hudElement; - } -} - -void remove_status_icon_danger(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - if (statusIcon->danger.active) { - statusIcon->danger.active = FALSE; - free_hud_element(statusIcon->danger.hudElemIndex); - } -} - -void enable_status_icon_danger(s32 iconID) { - HudStatusIcon* statusIcon = &D_800A0F44[iconID]; - - statusIcon->flags |= STATUS_ICON_FLAG_DANGER; -} diff --git a/src/common/RemoveChillOut.inc.c b/src/common/RemoveChillOut.inc.c index 86bd707121..aa6d9af4d2 100644 --- a/src/common/RemoveChillOut.inc.c +++ b/src/common/RemoveChillOut.inc.c @@ -7,7 +7,7 @@ ApiStatus N(RemoveChillOut)(Evt* script, s32 isInitialCall) { actor->chillOutTurns = 0; actor->chillOutAmount = 0; - remove_status_4(hudElementDataIndex); + remove_status_chill_out(hudElementDataIndex); return ApiStatus_DONE2; } diff --git a/src/status_icons.c b/src/status_icons.c new file mode 100644 index 0000000000..02a11514eb --- /dev/null +++ b/src/status_icons.c @@ -0,0 +1,1288 @@ +#include "common.h" +#include "npc.h" +#include "hud_element.h" + +#define MAX_ICONS (64) + +enum StatusIconFlag { + STATUS_ICON_FLAG_USED = 0x001, + STATUS_ICON_FLAG_BATTLE = 0x002, + STATUS_ICON_FLAG_DEBUFF = 0x004, + STATUS_ICON_FLAG_STATIC = 0x008, + STATUS_ICON_FLAG_TRANSPARENT = 0x010, + STATUS_ICON_FLAG_STATUS_CHILL_OUT = 0x020, + STATUS_ICON_FLAG_BOOST_JUMP = 0x040, + STATUS_ICON_FLAG_BOOST_HAMMER = 0x080, + STATUS_ICON_FLAG_BOOST_PARTNER = 0x100, + STATUS_ICON_FLAG_SURPRISE = 0x200, + STATUS_ICON_FLAG_PERIL = 0x400, + STATUS_ICON_FLAG_DANGER = 0x800, +}; + +enum StatusIconTask { + STATUS_ICON_TASK_NONE = 0, + STATUS_ICON_TASK_LOAD = 1, + STATUS_ICON_TASK_DRAW = 2, +}; + +typedef struct HudComplexStatusIcon { + /* 0x0 */ s8 active; + /* 0x1 */ s8 removing; + /* 0x2 */ s8 activeTask; + /* 0x3 */ s8 removingTask; + /* 0x4 */ s8 unk_04; + /* 0x5 */ s8 frameCounter; + /* 0x8 */ s32 activeElementID; + /* 0xC */ s32 removingElementID; +} HudComplexStatusIcon; // size = 0x10 + +typedef struct HudSimpleStatusIcon { + /* 0x0 */ s8 active; + /* 0x1 */ s8 removing; + /* 0x4 */ s32 activeElementID; +} HudSimpleStatusIcon; // size = 0x8 + +typedef struct HudStatusIcon { + /* 0x00 */ s32 flags; + /* 0x04 */ Vec3f worldPos; + /* 0x10 */ s32 status1Radius; + /* 0x14 */ s32 status1OffsetY; + /* 0x18 */ s32 status2Radius; + /* 0x1C */ s32 status2OffsetY; + /* 0x20 */ s32 status3Radius; + /* 0x24 */ s32 status3OffsetY; + /* 0x28 */ s32 status4Radius; + /* 0x2C */ s32 status4OffsetY; + /* 0x30 */ s32 offsetY; + /* 0x34 */ f32 unk_34; + /* 0x38 */ HudComplexStatusIcon status1; + /* 0x48 */ HudComplexStatusIcon status2; + /* 0x58 */ HudComplexStatusIcon status3; + /* 0x68 */ HudComplexStatusIcon status4; + /* 0x78 */ HudSimpleStatusIcon boostJump; + /* 0x80 */ s32 prevIndexBoostJump; + /* 0x84 */ HudSimpleStatusIcon boostHammer; + /* 0x8C */ s32 prevIndexBoostHammer; + /* 0x90 */ HudSimpleStatusIcon boostPartner; + /* 0x98 */ HudSimpleStatusIcon surprise; + /* 0xA0 */ HudSimpleStatusIcon peril; + /* 0xA8 */ HudSimpleStatusIcon danger; +} HudStatusIcon; // size = 0xB0 + +extern s16 D_80078160[]; +extern s16 D_80078164[]; +extern s32 D_80078168[]; + +extern HudElementAnim D_800804F0; + +extern PopupMessage D_800A0BC0[32]; +extern s32 D_800A0F40; +extern HudStatusIcon* D_800A0F44; + +extern HudElementAnim D_80104CC4; +extern HudElementAnim D_80104E64; +extern HudElementAnim D_801050A8; +extern HudElementAnim D_801052D8; +extern HudElementAnim D_8010551C; +extern HudElementAnim D_8010574C; +extern HudElementAnim D_80105AA0; +extern HudElementAnim D_80105C54; +extern HudElementAnim D_80105DF4; +extern HudElementAnim D_80105900; +extern HudElementAnim D_80105FA8; +extern HudElementAnim D_80106148; +extern HudElementAnim D_801062A0; +extern HudElementAnim D_801062DC; +extern HudElementAnim D_8010645C; +extern HudElementAnim D_80106610; +extern HudElementAnim D_801067B0; +extern HudElementAnim D_80106964; +extern HudElementAnim D_80106B04; +extern HudElementAnim D_80106CD8; +extern HudElementAnim D_80106E98; +extern HudElementAnim D_8010701C; +extern HudElementAnim D_8010717C; +extern HudElementAnim D_80107314; +extern HudElementAnim D_80107474; +extern HudElementAnim D_801075E0; +extern HudElementAnim D_8010760C; +extern HudElementAnim D_801089C4; +extern HudElementAnim D_80108A14; + + +void update_merlee_message(PopupMessage* popup); +void draw_merlee_message(PopupMessage* popup); +void func_80045BC8(void); +void init_all_status_icons(void); +void update_all_status_icons(PopupMessage* popup); +void draw_all_status_icons(PopupMessage* popup); + +void func_80045AC0(void) { + s32 i; + + for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { + PopupMessage* popup = &D_800A0BC0[i]; + popup->active = FALSE; + popup->message = NULL; + } + + create_generic_entity_world(NULL, func_80045BC8); + init_all_status_icons(); +} + +void func_80045B10(void) { + s32 i; + + for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { + PopupMessage* popup = &D_800A0BC0[i]; + if (popup->message != NULL) { + heap_free(popup->message); + } + popup->active = FALSE; + } +} + +void update_merlee_messages(void) { + s32 i; + + for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { + PopupMessage* popup = &D_800A0BC0[i]; + if (popup->active && popup->updateFunc != NULL) { + popup->updateFunc(popup); + } + } +} + +void func_80045BC8(void) { + s32 i; + + for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { + PopupMessage* popup = &D_800A0BC0[i]; + if (popup->active && popup->unk_08 != NULL) { + popup->unk_08(popup); + } + } +} + +void draw_merlee_messages(void) { + s32 i; + + for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { + PopupMessage* popup = &D_800A0BC0[i]; + if (popup->active && popup->drawFunc != NULL) { + popup->drawFunc(popup); + } + } +} + +PopupMessage* get_current_merlee_message(void) { + s32 i; + + for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { + PopupMessage* popup = &D_800A0BC0[i]; + if (!popup->active) { + popup->active = TRUE; + return popup; + } + } + + return NULL; +} + +void dispose_merlee_message(PopupMessage* popup) { + if (popup->message != NULL) { + heap_free(popup->message); + popup->message = NULL; + } + popup->active = FALSE; +} + +void show_merlee_message(s16 messageIndex, s16 duration) { + PopupMessage* popup = get_current_merlee_message(); + + if (popup != NULL) { + popup->updateFunc = update_merlee_message; + popup->drawFunc = draw_merlee_message; + popup->unk_17 = 1; + popup->unk_00 = 0; + popup->unk_08 = NULL; + popup->messageIndex = messageIndex; + popup->duration = duration; + popup->unk_16 = 0; + D_800A0F40 = 1; + } +} + +void update_merlee_message(PopupMessage* popup) { + s32 closeMessage = FALSE; + + switch (popup->unk_16) { + case 0: + popup->unk_16 = 1; + break; + case 1: + popup->unk_16 = 2; + break; + case 2: + if (gGameStatusPtr->pressedButtons & 0xC000) { + popup->duration = 0; + } + if (popup->duration != 0) { + popup->duration--; + } else { + popup->unk_16 = 3; + } + break; + case 3: + popup->unk_16 = 4; + break; + case 4: + closeMessage = TRUE; + break; + } + + if (closeMessage) { + set_window_update(9, 2); + D_800A0F40 = 0; + dispose_merlee_message(popup); + } +} + +void draw_merlee_message_string(PopupMessage* popup, s32 posX, s32 posY) { + s32 messageID = D_80078168[popup->messageIndex]; + + posY += 6; + posX += 15; + + posY += D_80078164[get_msg_lines(messageID) - 1]; + + draw_msg(messageID, posX, posY, 255, 15, 0); +} + +void draw_merlee_message(PopupMessage* popup) { + s32 messageID; + s32 xPos; + s32 width; + + if (popup->unk_17 != 0) { + popup->unk_17 = 0; + messageID = D_80078168[popup->messageIndex]; + width = get_msg_width(messageID, 0) + 30; + xPos = 160 - (width / 2); + set_window_properties(9, xPos, 80, width, D_80078160[get_msg_lines(messageID) - 1], 0, draw_merlee_message_string, popup, -1); + set_window_update(9, 1); + } +} + +s32 is_merlee_message_done(void) { + return D_800A0F40; +} + +void init_all_status_icons(void) { + int i; + HudStatusIcon* icons; + PopupMessage* popup = get_current_merlee_message(); + + if (popup != NULL) { + popup->updateFunc = &update_all_status_icons; + popup->unk_00 = 0; + popup->unk_08 = NULL; + popup->drawFunc = &draw_all_status_icons; + popup->message = general_heap_malloc(64 * sizeof(HudStatusIcon)); + icons = D_800A0F44 = (HudStatusIcon*)(popup->message); + ASSERT(icons != NULL); + + for (i = 0; i < MAX_ICONS; i++, icons++) + icons->flags = 0; + } +} + +void update_all_status_icons(PopupMessage* popup) { + HudStatusIcon* icon; + int i; + s32 elementID; + + for (i = 0, icon = D_800A0F44; i < MAX_ICONS; i++, icon++) { + if (icon->flags == 0) { + continue; + } + + if (icon->status1.activeTask == STATUS_ICON_TASK_LOAD) { + switch (icon->status1.active) { + case STATUS_SLEEP: + elementID = icon->status1.activeElementID = create_hud_element(&D_80104CC4); + break; + case STATUS_PARALYZE: + elementID = icon->status1.activeElementID = create_hud_element(&D_8010551C); + break; + case STATUS_DIZZY: + elementID = icon->status1.activeElementID = create_hud_element(&D_80105900); + break; + case STATUS_FEAR: + elementID = icon->status1.activeElementID = create_hud_element(&D_801062A0); + break; + case STATUS_STOP: + elementID = icon->status1.activeElementID = create_hud_element(&D_80106610); + break; + case STATUS_POISON: + elementID = icon->status1.activeElementID = create_hud_element(&D_80105C54); + break; + case STATUS_SHRINK: + elementID = icon->status1.activeElementID = create_hud_element(&D_80106964); + break; + case STATUS_FROZEN: + elementID = icon->status1.activeElementID = create_hud_element(&D_80105FA8); + break; + default: + elementID = icon->status1.activeElementID = create_hud_element(&D_800804F0); + break; + } + set_hud_element_flags(elementID, 2); + set_hud_element_flags(elementID, 0x80); + icon->status1.activeTask = STATUS_ICON_TASK_DRAW; + } + + switch (icon->status1.removingTask) { + case STATUS_ICON_TASK_NONE: + break; + case STATUS_ICON_TASK_LOAD: + switch (icon->status1.removing) { + case STATUS_SLEEP: + set_hud_element_anim(icon->status1.removingElementID, &D_80104E64); + break; + case STATUS_PARALYZE: + set_hud_element_anim(icon->status1.removingElementID, &D_8010574C); + break; + case STATUS_DIZZY: + set_hud_element_anim(icon->status1.removingElementID, &D_80105AA0); + break; + case STATUS_FEAR: + set_hud_element_anim(icon->status1.removingElementID, &D_801062A0); + break; + case STATUS_STOP: + set_hud_element_anim(icon->status1.removingElementID, &D_801067B0); + break; + case STATUS_POISON: + set_hud_element_anim(icon->status1.removingElementID, &D_80105DF4); + break; + case STATUS_SHRINK: + set_hud_element_anim(icon->status1.removingElementID, &D_80106B04); + break; + case STATUS_FROZEN: + set_hud_element_anim(icon->status1.removingElementID, &D_80106148); + break; + default: + set_hud_element_anim(icon->status1.removingElementID, &D_800804F0); + break; + } + + icon->status1.frameCounter = 10; + icon->status1.removingTask = STATUS_ICON_TASK_DRAW; + break; + + case STATUS_ICON_TASK_DRAW: + if (icon->status1.frameCounter != 0) { + icon->status1.frameCounter--; + } else { + icon->status1.removing = 0; + free_hud_element(icon->status1.removingElementID); + icon->status1.removingTask = STATUS_ICON_TASK_NONE; + } + break; + } + + if (icon->status2.activeTask == STATUS_ICON_TASK_LOAD) { + switch (icon->status2.active) { + case STATUS_STATIC: + elementID = icon->status2.activeElementID = create_hud_element(&D_801050A8); + break; + default: + elementID = icon->status2.activeElementID = create_hud_element(&D_800804F0); + break; + } + + set_hud_element_flags(elementID, 2); + set_hud_element_flags(elementID, 0x80); + icon->status2.activeTask = STATUS_ICON_TASK_DRAW; + } + + switch (icon->status2.removingTask) { + case STATUS_ICON_TASK_NONE: + break; + case STATUS_ICON_TASK_LOAD: + switch (icon->status2.removing) { + case STATUS_STATIC: + set_hud_element_anim(icon->status2.removingElementID, &D_801052D8); + break; + default: + set_hud_element_anim(icon->status2.removingElementID, &D_800804F0); + break; + } + + icon->status2.frameCounter = 20; + icon->status2.removingTask = STATUS_ICON_TASK_DRAW; + break; + case STATUS_ICON_TASK_DRAW: + if (icon->status2.frameCounter != 0) { + icon->status2.frameCounter--; + } else { + icon->status2.removing = 0; + free_hud_element(icon->status2.removingElementID); + icon->status2.removingTask = STATUS_ICON_TASK_NONE; + } + break; + } + + if (icon->status3.activeTask == STATUS_ICON_TASK_LOAD) { + switch (icon->status3.active) { + case STATUS_E: + elementID = icon->status3.activeElementID = create_hud_element(&D_80106CD8); + break; + default: + elementID = icon->status3.activeElementID = create_hud_element(&D_800804F0); + break; + } + + set_hud_element_flags(elementID, 2); + set_hud_element_flags(elementID, 0x80); + icon->status3.activeTask = STATUS_ICON_TASK_DRAW; + } + + switch (icon->status3.removingTask) { + case STATUS_ICON_TASK_NONE: + break; + case STATUS_ICON_TASK_LOAD: + switch (icon->status3.removing) { + case STATUS_E: + set_hud_element_anim(icon->status3.removingElementID, &D_80106E98); + break; + default: + set_hud_element_anim(icon->status3.removingElementID, &D_800804F0); + break; + } + + icon->status3.frameCounter = 20; + icon->status3.removingTask = STATUS_ICON_TASK_DRAW; + break; + case STATUS_ICON_TASK_DRAW: + if (icon->status3.frameCounter != 0) { + icon->status3.frameCounter--; + } else { + icon->status3.removing = 0; + free_hud_element(icon->status3.removingElementID); + icon->status3.removingTask = STATUS_ICON_TASK_NONE; + } + break; + } + + if (icon->status4.activeTask == STATUS_ICON_TASK_LOAD) { + elementID = icon->status4.activeElementID = create_hud_element(&D_801062DC); + set_hud_element_flags(elementID, 2); + set_hud_element_flags(elementID, 0x80); + icon->status4.activeTask = STATUS_ICON_TASK_DRAW; + } + + switch (icon->status4.removingTask) { + case STATUS_ICON_TASK_NONE: + break; + case STATUS_ICON_TASK_LOAD: + set_hud_element_anim(icon->status4.removingElementID, &D_8010645C); + icon->status4.frameCounter = 20; + icon->status4.removingTask = STATUS_ICON_TASK_DRAW; + break; + case STATUS_ICON_TASK_DRAW: + if (icon->status4.frameCounter != 0) { + icon->status4.frameCounter--; + } else { + icon->status4.removing = 0; + free_hud_element(icon->status4.removingElementID); + icon->status4.removingTask = STATUS_ICON_TASK_NONE; + } + break; + } + + if (icon->boostJump.removing) { + if (icon->boostJump.removing == 1) { + s32 index = icon->prevIndexBoostJump; + + if (get_hud_element(index)->flags.as_word & 4) { + free_hud_element(index); + icon->boostJump.removing = 0; + } + } + } + + if (icon->boostHammer.removing) { + if (icon->boostHammer.removing == 1) { + s32 index = icon->prevIndexBoostHammer; + + if (get_hud_element(index)->flags.as_word & 4) { + free_hud_element(index); + icon->boostHammer.removing = 0; + } + } + } + } +} + +void draw_all_status_icons(PopupMessage* popup) { + HudStatusIcon* icon; + s32 elementId; + f32 x, y, z; + s32 screenX, screenY, screenZ; + s32 isActiveDrawn, iconCounter; + s32 offsetY; + Camera* camera = &gCameras[gCurrentCameraID]; + int i; + + gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 12, 20, SCREEN_WIDTH - 12, SCREEN_HEIGHT - 20); + gDPPipeSync(gMasterGfxPos++); + gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE); + gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE); + gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE); + gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP); + gDPSetTextureConvert(gMasterGfxPos++, G_TC_FILT); + gDPSetCombineKey(gMasterGfxPos++, G_CK_NONE); + gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE); + gDPNoOp(gMasterGfxPos++); + gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE); + gDPSetAlphaDither(gMasterGfxPos++, G_AD_DISABLE); + gSPTexture(gMasterGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON); + + for (i = 0, icon = D_800A0F44; i < MAX_ICONS; i++, icon++) { + if (icon->flags == 0) { + continue; + } + + iconCounter = 0; + isActiveDrawn = 0; + if (icon->status1.activeTask == STATUS_ICON_TASK_DRAW) { + if (icon->flags & STATUS_ICON_FLAG_DEBUFF) { + set_hud_element_flags(icon->status1.activeElementID, 2); + } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { + clear_hud_element_flags(icon->status1.activeElementID, 2); + + x = icon->worldPos.x; + y = icon->worldPos.y + icon->status1OffsetY; + z = icon->worldPos.z; + + add_vec2D_polar(&x, &z, icon->status1Radius, clamp_angle(camera->currentYaw + 90)); + get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ); + elementId = icon->status1.activeElementID; + set_hud_element_render_pos(elementId, screenX - 8, screenY - 8); + draw_hud_element_2(elementId); + iconCounter = 1; + isActiveDrawn = 1; + } + } + + if (icon->status1.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) { + clear_hud_element_flags(icon->status1.removingElementID, 2); + + if (isActiveDrawn == 0) { + iconCounter++; + } + + x = icon->worldPos.x; + y = icon->worldPos.y + icon->status1OffsetY; + z = icon->worldPos.z; + + add_vec2D_polar(&x, &z, icon->status1Radius, clamp_angle(camera->currentYaw + 90)); + get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ); + elementId = icon->status1.removingElementID; + set_hud_element_render_pos(elementId, screenX - 8, screenY - 8); + draw_hud_element_2(elementId); + } + + isActiveDrawn = 0; + if (icon->status2.activeTask == STATUS_ICON_TASK_DRAW) { + if (icon->flags & STATUS_ICON_FLAG_STATIC) { + set_hud_element_flags(icon->status2.activeElementID, 2); + } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { + clear_hud_element_flags(icon->status2.activeElementID, 2); + + offsetY = 0; + if (iconCounter == 0) { + offsetY = -17; + } + + x = icon->worldPos.x; + y = icon->worldPos.y + icon->status2OffsetY + offsetY; + z = icon->worldPos.z; + + add_vec2D_polar(&x, &z, icon->status2Radius, clamp_angle(camera->currentYaw + 90)); + get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ); + elementId = icon->status2.activeElementID; + set_hud_element_render_pos(elementId, screenX - 8, screenY - 8); + draw_hud_element_2(elementId); + + iconCounter++; + isActiveDrawn = 1; + } + } + + if (icon->status2.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) { + clear_hud_element_flags(icon->status2.removingElementID, 2); + + offsetY = 0; + if (iconCounter == 0) { + offsetY = -17; + } + if (isActiveDrawn == 0) { + iconCounter++; + } + + x = icon->worldPos.x; + y = icon->worldPos.y + icon->status2OffsetY + offsetY; + z = icon->worldPos.z; + + add_vec2D_polar(&x, &z, icon->status2Radius, clamp_angle(camera->currentYaw + 90)); + get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ); + elementId = icon->status2.removingElementID; + set_hud_element_render_pos(elementId, screenX - 8, screenY - 8); + draw_hud_element_2(elementId); + } + + isActiveDrawn = 0; + if (icon->status3.activeTask == STATUS_ICON_TASK_DRAW) { + if (icon->flags & STATUS_ICON_FLAG_TRANSPARENT) { + set_hud_element_flags(icon->status3.activeElementID, 2); + } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { + clear_hud_element_flags(icon->status3.activeElementID, 2); + + offsetY = 0; + if (iconCounter == 1) { + offsetY = -17; + } if (iconCounter == 0) { + offsetY = -34; + } + + x = icon->worldPos.x; + y = icon->worldPos.y + icon->status3OffsetY + offsetY; + z = icon->worldPos.z; + + add_vec2D_polar(&x, &z, icon->status3Radius, clamp_angle(camera->currentYaw + 90)); + get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ); + elementId = icon->status3.activeElementID; + set_hud_element_render_pos(elementId, screenX - 8, screenY - 8); + draw_hud_element_2(elementId); + iconCounter++; + isActiveDrawn = 1; + } + } + + if (icon->status3.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) { + clear_hud_element_flags(icon->status3.removingElementID, 2); + + offsetY = 0; + if (iconCounter == 1) { + offsetY = -17; + } + if (iconCounter == 0) { + offsetY = -34; + } + if (isActiveDrawn == 0) { + iconCounter++; + } + + x = icon->worldPos.x; + y = icon->worldPos.y + icon->status3OffsetY + offsetY; + z = icon->worldPos.z; + + add_vec2D_polar(&x, &z, icon->status3Radius, clamp_angle(camera->currentYaw + 90)); + get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ); + elementId = icon->status3.removingElementID; + set_hud_element_render_pos(elementId, screenX - 8, screenY - 8); + draw_hud_element_2(elementId); + } + + isActiveDrawn = 0; + if (icon->status4.activeTask == STATUS_ICON_TASK_DRAW) { + if (icon->flags & STATUS_ICON_FLAG_STATUS_CHILL_OUT) { + set_hud_element_flags(icon->status4.activeElementID, 2); + } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { + clear_hud_element_flags(icon->status4.activeElementID, 2); + + offsetY = 0; + if (iconCounter == 2) { + offsetY = -17; + } + if (iconCounter == 1) { + offsetY = -34; + } + if (iconCounter == 0) { + offsetY = -51; + } + + x = icon->worldPos.x; + y = icon->worldPos.y + icon->status4OffsetY + offsetY; + z = icon->worldPos.z; + + add_vec2D_polar(&x, &z, icon->status4Radius, clamp_angle(camera->currentYaw + 90)); + get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ); + elementId = icon->status4.activeElementID; + set_hud_element_render_pos(elementId, screenX - 8, screenY - 8); + draw_hud_element_2(elementId); + iconCounter++; + isActiveDrawn = 1; + } + } + + if (icon->status4.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) { + clear_hud_element_flags(icon->status4.removingElementID, 2); + + offsetY = 0; + if (iconCounter == 2) { + offsetY = -17; + } + if (iconCounter == 1) { + offsetY = -34; + } + if (iconCounter == 0) { + offsetY = -51; + } + if (isActiveDrawn == 0) { + iconCounter++; + } + + x = icon->worldPos.x; + y = icon->worldPos.y + icon->status4OffsetY + offsetY; + z = icon->worldPos.z; + + add_vec2D_polar(&x, &z, icon->status4Radius, clamp_angle(camera->currentYaw + 90)); + get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ); + elementId = icon->status4.removingElementID; + set_hud_element_render_pos(elementId, screenX - 8, screenY - 8); + draw_hud_element_2(elementId); + } + + do { + if (icon->boostJump.active) { + if (icon->flags & STATUS_ICON_FLAG_BOOST_JUMP) { + set_hud_element_flags(icon->boostJump.activeElementID, 2); + } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { + clear_hud_element_flags(icon->boostJump.activeElementID, 2); + + x = icon->worldPos.x; + z = icon->worldPos.z; + + get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ); + elementId = icon->boostJump.activeElementID; + set_hud_element_render_pos(elementId, screenX + 2, screenY - 12); + draw_hud_element_2(elementId); + } + } + } while (0); + + if (icon->boostJump.removing) { + clear_hud_element_flags(icon->prevIndexBoostJump, 2); + + x = icon->worldPos.x; + z = icon->worldPos.z; + + get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ); + elementId = icon->prevIndexBoostJump; + set_hud_element_render_pos(elementId, screenX + 2, screenY - 12); + draw_hud_element_2(elementId); + } + + do { + if (icon->boostHammer.active) { + if (icon->flags & STATUS_ICON_FLAG_BOOST_HAMMER) { + set_hud_element_flags(icon->boostHammer.activeElementID, 2); + } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { + clear_hud_element_flags(icon->boostHammer.activeElementID, 2); + + x = icon->worldPos.x; + z = icon->worldPos.z; + + get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ); + elementId = icon->boostHammer.activeElementID; + set_hud_element_render_pos(elementId, screenX + 2, screenY - 12); + draw_hud_element_2(elementId); + } + } + } while (0); + + if (icon->boostHammer.removing) { + clear_hud_element_flags(icon->prevIndexBoostHammer, 2); + + x = icon->worldPos.x; + z = icon->worldPos.z; + + get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ); + elementId = icon->prevIndexBoostHammer; + set_hud_element_render_pos(elementId, screenX + 2, screenY - 12); + draw_hud_element_2(elementId); + } + + do { + if (icon->boostPartner.active) { + if (icon->flags & STATUS_ICON_FLAG_BOOST_PARTNER) { + set_hud_element_flags(icon->boostPartner.activeElementID, 2); + } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { + clear_hud_element_flags(icon->boostPartner.activeElementID, 2); + + x = icon->worldPos.x; + z = icon->worldPos.z; + + get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ); + elementId = icon->boostPartner.activeElementID; + set_hud_element_render_pos(elementId, screenX + 2, screenY - 12); + draw_hud_element_2(elementId); + } + } + } while (0); + + do { + if (icon->surprise.active) { + if (icon->flags & STATUS_ICON_FLAG_SURPRISE) { + set_hud_element_flags(icon->surprise.activeElementID, 2); + } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { + clear_hud_element_flags(icon->surprise.activeElementID, 2); + + x = icon->worldPos.x; + z = icon->worldPos.z; + + get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ); + elementId = icon->surprise.activeElementID; + set_hud_element_render_pos(elementId, screenX + 2, screenY - 15); + draw_hud_element_2(elementId); + } + } + } while (0); + + do { + if (icon->peril.active) { + if (icon->flags & STATUS_ICON_FLAG_PERIL) { + set_hud_element_flags(icon->peril.activeElementID, 2); + } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { + clear_hud_element_flags(icon->peril.activeElementID, 2); + + x = icon->worldPos.x; + z = icon->worldPos.z; + + get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ); + elementId = icon->peril.activeElementID; + set_hud_element_render_pos(elementId, screenX + 2, screenY - 16); + draw_hud_element_2(elementId); + } + } + } while (0); + + do { + if (icon->danger.active) { + if (icon->flags & STATUS_ICON_FLAG_DANGER) { + set_hud_element_flags(icon->danger.activeElementID, 2); + } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { + clear_hud_element_flags(icon->danger.activeElementID, 2); + + x = icon->worldPos.x; + z = icon->worldPos.z; + + get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ); + elementId = icon->danger.activeElementID; + set_hud_element_render_pos(elementId, screenX + 2, screenY - 16); + draw_hud_element_2(elementId); + } + } + } while (0); + } +} + +s32 create_status_icon_set(void) { + s32 i; + HudStatusIcon* icon; + + for (icon = D_800A0F44, i = 0; i < MAX_ICONS; icon++, i++) { + if (icon->flags == 0) { + break; + } + } + + ASSERT(i < MAX_ICONS); + + icon->flags = STATUS_ICON_FLAG_USED; + if (gGameStatusPtr->isBattle) { + icon->flags = STATUS_ICON_FLAG_BATTLE | STATUS_ICON_FLAG_USED; + } + + icon->worldPos.x = 0; + icon->worldPos.y = 0; + icon->worldPos.z = 0; + + icon->status1Radius = 0; + icon->status1OffsetY = 0; + icon->status2Radius = 0; + icon->status2OffsetY = 0; + icon->status3Radius = 0; + icon->status3OffsetY = 0; + icon->status4Radius = 0; + icon->status4OffsetY = 0; + icon->status1.active = 0; + icon->status1.removing = 0; + icon->status1.activeTask = 0; + icon->status1.removingTask = 0; + icon->status2.active = 0; + icon->status2.removing = 0; + icon->status2.activeTask = 0; + icon->status2.removingTask = 0; + icon->status3.active = 0; + icon->status3.removing = 0; + icon->status3.activeTask = 0; + icon->status3.removingTask = 0; + icon->status4.active = 0; + icon->status4.removing = 0; + icon->status4.activeTask = 0; + icon->status4.removingTask = 0; + icon->boostJump.active = 0; + icon->boostJump.removing = 0; + icon->boostHammer.active = 0; + icon->boostHammer.removing = 0; + icon->boostPartner.active = 0; + icon->surprise.active = 0; + icon->peril.active = 0; + icon->danger.active = 0; + + return i; +} + +void remove_all_status_icons(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + remove_status_debuff(iconID); + remove_status_static(iconID); + remove_status_transparent(iconID); + remove_status_chill_out(iconID); + remove_status_icon_boost_jump(iconID); + remove_status_icon_boost_hammer(iconID); + remove_status_icon_boost_partner(iconID); + remove_status_icon_surprise(iconID); + remove_status_icon_peril(iconID); + remove_status_icon_danger(iconID); + statusIcon->flags = 0; +} + +void set_status_icons_properties(s32 iconID, f32 x, f32 y, f32 z, s32 arg, s32 arg2, s32 radius, s32 offsetY) { + HudStatusIcon* icon = &D_800A0F44[iconID]; + + icon->worldPos.x = x; + icon->worldPos.y = y; + icon->worldPos.z = z; + icon->status1Radius = radius + 17; + icon->status1OffsetY = offsetY; + icon->status2Radius = radius + 17; + icon->status2OffsetY = offsetY + 17; + icon->status3Radius = radius + 17; + icon->status3OffsetY = offsetY + 34; + icon->status4Radius = radius + 17; + icon->status4OffsetY = offsetY + 51; +} + +void set_status_icons_offset(s32 iconID, s32 offsetY, f32 arg2) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->offsetY = offsetY; + statusIcon->unk_34 = arg2; +} + +void create_status_debuff(s32 iconID, s32 statusID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags &= ~STATUS_ICON_FLAG_DEBUFF; + if (statusIcon->status1.active != statusID) { + remove_status_debuff(iconID); + statusIcon->status1.active = statusID; + statusIcon->status1.activeTask = STATUS_ICON_TASK_LOAD; + } +} + +void remove_status_debuff(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + if (statusIcon->status1.active && !statusIcon->status1.removing) { + statusIcon->status1.removing = statusIcon->status1.active; + statusIcon->status1.removingTask = STATUS_ICON_TASK_LOAD; + statusIcon->status1.active = STATUS_END; + statusIcon->status1.activeTask = STATUS_ICON_TASK_NONE; + statusIcon->status1.frameCounter = 10; + statusIcon->status1.removingElementID = statusIcon->status1.activeElementID; + } +} + +void enable_status_debuff(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags |= STATUS_ICON_FLAG_DEBUFF; +} + +void create_status_static(s32 iconID, s32 statusID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags &= ~STATUS_ICON_FLAG_STATIC; + if (statusIcon->status2.active != statusID) { + remove_status_static(iconID); + statusIcon->status2.active = statusID; + statusIcon->status2.activeTask = 1; + } +} + +void remove_status_static(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + if (statusIcon->status2.active && !statusIcon->status2.removing) { + statusIcon->status2.removing = statusIcon->status2.active; + statusIcon->status2.removingTask = TRUE; + statusIcon->status2.active = FALSE; + statusIcon->status2.activeTask = FALSE; + statusIcon->status2.frameCounter = 10; + statusIcon->status2.removingElementID = statusIcon->status2.activeElementID; + } +} + +void enable_status_2(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags |= STATUS_ICON_FLAG_STATIC; +} + +void create_status_transparent(s32 iconID, s32 statusID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags &= ~STATUS_ICON_FLAG_TRANSPARENT; + if (statusIcon->status3.active != statusID) { + remove_status_transparent(iconID); + statusIcon->status3.active = statusID; + statusIcon->status3.activeTask = 1; + } +} + +void remove_status_transparent(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + if (statusIcon->status3.active && !statusIcon->status3.removing) { + statusIcon->status3.removing = statusIcon->status3.active; + statusIcon->status3.removingTask = TRUE; + statusIcon->status3.active = FALSE; + statusIcon->status3.activeTask = FALSE; + statusIcon->status3.frameCounter = 10; + statusIcon->status3.removingElementID = statusIcon->status3.activeElementID; + } +} + +void enable_status_transparent(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags |= STATUS_ICON_FLAG_TRANSPARENT; +} + +void create_status_chill_out(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags &= ~STATUS_ICON_FLAG_STATUS_CHILL_OUT; + if (!statusIcon->status4.active) { + statusIcon->status4.active = TRUE; + statusIcon->status4.activeTask = TRUE; + } +} + +void remove_status_chill_out(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + if (statusIcon->status4.active && !statusIcon->status4.removing) { + statusIcon->status4.removing = statusIcon->status4.active; + statusIcon->status4.removingTask = TRUE; + statusIcon->status4.active = FALSE; + statusIcon->status4.activeTask = FALSE; + statusIcon->status4.frameCounter = 10; + statusIcon->status4.removingElementID = statusIcon->status4.activeElementID; + } +} + +void enable_status_chill_out(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags |= STATUS_ICON_FLAG_STATUS_CHILL_OUT; +} + +void create_status_icon_boost_jump(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + s32 hudElement; + + statusIcon->flags &= ~STATUS_ICON_FLAG_BOOST_JUMP; + if (!statusIcon->boostJump.active) { + statusIcon->boostJump.active = TRUE; + hudElement = create_hud_element(&D_8010701C); + set_hud_element_flags(hudElement, 2); + set_hud_element_flags(hudElement, 0x80); + statusIcon->boostJump.activeElementID = hudElement; + } +} + +void remove_status_icon_boost_jump(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + if (statusIcon->boostJump.active) { + s32 hudElemIndex = statusIcon->boostJump.activeElementID; + statusIcon->boostJump.active = FALSE; + statusIcon->boostJump.removing = TRUE; + statusIcon->prevIndexBoostJump = hudElemIndex; + set_hud_element_anim(hudElemIndex, &D_8010717C); + } +} + +void enable_status_icon_boost_jump(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags |= STATUS_ICON_FLAG_BOOST_JUMP; +} + +void create_status_icon_boost_hammer(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + s32 hudElement; + + statusIcon->flags &= ~STATUS_ICON_FLAG_BOOST_HAMMER; + if (!statusIcon->boostHammer.active) { + statusIcon->boostHammer.active = TRUE; + hudElement = create_hud_element(&D_80107314); + set_hud_element_flags(hudElement, 2); + set_hud_element_flags(hudElement, 0x80); + statusIcon->boostHammer.activeElementID = hudElement; + } +} + +void remove_status_icon_boost_hammer(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + if (statusIcon->boostHammer.active) { + s32 hudElemIndex = statusIcon->boostHammer.activeElementID; + statusIcon->boostHammer.active = FALSE; + statusIcon->boostHammer.removing = FALSE; + statusIcon->prevIndexBoostHammer = hudElemIndex; + set_hud_element_anim(hudElemIndex, &D_80107474); + } +} + +void enable_status_icon_boost_hammer(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags |= STATUS_ICON_FLAG_BOOST_HAMMER; +} + +void create_status_icon_boost_partner(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + s32 hudElement; + + statusIcon->flags &= ~STATUS_ICON_FLAG_BOOST_PARTNER; + if (!statusIcon->boostPartner.active) { + statusIcon->boostPartner.active = TRUE; + hudElement = create_hud_element(&D_801075E0); + set_hud_element_flags(hudElement, 2); + set_hud_element_flags(hudElement, 0x80); + statusIcon->boostPartner.activeElementID = hudElement; + } +} + +void remove_status_icon_boost_partner(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + if (statusIcon->boostPartner.active) { + statusIcon->boostPartner.active = FALSE; + free_hud_element(statusIcon->boostPartner.activeElementID); + } +} + +void enable_status_icon_boost_partner(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags |= STATUS_ICON_FLAG_BOOST_PARTNER; +} + +void create_status_icon_surprise(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + s32 hudElement; + + statusIcon->flags &= ~STATUS_ICON_FLAG_SURPRISE; + if (!statusIcon->surprise.active) { + statusIcon->surprise.active = TRUE; + hudElement = create_hud_element(&D_8010760C); + set_hud_element_flags(hudElement, 2); + set_hud_element_flags(hudElement, 0x80); + statusIcon->surprise.activeElementID = hudElement; + } +} + +void remove_status_icon_surprise(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + if (statusIcon->surprise.active) { + statusIcon->surprise.active = FALSE; + free_hud_element(statusIcon->surprise.activeElementID); + } +} + +void enable_status_icon_surprise(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags |= STATUS_ICON_FLAG_SURPRISE; +} + +void create_status_icon_peril(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + s32 hudElement; + + statusIcon->flags &= ~STATUS_ICON_FLAG_PERIL; + if (!statusIcon->peril.active) { + statusIcon->peril.active = TRUE; + hudElement = create_hud_element(&D_801089C4); + set_hud_element_flags(hudElement, 2); + set_hud_element_flags(hudElement, 0x80); + statusIcon->peril.activeElementID = hudElement; + } +} + +void remove_status_icon_peril(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + if (statusIcon->peril.active) { + statusIcon->peril.active = FALSE; + free_hud_element(statusIcon->peril.activeElementID); + } +} + +void enable_status_icon_peril(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags |= STATUS_ICON_FLAG_PERIL; +} + +void create_status_icon_danger(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + s32 hudElement; + + statusIcon->flags &= ~STATUS_ICON_FLAG_DANGER; + if (!statusIcon->danger.active) { + statusIcon->danger.active = TRUE; + hudElement = create_hud_element(&D_80108A14); + set_hud_element_flags(hudElement, 2); + set_hud_element_flags(hudElement, 0x80); + statusIcon->danger.activeElementID = hudElement; + } +} + +void remove_status_icon_danger(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + if (statusIcon->danger.active) { + statusIcon->danger.active = FALSE; + free_hud_element(statusIcon->danger.activeElementID); + } +} + +void enable_status_icon_danger(s32 iconID) { + HudStatusIcon* statusIcon = &D_800A0F44[iconID]; + + statusIcon->flags |= STATUS_ICON_FLAG_DANGER; +} + +const f32 status_icons_rodata_alignment = 0.0f; diff --git a/ver/us/asm/nonmatchings/16F740/btl_state_update_begin_player_turn.s b/ver/us/asm/nonmatchings/16F740/btl_state_update_begin_player_turn.s index 9391ba993f..0578ee9a1a 100644 --- a/ver/us/asm/nonmatchings/16F740/btl_state_update_begin_player_turn.s +++ b/ver/us/asm/nonmatchings/16F740/btl_state_update_begin_player_turn.s @@ -572,7 +572,7 @@ glabel btl_state_update_begin_player_turn /* 171138 80242858 54400007 */ bnel $v0, $zero, .L80242878 /* 17113C 8024285C 26520001 */ addiu $s2, $s2, 1 /* 171140 80242860 84640436 */ lh $a0, 0x436($v1) -/* 171144 80242864 0C011EE1 */ jal remove_status_4 +/* 171144 80242864 0C011EE1 */ jal remove_status_chill_out /* 171148 80242868 A0600223 */ sb $zero, 0x223($v1) /* 17114C 8024286C 3C01802A */ lui $at, %hi(D_8029F258) /* 171150 80242870 AC34F258 */ sw $s4, %lo(D_8029F258)($at) diff --git a/ver/us/asm/nonmatchings/182B30/func_80255FE0.s b/ver/us/asm/nonmatchings/182B30/func_80255FE0.s index eea027cff4..96f5ae1f3b 100644 --- a/ver/us/asm/nonmatchings/182B30/func_80255FE0.s +++ b/ver/us/asm/nonmatchings/182B30/func_80255FE0.s @@ -308,7 +308,7 @@ glabel func_80255FE0 /* 184D10 80256430 44055000 */ mfc1 $a1, $f10 /* 184D14 80256434 4600028D */ trunc.w.s $f10, $f0 /* 184D18 80256438 44065000 */ mfc1 $a2, $f10 -/* 184D1C 8025643C 0C011DFD */ jal func_800477F4 +/* 184D1C 8025643C 0C011DFD */ jal set_status_icons_offset /* 184D20 80256440 00000000 */ nop /* 184D24 80256444 82430210 */ lb $v1, 0x210($s2) /* 184D28 80256448 2402000A */ addiu $v0, $zero, 0xa @@ -843,7 +843,7 @@ glabel func_80255FE0 /* 185500 80256C20 0040282D */ daddu $a1, $v0, $zero /* 185504 80256C24 AE220088 */ sw $v0, 0x88($s1) /* 185508 80256C28 86440436 */ lh $a0, 0x436($s2) -/* 18550C 80256C2C 0C011E08 */ jal func_80047820 +/* 18550C 80256C2C 0C011E08 */ jal create_status_debuff /* 185510 80256C30 24050008 */ addiu $a1, $zero, 8 /* 185514 80256C34 08095B2D */ j .L80256CB4 /* 185518 80256C38 00000000 */ nop @@ -908,7 +908,7 @@ glabel func_80255FE0 /* 1855E8 80256D08 0040282D */ daddu $a1, $v0, $zero /* 1855EC 80256D0C 86440436 */ lh $a0, 0x436($s2) .L80256D10: -/* 1855F0 80256D10 0C011E08 */ jal func_80047820 +/* 1855F0 80256D10 0C011E08 */ jal create_status_debuff /* 1855F4 80256D14 00000000 */ nop .L80256D18: /* 1855F8 80256D18 82430212 */ lb $v1, 0x212($s2) @@ -916,7 +916,7 @@ glabel func_80255FE0 /* 185600 80256D20 14620004 */ bne $v1, $v0, .L80256D34 /* 185604 80256D24 00000000 */ nop /* 185608 80256D28 86440436 */ lh $a0, 0x436($s2) -/* 18560C 80256D2C 0C011E4A */ jal func_80047928 +/* 18560C 80256D2C 0C011E4A */ jal create_status_static /* 185610 80256D30 0040282D */ daddu $a1, $v0, $zero .L80256D34: /* 185614 80256D34 82430218 */ lb $v1, 0x218($s2) @@ -929,24 +929,24 @@ glabel func_80255FE0 /* 185630 80256D50 00000000 */ nop .L80256D54: /* 185634 80256D54 86440436 */ lh $a0, 0x436($s2) -/* 185638 80256D58 0C011E8C */ jal func_80047A30 +/* 185638 80256D58 0C011E8C */ jal create_status_transparent /* 18563C 80256D5C 2405000E */ addiu $a1, $zero, 0xe .L80256D60: /* 185640 80256D60 82420223 */ lb $v0, 0x223($s2) /* 185644 80256D64 1040000D */ beqz $v0, .L80256D9C /* 185648 80256D68 00000000 */ nop -/* 18564C 80256D6C 0C011ECE */ jal func_80047B38 +/* 18564C 80256D6C 0C011ECE */ jal create_status_chill_out /* 185650 80256D70 86440436 */ lh $a0, 0x436($s2) /* 185654 80256D74 08095B67 */ j .L80256D9C /* 185658 80256D78 00000000 */ nop .L80256D7C: -/* 18565C 80256D7C 0C011E3E */ jal enable_status_1 +/* 18565C 80256D7C 0C011E3E */ jal enable_status_debuff /* 185660 80256D80 86440436 */ lh $a0, 0x436($s2) /* 185664 80256D84 0C011E80 */ jal enable_status_2 /* 185668 80256D88 86440436 */ lh $a0, 0x436($s2) -/* 18566C 80256D8C 0C011EC2 */ jal enable_status_3 +/* 18566C 80256D8C 0C011EC2 */ jal enable_status_transparent /* 185670 80256D90 86440436 */ lh $a0, 0x436($s2) -/* 185674 80256D94 0C011EF9 */ jal enable_status_4 +/* 185674 80256D94 0C011EF9 */ jal enable_status_chill_out /* 185678 80256D98 86440436 */ lh $a0, 0x436($s2) .L80256D9C: /* 18567C 80256D9C 8E240084 */ lw $a0, 0x84($s1) diff --git a/ver/us/asm/nonmatchings/182B30/func_80257DA4.s b/ver/us/asm/nonmatchings/182B30/func_80257DA4.s index 2152a25f7c..924b6d3a54 100644 --- a/ver/us/asm/nonmatchings/182B30/func_80257DA4.s +++ b/ver/us/asm/nonmatchings/182B30/func_80257DA4.s @@ -410,7 +410,7 @@ glabel func_80257DA4 /* 186C3C 8025835C 24040008 */ addiu $a0, $zero, 8 /* 186C40 80258360 AEE20088 */ sw $v0, 0x88($s7) /* 186C44 80258364 86C40436 */ lh $a0, 0x436($s6) -/* 186C48 80258368 0C011E08 */ jal func_80047820 +/* 186C48 80258368 0C011E08 */ jal create_status_debuff /* 186C4C 8025836C 24050008 */ addiu $a1, $zero, 8 /* 186C50 80258370 08096272 */ j .L802589C8 /* 186C54 80258374 00000000 */ nop @@ -536,16 +536,16 @@ glabel func_80257DA4 /* 186DFC 8025851C 0C099BBA */ jal func_80266EE8 /* 186E00 80258520 0000282D */ daddu $a1, $zero, $zero /* 186E04 80258524 86C40436 */ lh $a0, 0x436($s6) -/* 186E08 80258528 0C011E3E */ jal enable_status_1 +/* 186E08 80258528 0C011E3E */ jal enable_status_debuff /* 186E0C 8025852C 24120001 */ addiu $s2, $zero, 1 /* 186E10 80258530 86C40436 */ lh $a0, 0x436($s6) /* 186E14 80258534 0C011E80 */ jal enable_status_2 /* 186E18 80258538 0240982D */ daddu $s3, $s2, $zero /* 186E1C 8025853C 86C40436 */ lh $a0, 0x436($s6) -/* 186E20 80258540 0C011EC2 */ jal enable_status_3 +/* 186E20 80258540 0C011EC2 */ jal enable_status_transparent /* 186E24 80258544 0240A82D */ daddu $s5, $s2, $zero /* 186E28 80258548 86C40436 */ lh $a0, 0x436($s6) -/* 186E2C 8025854C 0C011EF9 */ jal enable_status_4 +/* 186E2C 8025854C 0C011EF9 */ jal enable_status_chill_out /* 186E30 80258550 00000000 */ nop .L80258554: /* 186E34 80258554 8EC20000 */ lw $v0, ($s6) @@ -780,7 +780,7 @@ glabel func_80257DA4 /* 18715C 8025887C 24110001 */ addiu $s1, $zero, 1 .L80258880: /* 187160 80258880 86C40436 */ lh $a0, 0x436($s6) -/* 187164 80258884 0C011E8C */ jal func_80047A30 +/* 187164 80258884 0C011E8C */ jal create_status_transparent /* 187168 80258888 2405000E */ addiu $a1, $zero, 0xe .L8025888C: /* 18716C 8025888C 16200004 */ bnez $s1, .L802588A0 @@ -815,7 +815,7 @@ glabel func_80257DA4 /* 1871DC 802588FC 0040282D */ daddu $a1, $v0, $zero /* 1871E0 80258900 86C40436 */ lh $a0, 0x436($s6) .L80258904: -/* 1871E4 80258904 0C011E08 */ jal func_80047820 +/* 1871E4 80258904 0C011E08 */ jal create_status_debuff /* 1871E8 80258908 00000000 */ nop .L8025890C: /* 1871EC 8025890C 16A0000B */ bnez $s5, .L8025893C @@ -829,7 +829,7 @@ glabel func_80257DA4 /* 18720C 8025892C 00000000 */ nop .L80258930: /* 187210 80258930 86C40436 */ lh $a0, 0x436($s6) -/* 187214 80258934 0C011E4A */ jal func_80047928 +/* 187214 80258934 0C011E4A */ jal create_status_static /* 187218 80258938 2405000B */ addiu $a1, $zero, 0xb .L8025893C: /* 18721C 8025893C 82C30218 */ lb $v1, 0x218($s6) @@ -842,18 +842,18 @@ glabel func_80257DA4 /* 187238 80258958 00000000 */ nop .L8025895C: /* 18723C 8025895C 86C40436 */ lh $a0, 0x436($s6) -/* 187240 80258960 0C011E8C */ jal func_80047A30 +/* 187240 80258960 0C011E8C */ jal create_status_transparent /* 187244 80258964 2405000E */ addiu $a1, $zero, 0xe /* 187248 80258968 08096264 */ j .L80258990 /* 18724C 8025896C 00000000 */ nop .L80258970: -/* 187250 80258970 0C011E3E */ jal enable_status_1 +/* 187250 80258970 0C011E3E */ jal enable_status_debuff /* 187254 80258974 86C40436 */ lh $a0, 0x436($s6) /* 187258 80258978 0C011E80 */ jal enable_status_2 /* 18725C 8025897C 86C40436 */ lh $a0, 0x436($s6) -/* 187260 80258980 0C011EC2 */ jal enable_status_3 +/* 187260 80258980 0C011EC2 */ jal enable_status_transparent /* 187264 80258984 86C40436 */ lh $a0, 0x436($s6) -/* 187268 80258988 0C011EF9 */ jal enable_status_4 +/* 187268 80258988 0C011EF9 */ jal enable_status_chill_out /* 18726C 8025898C 86C40436 */ lh $a0, 0x436($s6) .L80258990: /* 187270 80258990 82C30210 */ lb $v1, 0x210($s6) @@ -934,7 +934,7 @@ glabel func_80257DA4 /* 187398 80258AB8 44057000 */ mfc1 $a1, $f14 /* 18739C 80258ABC 4600038D */ trunc.w.s $f14, $f0 /* 1873A0 80258AC0 44067000 */ mfc1 $a2, $f14 -/* 1873A4 80258AC4 0C011DFD */ jal func_800477F4 +/* 1873A4 80258AC4 0C011DFD */ jal set_status_icons_offset /* 1873A8 80258AC8 00000000 */ nop /* 1873AC 80258ACC 86E20068 */ lh $v0, 0x68($s7) /* 1873B0 80258AD0 44820000 */ mtc1 $v0, $f0 diff --git a/ver/us/asm/nonmatchings/20ec0_len_5040/create_status_icon_set.s b/ver/us/asm/nonmatchings/20ec0_len_5040/create_status_icon_set.s deleted file mode 100644 index d35f6d8152..0000000000 --- a/ver/us/asm/nonmatchings/20ec0_len_5040/create_status_icon_set.s +++ /dev/null @@ -1,68 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel create_status_icon_set -/* 22A08 80047608 3C04800A */ lui $a0, %hi(D_800A0F44) -/* 22A0C 8004760C 8C840F44 */ lw $a0, %lo(D_800A0F44)($a0) -/* 22A10 80047610 0000282D */ daddu $a1, $zero, $zero -.L80047614: -/* 22A14 80047614 8C820000 */ lw $v0, ($a0) -/* 22A18 80047618 10400006 */ beqz $v0, .L80047634 -/* 22A1C 8004761C 28A20040 */ slti $v0, $a1, 0x40 -/* 22A20 80047620 24A50001 */ addiu $a1, $a1, 1 -/* 22A24 80047624 28A20040 */ slti $v0, $a1, 0x40 -/* 22A28 80047628 1440FFFA */ bnez $v0, .L80047614 -/* 22A2C 8004762C 248400B0 */ addiu $a0, $a0, 0xb0 -/* 22A30 80047630 28A20040 */ slti $v0, $a1, 0x40 -.L80047634: -/* 22A34 80047634 14400003 */ bnez $v0, .L80047644 -/* 22A38 80047638 24030001 */ addiu $v1, $zero, 1 -.L8004763C: -/* 22A3C 8004763C 08011D8F */ j .L8004763C -/* 22A40 80047640 00000000 */ nop -.L80047644: -/* 22A44 80047644 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 22A48 80047648 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 22A4C 8004764C AC830000 */ sw $v1, ($a0) -/* 22A50 80047650 80420070 */ lb $v0, 0x70($v0) -/* 22A54 80047654 10400002 */ beqz $v0, .L80047660 -/* 22A58 80047658 24020003 */ addiu $v0, $zero, 3 -/* 22A5C 8004765C AC820000 */ sw $v0, ($a0) -.L80047660: -/* 22A60 80047660 00A0102D */ daddu $v0, $a1, $zero -/* 22A64 80047664 AC800004 */ sw $zero, 4($a0) -/* 22A68 80047668 AC800008 */ sw $zero, 8($a0) -/* 22A6C 8004766C AC80000C */ sw $zero, 0xc($a0) -/* 22A70 80047670 AC800010 */ sw $zero, 0x10($a0) -/* 22A74 80047674 AC800014 */ sw $zero, 0x14($a0) -/* 22A78 80047678 AC800018 */ sw $zero, 0x18($a0) -/* 22A7C 8004767C AC80001C */ sw $zero, 0x1c($a0) -/* 22A80 80047680 AC800020 */ sw $zero, 0x20($a0) -/* 22A84 80047684 AC800024 */ sw $zero, 0x24($a0) -/* 22A88 80047688 AC800028 */ sw $zero, 0x28($a0) -/* 22A8C 8004768C AC80002C */ sw $zero, 0x2c($a0) -/* 22A90 80047690 A0800038 */ sb $zero, 0x38($a0) -/* 22A94 80047694 A0800039 */ sb $zero, 0x39($a0) -/* 22A98 80047698 A080003A */ sb $zero, 0x3a($a0) -/* 22A9C 8004769C A080003B */ sb $zero, 0x3b($a0) -/* 22AA0 800476A0 A0800048 */ sb $zero, 0x48($a0) -/* 22AA4 800476A4 A0800049 */ sb $zero, 0x49($a0) -/* 22AA8 800476A8 A080004A */ sb $zero, 0x4a($a0) -/* 22AAC 800476AC A080004B */ sb $zero, 0x4b($a0) -/* 22AB0 800476B0 A0800058 */ sb $zero, 0x58($a0) -/* 22AB4 800476B4 A0800059 */ sb $zero, 0x59($a0) -/* 22AB8 800476B8 A080005A */ sb $zero, 0x5a($a0) -/* 22ABC 800476BC A080005B */ sb $zero, 0x5b($a0) -/* 22AC0 800476C0 A0800068 */ sb $zero, 0x68($a0) -/* 22AC4 800476C4 A0800069 */ sb $zero, 0x69($a0) -/* 22AC8 800476C8 A080006A */ sb $zero, 0x6a($a0) -/* 22ACC 800476CC A080006B */ sb $zero, 0x6b($a0) -/* 22AD0 800476D0 A0800078 */ sb $zero, 0x78($a0) -/* 22AD4 800476D4 A0800079 */ sb $zero, 0x79($a0) -/* 22AD8 800476D8 A0800084 */ sb $zero, 0x84($a0) -/* 22ADC 800476DC A0800085 */ sb $zero, 0x85($a0) -/* 22AE0 800476E0 A0800090 */ sb $zero, 0x90($a0) -/* 22AE4 800476E4 A0800098 */ sb $zero, 0x98($a0) -/* 22AE8 800476E8 A08000A0 */ sb $zero, 0xa0($a0) -/* 22AEC 800476EC 03E00008 */ jr $ra -/* 22AF0 800476F0 A08000A8 */ sb $zero, 0xa8($a0) diff --git a/ver/us/asm/nonmatchings/20ec0_len_5040/draw_all_status_icons.s b/ver/us/asm/nonmatchings/20ec0_len_5040/draw_all_status_icons.s deleted file mode 100644 index 2502f47e0f..0000000000 --- a/ver/us/asm/nonmatchings/20ec0_len_5040/draw_all_status_icons.s +++ /dev/null @@ -1,1094 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel draw_all_status_icons -/* 219E0 800465E0 27BDFF88 */ addiu $sp, $sp, -0x78 -/* 219E4 800465E4 3C08ED03 */ lui $t0, 0xed03 -/* 219E8 800465E8 35080050 */ ori $t0, $t0, 0x50 -/* 219EC 800465EC 3C07004D */ lui $a3, 0x4d -/* 219F0 800465F0 34E70370 */ ori $a3, $a3, 0x370 -/* 219F4 800465F4 3C09E300 */ lui $t1, 0xe300 -/* 219F8 800465F8 35290A01 */ ori $t1, $t1, 0xa01 -/* 219FC 800465FC 3C0AE300 */ lui $t2, 0xe300 -/* 21A00 80046600 354A0C00 */ ori $t2, $t2, 0xc00 -/* 21A04 80046604 3C0BE300 */ lui $t3, 0xe300 -/* 21A08 80046608 356B0F00 */ ori $t3, $t3, 0xf00 -/* 21A0C 8004660C 3C0CE300 */ lui $t4, 0xe300 -/* 21A10 80046610 358C0D01 */ ori $t4, $t4, 0xd01 -/* 21A14 80046614 3C0DE300 */ lui $t5, 0xe300 -/* 21A18 80046618 35AD1402 */ ori $t5, $t5, 0x1402 -/* 21A1C 8004661C 3C0EE300 */ lui $t6, 0xe300 -/* 21A20 80046620 35CE1700 */ ori $t6, $t6, 0x1700 -/* 21A24 80046624 3C0FE200 */ lui $t7, 0xe200 -/* 21A28 80046628 35EF1E01 */ ori $t7, $t7, 0x1e01 -/* 21A2C 8004662C AFB00040 */ sw $s0, 0x40($sp) -/* 21A30 80046630 3C10E300 */ lui $s0, 0xe300 -/* 21A34 80046634 36101801 */ ori $s0, $s0, 0x1801 -/* 21A38 80046638 AFB10044 */ sw $s1, 0x44($sp) -/* 21A3C 8004663C 3C11E300 */ lui $s1, 0xe300 -/* 21A40 80046640 36311A01 */ ori $s1, $s1, 0x1a01 -/* 21A44 80046644 AFB20048 */ sw $s2, 0x48($sp) -/* 21A48 80046648 3C12D700 */ lui $s2, 0xd700 -/* 21A4C 8004664C 36520002 */ ori $s2, $s2, 2 -/* 21A50 80046650 AFBE0060 */ sw $fp, 0x60($sp) -/* 21A54 80046654 241E0001 */ addiu $fp, $zero, 1 -/* 21A58 80046658 AFB7005C */ sw $s7, 0x5c($sp) -/* 21A5C 8004665C 27B70028 */ addiu $s7, $sp, 0x28 -/* 21A60 80046660 AFB60058 */ sw $s6, 0x58($sp) -/* 21A64 80046664 27B6002C */ addiu $s6, $sp, 0x2c -/* 21A68 80046668 AFB50054 */ sw $s5, 0x54($sp) -/* 21A6C 8004666C 27B50030 */ addiu $s5, $sp, 0x30 -/* 21A70 80046670 3C05800A */ lui $a1, %hi(gMasterGfxPos) -/* 21A74 80046674 24A5A66C */ addiu $a1, $a1, %lo(gMasterGfxPos) -/* 21A78 80046678 3C06800B */ lui $a2, %hi(gCameras) -/* 21A7C 8004667C 24C61D80 */ addiu $a2, $a2, %lo(gCameras) -/* 21A80 80046680 AFBF0064 */ sw $ra, 0x64($sp) -/* 21A84 80046684 AFB40050 */ sw $s4, 0x50($sp) -/* 21A88 80046688 AFB3004C */ sw $s3, 0x4c($sp) -/* 21A8C 8004668C F7B60070 */ sdc1 $f22, 0x70($sp) -/* 21A90 80046690 F7B40068 */ sdc1 $f20, 0x68($sp) -/* 21A94 80046694 AFA00038 */ sw $zero, 0x38($sp) -/* 21A98 80046698 8CA30000 */ lw $v1, ($a1) -/* 21A9C 8004669C 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 21AA0 800466A0 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 21AA4 800466A4 3C0142B4 */ lui $at, 0x42b4 -/* 21AA8 800466A8 4481B000 */ mtc1 $at, $f22 -/* 21AAC 800466AC 00041080 */ sll $v0, $a0, 2 -/* 21AB0 800466B0 00441021 */ addu $v0, $v0, $a0 -/* 21AB4 800466B4 00021080 */ sll $v0, $v0, 2 -/* 21AB8 800466B8 00441023 */ subu $v0, $v0, $a0 -/* 21ABC 800466BC 000220C0 */ sll $a0, $v0, 3 -/* 21AC0 800466C0 00441021 */ addu $v0, $v0, $a0 -/* 21AC4 800466C4 000210C0 */ sll $v0, $v0, 3 -/* 21AC8 800466C8 00461021 */ addu $v0, $v0, $a2 -/* 21ACC 800466CC AFA20034 */ sw $v0, 0x34($sp) -/* 21AD0 800466D0 0060102D */ daddu $v0, $v1, $zero -/* 21AD4 800466D4 24630008 */ addiu $v1, $v1, 8 -/* 21AD8 800466D8 ACA30000 */ sw $v1, ($a1) -/* 21ADC 800466DC AC480000 */ sw $t0, ($v0) -/* 21AE0 800466E0 AC470004 */ sw $a3, 4($v0) -/* 21AE4 800466E4 24620008 */ addiu $v0, $v1, 8 -/* 21AE8 800466E8 ACA20000 */ sw $v0, ($a1) -/* 21AEC 800466EC 3C02E700 */ lui $v0, 0xe700 -/* 21AF0 800466F0 AC620000 */ sw $v0, ($v1) -/* 21AF4 800466F4 24620010 */ addiu $v0, $v1, 0x10 -/* 21AF8 800466F8 AC600004 */ sw $zero, 4($v1) -/* 21AFC 800466FC ACA20000 */ sw $v0, ($a1) -/* 21B00 80046700 24620018 */ addiu $v0, $v1, 0x18 -/* 21B04 80046704 AC690008 */ sw $t1, 8($v1) -/* 21B08 80046708 AC60000C */ sw $zero, 0xc($v1) -/* 21B0C 8004670C ACA20000 */ sw $v0, ($a1) -/* 21B10 80046710 24620020 */ addiu $v0, $v1, 0x20 -/* 21B14 80046714 AC6A0010 */ sw $t2, 0x10($v1) -/* 21B18 80046718 AC600014 */ sw $zero, 0x14($v1) -/* 21B1C 8004671C ACA20000 */ sw $v0, ($a1) -/* 21B20 80046720 24620028 */ addiu $v0, $v1, 0x28 -/* 21B24 80046724 AC6B0018 */ sw $t3, 0x18($v1) -/* 21B28 80046728 AC60001C */ sw $zero, 0x1c($v1) -/* 21B2C 8004672C ACA20000 */ sw $v0, ($a1) -/* 21B30 80046730 24620030 */ addiu $v0, $v1, 0x30 -/* 21B34 80046734 AC6C0020 */ sw $t4, 0x20($v1) -/* 21B38 80046738 AC600024 */ sw $zero, 0x24($v1) -/* 21B3C 8004673C ACA20000 */ sw $v0, ($a1) -/* 21B40 80046740 24020C00 */ addiu $v0, $zero, 0xc00 -/* 21B44 80046744 AC62002C */ sw $v0, 0x2c($v1) -/* 21B48 80046748 24620038 */ addiu $v0, $v1, 0x38 -/* 21B4C 8004674C AC6D0028 */ sw $t5, 0x28($v1) -/* 21B50 80046750 ACA20000 */ sw $v0, ($a1) -/* 21B54 80046754 24620040 */ addiu $v0, $v1, 0x40 -/* 21B58 80046758 AC6E0030 */ sw $t6, 0x30($v1) -/* 21B5C 8004675C AC600034 */ sw $zero, 0x34($v1) -/* 21B60 80046760 ACA20000 */ sw $v0, ($a1) -/* 21B64 80046764 24620048 */ addiu $v0, $v1, 0x48 -/* 21B68 80046768 AC6F0038 */ sw $t7, 0x38($v1) -/* 21B6C 8004676C AC60003C */ sw $zero, 0x3c($v1) -/* 21B70 80046770 ACA20000 */ sw $v0, ($a1) -/* 21B74 80046774 24620050 */ addiu $v0, $v1, 0x50 -/* 21B78 80046778 AC600040 */ sw $zero, 0x40($v1) -/* 21B7C 8004677C AC600044 */ sw $zero, 0x44($v1) -/* 21B80 80046780 ACA20000 */ sw $v0, ($a1) -/* 21B84 80046784 AC700048 */ sw $s0, 0x48($v1) -/* 21B88 80046788 3C14800A */ lui $s4, %hi(D_800A0F44) -/* 21B8C 8004678C 8E940F44 */ lw $s4, %lo(D_800A0F44)($s4) -/* 21B90 80046790 240200C0 */ addiu $v0, $zero, 0xc0 -/* 21B94 80046794 AC62004C */ sw $v0, 0x4c($v1) -/* 21B98 80046798 24620058 */ addiu $v0, $v1, 0x58 -/* 21B9C 8004679C ACA20000 */ sw $v0, ($a1) -/* 21BA0 800467A0 24020030 */ addiu $v0, $zero, 0x30 -/* 21BA4 800467A4 AC620054 */ sw $v0, 0x54($v1) -/* 21BA8 800467A8 24620060 */ addiu $v0, $v1, 0x60 -/* 21BAC 800467AC AC710050 */ sw $s1, 0x50($v1) -/* 21BB0 800467B0 ACA20000 */ sw $v0, ($a1) -/* 21BB4 800467B4 2402FFFF */ addiu $v0, $zero, -1 -/* 21BB8 800467B8 AC720058 */ sw $s2, 0x58($v1) -/* 21BBC 800467BC AC62005C */ sw $v0, 0x5c($v1) -/* 21BC0 800467C0 269100AC */ addiu $s1, $s4, 0xac -.L800467C4: -/* 21BC4 800467C4 8E830000 */ lw $v1, ($s4) -/* 21BC8 800467C8 5060037B */ beql $v1, $zero, .L800475B8 -/* 21BCC 800467CC 263100B0 */ addiu $s1, $s1, 0xb0 -/* 21BD0 800467D0 0000902D */ daddu $s2, $zero, $zero -/* 21BD4 800467D4 8222FF8E */ lb $v0, -0x72($s1) -/* 21BD8 800467D8 24180002 */ addiu $t8, $zero, 2 -/* 21BDC 800467DC 1458003C */ bne $v0, $t8, .L800468D0 -/* 21BE0 800467E0 0240982D */ daddu $s3, $s2, $zero -/* 21BE4 800467E4 30620004 */ andi $v0, $v1, 4 -/* 21BE8 800467E8 10400006 */ beqz $v0, .L80046804 -/* 21BEC 800467EC 30620002 */ andi $v0, $v1, 2 -/* 21BF0 800467F0 8E24FF94 */ lw $a0, -0x6c($s1) -/* 21BF4 800467F4 0C051280 */ jal set_hud_element_flags -/* 21BF8 800467F8 0300282D */ daddu $a1, $t8, $zero -/* 21BFC 800467FC 08011A34 */ j .L800468D0 -/* 21C00 80046800 00000000 */ nop -.L80046804: -/* 21C04 80046804 14400006 */ bnez $v0, .L80046820 -/* 21C08 80046808 00000000 */ nop -/* 21C0C 8004680C 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 21C10 80046810 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 21C14 80046814 80420070 */ lb $v0, 0x70($v0) -/* 21C18 80046818 105E002D */ beq $v0, $fp, .L800468D0 -/* 21C1C 8004681C 00000000 */ nop -.L80046820: -/* 21C20 80046820 8E24FF94 */ lw $a0, -0x6c($s1) -/* 21C24 80046824 0C05128B */ jal clear_hud_element_flags -/* 21C28 80046828 24050002 */ addiu $a1, $zero, 2 -/* 21C2C 8004682C C620FF68 */ lwc1 $f0, -0x98($s1) -/* 21C30 80046830 46800020 */ cvt.s.w $f0, $f0 -/* 21C34 80046834 C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 21C38 80046838 8FB80034 */ lw $t8, 0x34($sp) -/* 21C3C 8004683C 46001500 */ add.s $f20, $f2, $f0 -/* 21C40 80046840 C622FF58 */ lwc1 $f2, -0xa8($s1) -/* 21C44 80046844 C70C006C */ lwc1 $f12, 0x6c($t8) -/* 21C48 80046848 C620FF60 */ lwc1 $f0, -0xa0($s1) -/* 21C4C 8004684C 46166300 */ add.s $f12, $f12, $f22 -/* 21C50 80046850 E7A20020 */ swc1 $f2, 0x20($sp) -/* 21C54 80046854 0C00A6C9 */ jal clamp_angle -/* 21C58 80046858 E7A00024 */ swc1 $f0, 0x24($sp) -/* 21C5C 8004685C 27A40020 */ addiu $a0, $sp, 0x20 -/* 21C60 80046860 C626FF64 */ lwc1 $f6, -0x9c($s1) -/* 21C64 80046864 468031A0 */ cvt.s.w $f6, $f6 -/* 21C68 80046868 44070000 */ mfc1 $a3, $f0 -/* 21C6C 8004686C 44063000 */ mfc1 $a2, $f6 -/* 21C70 80046870 0C00A7E7 */ jal add_vec2D_polar -/* 21C74 80046874 27A50024 */ addiu $a1, $sp, 0x24 -/* 21C78 80046878 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 21C7C 8004687C 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 21C80 80046880 4406A000 */ mfc1 $a2, $f20 -/* 21C84 80046884 C7A00020 */ lwc1 $f0, 0x20($sp) -/* 21C88 80046888 C7A20024 */ lwc1 $f2, 0x24($sp) -/* 21C8C 8004688C 44050000 */ mfc1 $a1, $f0 -/* 21C90 80046890 44071000 */ mfc1 $a3, $f2 -/* 21C94 80046894 24120001 */ addiu $s2, $zero, 1 -/* 21C98 80046898 AFB70010 */ sw $s7, 0x10($sp) -/* 21C9C 8004689C AFB60014 */ sw $s6, 0x14($sp) -/* 21CA0 800468A0 0C00B94E */ jal get_screen_coords -/* 21CA4 800468A4 AFB50018 */ sw $s5, 0x18($sp) -/* 21CA8 800468A8 0240982D */ daddu $s3, $s2, $zero -/* 21CAC 800468AC 8E30FF94 */ lw $s0, -0x6c($s1) -/* 21CB0 800468B0 8FA50028 */ lw $a1, 0x28($sp) -/* 21CB4 800468B4 8FA6002C */ lw $a2, 0x2c($sp) -/* 21CB8 800468B8 0200202D */ daddu $a0, $s0, $zero -/* 21CBC 800468BC 24A5FFF8 */ addiu $a1, $a1, -8 -/* 21CC0 800468C0 0C051261 */ jal set_hud_element_render_pos -/* 21CC4 800468C4 24C6FFF8 */ addiu $a2, $a2, -8 -/* 21CC8 800468C8 0C0511F1 */ jal draw_hud_element_2 -/* 21CCC 800468CC 0200202D */ daddu $a0, $s0, $zero -.L800468D0: -/* 21CD0 800468D0 8222FF8F */ lb $v0, -0x71($s1) -/* 21CD4 800468D4 24180002 */ addiu $t8, $zero, 2 -/* 21CD8 800468D8 14580036 */ bne $v0, $t8, .L800469B4 -/* 21CDC 800468DC 00000000 */ nop -/* 21CE0 800468E0 8E820000 */ lw $v0, ($s4) -/* 21CE4 800468E4 00581024 */ and $v0, $v0, $t8 -/* 21CE8 800468E8 14400006 */ bnez $v0, .L80046904 -/* 21CEC 800468EC 00000000 */ nop -/* 21CF0 800468F0 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 21CF4 800468F4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 21CF8 800468F8 80420070 */ lb $v0, 0x70($v0) -/* 21CFC 800468FC 105E002D */ beq $v0, $fp, .L800469B4 -/* 21D00 80046900 00000000 */ nop -.L80046904: -/* 21D04 80046904 8E24FF98 */ lw $a0, -0x68($s1) -/* 21D08 80046908 0C05128B */ jal clear_hud_element_flags -/* 21D0C 8004690C 24050002 */ addiu $a1, $zero, 2 -/* 21D10 80046910 52600001 */ beql $s3, $zero, .L80046918 -/* 21D14 80046914 26520001 */ addiu $s2, $s2, 1 -.L80046918: -/* 21D18 80046918 C620FF68 */ lwc1 $f0, -0x98($s1) -/* 21D1C 8004691C 46800020 */ cvt.s.w $f0, $f0 -/* 21D20 80046920 C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 21D24 80046924 8FB80034 */ lw $t8, 0x34($sp) -/* 21D28 80046928 46001500 */ add.s $f20, $f2, $f0 -/* 21D2C 8004692C C622FF58 */ lwc1 $f2, -0xa8($s1) -/* 21D30 80046930 C70C006C */ lwc1 $f12, 0x6c($t8) -/* 21D34 80046934 C620FF60 */ lwc1 $f0, -0xa0($s1) -/* 21D38 80046938 46166300 */ add.s $f12, $f12, $f22 -/* 21D3C 8004693C E7A20020 */ swc1 $f2, 0x20($sp) -/* 21D40 80046940 0C00A6C9 */ jal clamp_angle -/* 21D44 80046944 E7A00024 */ swc1 $f0, 0x24($sp) -/* 21D48 80046948 27A40020 */ addiu $a0, $sp, 0x20 -/* 21D4C 8004694C C626FF64 */ lwc1 $f6, -0x9c($s1) -/* 21D50 80046950 468031A0 */ cvt.s.w $f6, $f6 -/* 21D54 80046954 44070000 */ mfc1 $a3, $f0 -/* 21D58 80046958 44063000 */ mfc1 $a2, $f6 -/* 21D5C 8004695C 0C00A7E7 */ jal add_vec2D_polar -/* 21D60 80046960 27A50024 */ addiu $a1, $sp, 0x24 -/* 21D64 80046964 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 21D68 80046968 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 21D6C 8004696C 4406A000 */ mfc1 $a2, $f20 -/* 21D70 80046970 C7A00020 */ lwc1 $f0, 0x20($sp) -/* 21D74 80046974 C7A20024 */ lwc1 $f2, 0x24($sp) -/* 21D78 80046978 44050000 */ mfc1 $a1, $f0 -/* 21D7C 8004697C 44071000 */ mfc1 $a3, $f2 -/* 21D80 80046980 AFB70010 */ sw $s7, 0x10($sp) -/* 21D84 80046984 AFB60014 */ sw $s6, 0x14($sp) -/* 21D88 80046988 0C00B94E */ jal get_screen_coords -/* 21D8C 8004698C AFB50018 */ sw $s5, 0x18($sp) -/* 21D90 80046990 8E30FF98 */ lw $s0, -0x68($s1) -/* 21D94 80046994 8FA50028 */ lw $a1, 0x28($sp) -/* 21D98 80046998 8FA6002C */ lw $a2, 0x2c($sp) -/* 21D9C 8004699C 0200202D */ daddu $a0, $s0, $zero -/* 21DA0 800469A0 24A5FFF8 */ addiu $a1, $a1, -8 -/* 21DA4 800469A4 0C051261 */ jal set_hud_element_render_pos -/* 21DA8 800469A8 24C6FFF8 */ addiu $a2, $a2, -8 -/* 21DAC 800469AC 0C0511F1 */ jal draw_hud_element_2 -/* 21DB0 800469B0 0200202D */ daddu $a0, $s0, $zero -.L800469B4: -/* 21DB4 800469B4 8222FF9E */ lb $v0, -0x62($s1) -/* 21DB8 800469B8 24180002 */ addiu $t8, $zero, 2 -/* 21DBC 800469BC 14580044 */ bne $v0, $t8, .L80046AD0 -/* 21DC0 800469C0 0000982D */ daddu $s3, $zero, $zero -/* 21DC4 800469C4 8E830000 */ lw $v1, ($s4) -/* 21DC8 800469C8 30620008 */ andi $v0, $v1, 8 -/* 21DCC 800469CC 10400006 */ beqz $v0, .L800469E8 -/* 21DD0 800469D0 30620002 */ andi $v0, $v1, 2 -/* 21DD4 800469D4 8E24FFA4 */ lw $a0, -0x5c($s1) -/* 21DD8 800469D8 0C051280 */ jal set_hud_element_flags -/* 21DDC 800469DC 0300282D */ daddu $a1, $t8, $zero -/* 21DE0 800469E0 08011AB4 */ j .L80046AD0 -/* 21DE4 800469E4 00000000 */ nop -.L800469E8: -/* 21DE8 800469E8 14400006 */ bnez $v0, .L80046A04 -/* 21DEC 800469EC 00000000 */ nop -/* 21DF0 800469F0 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 21DF4 800469F4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 21DF8 800469F8 80420070 */ lb $v0, 0x70($v0) -/* 21DFC 800469FC 105E0034 */ beq $v0, $fp, .L80046AD0 -/* 21E00 80046A00 00000000 */ nop -.L80046A04: -/* 21E04 80046A04 8E24FFA4 */ lw $a0, -0x5c($s1) -/* 21E08 80046A08 0C05128B */ jal clear_hud_element_flags -/* 21E0C 80046A0C 24050002 */ addiu $a1, $zero, 2 -/* 21E10 80046A10 16400002 */ bnez $s2, .L80046A1C -/* 21E14 80046A14 0000102D */ daddu $v0, $zero, $zero -/* 21E18 80046A18 2402FFEF */ addiu $v0, $zero, -0x11 -.L80046A1C: -/* 21E1C 80046A1C 8FB80034 */ lw $t8, 0x34($sp) -/* 21E20 80046A20 C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 21E24 80046A24 C70C006C */ lwc1 $f12, 0x6c($t8) -/* 21E28 80046A28 E7A00020 */ swc1 $f0, 0x20($sp) -/* 21E2C 80046A2C C624FF70 */ lwc1 $f4, -0x90($s1) -/* 21E30 80046A30 46802120 */ cvt.s.w $f4, $f4 -/* 21E34 80046A34 46166300 */ add.s $f12, $f12, $f22 -/* 21E38 80046A38 C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 21E3C 80046A3C C620FF60 */ lwc1 $f0, -0xa0($s1) -/* 21E40 80046A40 46041080 */ add.s $f2, $f2, $f4 -/* 21E44 80046A44 E7A00024 */ swc1 $f0, 0x24($sp) -/* 21E48 80046A48 44820000 */ mtc1 $v0, $f0 -/* 21E4C 80046A4C 00000000 */ nop -/* 21E50 80046A50 46800020 */ cvt.s.w $f0, $f0 -/* 21E54 80046A54 0C00A6C9 */ jal clamp_angle -/* 21E58 80046A58 46001500 */ add.s $f20, $f2, $f0 -/* 21E5C 80046A5C 27A40020 */ addiu $a0, $sp, 0x20 -/* 21E60 80046A60 C626FF6C */ lwc1 $f6, -0x94($s1) -/* 21E64 80046A64 468031A0 */ cvt.s.w $f6, $f6 -/* 21E68 80046A68 44070000 */ mfc1 $a3, $f0 -/* 21E6C 80046A6C 44063000 */ mfc1 $a2, $f6 -/* 21E70 80046A70 0C00A7E7 */ jal add_vec2D_polar -/* 21E74 80046A74 27A50024 */ addiu $a1, $sp, 0x24 -/* 21E78 80046A78 C7A00020 */ lwc1 $f0, 0x20($sp) -/* 21E7C 80046A7C 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 21E80 80046A80 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 21E84 80046A84 44050000 */ mfc1 $a1, $f0 -/* 21E88 80046A88 C7A00024 */ lwc1 $f0, 0x24($sp) -/* 21E8C 80046A8C 4406A000 */ mfc1 $a2, $f20 -/* 21E90 80046A90 44070000 */ mfc1 $a3, $f0 -/* 21E94 80046A94 26520001 */ addiu $s2, $s2, 1 -/* 21E98 80046A98 AFB70010 */ sw $s7, 0x10($sp) -/* 21E9C 80046A9C AFB60014 */ sw $s6, 0x14($sp) -/* 21EA0 80046AA0 0C00B94E */ jal get_screen_coords -/* 21EA4 80046AA4 AFB50018 */ sw $s5, 0x18($sp) -/* 21EA8 80046AA8 24130001 */ addiu $s3, $zero, 1 -/* 21EAC 80046AAC 8E30FFA4 */ lw $s0, -0x5c($s1) -/* 21EB0 80046AB0 8FA50028 */ lw $a1, 0x28($sp) -/* 21EB4 80046AB4 8FA6002C */ lw $a2, 0x2c($sp) -/* 21EB8 80046AB8 0200202D */ daddu $a0, $s0, $zero -/* 21EBC 80046ABC 24A5FFF8 */ addiu $a1, $a1, -8 -/* 21EC0 80046AC0 0C051261 */ jal set_hud_element_render_pos -/* 21EC4 80046AC4 24C6FFF8 */ addiu $a2, $a2, -8 -/* 21EC8 80046AC8 0C0511F1 */ jal draw_hud_element_2 -/* 21ECC 80046ACC 0200202D */ daddu $a0, $s0, $zero -.L80046AD0: -/* 21ED0 80046AD0 8222FF9F */ lb $v0, -0x61($s1) -/* 21ED4 80046AD4 24180002 */ addiu $t8, $zero, 2 -/* 21ED8 80046AD8 1458003D */ bne $v0, $t8, .L80046BD0 -/* 21EDC 80046ADC 00000000 */ nop -/* 21EE0 80046AE0 8E820000 */ lw $v0, ($s4) -/* 21EE4 80046AE4 00581024 */ and $v0, $v0, $t8 -/* 21EE8 80046AE8 14400006 */ bnez $v0, .L80046B04 -/* 21EEC 80046AEC 00000000 */ nop -/* 21EF0 80046AF0 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 21EF4 80046AF4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 21EF8 80046AF8 80420070 */ lb $v0, 0x70($v0) -/* 21EFC 80046AFC 105E0034 */ beq $v0, $fp, .L80046BD0 -/* 21F00 80046B00 00000000 */ nop -.L80046B04: -/* 21F04 80046B04 8E24FFA8 */ lw $a0, -0x58($s1) -/* 21F08 80046B08 0C05128B */ jal clear_hud_element_flags -/* 21F0C 80046B0C 24050002 */ addiu $a1, $zero, 2 -/* 21F10 80046B10 16400002 */ bnez $s2, .L80046B1C -/* 21F14 80046B14 0000102D */ daddu $v0, $zero, $zero -/* 21F18 80046B18 2402FFEF */ addiu $v0, $zero, -0x11 -.L80046B1C: -/* 21F1C 80046B1C 52600001 */ beql $s3, $zero, .L80046B24 -/* 21F20 80046B20 26520001 */ addiu $s2, $s2, 1 -.L80046B24: -/* 21F24 80046B24 8FB80034 */ lw $t8, 0x34($sp) -/* 21F28 80046B28 C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 21F2C 80046B2C C70C006C */ lwc1 $f12, 0x6c($t8) -/* 21F30 80046B30 E7A00020 */ swc1 $f0, 0x20($sp) -/* 21F34 80046B34 C624FF70 */ lwc1 $f4, -0x90($s1) -/* 21F38 80046B38 46802120 */ cvt.s.w $f4, $f4 -/* 21F3C 80046B3C 46166300 */ add.s $f12, $f12, $f22 -/* 21F40 80046B40 C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 21F44 80046B44 C620FF60 */ lwc1 $f0, -0xa0($s1) -/* 21F48 80046B48 46041080 */ add.s $f2, $f2, $f4 -/* 21F4C 80046B4C E7A00024 */ swc1 $f0, 0x24($sp) -/* 21F50 80046B50 44820000 */ mtc1 $v0, $f0 -/* 21F54 80046B54 00000000 */ nop -/* 21F58 80046B58 46800020 */ cvt.s.w $f0, $f0 -/* 21F5C 80046B5C 0C00A6C9 */ jal clamp_angle -/* 21F60 80046B60 46001500 */ add.s $f20, $f2, $f0 -/* 21F64 80046B64 27A40020 */ addiu $a0, $sp, 0x20 -/* 21F68 80046B68 C626FF6C */ lwc1 $f6, -0x94($s1) -/* 21F6C 80046B6C 468031A0 */ cvt.s.w $f6, $f6 -/* 21F70 80046B70 44070000 */ mfc1 $a3, $f0 -/* 21F74 80046B74 44063000 */ mfc1 $a2, $f6 -/* 21F78 80046B78 0C00A7E7 */ jal add_vec2D_polar -/* 21F7C 80046B7C 27A50024 */ addiu $a1, $sp, 0x24 -/* 21F80 80046B80 C7A00020 */ lwc1 $f0, 0x20($sp) -/* 21F84 80046B84 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 21F88 80046B88 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 21F8C 80046B8C 44050000 */ mfc1 $a1, $f0 -/* 21F90 80046B90 C7A00024 */ lwc1 $f0, 0x24($sp) -/* 21F94 80046B94 4406A000 */ mfc1 $a2, $f20 -/* 21F98 80046B98 44070000 */ mfc1 $a3, $f0 -/* 21F9C 80046B9C AFB70010 */ sw $s7, 0x10($sp) -/* 21FA0 80046BA0 AFB60014 */ sw $s6, 0x14($sp) -/* 21FA4 80046BA4 0C00B94E */ jal get_screen_coords -/* 21FA8 80046BA8 AFB50018 */ sw $s5, 0x18($sp) -/* 21FAC 80046BAC 8E30FFA8 */ lw $s0, -0x58($s1) -/* 21FB0 80046BB0 8FA50028 */ lw $a1, 0x28($sp) -/* 21FB4 80046BB4 8FA6002C */ lw $a2, 0x2c($sp) -/* 21FB8 80046BB8 0200202D */ daddu $a0, $s0, $zero -/* 21FBC 80046BBC 24A5FFF8 */ addiu $a1, $a1, -8 -/* 21FC0 80046BC0 0C051261 */ jal set_hud_element_render_pos -/* 21FC4 80046BC4 24C6FFF8 */ addiu $a2, $a2, -8 -/* 21FC8 80046BC8 0C0511F1 */ jal draw_hud_element_2 -/* 21FCC 80046BCC 0200202D */ daddu $a0, $s0, $zero -.L80046BD0: -/* 21FD0 80046BD0 8222FFAE */ lb $v0, -0x52($s1) -/* 21FD4 80046BD4 24180002 */ addiu $t8, $zero, 2 -/* 21FD8 80046BD8 14580046 */ bne $v0, $t8, .L80046CF4 -/* 21FDC 80046BDC 0000982D */ daddu $s3, $zero, $zero -/* 21FE0 80046BE0 8E830000 */ lw $v1, ($s4) -/* 21FE4 80046BE4 30620010 */ andi $v0, $v1, 0x10 -/* 21FE8 80046BE8 10400006 */ beqz $v0, .L80046C04 -/* 21FEC 80046BEC 30620002 */ andi $v0, $v1, 2 -/* 21FF0 80046BF0 8E24FFB4 */ lw $a0, -0x4c($s1) -/* 21FF4 80046BF4 0C051280 */ jal set_hud_element_flags -/* 21FF8 80046BF8 0300282D */ daddu $a1, $t8, $zero -/* 21FFC 80046BFC 08011B3D */ j .L80046CF4 -/* 22000 80046C00 00000000 */ nop -.L80046C04: -/* 22004 80046C04 14400006 */ bnez $v0, .L80046C20 -/* 22008 80046C08 00000000 */ nop -/* 2200C 80046C0C 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 22010 80046C10 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 22014 80046C14 80420070 */ lb $v0, 0x70($v0) -/* 22018 80046C18 105E0036 */ beq $v0, $fp, .L80046CF4 -/* 2201C 80046C1C 00000000 */ nop -.L80046C20: -/* 22020 80046C20 8E24FFB4 */ lw $a0, -0x4c($s1) -/* 22024 80046C24 0C05128B */ jal clear_hud_element_flags -/* 22028 80046C28 24050002 */ addiu $a1, $zero, 2 -/* 2202C 80046C2C 165E0002 */ bne $s2, $fp, .L80046C38 -/* 22030 80046C30 0000102D */ daddu $v0, $zero, $zero -/* 22034 80046C34 2402FFEF */ addiu $v0, $zero, -0x11 -.L80046C38: -/* 22038 80046C38 52400001 */ beql $s2, $zero, .L80046C40 -/* 2203C 80046C3C 2402FFDE */ addiu $v0, $zero, -0x22 -.L80046C40: -/* 22040 80046C40 8FB80034 */ lw $t8, 0x34($sp) -/* 22044 80046C44 C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 22048 80046C48 C70C006C */ lwc1 $f12, 0x6c($t8) -/* 2204C 80046C4C E7A00020 */ swc1 $f0, 0x20($sp) -/* 22050 80046C50 C624FF78 */ lwc1 $f4, -0x88($s1) -/* 22054 80046C54 46802120 */ cvt.s.w $f4, $f4 -/* 22058 80046C58 46166300 */ add.s $f12, $f12, $f22 -/* 2205C 80046C5C C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 22060 80046C60 C620FF60 */ lwc1 $f0, -0xa0($s1) -/* 22064 80046C64 46041080 */ add.s $f2, $f2, $f4 -/* 22068 80046C68 E7A00024 */ swc1 $f0, 0x24($sp) -/* 2206C 80046C6C 44820000 */ mtc1 $v0, $f0 -/* 22070 80046C70 00000000 */ nop -/* 22074 80046C74 46800020 */ cvt.s.w $f0, $f0 -/* 22078 80046C78 0C00A6C9 */ jal clamp_angle -/* 2207C 80046C7C 46001500 */ add.s $f20, $f2, $f0 -/* 22080 80046C80 27A40020 */ addiu $a0, $sp, 0x20 -/* 22084 80046C84 C626FF74 */ lwc1 $f6, -0x8c($s1) -/* 22088 80046C88 468031A0 */ cvt.s.w $f6, $f6 -/* 2208C 80046C8C 44070000 */ mfc1 $a3, $f0 -/* 22090 80046C90 44063000 */ mfc1 $a2, $f6 -/* 22094 80046C94 0C00A7E7 */ jal add_vec2D_polar -/* 22098 80046C98 27A50024 */ addiu $a1, $sp, 0x24 -/* 2209C 80046C9C C7A00020 */ lwc1 $f0, 0x20($sp) -/* 220A0 80046CA0 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 220A4 80046CA4 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 220A8 80046CA8 44050000 */ mfc1 $a1, $f0 -/* 220AC 80046CAC C7A00024 */ lwc1 $f0, 0x24($sp) -/* 220B0 80046CB0 4406A000 */ mfc1 $a2, $f20 -/* 220B4 80046CB4 44070000 */ mfc1 $a3, $f0 -/* 220B8 80046CB8 26520001 */ addiu $s2, $s2, 1 -/* 220BC 80046CBC AFB70010 */ sw $s7, 0x10($sp) -/* 220C0 80046CC0 AFB60014 */ sw $s6, 0x14($sp) -/* 220C4 80046CC4 0C00B94E */ jal get_screen_coords -/* 220C8 80046CC8 AFB50018 */ sw $s5, 0x18($sp) -/* 220CC 80046CCC 24130001 */ addiu $s3, $zero, 1 -/* 220D0 80046CD0 8E30FFB4 */ lw $s0, -0x4c($s1) -/* 220D4 80046CD4 8FA50028 */ lw $a1, 0x28($sp) -/* 220D8 80046CD8 8FA6002C */ lw $a2, 0x2c($sp) -/* 220DC 80046CDC 0200202D */ daddu $a0, $s0, $zero -/* 220E0 80046CE0 24A5FFF8 */ addiu $a1, $a1, -8 -/* 220E4 80046CE4 0C051261 */ jal set_hud_element_render_pos -/* 220E8 80046CE8 24C6FFF8 */ addiu $a2, $a2, -8 -/* 220EC 80046CEC 0C0511F1 */ jal draw_hud_element_2 -/* 220F0 80046CF0 0200202D */ daddu $a0, $s0, $zero -.L80046CF4: -/* 220F4 80046CF4 8222FFAF */ lb $v0, -0x51($s1) -/* 220F8 80046CF8 24180002 */ addiu $t8, $zero, 2 -/* 220FC 80046CFC 1458003F */ bne $v0, $t8, .L80046DFC -/* 22100 80046D00 00000000 */ nop -/* 22104 80046D04 8E820000 */ lw $v0, ($s4) -/* 22108 80046D08 00581024 */ and $v0, $v0, $t8 -/* 2210C 80046D0C 14400006 */ bnez $v0, .L80046D28 -/* 22110 80046D10 00000000 */ nop -/* 22114 80046D14 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 22118 80046D18 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 2211C 80046D1C 80420070 */ lb $v0, 0x70($v0) -/* 22120 80046D20 105E0036 */ beq $v0, $fp, .L80046DFC -/* 22124 80046D24 00000000 */ nop -.L80046D28: -/* 22128 80046D28 8E24FFB8 */ lw $a0, -0x48($s1) -/* 2212C 80046D2C 0C05128B */ jal clear_hud_element_flags -/* 22130 80046D30 24050002 */ addiu $a1, $zero, 2 -/* 22134 80046D34 165E0002 */ bne $s2, $fp, .L80046D40 -/* 22138 80046D38 0000102D */ daddu $v0, $zero, $zero -/* 2213C 80046D3C 2402FFEF */ addiu $v0, $zero, -0x11 -.L80046D40: -/* 22140 80046D40 52400001 */ beql $s2, $zero, .L80046D48 -/* 22144 80046D44 2402FFDE */ addiu $v0, $zero, -0x22 -.L80046D48: -/* 22148 80046D48 52600001 */ beql $s3, $zero, .L80046D50 -/* 2214C 80046D4C 26520001 */ addiu $s2, $s2, 1 -.L80046D50: -/* 22150 80046D50 8FB80034 */ lw $t8, 0x34($sp) -/* 22154 80046D54 C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 22158 80046D58 C70C006C */ lwc1 $f12, 0x6c($t8) -/* 2215C 80046D5C E7A00020 */ swc1 $f0, 0x20($sp) -/* 22160 80046D60 C624FF78 */ lwc1 $f4, -0x88($s1) -/* 22164 80046D64 46802120 */ cvt.s.w $f4, $f4 -/* 22168 80046D68 46166300 */ add.s $f12, $f12, $f22 -/* 2216C 80046D6C C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 22170 80046D70 C620FF60 */ lwc1 $f0, -0xa0($s1) -/* 22174 80046D74 46041080 */ add.s $f2, $f2, $f4 -/* 22178 80046D78 E7A00024 */ swc1 $f0, 0x24($sp) -/* 2217C 80046D7C 44820000 */ mtc1 $v0, $f0 -/* 22180 80046D80 00000000 */ nop -/* 22184 80046D84 46800020 */ cvt.s.w $f0, $f0 -/* 22188 80046D88 0C00A6C9 */ jal clamp_angle -/* 2218C 80046D8C 46001500 */ add.s $f20, $f2, $f0 -/* 22190 80046D90 27A40020 */ addiu $a0, $sp, 0x20 -/* 22194 80046D94 C626FF74 */ lwc1 $f6, -0x8c($s1) -/* 22198 80046D98 468031A0 */ cvt.s.w $f6, $f6 -/* 2219C 80046D9C 44070000 */ mfc1 $a3, $f0 -/* 221A0 80046DA0 44063000 */ mfc1 $a2, $f6 -/* 221A4 80046DA4 0C00A7E7 */ jal add_vec2D_polar -/* 221A8 80046DA8 27A50024 */ addiu $a1, $sp, 0x24 -/* 221AC 80046DAC C7A00020 */ lwc1 $f0, 0x20($sp) -/* 221B0 80046DB0 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 221B4 80046DB4 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 221B8 80046DB8 44050000 */ mfc1 $a1, $f0 -/* 221BC 80046DBC C7A00024 */ lwc1 $f0, 0x24($sp) -/* 221C0 80046DC0 4406A000 */ mfc1 $a2, $f20 -/* 221C4 80046DC4 44070000 */ mfc1 $a3, $f0 -/* 221C8 80046DC8 AFB70010 */ sw $s7, 0x10($sp) -/* 221CC 80046DCC AFB60014 */ sw $s6, 0x14($sp) -/* 221D0 80046DD0 0C00B94E */ jal get_screen_coords -/* 221D4 80046DD4 AFB50018 */ sw $s5, 0x18($sp) -/* 221D8 80046DD8 8E30FFB8 */ lw $s0, -0x48($s1) -/* 221DC 80046DDC 8FA50028 */ lw $a1, 0x28($sp) -/* 221E0 80046DE0 8FA6002C */ lw $a2, 0x2c($sp) -/* 221E4 80046DE4 0200202D */ daddu $a0, $s0, $zero -/* 221E8 80046DE8 24A5FFF8 */ addiu $a1, $a1, -8 -/* 221EC 80046DEC 0C051261 */ jal set_hud_element_render_pos -/* 221F0 80046DF0 24C6FFF8 */ addiu $a2, $a2, -8 -/* 221F4 80046DF4 0C0511F1 */ jal draw_hud_element_2 -/* 221F8 80046DF8 0200202D */ daddu $a0, $s0, $zero -.L80046DFC: -/* 221FC 80046DFC 8222FFBE */ lb $v0, -0x42($s1) -/* 22200 80046E00 24180002 */ addiu $t8, $zero, 2 -/* 22204 80046E04 14580067 */ bne $v0, $t8, .L80046FA4 -/* 22208 80046E08 0000982D */ daddu $s3, $zero, $zero -/* 2220C 80046E0C 8E830000 */ lw $v1, ($s4) -/* 22210 80046E10 30620020 */ andi $v0, $v1, 0x20 -/* 22214 80046E14 10400024 */ beqz $v0, .L80046EA8 -/* 22218 80046E18 30620002 */ andi $v0, $v1, 2 -/* 2221C 80046E1C 8E24FFC4 */ lw $a0, -0x3c($s1) -/* 22220 80046E20 0C051280 */ jal set_hud_element_flags -/* 22224 80046E24 0300282D */ daddu $a1, $t8, $zero -/* 22228 80046E28 08011BE9 */ j .L80046FA4 -/* 2222C 80046E2C 00000000 */ nop -.L80046E30: -/* 22230 80046E30 8E24FFD0 */ lw $a0, -0x30($s1) -/* 22234 80046E34 0C051280 */ jal set_hud_element_flags -/* 22238 80046E38 24050002 */ addiu $a1, $zero, 2 -/* 2223C 80046E3C 08011C56 */ j .L80047158 -/* 22240 80046E40 00000000 */ nop -.L80046E44: -/* 22244 80046E44 8E24FFDC */ lw $a0, -0x24($s1) -/* 22248 80046E48 0C051280 */ jal set_hud_element_flags -/* 2224C 80046E4C 24050002 */ addiu $a1, $zero, 2 -/* 22250 80046E50 08011CA1 */ j .L80047284 -/* 22254 80046E54 00000000 */ nop -.L80046E58: -/* 22258 80046E58 8E24FFE8 */ lw $a0, -0x18($s1) -/* 2225C 80046E5C 0C051280 */ jal set_hud_element_flags -/* 22260 80046E60 24050002 */ addiu $a1, $zero, 2 -/* 22264 80046E64 08011CEC */ j .L800473B0 -/* 22268 80046E68 00000000 */ nop -.L80046E6C: -/* 2226C 80046E6C 8E24FFF0 */ lw $a0, -0x10($s1) -/* 22270 80046E70 0C051280 */ jal set_hud_element_flags -/* 22274 80046E74 24050002 */ addiu $a1, $zero, 2 -/* 22278 80046E78 08011D17 */ j .L8004745C -/* 2227C 80046E7C 00000000 */ nop -.L80046E80: -/* 22280 80046E80 8E24FFF8 */ lw $a0, -8($s1) -/* 22284 80046E84 0C051280 */ jal set_hud_element_flags -/* 22288 80046E88 24050002 */ addiu $a1, $zero, 2 -/* 2228C 80046E8C 08011D42 */ j .L80047508 -/* 22290 80046E90 00000000 */ nop -.L80046E94: -/* 22294 80046E94 8E240000 */ lw $a0, ($s1) -/* 22298 80046E98 0C051280 */ jal set_hud_element_flags -/* 2229C 80046E9C 24050002 */ addiu $a1, $zero, 2 -/* 222A0 80046EA0 08011D6E */ j .L800475B8 -/* 222A4 80046EA4 263100B0 */ addiu $s1, $s1, 0xb0 -.L80046EA8: -/* 222A8 80046EA8 14400006 */ bnez $v0, .L80046EC4 -/* 222AC 80046EAC 00000000 */ nop -/* 222B0 80046EB0 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 222B4 80046EB4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 222B8 80046EB8 80420070 */ lb $v0, 0x70($v0) -/* 222BC 80046EBC 105E0039 */ beq $v0, $fp, .L80046FA4 -/* 222C0 80046EC0 00000000 */ nop -.L80046EC4: -/* 222C4 80046EC4 8E24FFC4 */ lw $a0, -0x3c($s1) -/* 222C8 80046EC8 0C05128B */ jal clear_hud_element_flags -/* 222CC 80046ECC 24050002 */ addiu $a1, $zero, 2 -/* 222D0 80046ED0 24180002 */ addiu $t8, $zero, 2 -/* 222D4 80046ED4 16580002 */ bne $s2, $t8, .L80046EE0 -/* 222D8 80046ED8 0000102D */ daddu $v0, $zero, $zero -/* 222DC 80046EDC 2402FFEF */ addiu $v0, $zero, -0x11 -.L80046EE0: -/* 222E0 80046EE0 525E0001 */ beql $s2, $fp, .L80046EE8 -/* 222E4 80046EE4 2402FFDE */ addiu $v0, $zero, -0x22 -.L80046EE8: -/* 222E8 80046EE8 52400001 */ beql $s2, $zero, .L80046EF0 -/* 222EC 80046EEC 2402FFCD */ addiu $v0, $zero, -0x33 -.L80046EF0: -/* 222F0 80046EF0 8FB80034 */ lw $t8, 0x34($sp) -/* 222F4 80046EF4 C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 222F8 80046EF8 C70C006C */ lwc1 $f12, 0x6c($t8) -/* 222FC 80046EFC E7A00020 */ swc1 $f0, 0x20($sp) -/* 22300 80046F00 C624FF80 */ lwc1 $f4, -0x80($s1) -/* 22304 80046F04 46802120 */ cvt.s.w $f4, $f4 -/* 22308 80046F08 46166300 */ add.s $f12, $f12, $f22 -/* 2230C 80046F0C C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 22310 80046F10 C620FF60 */ lwc1 $f0, -0xa0($s1) -/* 22314 80046F14 46041080 */ add.s $f2, $f2, $f4 -/* 22318 80046F18 E7A00024 */ swc1 $f0, 0x24($sp) -/* 2231C 80046F1C 44820000 */ mtc1 $v0, $f0 -/* 22320 80046F20 00000000 */ nop -/* 22324 80046F24 46800020 */ cvt.s.w $f0, $f0 -/* 22328 80046F28 0C00A6C9 */ jal clamp_angle -/* 2232C 80046F2C 46001500 */ add.s $f20, $f2, $f0 -/* 22330 80046F30 27A40020 */ addiu $a0, $sp, 0x20 -/* 22334 80046F34 C626FF7C */ lwc1 $f6, -0x84($s1) -/* 22338 80046F38 468031A0 */ cvt.s.w $f6, $f6 -/* 2233C 80046F3C 44070000 */ mfc1 $a3, $f0 -/* 22340 80046F40 44063000 */ mfc1 $a2, $f6 -/* 22344 80046F44 0C00A7E7 */ jal add_vec2D_polar -/* 22348 80046F48 27A50024 */ addiu $a1, $sp, 0x24 -/* 2234C 80046F4C C7A00020 */ lwc1 $f0, 0x20($sp) -/* 22350 80046F50 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 22354 80046F54 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 22358 80046F58 44050000 */ mfc1 $a1, $f0 -/* 2235C 80046F5C C7A00024 */ lwc1 $f0, 0x24($sp) -/* 22360 80046F60 4406A000 */ mfc1 $a2, $f20 -/* 22364 80046F64 44070000 */ mfc1 $a3, $f0 -/* 22368 80046F68 26520001 */ addiu $s2, $s2, 1 -/* 2236C 80046F6C AFB70010 */ sw $s7, 0x10($sp) -/* 22370 80046F70 AFB60014 */ sw $s6, 0x14($sp) -/* 22374 80046F74 0C00B94E */ jal get_screen_coords -/* 22378 80046F78 AFB50018 */ sw $s5, 0x18($sp) -/* 2237C 80046F7C 24130001 */ addiu $s3, $zero, 1 -/* 22380 80046F80 8E30FFC4 */ lw $s0, -0x3c($s1) -/* 22384 80046F84 8FA50028 */ lw $a1, 0x28($sp) -/* 22388 80046F88 8FA6002C */ lw $a2, 0x2c($sp) -/* 2238C 80046F8C 0200202D */ daddu $a0, $s0, $zero -/* 22390 80046F90 24A5FFF8 */ addiu $a1, $a1, -8 -/* 22394 80046F94 0C051261 */ jal set_hud_element_render_pos -/* 22398 80046F98 24C6FFF8 */ addiu $a2, $a2, -8 -/* 2239C 80046F9C 0C0511F1 */ jal draw_hud_element_2 -/* 223A0 80046FA0 0200202D */ daddu $a0, $s0, $zero -.L80046FA4: -/* 223A4 80046FA4 8230FFBF */ lb $s0, -0x41($s1) -/* 223A8 80046FA8 24180002 */ addiu $t8, $zero, 2 -/* 223AC 80046FAC 1618003F */ bne $s0, $t8, .L800470AC -/* 223B0 80046FB0 00000000 */ nop -/* 223B4 80046FB4 8E820000 */ lw $v0, ($s4) -/* 223B8 80046FB8 00581024 */ and $v0, $v0, $t8 -/* 223BC 80046FBC 14400006 */ bnez $v0, .L80046FD8 -/* 223C0 80046FC0 00000000 */ nop -/* 223C4 80046FC4 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 223C8 80046FC8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 223CC 80046FCC 80420070 */ lb $v0, 0x70($v0) -/* 223D0 80046FD0 105E0036 */ beq $v0, $fp, .L800470AC -/* 223D4 80046FD4 00000000 */ nop -.L80046FD8: -/* 223D8 80046FD8 8E24FFC8 */ lw $a0, -0x38($s1) -/* 223DC 80046FDC 0C05128B */ jal clear_hud_element_flags -/* 223E0 80046FE0 24050002 */ addiu $a1, $zero, 2 -/* 223E4 80046FE4 16500002 */ bne $s2, $s0, .L80046FF0 -/* 223E8 80046FE8 0000102D */ daddu $v0, $zero, $zero -/* 223EC 80046FEC 2402FFEF */ addiu $v0, $zero, -0x11 -.L80046FF0: -/* 223F0 80046FF0 525E0001 */ beql $s2, $fp, .L80046FF8 -/* 223F4 80046FF4 2402FFDE */ addiu $v0, $zero, -0x22 -.L80046FF8: -/* 223F8 80046FF8 52400001 */ beql $s2, $zero, .L80047000 -/* 223FC 80046FFC 2402FFCD */ addiu $v0, $zero, -0x33 -.L80047000: -/* 22400 80047000 8FB80034 */ lw $t8, 0x34($sp) -/* 22404 80047004 C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 22408 80047008 C70C006C */ lwc1 $f12, 0x6c($t8) -/* 2240C 8004700C E7A00020 */ swc1 $f0, 0x20($sp) -/* 22410 80047010 C624FF80 */ lwc1 $f4, -0x80($s1) -/* 22414 80047014 46802120 */ cvt.s.w $f4, $f4 -/* 22418 80047018 46166300 */ add.s $f12, $f12, $f22 -/* 2241C 8004701C C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 22420 80047020 C620FF60 */ lwc1 $f0, -0xa0($s1) -/* 22424 80047024 46041080 */ add.s $f2, $f2, $f4 -/* 22428 80047028 E7A00024 */ swc1 $f0, 0x24($sp) -/* 2242C 8004702C 44820000 */ mtc1 $v0, $f0 -/* 22430 80047030 00000000 */ nop -/* 22434 80047034 46800020 */ cvt.s.w $f0, $f0 -/* 22438 80047038 0C00A6C9 */ jal clamp_angle -/* 2243C 8004703C 46001500 */ add.s $f20, $f2, $f0 -/* 22440 80047040 27A40020 */ addiu $a0, $sp, 0x20 -/* 22444 80047044 C626FF7C */ lwc1 $f6, -0x84($s1) -/* 22448 80047048 468031A0 */ cvt.s.w $f6, $f6 -/* 2244C 8004704C 44070000 */ mfc1 $a3, $f0 -/* 22450 80047050 44063000 */ mfc1 $a2, $f6 -/* 22454 80047054 0C00A7E7 */ jal add_vec2D_polar -/* 22458 80047058 27A50024 */ addiu $a1, $sp, 0x24 -/* 2245C 8004705C C7A00020 */ lwc1 $f0, 0x20($sp) -/* 22460 80047060 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 22464 80047064 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 22468 80047068 44050000 */ mfc1 $a1, $f0 -/* 2246C 8004706C C7A00024 */ lwc1 $f0, 0x24($sp) -/* 22470 80047070 4406A000 */ mfc1 $a2, $f20 -/* 22474 80047074 44070000 */ mfc1 $a3, $f0 -/* 22478 80047078 AFB70010 */ sw $s7, 0x10($sp) -/* 2247C 8004707C AFB60014 */ sw $s6, 0x14($sp) -/* 22480 80047080 0C00B94E */ jal get_screen_coords -/* 22484 80047084 AFB50018 */ sw $s5, 0x18($sp) -/* 22488 80047088 8E30FFC8 */ lw $s0, -0x38($s1) -/* 2248C 8004708C 8FA50028 */ lw $a1, 0x28($sp) -/* 22490 80047090 8FA6002C */ lw $a2, 0x2c($sp) -/* 22494 80047094 0200202D */ daddu $a0, $s0, $zero -/* 22498 80047098 24A5FFF8 */ addiu $a1, $a1, -8 -/* 2249C 8004709C 0C051261 */ jal set_hud_element_render_pos -/* 224A0 800470A0 24C6FFF8 */ addiu $a2, $a2, -8 -/* 224A4 800470A4 0C0511F1 */ jal draw_hud_element_2 -/* 224A8 800470A8 0200202D */ daddu $a0, $s0, $zero -.L800470AC: -/* 224AC 800470AC 8222FFCC */ lb $v0, -0x34($s1) -/* 224B0 800470B0 10400029 */ beqz $v0, .L80047158 -/* 224B4 800470B4 00000000 */ nop -/* 224B8 800470B8 8E830000 */ lw $v1, ($s4) -/* 224BC 800470BC 30620040 */ andi $v0, $v1, 0x40 -/* 224C0 800470C0 1440FF5B */ bnez $v0, .L80046E30 -/* 224C4 800470C4 30620002 */ andi $v0, $v1, 2 -/* 224C8 800470C8 14400006 */ bnez $v0, .L800470E4 -/* 224CC 800470CC 00000000 */ nop -/* 224D0 800470D0 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 224D4 800470D4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 224D8 800470D8 80420070 */ lb $v0, 0x70($v0) -/* 224DC 800470DC 105E001E */ beq $v0, $fp, .L80047158 -/* 224E0 800470E0 00000000 */ nop -.L800470E4: -/* 224E4 800470E4 8E24FFD0 */ lw $a0, -0x30($s1) -/* 224E8 800470E8 0C05128B */ jal clear_hud_element_flags -/* 224EC 800470EC 24050002 */ addiu $a1, $zero, 2 -/* 224F0 800470F0 C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 224F4 800470F4 C622FF60 */ lwc1 $f2, -0xa0($s1) -/* 224F8 800470F8 44050000 */ mfc1 $a1, $f0 -/* 224FC 800470FC 44071000 */ mfc1 $a3, $f2 -/* 22500 80047100 C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 22504 80047104 C620FF84 */ lwc1 $f0, -0x7c($s1) -/* 22508 80047108 46800020 */ cvt.s.w $f0, $f0 -/* 2250C 8004710C 46001080 */ add.s $f2, $f2, $f0 -/* 22510 80047110 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 22514 80047114 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 22518 80047118 44061000 */ mfc1 $a2, $f2 -/* 2251C 8004711C AFA50020 */ sw $a1, 0x20($sp) -/* 22520 80047120 AFA70024 */ sw $a3, 0x24($sp) -/* 22524 80047124 AFB70010 */ sw $s7, 0x10($sp) -/* 22528 80047128 AFB60014 */ sw $s6, 0x14($sp) -/* 2252C 8004712C 0C00B94E */ jal get_screen_coords -/* 22530 80047130 AFB50018 */ sw $s5, 0x18($sp) -/* 22534 80047134 8E30FFD0 */ lw $s0, -0x30($s1) -/* 22538 80047138 8FA50028 */ lw $a1, 0x28($sp) -/* 2253C 8004713C 8FA6002C */ lw $a2, 0x2c($sp) -/* 22540 80047140 0200202D */ daddu $a0, $s0, $zero -/* 22544 80047144 24A50002 */ addiu $a1, $a1, 2 -/* 22548 80047148 0C051261 */ jal set_hud_element_render_pos -/* 2254C 8004714C 24C6FFF4 */ addiu $a2, $a2, -0xc -/* 22550 80047150 0C0511F1 */ jal draw_hud_element_2 -/* 22554 80047154 0200202D */ daddu $a0, $s0, $zero -.L80047158: -/* 22558 80047158 8222FFCD */ lb $v0, -0x33($s1) -/* 2255C 8004715C 1040001E */ beqz $v0, .L800471D8 -/* 22560 80047160 00000000 */ nop -/* 22564 80047164 8E24FFD4 */ lw $a0, -0x2c($s1) -/* 22568 80047168 0C05128B */ jal clear_hud_element_flags -/* 2256C 8004716C 24050002 */ addiu $a1, $zero, 2 -/* 22570 80047170 C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 22574 80047174 C622FF60 */ lwc1 $f2, -0xa0($s1) -/* 22578 80047178 44050000 */ mfc1 $a1, $f0 -/* 2257C 8004717C 44071000 */ mfc1 $a3, $f2 -/* 22580 80047180 C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 22584 80047184 C620FF84 */ lwc1 $f0, -0x7c($s1) -/* 22588 80047188 46800020 */ cvt.s.w $f0, $f0 -/* 2258C 8004718C 46001080 */ add.s $f2, $f2, $f0 -/* 22590 80047190 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 22594 80047194 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 22598 80047198 44061000 */ mfc1 $a2, $f2 -/* 2259C 8004719C AFA50020 */ sw $a1, 0x20($sp) -/* 225A0 800471A0 AFA70024 */ sw $a3, 0x24($sp) -/* 225A4 800471A4 AFB70010 */ sw $s7, 0x10($sp) -/* 225A8 800471A8 AFB60014 */ sw $s6, 0x14($sp) -/* 225AC 800471AC 0C00B94E */ jal get_screen_coords -/* 225B0 800471B0 AFB50018 */ sw $s5, 0x18($sp) -/* 225B4 800471B4 8E30FFD4 */ lw $s0, -0x2c($s1) -/* 225B8 800471B8 8FA50028 */ lw $a1, 0x28($sp) -/* 225BC 800471BC 8FA6002C */ lw $a2, 0x2c($sp) -/* 225C0 800471C0 0200202D */ daddu $a0, $s0, $zero -/* 225C4 800471C4 24A50002 */ addiu $a1, $a1, 2 -/* 225C8 800471C8 0C051261 */ jal set_hud_element_render_pos -/* 225CC 800471CC 24C6FFF4 */ addiu $a2, $a2, -0xc -/* 225D0 800471D0 0C0511F1 */ jal draw_hud_element_2 -/* 225D4 800471D4 0200202D */ daddu $a0, $s0, $zero -.L800471D8: -/* 225D8 800471D8 8222FFD8 */ lb $v0, -0x28($s1) -/* 225DC 800471DC 10400029 */ beqz $v0, .L80047284 -/* 225E0 800471E0 00000000 */ nop -/* 225E4 800471E4 8E830000 */ lw $v1, ($s4) -/* 225E8 800471E8 30620080 */ andi $v0, $v1, 0x80 -/* 225EC 800471EC 1440FF15 */ bnez $v0, .L80046E44 -/* 225F0 800471F0 30620002 */ andi $v0, $v1, 2 -/* 225F4 800471F4 14400006 */ bnez $v0, .L80047210 -/* 225F8 800471F8 00000000 */ nop -/* 225FC 800471FC 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 22600 80047200 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 22604 80047204 80420070 */ lb $v0, 0x70($v0) -/* 22608 80047208 105E001E */ beq $v0, $fp, .L80047284 -/* 2260C 8004720C 00000000 */ nop -.L80047210: -/* 22610 80047210 8E24FFDC */ lw $a0, -0x24($s1) -/* 22614 80047214 0C05128B */ jal clear_hud_element_flags -/* 22618 80047218 24050002 */ addiu $a1, $zero, 2 -/* 2261C 8004721C C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 22620 80047220 C622FF60 */ lwc1 $f2, -0xa0($s1) -/* 22624 80047224 44050000 */ mfc1 $a1, $f0 -/* 22628 80047228 44071000 */ mfc1 $a3, $f2 -/* 2262C 8004722C C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 22630 80047230 C620FF84 */ lwc1 $f0, -0x7c($s1) -/* 22634 80047234 46800020 */ cvt.s.w $f0, $f0 -/* 22638 80047238 46001080 */ add.s $f2, $f2, $f0 -/* 2263C 8004723C 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 22640 80047240 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 22644 80047244 44061000 */ mfc1 $a2, $f2 -/* 22648 80047248 AFA50020 */ sw $a1, 0x20($sp) -/* 2264C 8004724C AFA70024 */ sw $a3, 0x24($sp) -/* 22650 80047250 AFB70010 */ sw $s7, 0x10($sp) -/* 22654 80047254 AFB60014 */ sw $s6, 0x14($sp) -/* 22658 80047258 0C00B94E */ jal get_screen_coords -/* 2265C 8004725C AFB50018 */ sw $s5, 0x18($sp) -/* 22660 80047260 8E30FFDC */ lw $s0, -0x24($s1) -/* 22664 80047264 8FA50028 */ lw $a1, 0x28($sp) -/* 22668 80047268 8FA6002C */ lw $a2, 0x2c($sp) -/* 2266C 8004726C 0200202D */ daddu $a0, $s0, $zero -/* 22670 80047270 24A50002 */ addiu $a1, $a1, 2 -/* 22674 80047274 0C051261 */ jal set_hud_element_render_pos -/* 22678 80047278 24C6FFF4 */ addiu $a2, $a2, -0xc -/* 2267C 8004727C 0C0511F1 */ jal draw_hud_element_2 -/* 22680 80047280 0200202D */ daddu $a0, $s0, $zero -.L80047284: -/* 22684 80047284 8222FFD9 */ lb $v0, -0x27($s1) -/* 22688 80047288 1040001E */ beqz $v0, .L80047304 -/* 2268C 8004728C 00000000 */ nop -/* 22690 80047290 8E24FFE0 */ lw $a0, -0x20($s1) -/* 22694 80047294 0C05128B */ jal clear_hud_element_flags -/* 22698 80047298 24050002 */ addiu $a1, $zero, 2 -/* 2269C 8004729C C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 226A0 800472A0 C622FF60 */ lwc1 $f2, -0xa0($s1) -/* 226A4 800472A4 44050000 */ mfc1 $a1, $f0 -/* 226A8 800472A8 44071000 */ mfc1 $a3, $f2 -/* 226AC 800472AC C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 226B0 800472B0 C620FF84 */ lwc1 $f0, -0x7c($s1) -/* 226B4 800472B4 46800020 */ cvt.s.w $f0, $f0 -/* 226B8 800472B8 46001080 */ add.s $f2, $f2, $f0 -/* 226BC 800472BC 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 226C0 800472C0 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 226C4 800472C4 44061000 */ mfc1 $a2, $f2 -/* 226C8 800472C8 AFA50020 */ sw $a1, 0x20($sp) -/* 226CC 800472CC AFA70024 */ sw $a3, 0x24($sp) -/* 226D0 800472D0 AFB70010 */ sw $s7, 0x10($sp) -/* 226D4 800472D4 AFB60014 */ sw $s6, 0x14($sp) -/* 226D8 800472D8 0C00B94E */ jal get_screen_coords -/* 226DC 800472DC AFB50018 */ sw $s5, 0x18($sp) -/* 226E0 800472E0 8E30FFE0 */ lw $s0, -0x20($s1) -/* 226E4 800472E4 8FA50028 */ lw $a1, 0x28($sp) -/* 226E8 800472E8 8FA6002C */ lw $a2, 0x2c($sp) -/* 226EC 800472EC 0200202D */ daddu $a0, $s0, $zero -/* 226F0 800472F0 24A50002 */ addiu $a1, $a1, 2 -/* 226F4 800472F4 0C051261 */ jal set_hud_element_render_pos -/* 226F8 800472F8 24C6FFF4 */ addiu $a2, $a2, -0xc -/* 226FC 800472FC 0C0511F1 */ jal draw_hud_element_2 -/* 22700 80047300 0200202D */ daddu $a0, $s0, $zero -.L80047304: -/* 22704 80047304 8222FFE4 */ lb $v0, -0x1c($s1) -/* 22708 80047308 10400029 */ beqz $v0, .L800473B0 -/* 2270C 8004730C 00000000 */ nop -/* 22710 80047310 8E830000 */ lw $v1, ($s4) -/* 22714 80047314 30620100 */ andi $v0, $v1, 0x100 -/* 22718 80047318 1440FECF */ bnez $v0, .L80046E58 -/* 2271C 8004731C 30620002 */ andi $v0, $v1, 2 -/* 22720 80047320 14400006 */ bnez $v0, .L8004733C -/* 22724 80047324 00000000 */ nop -/* 22728 80047328 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 2272C 8004732C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 22730 80047330 80420070 */ lb $v0, 0x70($v0) -/* 22734 80047334 105E001E */ beq $v0, $fp, .L800473B0 -/* 22738 80047338 00000000 */ nop -.L8004733C: -/* 2273C 8004733C 8E24FFE8 */ lw $a0, -0x18($s1) -/* 22740 80047340 0C05128B */ jal clear_hud_element_flags -/* 22744 80047344 24050002 */ addiu $a1, $zero, 2 -/* 22748 80047348 C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 2274C 8004734C C622FF60 */ lwc1 $f2, -0xa0($s1) -/* 22750 80047350 44050000 */ mfc1 $a1, $f0 -/* 22754 80047354 44071000 */ mfc1 $a3, $f2 -/* 22758 80047358 C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 2275C 8004735C C620FF84 */ lwc1 $f0, -0x7c($s1) -/* 22760 80047360 46800020 */ cvt.s.w $f0, $f0 -/* 22764 80047364 46001080 */ add.s $f2, $f2, $f0 -/* 22768 80047368 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 2276C 8004736C 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 22770 80047370 44061000 */ mfc1 $a2, $f2 -/* 22774 80047374 AFA50020 */ sw $a1, 0x20($sp) -/* 22778 80047378 AFA70024 */ sw $a3, 0x24($sp) -/* 2277C 8004737C AFB70010 */ sw $s7, 0x10($sp) -/* 22780 80047380 AFB60014 */ sw $s6, 0x14($sp) -/* 22784 80047384 0C00B94E */ jal get_screen_coords -/* 22788 80047388 AFB50018 */ sw $s5, 0x18($sp) -/* 2278C 8004738C 8E30FFE8 */ lw $s0, -0x18($s1) -/* 22790 80047390 8FA50028 */ lw $a1, 0x28($sp) -/* 22794 80047394 8FA6002C */ lw $a2, 0x2c($sp) -/* 22798 80047398 0200202D */ daddu $a0, $s0, $zero -/* 2279C 8004739C 24A50002 */ addiu $a1, $a1, 2 -/* 227A0 800473A0 0C051261 */ jal set_hud_element_render_pos -/* 227A4 800473A4 24C6FFF4 */ addiu $a2, $a2, -0xc -/* 227A8 800473A8 0C0511F1 */ jal draw_hud_element_2 -/* 227AC 800473AC 0200202D */ daddu $a0, $s0, $zero -.L800473B0: -/* 227B0 800473B0 8222FFEC */ lb $v0, -0x14($s1) -/* 227B4 800473B4 10400029 */ beqz $v0, .L8004745C -/* 227B8 800473B8 00000000 */ nop -/* 227BC 800473BC 8E830000 */ lw $v1, ($s4) -/* 227C0 800473C0 30620200 */ andi $v0, $v1, 0x200 -/* 227C4 800473C4 1440FEA9 */ bnez $v0, .L80046E6C -/* 227C8 800473C8 30620002 */ andi $v0, $v1, 2 -/* 227CC 800473CC 14400006 */ bnez $v0, .L800473E8 -/* 227D0 800473D0 00000000 */ nop -/* 227D4 800473D4 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 227D8 800473D8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 227DC 800473DC 80420070 */ lb $v0, 0x70($v0) -/* 227E0 800473E0 105E001E */ beq $v0, $fp, .L8004745C -/* 227E4 800473E4 00000000 */ nop -.L800473E8: -/* 227E8 800473E8 8E24FFF0 */ lw $a0, -0x10($s1) -/* 227EC 800473EC 0C05128B */ jal clear_hud_element_flags -/* 227F0 800473F0 24050002 */ addiu $a1, $zero, 2 -/* 227F4 800473F4 C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 227F8 800473F8 C622FF60 */ lwc1 $f2, -0xa0($s1) -/* 227FC 800473FC 44050000 */ mfc1 $a1, $f0 -/* 22800 80047400 44071000 */ mfc1 $a3, $f2 -/* 22804 80047404 C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 22808 80047408 C620FF84 */ lwc1 $f0, -0x7c($s1) -/* 2280C 8004740C 46800020 */ cvt.s.w $f0, $f0 -/* 22810 80047410 46001080 */ add.s $f2, $f2, $f0 -/* 22814 80047414 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 22818 80047418 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 2281C 8004741C 44061000 */ mfc1 $a2, $f2 -/* 22820 80047420 AFA50020 */ sw $a1, 0x20($sp) -/* 22824 80047424 AFA70024 */ sw $a3, 0x24($sp) -/* 22828 80047428 AFB70010 */ sw $s7, 0x10($sp) -/* 2282C 8004742C AFB60014 */ sw $s6, 0x14($sp) -/* 22830 80047430 0C00B94E */ jal get_screen_coords -/* 22834 80047434 AFB50018 */ sw $s5, 0x18($sp) -/* 22838 80047438 8E30FFF0 */ lw $s0, -0x10($s1) -/* 2283C 8004743C 8FA50028 */ lw $a1, 0x28($sp) -/* 22840 80047440 8FA6002C */ lw $a2, 0x2c($sp) -/* 22844 80047444 0200202D */ daddu $a0, $s0, $zero -/* 22848 80047448 24A50002 */ addiu $a1, $a1, 2 -/* 2284C 8004744C 0C051261 */ jal set_hud_element_render_pos -/* 22850 80047450 24C6FFF1 */ addiu $a2, $a2, -0xf -/* 22854 80047454 0C0511F1 */ jal draw_hud_element_2 -/* 22858 80047458 0200202D */ daddu $a0, $s0, $zero -.L8004745C: -/* 2285C 8004745C 8222FFF4 */ lb $v0, -0xc($s1) -/* 22860 80047460 10400029 */ beqz $v0, .L80047508 -/* 22864 80047464 00000000 */ nop -/* 22868 80047468 8E830000 */ lw $v1, ($s4) -/* 2286C 8004746C 30620400 */ andi $v0, $v1, 0x400 -/* 22870 80047470 1440FE83 */ bnez $v0, .L80046E80 -/* 22874 80047474 30620002 */ andi $v0, $v1, 2 -/* 22878 80047478 14400006 */ bnez $v0, .L80047494 -/* 2287C 8004747C 00000000 */ nop -/* 22880 80047480 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 22884 80047484 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 22888 80047488 80420070 */ lb $v0, 0x70($v0) -/* 2288C 8004748C 105E001E */ beq $v0, $fp, .L80047508 -/* 22890 80047490 00000000 */ nop -.L80047494: -/* 22894 80047494 8E24FFF8 */ lw $a0, -8($s1) -/* 22898 80047498 0C05128B */ jal clear_hud_element_flags -/* 2289C 8004749C 24050002 */ addiu $a1, $zero, 2 -/* 228A0 800474A0 C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 228A4 800474A4 C622FF60 */ lwc1 $f2, -0xa0($s1) -/* 228A8 800474A8 44050000 */ mfc1 $a1, $f0 -/* 228AC 800474AC 44071000 */ mfc1 $a3, $f2 -/* 228B0 800474B0 C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 228B4 800474B4 C620FF84 */ lwc1 $f0, -0x7c($s1) -/* 228B8 800474B8 46800020 */ cvt.s.w $f0, $f0 -/* 228BC 800474BC 46001080 */ add.s $f2, $f2, $f0 -/* 228C0 800474C0 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 228C4 800474C4 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 228C8 800474C8 44061000 */ mfc1 $a2, $f2 -/* 228CC 800474CC AFA50020 */ sw $a1, 0x20($sp) -/* 228D0 800474D0 AFA70024 */ sw $a3, 0x24($sp) -/* 228D4 800474D4 AFB70010 */ sw $s7, 0x10($sp) -/* 228D8 800474D8 AFB60014 */ sw $s6, 0x14($sp) -/* 228DC 800474DC 0C00B94E */ jal get_screen_coords -/* 228E0 800474E0 AFB50018 */ sw $s5, 0x18($sp) -/* 228E4 800474E4 8E30FFF8 */ lw $s0, -8($s1) -/* 228E8 800474E8 8FA50028 */ lw $a1, 0x28($sp) -/* 228EC 800474EC 8FA6002C */ lw $a2, 0x2c($sp) -/* 228F0 800474F0 0200202D */ daddu $a0, $s0, $zero -/* 228F4 800474F4 24A50002 */ addiu $a1, $a1, 2 -/* 228F8 800474F8 0C051261 */ jal set_hud_element_render_pos -/* 228FC 800474FC 24C6FFF0 */ addiu $a2, $a2, -0x10 -/* 22900 80047500 0C0511F1 */ jal draw_hud_element_2 -/* 22904 80047504 0200202D */ daddu $a0, $s0, $zero -.L80047508: -/* 22908 80047508 8222FFFC */ lb $v0, -4($s1) -/* 2290C 8004750C 5040002A */ beql $v0, $zero, .L800475B8 -/* 22910 80047510 263100B0 */ addiu $s1, $s1, 0xb0 -/* 22914 80047514 8E830000 */ lw $v1, ($s4) -/* 22918 80047518 30620800 */ andi $v0, $v1, 0x800 -/* 2291C 8004751C 1440FE5D */ bnez $v0, .L80046E94 -/* 22920 80047520 30620002 */ andi $v0, $v1, 2 -/* 22924 80047524 14400006 */ bnez $v0, .L80047540 -/* 22928 80047528 00000000 */ nop -/* 2292C 8004752C 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 22930 80047530 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 22934 80047534 80420070 */ lb $v0, 0x70($v0) -/* 22938 80047538 505E001F */ beql $v0, $fp, .L800475B8 -/* 2293C 8004753C 263100B0 */ addiu $s1, $s1, 0xb0 -.L80047540: -/* 22940 80047540 8E240000 */ lw $a0, ($s1) -/* 22944 80047544 0C05128B */ jal clear_hud_element_flags -/* 22948 80047548 24050002 */ addiu $a1, $zero, 2 -/* 2294C 8004754C C620FF58 */ lwc1 $f0, -0xa8($s1) -/* 22950 80047550 C622FF60 */ lwc1 $f2, -0xa0($s1) -/* 22954 80047554 44050000 */ mfc1 $a1, $f0 -/* 22958 80047558 44071000 */ mfc1 $a3, $f2 -/* 2295C 8004755C C622FF5C */ lwc1 $f2, -0xa4($s1) -/* 22960 80047560 C620FF84 */ lwc1 $f0, -0x7c($s1) -/* 22964 80047564 46800020 */ cvt.s.w $f0, $f0 -/* 22968 80047568 46001080 */ add.s $f2, $f2, $f0 -/* 2296C 8004756C 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 22970 80047570 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 22974 80047574 44061000 */ mfc1 $a2, $f2 -/* 22978 80047578 AFA50020 */ sw $a1, 0x20($sp) -/* 2297C 8004757C AFA70024 */ sw $a3, 0x24($sp) -/* 22980 80047580 AFB70010 */ sw $s7, 0x10($sp) -/* 22984 80047584 AFB60014 */ sw $s6, 0x14($sp) -/* 22988 80047588 0C00B94E */ jal get_screen_coords -/* 2298C 8004758C AFB50018 */ sw $s5, 0x18($sp) -/* 22990 80047590 8E300000 */ lw $s0, ($s1) -/* 22994 80047594 8FA50028 */ lw $a1, 0x28($sp) -/* 22998 80047598 8FA6002C */ lw $a2, 0x2c($sp) -/* 2299C 8004759C 0200202D */ daddu $a0, $s0, $zero -/* 229A0 800475A0 24A50002 */ addiu $a1, $a1, 2 -/* 229A4 800475A4 0C051261 */ jal set_hud_element_render_pos -/* 229A8 800475A8 24C6FFF0 */ addiu $a2, $a2, -0x10 -/* 229AC 800475AC 0C0511F1 */ jal draw_hud_element_2 -/* 229B0 800475B0 0200202D */ daddu $a0, $s0, $zero -/* 229B4 800475B4 263100B0 */ addiu $s1, $s1, 0xb0 -.L800475B8: -/* 229B8 800475B8 8FB80038 */ lw $t8, 0x38($sp) -/* 229BC 800475BC 269400B0 */ addiu $s4, $s4, 0xb0 -/* 229C0 800475C0 27180001 */ addiu $t8, $t8, 1 -/* 229C4 800475C4 2B020040 */ slti $v0, $t8, 0x40 -/* 229C8 800475C8 1440FC7E */ bnez $v0, .L800467C4 -/* 229CC 800475CC AFB80038 */ sw $t8, 0x38($sp) -/* 229D0 800475D0 8FBF0064 */ lw $ra, 0x64($sp) -/* 229D4 800475D4 8FBE0060 */ lw $fp, 0x60($sp) -/* 229D8 800475D8 8FB7005C */ lw $s7, 0x5c($sp) -/* 229DC 800475DC 8FB60058 */ lw $s6, 0x58($sp) -/* 229E0 800475E0 8FB50054 */ lw $s5, 0x54($sp) -/* 229E4 800475E4 8FB40050 */ lw $s4, 0x50($sp) -/* 229E8 800475E8 8FB3004C */ lw $s3, 0x4c($sp) -/* 229EC 800475EC 8FB20048 */ lw $s2, 0x48($sp) -/* 229F0 800475F0 8FB10044 */ lw $s1, 0x44($sp) -/* 229F4 800475F4 8FB00040 */ lw $s0, 0x40($sp) -/* 229F8 800475F8 D7B60070 */ ldc1 $f22, 0x70($sp) -/* 229FC 800475FC D7B40068 */ ldc1 $f20, 0x68($sp) -/* 22A00 80047600 03E00008 */ jr $ra -/* 22A04 80047604 27BD0078 */ addiu $sp, $sp, 0x78 diff --git a/ver/us/asm/nonmatchings/20ec0_len_5040/func_80045FB4.s b/ver/us/asm/nonmatchings/20ec0_len_5040/func_80045FB4.s deleted file mode 100644 index 4b09ef1fcf..0000000000 --- a/ver/us/asm/nonmatchings/20ec0_len_5040/func_80045FB4.s +++ /dev/null @@ -1,38 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80045FB4 -/* 213B4 80045FB4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 213B8 80045FB8 AFBF0014 */ sw $ra, 0x14($sp) -/* 213BC 80045FBC 0C011722 */ jal get_current_merlee_message -/* 213C0 80045FC0 AFB00010 */ sw $s0, 0x10($sp) -/* 213C4 80045FC4 0040802D */ daddu $s0, $v0, $zero -/* 213C8 80045FC8 12000015 */ beqz $s0, .L80046020 -/* 213CC 80045FCC 24042C00 */ addiu $a0, $zero, 0x2c00 -/* 213D0 80045FD0 3C028004 */ lui $v0, %hi(func_80046030) -/* 213D4 80045FD4 24426030 */ addiu $v0, $v0, %lo(func_80046030) -/* 213D8 80045FD8 AE020004 */ sw $v0, 4($s0) -/* 213DC 80045FDC 3C028004 */ lui $v0, %hi(draw_all_status_icons) -/* 213E0 80045FE0 244265E0 */ addiu $v0, $v0, %lo(draw_all_status_icons) -/* 213E4 80045FE4 AE000000 */ sw $zero, ($s0) -/* 213E8 80045FE8 AE000008 */ sw $zero, 8($s0) -/* 213EC 80045FEC 0C00AB0A */ jal general_heap_malloc -/* 213F0 80045FF0 AE02000C */ sw $v0, 0xc($s0) -/* 213F4 80045FF4 AE020018 */ sw $v0, 0x18($s0) -/* 213F8 80045FF8 3C01800A */ lui $at, %hi(D_800A0F44) -/* 213FC 80045FFC AC220F44 */ sw $v0, %lo(D_800A0F44)($at) -/* 21400 80046000 14400003 */ bnez $v0, .L80046010 -/* 21404 80046004 2403003F */ addiu $v1, $zero, 0x3f -.L80046008: -/* 21408 80046008 08011802 */ j .L80046008 -/* 2140C 8004600C 00000000 */ nop -.L80046010: -/* 21410 80046010 AC400000 */ sw $zero, ($v0) -/* 21414 80046014 2463FFFF */ addiu $v1, $v1, -1 -/* 21418 80046018 0461FFFD */ bgez $v1, .L80046010 -/* 2141C 8004601C 244200B0 */ addiu $v0, $v0, 0xb0 -.L80046020: -/* 21420 80046020 8FBF0014 */ lw $ra, 0x14($sp) -/* 21424 80046024 8FB00010 */ lw $s0, 0x10($sp) -/* 21428 80046028 03E00008 */ jr $ra -/* 2142C 8004602C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/20ec0_len_5040/func_80046030.s b/ver/us/asm/nonmatchings/20ec0_len_5040/func_80046030.s deleted file mode 100644 index 7c83530d56..0000000000 --- a/ver/us/asm/nonmatchings/20ec0_len_5040/func_80046030.s +++ /dev/null @@ -1,427 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_800986C8 -.word .L800460F0_214F0, .L800460E0_214E0, .L800460D0_214D0, .L800460C0_214C0, .L80046130_21530, .L80046100_21500, .L80046110_21510, .L80046120_21520 - -dlabel jtbl_800986E8 -.word .L80046204_21604, .L800461F0_215F0, .L800461DC_215DC, .L800461C8_215C8, .L80046254_21654, .L80046218_21618, .L8004622C_2162C, .L80046240_21640, 0, 0 - -.section .text - -glabel func_80046030 -/* 21430 80046030 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 21434 80046034 AFB40020 */ sw $s4, 0x20($sp) -/* 21438 80046038 3C14800A */ lui $s4, %hi(D_800A0F44) -/* 2143C 8004603C 8E940F44 */ lw $s4, %lo(D_800A0F44)($s4) -/* 21440 80046040 AFB50024 */ sw $s5, 0x24($sp) -/* 21444 80046044 0000A82D */ daddu $s5, $zero, $zero -/* 21448 80046048 AFB20018 */ sw $s2, 0x18($sp) -/* 2144C 8004604C 24120001 */ addiu $s2, $zero, 1 -/* 21450 80046050 AFB3001C */ sw $s3, 0x1c($sp) -/* 21454 80046054 24130002 */ addiu $s3, $zero, 2 -/* 21458 80046058 AFB60028 */ sw $s6, 0x28($sp) -/* 2145C 8004605C 24160002 */ addiu $s6, $zero, 2 -/* 21460 80046060 AFB7002C */ sw $s7, 0x2c($sp) -/* 21464 80046064 24170014 */ addiu $s7, $zero, 0x14 -/* 21468 80046068 AFBF0030 */ sw $ra, 0x30($sp) -/* 2146C 8004606C AFB10014 */ sw $s1, 0x14($sp) -/* 21470 80046070 AFB00010 */ sw $s0, 0x10($sp) -/* 21474 80046074 26910085 */ addiu $s1, $s4, 0x85 -.L80046078: -/* 21478 80046078 8E820000 */ lw $v0, ($s4) -/* 2147C 8004607C 50400149 */ beql $v0, $zero, .L800465A4 -/* 21480 80046080 26B50001 */ addiu $s5, $s5, 1 -/* 21484 80046084 8222FFB5 */ lb $v0, -0x4b($s1) -/* 21488 80046088 1452003A */ bne $v0, $s2, .L80046174 -/* 2148C 8004608C 00000000 */ nop -/* 21490 80046090 9222FFB3 */ lbu $v0, -0x4d($s1) -/* 21494 80046094 2442FFFD */ addiu $v0, $v0, -3 -/* 21498 80046098 00021600 */ sll $v0, $v0, 0x18 -/* 2149C 8004609C 00021E03 */ sra $v1, $v0, 0x18 -/* 214A0 800460A0 2C620008 */ sltiu $v0, $v1, 8 -/* 214A4 800460A4 10400026 */ beqz $v0, .L80046140 -/* 214A8 800460A8 00031080 */ sll $v0, $v1, 2 -/* 214AC 800460AC 3C01800A */ lui $at, %hi(jtbl_800986C8) -/* 214B0 800460B0 00220821 */ addu $at, $at, $v0 -/* 214B4 800460B4 8C2286C8 */ lw $v0, %lo(jtbl_800986C8)($at) -/* 214B8 800460B8 00400008 */ jr $v0 -/* 214BC 800460BC 00000000 */ nop -.L800460C0_214C0: -/* 214C0 800460C0 3C048010 */ lui $a0, %hi(D_80104CC4) -/* 214C4 800460C4 24844CC4 */ addiu $a0, $a0, %lo(D_80104CC4) -/* 214C8 800460C8 08011852 */ j .L80046148 -/* 214CC 800460CC 00000000 */ nop -.L800460D0_214D0: -/* 214D0 800460D0 3C048010 */ lui $a0, %hi(D_8010551C) -/* 214D4 800460D4 2484551C */ addiu $a0, $a0, %lo(D_8010551C) -/* 214D8 800460D8 08011852 */ j .L80046148 -/* 214DC 800460DC 00000000 */ nop -.L800460E0_214E0: -/* 214E0 800460E0 3C048010 */ lui $a0, %hi(D_80105900) -/* 214E4 800460E4 24845900 */ addiu $a0, $a0, %lo(D_80105900) -/* 214E8 800460E8 08011852 */ j .L80046148 -/* 214EC 800460EC 00000000 */ nop -.L800460F0_214F0: -/* 214F0 800460F0 3C048010 */ lui $a0, %hi(D_801062A0) -/* 214F4 800460F4 248462A0 */ addiu $a0, $a0, %lo(D_801062A0) -/* 214F8 800460F8 08011852 */ j .L80046148 -/* 214FC 800460FC 00000000 */ nop -.L80046100_21500: -/* 21500 80046100 3C048010 */ lui $a0, %hi(D_80106610) -/* 21504 80046104 24846610 */ addiu $a0, $a0, %lo(D_80106610) -/* 21508 80046108 08011852 */ j .L80046148 -/* 2150C 8004610C 00000000 */ nop -.L80046110_21510: -/* 21510 80046110 3C048010 */ lui $a0, %hi(D_80105C54) -/* 21514 80046114 24845C54 */ addiu $a0, $a0, %lo(D_80105C54) -/* 21518 80046118 08011852 */ j .L80046148 -/* 2151C 8004611C 00000000 */ nop -.L80046120_21520: -/* 21520 80046120 3C048010 */ lui $a0, %hi(D_80106964) -/* 21524 80046124 24846964 */ addiu $a0, $a0, %lo(D_80106964) -/* 21528 80046128 08011852 */ j .L80046148 -/* 2152C 8004612C 00000000 */ nop -.L80046130_21530: -/* 21530 80046130 3C048010 */ lui $a0, %hi(D_80105FA8) -/* 21534 80046134 24845FA8 */ addiu $a0, $a0, %lo(D_80105FA8) -/* 21538 80046138 08011852 */ j .L80046148 -/* 2153C 8004613C 00000000 */ nop -.L80046140: -/* 21540 80046140 3C048008 */ lui $a0, %hi(D_800804F0) -/* 21544 80046144 248404F0 */ addiu $a0, $a0, %lo(D_800804F0) -.L80046148: -/* 21548 80046148 0C050529 */ jal create_hud_element -/* 2154C 8004614C 00000000 */ nop -/* 21550 80046150 AE22FFBB */ sw $v0, -0x45($s1) -/* 21554 80046154 0040802D */ daddu $s0, $v0, $zero -/* 21558 80046158 0200202D */ daddu $a0, $s0, $zero -/* 2155C 8004615C 0C051280 */ jal set_hud_element_flags -/* 21560 80046160 24050002 */ addiu $a1, $zero, 2 -/* 21564 80046164 0200202D */ daddu $a0, $s0, $zero -/* 21568 80046168 0C051280 */ jal set_hud_element_flags -/* 2156C 8004616C 24050080 */ addiu $a1, $zero, 0x80 -/* 21570 80046170 A233FFB5 */ sb $s3, -0x4b($s1) -.L80046174: -/* 21574 80046174 8223FFB6 */ lb $v1, -0x4a($s1) -/* 21578 80046178 10720007 */ beq $v1, $s2, .L80046198 -/* 2157C 8004617C 28620002 */ slti $v0, $v1, 2 -/* 21580 80046180 1440004C */ bnez $v0, .L800462B4 -/* 21584 80046184 00000000 */ nop -/* 21588 80046188 10760040 */ beq $v1, $s6, .L8004628C -/* 2158C 8004618C 00000000 */ nop -/* 21590 80046190 080118AD */ j .L800462B4 -/* 21594 80046194 00000000 */ nop -.L80046198: -/* 21598 80046198 9222FFB4 */ lbu $v0, -0x4c($s1) -/* 2159C 8004619C 2442FFFD */ addiu $v0, $v0, -3 -/* 215A0 800461A0 00021600 */ sll $v0, $v0, 0x18 -/* 215A4 800461A4 00021E03 */ sra $v1, $v0, 0x18 -/* 215A8 800461A8 2C620008 */ sltiu $v0, $v1, 8 -/* 215AC 800461AC 1040002E */ beqz $v0, .L80046268 -/* 215B0 800461B0 00031080 */ sll $v0, $v1, 2 -/* 215B4 800461B4 3C01800A */ lui $at, %hi(jtbl_800986E8) -/* 215B8 800461B8 00220821 */ addu $at, $at, $v0 -/* 215BC 800461BC 8C2286E8 */ lw $v0, %lo(jtbl_800986E8)($at) -/* 215C0 800461C0 00400008 */ jr $v0 -/* 215C4 800461C4 00000000 */ nop -.L800461C8_215C8: -/* 215C8 800461C8 8E24FFBF */ lw $a0, -0x41($s1) -/* 215CC 800461CC 3C058010 */ lui $a1, %hi(D_80104E64) -/* 215D0 800461D0 24A54E64 */ addiu $a1, $a1, %lo(D_80104E64) -/* 215D4 800461D4 0801189D */ j .L80046274 -/* 215D8 800461D8 00000000 */ nop -.L800461DC_215DC: -/* 215DC 800461DC 8E24FFBF */ lw $a0, -0x41($s1) -/* 215E0 800461E0 3C058010 */ lui $a1, %hi(D_8010574C) -/* 215E4 800461E4 24A5574C */ addiu $a1, $a1, %lo(D_8010574C) -/* 215E8 800461E8 0801189D */ j .L80046274 -/* 215EC 800461EC 00000000 */ nop -.L800461F0_215F0: -/* 215F0 800461F0 8E24FFBF */ lw $a0, -0x41($s1) -/* 215F4 800461F4 3C058010 */ lui $a1, %hi(D_80105AA0) -/* 215F8 800461F8 24A55AA0 */ addiu $a1, $a1, %lo(D_80105AA0) -/* 215FC 800461FC 0801189D */ j .L80046274 -/* 21600 80046200 00000000 */ nop -.L80046204_21604: -/* 21604 80046204 8E24FFBF */ lw $a0, -0x41($s1) -/* 21608 80046208 3C058010 */ lui $a1, %hi(D_801062A0) -/* 2160C 8004620C 24A562A0 */ addiu $a1, $a1, %lo(D_801062A0) -/* 21610 80046210 0801189D */ j .L80046274 -/* 21614 80046214 00000000 */ nop -.L80046218_21618: -/* 21618 80046218 8E24FFBF */ lw $a0, -0x41($s1) -/* 2161C 8004621C 3C058010 */ lui $a1, %hi(D_801067B0) -/* 21620 80046220 24A567B0 */ addiu $a1, $a1, %lo(D_801067B0) -/* 21624 80046224 0801189D */ j .L80046274 -/* 21628 80046228 00000000 */ nop -.L8004622C_2162C: -/* 2162C 8004622C 8E24FFBF */ lw $a0, -0x41($s1) -/* 21630 80046230 3C058010 */ lui $a1, %hi(D_80105DF4) -/* 21634 80046234 24A55DF4 */ addiu $a1, $a1, %lo(D_80105DF4) -/* 21638 80046238 0801189D */ j .L80046274 -/* 2163C 8004623C 00000000 */ nop -.L80046240_21640: -/* 21640 80046240 8E24FFBF */ lw $a0, -0x41($s1) -/* 21644 80046244 3C058010 */ lui $a1, %hi(D_80106B04) -/* 21648 80046248 24A56B04 */ addiu $a1, $a1, %lo(D_80106B04) -/* 2164C 8004624C 0801189D */ j .L80046274 -/* 21650 80046250 00000000 */ nop -.L80046254_21654: -/* 21654 80046254 8E24FFBF */ lw $a0, -0x41($s1) -/* 21658 80046258 3C058010 */ lui $a1, %hi(D_80106148) -/* 2165C 8004625C 24A56148 */ addiu $a1, $a1, %lo(D_80106148) -/* 21660 80046260 0801189D */ j .L80046274 -/* 21664 80046264 00000000 */ nop -.L80046268: -/* 21668 80046268 8E24FFBF */ lw $a0, -0x41($s1) -/* 2166C 8004626C 3C058008 */ lui $a1, %hi(D_800804F0) -/* 21670 80046270 24A504F0 */ addiu $a1, $a1, %lo(D_800804F0) -.L80046274: -/* 21674 80046274 0C0511FF */ jal set_hud_element_anim -/* 21678 80046278 00000000 */ nop -/* 2167C 8004627C 2402000A */ addiu $v0, $zero, 0xa -/* 21680 80046280 A222FFB8 */ sb $v0, -0x48($s1) -/* 21684 80046284 080118AD */ j .L800462B4 -/* 21688 80046288 A233FFB6 */ sb $s3, -0x4a($s1) -.L8004628C: -/* 2168C 8004628C 8222FFB8 */ lb $v0, -0x48($s1) -/* 21690 80046290 9223FFB8 */ lbu $v1, -0x48($s1) -/* 21694 80046294 10400003 */ beqz $v0, .L800462A4 -/* 21698 80046298 2462FFFF */ addiu $v0, $v1, -1 -/* 2169C 8004629C 080118AD */ j .L800462B4 -/* 216A0 800462A0 A222FFB8 */ sb $v0, -0x48($s1) -.L800462A4: -/* 216A4 800462A4 8E24FFBF */ lw $a0, -0x41($s1) -/* 216A8 800462A8 0C05123D */ jal free_hud_element -/* 216AC 800462AC A220FFB4 */ sb $zero, -0x4c($s1) -/* 216B0 800462B0 A220FFB6 */ sb $zero, -0x4a($s1) -.L800462B4: -/* 216B4 800462B4 8222FFC5 */ lb $v0, -0x3b($s1) -/* 216B8 800462B8 14520013 */ bne $v0, $s2, .L80046308 -/* 216BC 800462BC 2402000B */ addiu $v0, $zero, 0xb -/* 216C0 800462C0 8223FFC3 */ lb $v1, -0x3d($s1) -/* 216C4 800462C4 3C048008 */ lui $a0, %hi(D_800804F0) -/* 216C8 800462C8 248404F0 */ addiu $a0, $a0, %lo(D_800804F0) -/* 216CC 800462CC 14620003 */ bne $v1, $v0, .L800462DC -/* 216D0 800462D0 00000000 */ nop -/* 216D4 800462D4 3C048010 */ lui $a0, %hi(D_801050A8) -/* 216D8 800462D8 248450A8 */ addiu $a0, $a0, %lo(D_801050A8) -.L800462DC: -/* 216DC 800462DC 0C050529 */ jal create_hud_element -/* 216E0 800462E0 00000000 */ nop -/* 216E4 800462E4 AE22FFCB */ sw $v0, -0x35($s1) -/* 216E8 800462E8 0040802D */ daddu $s0, $v0, $zero -/* 216EC 800462EC 0200202D */ daddu $a0, $s0, $zero -/* 216F0 800462F0 0C051280 */ jal set_hud_element_flags -/* 216F4 800462F4 24050002 */ addiu $a1, $zero, 2 -/* 216F8 800462F8 0200202D */ daddu $a0, $s0, $zero -/* 216FC 800462FC 0C051280 */ jal set_hud_element_flags -/* 21700 80046300 24050080 */ addiu $a1, $zero, 0x80 -/* 21704 80046304 A233FFC5 */ sb $s3, -0x3b($s1) -.L80046308: -/* 21708 80046308 8223FFC6 */ lb $v1, -0x3a($s1) -/* 2170C 8004630C 10720007 */ beq $v1, $s2, .L8004632C -/* 21710 80046310 28620002 */ slti $v0, $v1, 2 -/* 21714 80046314 14400020 */ bnez $v0, .L80046398 -/* 21718 80046318 00000000 */ nop -/* 2171C 8004631C 10760014 */ beq $v1, $s6, .L80046370 -/* 21720 80046320 00000000 */ nop -/* 21724 80046324 080118E6 */ j .L80046398 -/* 21728 80046328 00000000 */ nop -.L8004632C: -/* 2172C 8004632C 8223FFC4 */ lb $v1, -0x3c($s1) -/* 21730 80046330 2402000B */ addiu $v0, $zero, 0xb -/* 21734 80046334 14620006 */ bne $v1, $v0, .L80046350 -/* 21738 80046338 00000000 */ nop -/* 2173C 8004633C 8E24FFCF */ lw $a0, -0x31($s1) -/* 21740 80046340 3C058010 */ lui $a1, %hi(D_801052D8) -/* 21744 80046344 24A552D8 */ addiu $a1, $a1, %lo(D_801052D8) -/* 21748 80046348 080118D7 */ j .L8004635C -/* 2174C 8004634C 00000000 */ nop -.L80046350: -/* 21750 80046350 8E24FFCF */ lw $a0, -0x31($s1) -/* 21754 80046354 3C058008 */ lui $a1, %hi(D_800804F0) -/* 21758 80046358 24A504F0 */ addiu $a1, $a1, %lo(D_800804F0) -.L8004635C: -/* 2175C 8004635C 0C0511FF */ jal set_hud_element_anim -/* 21760 80046360 00000000 */ nop -/* 21764 80046364 A237FFC8 */ sb $s7, -0x38($s1) -/* 21768 80046368 080118E6 */ j .L80046398 -/* 2176C 8004636C A233FFC6 */ sb $s3, -0x3a($s1) -.L80046370: -/* 21770 80046370 8222FFC8 */ lb $v0, -0x38($s1) -/* 21774 80046374 9223FFC8 */ lbu $v1, -0x38($s1) -/* 21778 80046378 10400003 */ beqz $v0, .L80046388 -/* 2177C 8004637C 2462FFFF */ addiu $v0, $v1, -1 -/* 21780 80046380 080118E6 */ j .L80046398 -/* 21784 80046384 A222FFC8 */ sb $v0, -0x38($s1) -.L80046388: -/* 21788 80046388 8E24FFCF */ lw $a0, -0x31($s1) -/* 2178C 8004638C 0C05123D */ jal free_hud_element -/* 21790 80046390 A220FFC4 */ sb $zero, -0x3c($s1) -/* 21794 80046394 A220FFC6 */ sb $zero, -0x3a($s1) -.L80046398: -/* 21798 80046398 8222FFD5 */ lb $v0, -0x2b($s1) -/* 2179C 8004639C 14520013 */ bne $v0, $s2, .L800463EC -/* 217A0 800463A0 2402000E */ addiu $v0, $zero, 0xe -/* 217A4 800463A4 8223FFD3 */ lb $v1, -0x2d($s1) -/* 217A8 800463A8 3C048008 */ lui $a0, %hi(D_800804F0) -/* 217AC 800463AC 248404F0 */ addiu $a0, $a0, %lo(D_800804F0) -/* 217B0 800463B0 14620003 */ bne $v1, $v0, .L800463C0 -/* 217B4 800463B4 00000000 */ nop -/* 217B8 800463B8 3C048010 */ lui $a0, %hi(D_80106CD8) -/* 217BC 800463BC 24846CD8 */ addiu $a0, $a0, %lo(D_80106CD8) -.L800463C0: -/* 217C0 800463C0 0C050529 */ jal create_hud_element -/* 217C4 800463C4 00000000 */ nop -/* 217C8 800463C8 AE22FFDB */ sw $v0, -0x25($s1) -/* 217CC 800463CC 0040802D */ daddu $s0, $v0, $zero -/* 217D0 800463D0 0200202D */ daddu $a0, $s0, $zero -/* 217D4 800463D4 0C051280 */ jal set_hud_element_flags -/* 217D8 800463D8 24050002 */ addiu $a1, $zero, 2 -/* 217DC 800463DC 0200202D */ daddu $a0, $s0, $zero -/* 217E0 800463E0 0C051280 */ jal set_hud_element_flags -/* 217E4 800463E4 24050080 */ addiu $a1, $zero, 0x80 -/* 217E8 800463E8 A233FFD5 */ sb $s3, -0x2b($s1) -.L800463EC: -/* 217EC 800463EC 8223FFD6 */ lb $v1, -0x2a($s1) -/* 217F0 800463F0 10720007 */ beq $v1, $s2, .L80046410 -/* 217F4 800463F4 28620002 */ slti $v0, $v1, 2 -/* 217F8 800463F8 14400020 */ bnez $v0, .L8004647C -/* 217FC 800463FC 00000000 */ nop -/* 21800 80046400 10760014 */ beq $v1, $s6, .L80046454 -/* 21804 80046404 00000000 */ nop -/* 21808 80046408 0801191F */ j .L8004647C -/* 2180C 8004640C 00000000 */ nop -.L80046410: -/* 21810 80046410 8223FFD4 */ lb $v1, -0x2c($s1) -/* 21814 80046414 2402000E */ addiu $v0, $zero, 0xe -/* 21818 80046418 14620006 */ bne $v1, $v0, .L80046434 -/* 2181C 8004641C 00000000 */ nop -/* 21820 80046420 8E24FFDF */ lw $a0, -0x21($s1) -/* 21824 80046424 3C058010 */ lui $a1, %hi(D_80106E98) -/* 21828 80046428 24A56E98 */ addiu $a1, $a1, %lo(D_80106E98) -/* 2182C 8004642C 08011910 */ j .L80046440 -/* 21830 80046430 00000000 */ nop -.L80046434: -/* 21834 80046434 8E24FFDF */ lw $a0, -0x21($s1) -/* 21838 80046438 3C058008 */ lui $a1, %hi(D_800804F0) -/* 2183C 8004643C 24A504F0 */ addiu $a1, $a1, %lo(D_800804F0) -.L80046440: -/* 21840 80046440 0C0511FF */ jal set_hud_element_anim -/* 21844 80046444 00000000 */ nop -/* 21848 80046448 A237FFD8 */ sb $s7, -0x28($s1) -/* 2184C 8004644C 0801191F */ j .L8004647C -/* 21850 80046450 A233FFD6 */ sb $s3, -0x2a($s1) -.L80046454: -/* 21854 80046454 8222FFD8 */ lb $v0, -0x28($s1) -/* 21858 80046458 9223FFD8 */ lbu $v1, -0x28($s1) -/* 2185C 8004645C 10400003 */ beqz $v0, .L8004646C -/* 21860 80046460 2462FFFF */ addiu $v0, $v1, -1 -/* 21864 80046464 0801191F */ j .L8004647C -/* 21868 80046468 A222FFD8 */ sb $v0, -0x28($s1) -.L8004646C: -/* 2186C 8004646C 8E24FFDF */ lw $a0, -0x21($s1) -/* 21870 80046470 0C05123D */ jal free_hud_element -/* 21874 80046474 A220FFD4 */ sb $zero, -0x2c($s1) -/* 21878 80046478 A220FFD6 */ sb $zero, -0x2a($s1) -.L8004647C: -/* 2187C 8004647C 8222FFE5 */ lb $v0, -0x1b($s1) -/* 21880 80046480 1452000E */ bne $v0, $s2, .L800464BC -/* 21884 80046484 00000000 */ nop -/* 21888 80046488 3C048010 */ lui $a0, %hi(D_801062DC) -/* 2188C 8004648C 248462DC */ addiu $a0, $a0, %lo(D_801062DC) -/* 21890 80046490 0C050529 */ jal create_hud_element -/* 21894 80046494 00000000 */ nop -/* 21898 80046498 0040802D */ daddu $s0, $v0, $zero -/* 2189C 8004649C 0040202D */ daddu $a0, $v0, $zero -/* 218A0 800464A0 24050002 */ addiu $a1, $zero, 2 -/* 218A4 800464A4 0C051280 */ jal set_hud_element_flags -/* 218A8 800464A8 AE30FFEB */ sw $s0, -0x15($s1) -/* 218AC 800464AC 0200202D */ daddu $a0, $s0, $zero -/* 218B0 800464B0 0C051280 */ jal set_hud_element_flags -/* 218B4 800464B4 24050080 */ addiu $a1, $zero, 0x80 -/* 218B8 800464B8 A233FFE5 */ sb $s3, -0x1b($s1) -.L800464BC: -/* 218BC 800464BC 8223FFE6 */ lb $v1, -0x1a($s1) -/* 218C0 800464C0 10720007 */ beq $v1, $s2, .L800464E0 -/* 218C4 800464C4 28620002 */ slti $v0, $v1, 2 -/* 218C8 800464C8 14400017 */ bnez $v0, .L80046528 -/* 218CC 800464CC 00000000 */ nop -/* 218D0 800464D0 1076000B */ beq $v1, $s6, .L80046500 -/* 218D4 800464D4 00000000 */ nop -/* 218D8 800464D8 0801194A */ j .L80046528 -/* 218DC 800464DC 00000000 */ nop -.L800464E0: -/* 218E0 800464E0 8E24FFEF */ lw $a0, -0x11($s1) -/* 218E4 800464E4 3C058010 */ lui $a1, %hi(D_8010645C) -/* 218E8 800464E8 24A5645C */ addiu $a1, $a1, %lo(D_8010645C) -/* 218EC 800464EC 0C0511FF */ jal set_hud_element_anim -/* 218F0 800464F0 00000000 */ nop -/* 218F4 800464F4 A237FFE8 */ sb $s7, -0x18($s1) -/* 218F8 800464F8 0801194A */ j .L80046528 -/* 218FC 800464FC A233FFE6 */ sb $s3, -0x1a($s1) -.L80046500: -/* 21900 80046500 8222FFE8 */ lb $v0, -0x18($s1) -/* 21904 80046504 9223FFE8 */ lbu $v1, -0x18($s1) -/* 21908 80046508 10400003 */ beqz $v0, .L80046518 -/* 2190C 8004650C 2462FFFF */ addiu $v0, $v1, -1 -/* 21910 80046510 0801194A */ j .L80046528 -/* 21914 80046514 A222FFE8 */ sb $v0, -0x18($s1) -.L80046518: -/* 21918 80046518 8E24FFEF */ lw $a0, -0x11($s1) -/* 2191C 8004651C 0C05123D */ jal free_hud_element -/* 21920 80046520 A220FFE4 */ sb $zero, -0x1c($s1) -/* 21924 80046524 A220FFE6 */ sb $zero, -0x1a($s1) -.L80046528: -/* 21928 80046528 8222FFF4 */ lb $v0, -0xc($s1) -/* 2192C 8004652C 1040000D */ beqz $v0, .L80046564 -/* 21930 80046530 00000000 */ nop -/* 21934 80046534 1452000B */ bne $v0, $s2, .L80046564 -/* 21938 80046538 00000000 */ nop -/* 2193C 8004653C 8E30FFFB */ lw $s0, -5($s1) -/* 21940 80046540 0C051235 */ jal get_hud_element -/* 21944 80046544 0200202D */ daddu $a0, $s0, $zero -/* 21948 80046548 8C420000 */ lw $v0, ($v0) -/* 2194C 8004654C 30420004 */ andi $v0, $v0, 4 -/* 21950 80046550 10400004 */ beqz $v0, .L80046564 -/* 21954 80046554 00000000 */ nop -/* 21958 80046558 0C05123D */ jal free_hud_element -/* 2195C 8004655C 0200202D */ daddu $a0, $s0, $zero -/* 21960 80046560 A220FFF4 */ sb $zero, -0xc($s1) -.L80046564: -/* 21964 80046564 82220000 */ lb $v0, ($s1) -/* 21968 80046568 5040000E */ beql $v0, $zero, .L800465A4 -/* 2196C 8004656C 26B50001 */ addiu $s5, $s5, 1 -/* 21970 80046570 5452000C */ bnel $v0, $s2, .L800465A4 -/* 21974 80046574 26B50001 */ addiu $s5, $s5, 1 -/* 21978 80046578 8E300007 */ lw $s0, 7($s1) -/* 2197C 8004657C 0C051235 */ jal get_hud_element -/* 21980 80046580 0200202D */ daddu $a0, $s0, $zero -/* 21984 80046584 8C420000 */ lw $v0, ($v0) -/* 21988 80046588 30420004 */ andi $v0, $v0, 4 -/* 2198C 8004658C 50400005 */ beql $v0, $zero, .L800465A4 -/* 21990 80046590 26B50001 */ addiu $s5, $s5, 1 -/* 21994 80046594 0C05123D */ jal free_hud_element -/* 21998 80046598 0200202D */ daddu $a0, $s0, $zero -/* 2199C 8004659C A2200000 */ sb $zero, ($s1) -/* 219A0 800465A0 26B50001 */ addiu $s5, $s5, 1 -.L800465A4: -/* 219A4 800465A4 263100B0 */ addiu $s1, $s1, 0xb0 -/* 219A8 800465A8 2AA20040 */ slti $v0, $s5, 0x40 -/* 219AC 800465AC 1440FEB2 */ bnez $v0, .L80046078 -/* 219B0 800465B0 269400B0 */ addiu $s4, $s4, 0xb0 -/* 219B4 800465B4 8FBF0030 */ lw $ra, 0x30($sp) -/* 219B8 800465B8 8FB7002C */ lw $s7, 0x2c($sp) -/* 219BC 800465BC 8FB60028 */ lw $s6, 0x28($sp) -/* 219C0 800465C0 8FB50024 */ lw $s5, 0x24($sp) -/* 219C4 800465C4 8FB40020 */ lw $s4, 0x20($sp) -/* 219C8 800465C8 8FB3001C */ lw $s3, 0x1c($sp) -/* 219CC 800465CC 8FB20018 */ lw $s2, 0x18($sp) -/* 219D0 800465D0 8FB10014 */ lw $s1, 0x14($sp) -/* 219D4 800465D4 8FB00010 */ lw $s0, 0x10($sp) -/* 219D8 800465D8 03E00008 */ jr $ra -/* 219DC 800465DC 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/ver/us/asm/nonmatchings/20ec0_len_5040/set_status_icons_properties.s b/ver/us/asm/nonmatchings/20ec0_len_5040/set_status_icons_properties.s deleted file mode 100644 index 88851a785c..0000000000 --- a/ver/us/asm/nonmatchings/20ec0_len_5040/set_status_icons_properties.s +++ /dev/null @@ -1,30 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_status_icons_properties -/* 22B8C 8004778C 00041040 */ sll $v0, $a0, 1 -/* 22B90 80047790 00441021 */ addu $v0, $v0, $a0 -/* 22B94 80047794 00021080 */ sll $v0, $v0, 2 -/* 22B98 80047798 00441023 */ subu $v0, $v0, $a0 -/* 22B9C 8004779C 3C03800A */ lui $v1, %hi(D_800A0F44) -/* 22BA0 800477A0 8C630F44 */ lw $v1, %lo(D_800A0F44)($v1) -/* 22BA4 800477A4 00021100 */ sll $v0, $v0, 4 -/* 22BA8 800477A8 00621821 */ addu $v1, $v1, $v0 -/* 22BAC 800477AC AC650004 */ sw $a1, 4($v1) -/* 22BB0 800477B0 AC660008 */ sw $a2, 8($v1) -/* 22BB4 800477B4 AC67000C */ sw $a3, 0xc($v1) -/* 22BB8 800477B8 8FA40018 */ lw $a0, 0x18($sp) -/* 22BBC 800477BC 8FA5001C */ lw $a1, 0x1c($sp) -/* 22BC0 800477C0 24840011 */ addiu $a0, $a0, 0x11 -/* 22BC4 800477C4 24A20011 */ addiu $v0, $a1, 0x11 -/* 22BC8 800477C8 AC62001C */ sw $v0, 0x1c($v1) -/* 22BCC 800477CC 24A20022 */ addiu $v0, $a1, 0x22 -/* 22BD0 800477D0 AC650014 */ sw $a1, 0x14($v1) -/* 22BD4 800477D4 24A50033 */ addiu $a1, $a1, 0x33 -/* 22BD8 800477D8 AC640010 */ sw $a0, 0x10($v1) -/* 22BDC 800477DC AC640018 */ sw $a0, 0x18($v1) -/* 22BE0 800477E0 AC640020 */ sw $a0, 0x20($v1) -/* 22BE4 800477E4 AC620024 */ sw $v0, 0x24($v1) -/* 22BE8 800477E8 AC640028 */ sw $a0, 0x28($v1) -/* 22BEC 800477EC 03E00008 */ jr $ra -/* 22BF0 800477F0 AC65002C */ sw $a1, 0x2c($v1) diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index 8830d33e9f..b6200e157e 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -76,7 +76,7 @@ segments: - [0x13870, c, npc] - [0x1A1F0, c, 1a1f0_len_5390] - [0x1F580, c, encounter_api] - - [0x20EC0, c, 20ec0_len_5040] + - [0x20EC0, c, status_icons] - [0x23680, c] - [0x25AF0, c] - [0x25F00, c, 25f00_len_940] @@ -344,7 +344,7 @@ segments: - [0x73860, .rodata, state_demo] - [0x73880, .rodata, npc] - [0x739F0, .rodata, 1a1f0_len_5390] - - [0x73AB0, .rodata, 20ec0_len_5040] + - [0x73AB0, .rodata, status_icons] - [0x73B10, .rodata, 23680] - [0x73CC0, .rodata, 28910_len_5090] - [0x73CF0, .rodata, 2e230_len_2190] diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index 62e33569fa..47a1eb0c93 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -429,25 +429,25 @@ update_merlee_message = 0x80045D7C; // type:func rom:0x2117C draw_merlee_message_string = 0x80045E4C; // type:func rom:0x2124C draw_merlee_message = 0x80045ED0; // type:func rom:0x212D0 is_merlee_message_done = 0x80045FA4; // type:func rom:0x213A4 -func_80045FB4 = 0x80045FB4; // type:func rom:0x213B4 -func_80046030 = 0x80046030; // type:func rom:0x21430 +init_all_status_icons = 0x80045FB4; // type:func rom:0x213B4 +update_all_status_icons = 0x80046030; // type:func rom:0x21430 draw_all_status_icons = 0x800465E0; // type:func rom:0x219E0 create_status_icon_set = 0x80047608; // type:func rom:0x22A08 remove_all_status_icons = 0x800476F4; // type:func rom:0x22AF4 set_status_icons_properties = 0x8004778C; // type:func rom:0x22B8C -func_800477F4 = 0x800477F4; // type:func rom:0x22BF4 -func_80047820 = 0x80047820; // type:func rom:0x22C20 +set_status_icons_offset = 0x800477F4; // type:func rom:0x22BF4 +create_status_debuff = 0x80047820; // type:func rom:0x22C20 remove_status_debuff = 0x80047898; // type:func rom:0x22C98 -enable_status_1 = 0x800478F8; // type:func rom:0x22CF8 -func_80047928 = 0x80047928; // type:func rom:0x22D28 +enable_status_debuff = 0x800478F8; // type:func rom:0x22CF8 +create_status_static = 0x80047928; // type:func rom:0x22D28 remove_status_static = 0x800479A0; // type:func rom:0x22DA0 enable_status_2 = 0x80047A00; // type:func rom:0x22E00 -func_80047A30 = 0x80047A30; // type:func rom:0x22E30 +create_status_transparent = 0x80047A30; // type:func rom:0x22E30 remove_status_transparent = 0x80047AA8; // type:func rom:0x22EA8 -enable_status_3 = 0x80047B08; // type:func rom:0x22F08 -func_80047B38 = 0x80047B38; // type:func rom:0x22F38 -remove_status_4 = 0x80047B84; // type:func rom:0x22F84 -enable_status_4 = 0x80047BE4; // type:func rom:0x22FE4 +enable_status_transparent = 0x80047B08; // type:func rom:0x22F08 +create_status_chill_out = 0x80047B38; // type:func rom:0x22F38 +remove_status_chill_out = 0x80047B84; // type:func rom:0x22F84 +enable_status_chill_out = 0x80047BE4; // type:func rom:0x22FE4 create_status_icon_boost_jump = 0x80047C14; // type:func rom:0x23014 remove_status_icon_boost_jump = 0x80047CA4; // type:func rom:0x230A4 enable_status_icon_boost_jump = 0x80047D00; // type:func rom:0x23100