diff --git a/include/common.h b/include/common.h index d4a7e57916..1286a2ee89 100644 --- a/include/common.h +++ b/include/common.h @@ -4,7 +4,6 @@ #include "ultra64.h" #include "types.h" #include "common_structs.h" -#include "hud_element.h" // TEMP for Actor #include "functions.h" #include "variables.h" #include "macros.h" diff --git a/include/variables.h b/include/variables.h index 077b391915..d340adb364 100644 --- a/include/variables.h +++ b/include/variables.h @@ -199,8 +199,6 @@ extern s32 pause_map_cursorCurrentOptionCopy; extern s32 pause_map_spacesInSnapRange; -extern HudElementAnim* D_8024FA30[1]; - extern PauseMapSpace pause_map_spaces[34]; extern MenuWindowBP pause_map_windowBlueprints[7]; // Badges @@ -221,7 +219,6 @@ extern s32 gBadgeMenuBShowNotEnoughBP; extern s32 D_802703A4; extern s32 gBadgeMenuIconIDs[22]; extern MenuWindowBP gBadgeMenuWindowBPs[1]; -extern HudElementAnim *gBadgeMenuElements[22]; // Items extern s16 gItemMenuItemIDs[100]; @@ -236,7 +233,6 @@ extern s32 gItemMenuTargetScrollPos; extern s32 D_802705DC; extern s32 gItemMenuLevel; extern s32 gItemMenuCurrentTab; -extern HudElement* gItemIcons[20]; extern s32 gItemMenuScrollUpIcon; // Stats diff --git a/src/163400.c b/src/163400.c index 8ec4c051df..f8b0df9efa 100644 --- a/src/163400.c +++ b/src/163400.c @@ -1,5 +1,6 @@ #include "common.h" #include "filemenu.h" +#include "hud_element.h" extern s32 D_80241ECC; extern MenuPanel D_8024A098; diff --git a/src/165490.c b/src/165490.c index 13a209e854..663656f336 100644 --- a/src/165490.c +++ b/src/165490.c @@ -1,5 +1,6 @@ #include "common.h" #include "filemenu.h" +#include "hud_element.h" INCLUDE_ASM(s32, "165490", filemenu_draw_contents_title); diff --git a/src/168590.c b/src/168590.c index cde32ce473..24b43f34c5 100644 --- a/src/168590.c +++ b/src/168590.c @@ -1,5 +1,6 @@ #include "common.h" #include "filemenu.h" +#include "hud_element.h" extern MenuWindowBP D_8024A134[1]; diff --git a/src/190B20.c b/src/190B20.c index f45de6d463..0ebd04cfaa 100644 --- a/src/190B20.c +++ b/src/190B20.c @@ -1,6 +1,7 @@ #include "common.h" #include "effects.h" #include "battle/battle.h" +#include "hud_element.h" #include "message_ids.h" s32 D_80280FC0[] = { diff --git a/src/1A5830.c b/src/1A5830.c index cba78c5631..7079a02c63 100644 --- a/src/1A5830.c +++ b/src/1A5830.c @@ -2,6 +2,7 @@ #include "battle/battle.h" #include "script_api/battle.h" #include "effects.h" +#include "hud_element.h" extern s32 D_802946E0[]; diff --git a/src/8800.c b/src/8800.c index 3f5a6ba12c..21b64b125c 100644 --- a/src/8800.c +++ b/src/8800.c @@ -1,6 +1,7 @@ #include "common.h" #include "camera.h" #include "nu/nusys.h" +#include "hud_element.h" // D_8009A5EC bss here diff --git a/src/8a860_len_3f30.c b/src/8a860_len_3f30.c index d61f853fa3..2622bf7138 100644 --- a/src/8a860_len_3f30.c +++ b/src/8a860_len_3f30.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" extern s32 D_8010D650; extern s32 D_8010D660; @@ -131,7 +132,7 @@ void func_800F4C6C(PopupMessage* popup, s32 x, s32 y) { default: return; } - + set_hud_element_render_pos(hudElement, xPos, yPos); set_hud_element_alpha(hudElement, D_8010D650); draw_hud_element_clipped(hudElement); @@ -202,7 +203,7 @@ void create_popup_menu(PopupMenu* popup) { D_8010D654 = 0; D_8010D64C = D_8010D648; entryCount = otherPopup->numEntries; - + D_8010D656 = entryCount; if (entryCount > 6) { D_8010D656 = 6; diff --git a/src/battle/action_cmd/07.c b/src/battle/action_cmd/07.c index 22b22bcb04..3436f22efb 100644 --- a/src/battle/action_cmd/07.c +++ b/src/battle/action_cmd/07.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_07 diff --git a/src/battle/action_cmd/0A.c b/src/battle/action_cmd/0A.c index 542120a72e..7d3492a216 100644 --- a/src/battle/action_cmd/0A.c +++ b/src/battle/action_cmd/0A.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_0A diff --git a/src/battle/action_cmd/air_lift.c b/src/battle/action_cmd/air_lift.c index c04a317c05..54156d0364 100644 --- a/src/battle/action_cmd/air_lift.c +++ b/src/battle/action_cmd/air_lift.c @@ -1,6 +1,7 @@ #include "common.h" #include "effects.h" #include "battle/battle.h" +#include "hud_element.h" #define NAMESPACE action_command_air_lift diff --git a/src/battle/action_cmd/air_raid.c b/src/battle/action_cmd/air_raid.c index b881725606..f5112d448b 100644 --- a/src/battle/action_cmd/air_raid.c +++ b/src/battle/action_cmd/air_raid.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_air_raid diff --git a/src/battle/action_cmd/body_slam.c b/src/battle/action_cmd/body_slam.c index 5e849e5ed0..8b980fc018 100644 --- a/src/battle/action_cmd/body_slam.c +++ b/src/battle/action_cmd/body_slam.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_body_slam diff --git a/src/battle/action_cmd/bomb.c b/src/battle/action_cmd/bomb.c index cf95cfc4fd..e87ff95c57 100644 --- a/src/battle/action_cmd/bomb.c +++ b/src/battle/action_cmd/bomb.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_bomb diff --git a/src/battle/action_cmd/break_free.c b/src/battle/action_cmd/break_free.c index c68151ffa1..178607900b 100644 --- a/src/battle/action_cmd/break_free.c +++ b/src/battle/action_cmd/break_free.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_break_free diff --git a/src/battle/action_cmd/dizzy_shell.c b/src/battle/action_cmd/dizzy_shell.c index 4f14b57e45..55aab0bc29 100644 --- a/src/battle/action_cmd/dizzy_shell.c +++ b/src/battle/action_cmd/dizzy_shell.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_dizzy_shell diff --git a/src/battle/action_cmd/fire_shell.c b/src/battle/action_cmd/fire_shell.c index 9f1856c416..3b8ac7e320 100644 --- a/src/battle/action_cmd/fire_shell.c +++ b/src/battle/action_cmd/fire_shell.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_fire_shell diff --git a/src/battle/action_cmd/flee.c b/src/battle/action_cmd/flee.c index 371db6db7c..3e96f11e21 100644 --- a/src/battle/action_cmd/flee.c +++ b/src/battle/action_cmd/flee.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_flee diff --git a/src/battle/action_cmd/hurricane.c b/src/battle/action_cmd/hurricane.c index db9e3f447a..5f5a753a19 100644 --- a/src/battle/action_cmd/hurricane.c +++ b/src/battle/action_cmd/hurricane.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_hurricane diff --git a/src/battle/action_cmd/jump.c b/src/battle/action_cmd/jump.c index b835bf83e5..010c73a5c4 100644 --- a/src/battle/action_cmd/jump.c +++ b/src/battle/action_cmd/jump.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_jump diff --git a/src/battle/action_cmd/power_shock.c b/src/battle/action_cmd/power_shock.c index 8b56017cb2..b76f3f5f25 100644 --- a/src/battle/action_cmd/power_shock.c +++ b/src/battle/action_cmd/power_shock.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_power_shock diff --git a/src/battle/action_cmd/smack.c b/src/battle/action_cmd/smack.c index d4186fffc8..cc6a4b4efb 100644 --- a/src/battle/action_cmd/smack.c +++ b/src/battle/action_cmd/smack.c @@ -1,5 +1,6 @@ #include "common.h" #include "battle/battle.h" +#include "hud_element.h" #define NAMESPACE action_command_smack diff --git a/src/battle/action_cmd/spiny_surge.c b/src/battle/action_cmd/spiny_surge.c index 3c60fa8b63..d6f417eede 100644 --- a/src/battle/action_cmd/spiny_surge.c +++ b/src/battle/action_cmd/spiny_surge.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_spiny_surge diff --git a/src/battle/action_cmd/spook.c b/src/battle/action_cmd/spook.c index 998eee4b53..ea53dbbaa4 100644 --- a/src/battle/action_cmd/spook.c +++ b/src/battle/action_cmd/spook.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_spook diff --git a/src/battle/action_cmd/squirt.c b/src/battle/action_cmd/squirt.c index ab13f27924..f93c4817e6 100644 --- a/src/battle/action_cmd/squirt.c +++ b/src/battle/action_cmd/squirt.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_squirt diff --git a/src/battle/action_cmd/stop_leech.c b/src/battle/action_cmd/stop_leech.c index 13b4d98e52..ab6d4d93b8 100644 --- a/src/battle/action_cmd/stop_leech.c +++ b/src/battle/action_cmd/stop_leech.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_stop_leech diff --git a/src/battle/action_cmd/tidal_wave.c b/src/battle/action_cmd/tidal_wave.c index 57fc8d114e..8612b0832d 100644 --- a/src/battle/action_cmd/tidal_wave.c +++ b/src/battle/action_cmd/tidal_wave.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_tidal_wave diff --git a/src/battle/action_cmd/water_block.c b/src/battle/action_cmd/water_block.c index 6b9be75674..ed80995051 100644 --- a/src/battle/action_cmd/water_block.c +++ b/src/battle/action_cmd/water_block.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_water_block diff --git a/src/battle/action_cmd/whirlwind.c b/src/battle/action_cmd/whirlwind.c index 816e704754..e5160b11e2 100644 --- a/src/battle/action_cmd/whirlwind.c +++ b/src/battle/action_cmd/whirlwind.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE action_command_whirlwind diff --git a/src/battle/area_kmr_part_3/447D50.c b/src/battle/area_kmr_part_3/447D50.c index 70e9209963..61638fb20e 100644 --- a/src/battle/area_kmr_part_3/447D50.c +++ b/src/battle/area_kmr_part_3/447D50.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" extern s32 D_80104A28; diff --git a/src/battle/battle.c b/src/battle/battle.c index 17d94d2b54..cc0fa742f3 100644 --- a/src/battle/battle.c +++ b/src/battle/battle.c @@ -1,6 +1,7 @@ #include "common.h" #include "ld_addrs.h" #include "battle.h" +#include "hud_element.h" extern s32 D_800DC060; extern Stage* D_800DC064; diff --git a/src/battle/item/ItemRefund.inc.c b/src/battle/item/ItemRefund.inc.c index e290c1828e..da7fd7690e 100644 --- a/src/battle/item/ItemRefund.inc.c +++ b/src/battle/item/ItemRefund.inc.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" static HudElement* itemIcon; diff --git a/src/battle/star/refresh/78B600.c b/src/battle/star/refresh/78B600.c index 86c63caea3..549a3826eb 100644 --- a/src/battle/star/refresh/78B600.c +++ b/src/battle/star/refresh/78B600.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #define NAMESPACE battle_star_refresh diff --git a/src/hud_element.c b/src/hud_element.c index 9d893772ca..23716900e4 100644 --- a/src/hud_element.c +++ b/src/hud_element.c @@ -83,7 +83,25 @@ void init_hud_element_list(void) { D_80159180 = 0; } -INCLUDE_ASM(s32, "hud_element", func_801413F8); +void func_801413F8(void) { + set_cam_viewport(3, 0, 0, 0x13F, 0xEF); + gCameras[3].updateMode = 2; + gCameras[3].unk_06 = 1; + gCameras[3].unk_20 = 0x3CBF; + gCameras[3].nearClip = 0x10; + gCameras[3].unk_1C = 0; + gCameras[3].unk_1E = 0; + gCameras[3].unk_22 = 0; + gCameras[3].unk_5C = 0; + gCameras[3].farClip = 0x4000; + gCameras[3].bgColor[0] = 0; + gCameras[3].bgColor[1] = 0; + gCameras[3].bgColor[2] = 0; + gCameras[3].unk_54 = 160.0f; + gCameras[3].unk_58 = -120.0f; + gCameras[3].vfov = 1.0f; + gCameras[3].flags &= ~0x6; +} #ifdef NON_MATCHING s32 create_hud_element(const HudElementAnim* anim) { @@ -301,11 +319,67 @@ void set_hud_element_tint(s32 id, s32 r, s32 g, s32 b) { hudElement->tint.b = b; } -INCLUDE_ASM(void, "hud_element", create_hud_element_transform_A, s32 id); +void create_hud_element_transform_A(s32 id) { + HudElement* element = hudElements[id & ~0x800]; + HudTransform* transform = general_heap_malloc(sizeof(*transform)); -INCLUDE_ASM(void, "hud_element", create_hud_element_transform_B, s32 id); + element->hudTransform = transform; + ASSERT(transform != NULL); + element->flags.as_word |= 0x10000; + transform->unk_00 = func_8013A704(1); + transform->position.x = 0.0f; + transform->position.y = 0.0f; + transform->position.z = 0.0f; + transform->rotation.x = 0.0f; + transform->rotation.y = 0.0f; + transform->rotation.z = 0.0f; + transform->scale.x = 1.0f; + transform->scale.y = 1.0f; + transform->scale.z = 1.0f; + transform->pivot.x = 0; + transform->pivot.y = 0; + func_801413F8(); +} -INCLUDE_ASM(void, "hud_element", create_hud_element_transform_C, s32 id); +void create_hud_element_transform_B(s32 id) { + HudElement* element = hudElements[id & ~0x800]; + HudTransform* transform = general_heap_malloc(sizeof(*transform)); + + element->hudTransform = transform; + ASSERT(transform != NULL); + element->flags.as_word |= 0x30000; + transform->unk_00 = 0; + transform->position.x = 0.0f; + transform->position.y = 0.0f; + transform->position.z = 0.0f; + transform->rotation.x = 0.0f; + transform->rotation.y = 0.0f; + transform->rotation.z = 0.0f; + transform->scale.x = 1.0f; + transform->scale.y = 1.0f; + transform->scale.z = 1.0f; + func_801413F8(); +} + +void create_hud_element_transform_C(s32 id) { + HudElement* element = hudElements[id & ~0x800]; + HudTransform* transform = general_heap_malloc(sizeof(*transform)); + + element->hudTransform = transform; + ASSERT(transform != NULL); + element->flags.as_word |= 0x40030000; + transform->unk_00 = 0; + transform->position.x = 0.0f; + transform->position.y = 0.0f; + transform->position.z = 0.0f; + transform->rotation.x = 0.0f; + transform->rotation.y = 0.0f; + transform->rotation.z = 0.0f; + transform->scale.x = 1.0f; + transform->scale.y = 1.0f; + transform->scale.z = 1.0f; + func_801413F8(); +} void free_hud_element_transform(s32 id) { HudElement* hudElement = hudElements[id & ~0x800]; @@ -320,14 +394,62 @@ void free_hud_element_transform(s32 id) { hudElement->flags.as_word &= ~0x40030000; } -INCLUDE_ASM(void, "hud_element", set_hud_element_transform_pos, s32 id, f32 x, f32 y, f32 z); +void set_hud_element_transform_pos(s32 id, f32 x, f32 y, f32 z) { + HudElement* element = hudElements[id & ~0x800]; + HudTransform* transform = element->hudTransform; -INCLUDE_ASM(void, "hud_element", set_hud_element_transform_scale, s32 id, f32 x, f32 y, f32 z); + if (element->flags.as_word & 0x10000) { + transform->position.x = x; + transform->position.y = y; + transform->position.z = z; + } +} -INCLUDE_ASM(void, "hud_element", set_hud_element_transform_rotation, s32 id, f32 x, f32 y, f32 z); +void set_hud_element_transform_scale(s32 id, f32 x, f32 y, f32 z) { + HudElement* element = hudElements[id & ~0x800]; + HudTransform* transform = element->hudTransform; -INCLUDE_ASM(void, "hud_element", set_hud_element_transform_rotation_pivot, s32 id, s32 dx, s32 dy); + if (element->flags.as_word & 0x10000) { + transform->scale.x = x; + transform->scale.y = y; + transform->scale.z = z; + } +} +void set_hud_element_transform_rotation(s32 id, f32 x, f32 y, f32 z) { + HudElement* element = hudElements[id & ~0x800]; + HudTransform* transform = element->hudTransform; + + if (element->flags.as_word & 0x10000) { + transform->rotation.x = x; + transform->rotation.y = y; + transform->rotation.z = z; + } +} + +void set_hud_element_transform_rotation_pivot(s32 id, s32 dx, s32 dy) { + HudElement* element = hudElements[id & ~0x800]; + HudTransform* transform = element->hudTransform; + + if (element->flags.as_word & 0x10000) { + transform->pivot.x = dx; + transform->pivot.y = dy; + } +} + +#ifdef NON_MATCHING +void copy_world_hud_element_ref_to_battle(s32 worldID, s32 battleID) { + D_80157460[battleID & ~0x800].flags.as_word = D_80156F60[worldID & ~0x800].flags.as_word; +} +#else INCLUDE_ASM(void, "hud_element", copy_world_hud_element_ref_to_battle, s32 worldID, s32 battleID); +#endif -INCLUDE_ASM(void, "hud_element", set_hud_element_nonworld_cache, void* base, s32 size); +void set_hud_element_nonworld_cache(void* base, s32 size) { + D_8014EFC0[0] = (s32)base; + if (base == NULL) { + D_8014EFC4[0] = 0x11000; + } else { + D_8014EFC4[0] = size; + } +} diff --git a/src/hud_element.h b/src/hud_element.h index a5a075efbe..b70d6b71b3 100644 --- a/src/hud_element.h +++ b/src/hud_element.h @@ -71,6 +71,15 @@ typedef union { u32 as_word; } HudFlags; +typedef struct HudTransform { + /* 0x00 */ s32 unk_00; + /* 0x04 */ Vec3f position; + /* 0x10 */ Vec3f rotation; + /* 0x1C */ Vec3f scale; + /* 0x28 */ Vec2s pivot; + /* 0x30 */ char unk_30[0xC4]; +} HudTransform; // size = 0xF0 + typedef struct HudElement { /* 0x00 */ HudFlags flags; /* 0x04 */ const HudElementAnim* readPos; @@ -79,7 +88,7 @@ typedef struct HudElement { /* 0x10 */ s32* imageAddr; /* 0x14 */ s32* paletteAddr; /* 0x18 */ s32 memOffset; - /* 0x1C */ s32* hudTransform; + /* 0x1C */ HudTransform* hudTransform; /* 0x20 */ f32 unk_20; /* 0x24 */ f32 unk_24; /* 0x28 */ f32 unkImgScale[2]; @@ -101,6 +110,10 @@ typedef struct HudElement { /* 0x40 */ Vec2b customDrawSize; } HudElement; // size = 0x54 +extern HudElementAnim* D_8024FA30[1]; +extern HudElementAnim *gBadgeMenuElements[22]; +extern HudElement* gItemIcons[20]; + #define he_End HUD_ELEMENT_OP_End #define he_SetRGBA(arg0, image) HUD_ELEMENT_OP_SetRGBA, arg0, (s32)image #define he_SetCI(arg0, raster, palette) HUD_ELEMENT_OP_SetCI, arg0, (s32) raster, (s32)palette diff --git a/src/main_loop.c b/src/main_loop.c index c16f4432a3..f402c4d66b 100644 --- a/src/main_loop.c +++ b/src/main_loop.c @@ -1,6 +1,7 @@ #include "common.h" #include "nu/nusys.h" #include "ld_addrs.h" +#include "hud_element.h" s8 D_80074020 = 1; s8 D_80074021 = 5; diff --git a/src/pause/135EE0.c b/src/pause/135EE0.c index 1b5c79966a..f9d91b2719 100644 --- a/src/pause/135EE0.c +++ b/src/pause/135EE0.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" BSS s32 gPauseMenuHeldButtons; BSS s32 gPauseMenuPressedButtons; diff --git a/src/pause/137ED0.c b/src/pause/137ED0.c index c932fec5c3..a0e352a021 100644 --- a/src/pause/137ED0.c +++ b/src/pause/137ED0.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" void pause_tabs_draw_invis(void) { } diff --git a/src/pause/138CC0.c b/src/pause/138CC0.c index 83b77bb9f2..fa504a9913 100644 --- a/src/pause/138CC0.c +++ b/src/pause/138CC0.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" // Probably only used here, but could theoretically be used in the main menu too typedef struct { @@ -409,7 +410,7 @@ void pause_badges_load_badges(s32 onlyEquipped) { page = &gBadgeMenuPages[0]; i = 0; - + for (i = 0; i < gBadgeMenuNumItems / 8; i++, page++) { page->listStart = i * 8; page->numCols = 1; diff --git a/src/pause/13E120.c b/src/pause/13E120.c index c25156bed2..13d076f1c9 100644 --- a/src/pause/13E120.c +++ b/src/pause/13E120.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" extern s32 D_80270640[]; diff --git a/src/pause/pause_items.c b/src/pause/pause_items.c index 019b47da6b..95ddf26912 100644 --- a/src/pause/pause_items.c +++ b/src/pause/pause_items.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" struct struct8024F5C0 { char unk00[0x10]; diff --git a/src/pause/pause_map.c b/src/pause/pause_map.c index f872695a72..67711fa579 100644 --- a/src/pause/pause_map.c +++ b/src/pause/pause_map.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" #include "message_ids.h" void func_8024D930(PauseMapSpace* space) { diff --git a/src/state_battle.c b/src/state_battle.c index 0e98c9921d..ad53dba632 100644 --- a/src/state_battle.c +++ b/src/state_battle.c @@ -1,5 +1,6 @@ #include "common.h" #include "nu/nusys.h" +#include "hud_element.h" s32 D_800778A0[] = { &D_8038F800, &D_803B5000, &D_803DA800, diff --git a/src/state_demo.c b/src/state_demo.c index d64966bf9d..64c8248632 100644 --- a/src/state_demo.c +++ b/src/state_demo.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" typedef struct DemoSceneData { /* 0x0 */ s16 unk_0; diff --git a/src/state_file_select.c b/src/state_file_select.c index 4c0c166b62..dbfcb4d8f1 100644 --- a/src/state_file_select.c +++ b/src/state_file_select.c @@ -2,6 +2,7 @@ #include "ld_addrs.h" #include "nu/nusys.h" #include "camera.h" +#include "hud_element.h" s32 D_80077980[] = { &D_8038F800, &D_803B5000, &D_803DA800, }; diff --git a/src/state_intro.c b/src/state_intro.c index ec4aabe558..a7676fa43f 100644 --- a/src/state_intro.c +++ b/src/state_intro.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" extern s32 D_800A0950; diff --git a/src/state_logos.c b/src/state_logos.c index 45af71ff9b..facbad90cf 100644 --- a/src/state_logos.c +++ b/src/state_logos.c @@ -1,6 +1,7 @@ #include "common.h" #include "ld_addrs.h" #include "camera.h" +#include "hud_element.h" void appendGfx_intro_logos(); diff --git a/src/state_pause.c b/src/state_pause.c index 9f76a642c7..6097beb1ed 100644 --- a/src/state_pause.c +++ b/src/state_pause.c @@ -2,6 +2,7 @@ #include "ld_addrs.h" #include "map.h" #include "nu/nusys.h" +#include "hud_element.h" s32 D_80077950[] = { 0x8038F800, 0x803B5000, &D_803DA800 }; diff --git a/src/state_startup.c b/src/state_startup.c index 3e9d7a561b..0ff1810aff 100644 --- a/src/state_startup.c +++ b/src/state_startup.c @@ -1,4 +1,5 @@ #include "common.h" +#include "hud_element.h" void state_init_startup(void) { gOverrideFlags |= 0x8; diff --git a/src/world/world.c b/src/world/world.c index ad0b3adce8..6d59656a79 100644 --- a/src/world/world.c +++ b/src/world/world.c @@ -2,6 +2,7 @@ #include "ld_addrs.h" #include "map.h" #include "camera.h" +#include "hud_element.h" #define ASSET_TABLE_ROM_START 0x1E40000 #define ASSET_TABLE_HEADER_SIZE 0x20 diff --git a/ver/us/asm/nonmatchings/hud_element/create_hud_element_transform_A.s b/ver/us/asm/nonmatchings/hud_element/create_hud_element_transform_A.s deleted file mode 100644 index 5442934532..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/create_hud_element_transform_A.s +++ /dev/null @@ -1,50 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel create_hud_element_transform_A -/* DB628 80144F28 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* DB62C 80144F2C 2402F7FF */ addiu $v0, $zero, -0x801 -/* DB630 80144F30 00821024 */ and $v0, $a0, $v0 -/* DB634 80144F34 3C038015 */ lui $v1, %hi(hudElements) -/* DB638 80144F38 8C637960 */ lw $v1, %lo(hudElements)($v1) -/* DB63C 80144F3C 00021080 */ sll $v0, $v0, 2 -/* DB640 80144F40 AFBF0018 */ sw $ra, 0x18($sp) -/* DB644 80144F44 AFB10014 */ sw $s1, 0x14($sp) -/* DB648 80144F48 AFB00010 */ sw $s0, 0x10($sp) -/* DB64C 80144F4C 00431021 */ addu $v0, $v0, $v1 -/* DB650 80144F50 8C510000 */ lw $s1, ($v0) -/* DB654 80144F54 0C00AB0A */ jal general_heap_malloc -/* DB658 80144F58 240400F0 */ addiu $a0, $zero, 0xf0 -/* DB65C 80144F5C 0040802D */ daddu $s0, $v0, $zero -/* DB660 80144F60 16000003 */ bnez $s0, .L80144F70 -/* DB664 80144F64 AE30001C */ sw $s0, 0x1c($s1) -.L80144F68: -/* DB668 80144F68 080513DA */ j .L80144F68 -/* DB66C 80144F6C 00000000 */ nop -.L80144F70: -/* DB670 80144F70 24040001 */ addiu $a0, $zero, 1 -/* DB674 80144F74 8E220000 */ lw $v0, ($s1) -/* DB678 80144F78 3C030001 */ lui $v1, 1 -/* DB67C 80144F7C 00431025 */ or $v0, $v0, $v1 -/* DB680 80144F80 0C04E9C1 */ jal func_8013A704 -/* DB684 80144F84 AE220000 */ sw $v0, ($s1) -/* DB688 80144F88 3C013F80 */ lui $at, 0x3f80 -/* DB68C 80144F8C 44810000 */ mtc1 $at, $f0 -/* DB690 80144F90 AE020000 */ sw $v0, ($s0) -/* DB694 80144F94 AE000004 */ sw $zero, 4($s0) -/* DB698 80144F98 AE000008 */ sw $zero, 8($s0) -/* DB69C 80144F9C AE00000C */ sw $zero, 0xc($s0) -/* DB6A0 80144FA0 AE000010 */ sw $zero, 0x10($s0) -/* DB6A4 80144FA4 AE000014 */ sw $zero, 0x14($s0) -/* DB6A8 80144FA8 AE000018 */ sw $zero, 0x18($s0) -/* DB6AC 80144FAC A6000028 */ sh $zero, 0x28($s0) -/* DB6B0 80144FB0 A600002A */ sh $zero, 0x2a($s0) -/* DB6B4 80144FB4 E600001C */ swc1 $f0, 0x1c($s0) -/* DB6B8 80144FB8 E6000020 */ swc1 $f0, 0x20($s0) -/* DB6BC 80144FBC 0C0504FE */ jal func_801413F8 -/* DB6C0 80144FC0 E6000024 */ swc1 $f0, 0x24($s0) -/* DB6C4 80144FC4 8FBF0018 */ lw $ra, 0x18($sp) -/* DB6C8 80144FC8 8FB10014 */ lw $s1, 0x14($sp) -/* DB6CC 80144FCC 8FB00010 */ lw $s0, 0x10($sp) -/* DB6D0 80144FD0 03E00008 */ jr $ra -/* DB6D4 80144FD4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/hud_element/create_hud_element_transform_B.s b/ver/us/asm/nonmatchings/hud_element/create_hud_element_transform_B.s deleted file mode 100644 index 5c032d0a41..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/create_hud_element_transform_B.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel create_hud_element_transform_B -/* DB6D8 80144FD8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* DB6DC 80144FDC 2402F7FF */ addiu $v0, $zero, -0x801 -/* DB6E0 80144FE0 00821024 */ and $v0, $a0, $v0 -/* DB6E4 80144FE4 00021080 */ sll $v0, $v0, 2 -/* DB6E8 80144FE8 3C038015 */ lui $v1, %hi(hudElements) -/* DB6EC 80144FEC 8C637960 */ lw $v1, %lo(hudElements)($v1) -/* DB6F0 80144FF0 AFBF0014 */ sw $ra, 0x14($sp) -/* DB6F4 80144FF4 AFB00010 */ sw $s0, 0x10($sp) -/* DB6F8 80144FF8 00431021 */ addu $v0, $v0, $v1 -/* DB6FC 80144FFC 8C500000 */ lw $s0, ($v0) -/* DB700 80145000 0C00AB0A */ jal general_heap_malloc -/* DB704 80145004 240400F0 */ addiu $a0, $zero, 0xf0 -/* DB708 80145008 0040202D */ daddu $a0, $v0, $zero -/* DB70C 8014500C 14800003 */ bnez $a0, .L8014501C -/* DB710 80145010 AE04001C */ sw $a0, 0x1c($s0) -.L80145014: -/* DB714 80145014 08051405 */ j .L80145014 -/* DB718 80145018 00000000 */ nop -.L8014501C: -/* DB71C 8014501C 3C020003 */ lui $v0, 3 -/* DB720 80145020 8E030000 */ lw $v1, ($s0) -/* DB724 80145024 3C013F80 */ lui $at, 0x3f80 -/* DB728 80145028 44810000 */ mtc1 $at, $f0 -/* DB72C 8014502C 00621825 */ or $v1, $v1, $v0 -/* DB730 80145030 AE030000 */ sw $v1, ($s0) -/* DB734 80145034 AC800000 */ sw $zero, ($a0) -/* DB738 80145038 AC800004 */ sw $zero, 4($a0) -/* DB73C 8014503C AC800008 */ sw $zero, 8($a0) -/* DB740 80145040 AC80000C */ sw $zero, 0xc($a0) -/* DB744 80145044 AC800010 */ sw $zero, 0x10($a0) -/* DB748 80145048 AC800014 */ sw $zero, 0x14($a0) -/* DB74C 8014504C AC800018 */ sw $zero, 0x18($a0) -/* DB750 80145050 E480001C */ swc1 $f0, 0x1c($a0) -/* DB754 80145054 E4800020 */ swc1 $f0, 0x20($a0) -/* DB758 80145058 0C0504FE */ jal func_801413F8 -/* DB75C 8014505C E4800024 */ swc1 $f0, 0x24($a0) -/* DB760 80145060 8FBF0014 */ lw $ra, 0x14($sp) -/* DB764 80145064 8FB00010 */ lw $s0, 0x10($sp) -/* DB768 80145068 03E00008 */ jr $ra -/* DB76C 8014506C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/hud_element/create_hud_element_transform_C.s b/ver/us/asm/nonmatchings/hud_element/create_hud_element_transform_C.s deleted file mode 100644 index 54d461ce7b..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/create_hud_element_transform_C.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel create_hud_element_transform_C -/* DB770 80145070 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* DB774 80145074 2402F7FF */ addiu $v0, $zero, -0x801 -/* DB778 80145078 00821024 */ and $v0, $a0, $v0 -/* DB77C 8014507C 00021080 */ sll $v0, $v0, 2 -/* DB780 80145080 3C038015 */ lui $v1, %hi(hudElements) -/* DB784 80145084 8C637960 */ lw $v1, %lo(hudElements)($v1) -/* DB788 80145088 AFBF0014 */ sw $ra, 0x14($sp) -/* DB78C 8014508C AFB00010 */ sw $s0, 0x10($sp) -/* DB790 80145090 00431021 */ addu $v0, $v0, $v1 -/* DB794 80145094 8C500000 */ lw $s0, ($v0) -/* DB798 80145098 0C00AB0A */ jal general_heap_malloc -/* DB79C 8014509C 240400F0 */ addiu $a0, $zero, 0xf0 -/* DB7A0 801450A0 0040202D */ daddu $a0, $v0, $zero -/* DB7A4 801450A4 14800003 */ bnez $a0, .L801450B4 -/* DB7A8 801450A8 AE04001C */ sw $a0, 0x1c($s0) -.L801450AC: -/* DB7AC 801450AC 0805142B */ j .L801450AC -/* DB7B0 801450B0 00000000 */ nop -.L801450B4: -/* DB7B4 801450B4 3C024003 */ lui $v0, 0x4003 -/* DB7B8 801450B8 8E030000 */ lw $v1, ($s0) -/* DB7BC 801450BC 3C013F80 */ lui $at, 0x3f80 -/* DB7C0 801450C0 44810000 */ mtc1 $at, $f0 -/* DB7C4 801450C4 00621825 */ or $v1, $v1, $v0 -/* DB7C8 801450C8 AE030000 */ sw $v1, ($s0) -/* DB7CC 801450CC AC800000 */ sw $zero, ($a0) -/* DB7D0 801450D0 AC800004 */ sw $zero, 4($a0) -/* DB7D4 801450D4 AC800008 */ sw $zero, 8($a0) -/* DB7D8 801450D8 AC80000C */ sw $zero, 0xc($a0) -/* DB7DC 801450DC AC800010 */ sw $zero, 0x10($a0) -/* DB7E0 801450E0 AC800014 */ sw $zero, 0x14($a0) -/* DB7E4 801450E4 AC800018 */ sw $zero, 0x18($a0) -/* DB7E8 801450E8 E480001C */ swc1 $f0, 0x1c($a0) -/* DB7EC 801450EC E4800020 */ swc1 $f0, 0x20($a0) -/* DB7F0 801450F0 0C0504FE */ jal func_801413F8 -/* DB7F4 801450F4 E4800024 */ swc1 $f0, 0x24($a0) -/* DB7F8 801450F8 8FBF0014 */ lw $ra, 0x14($sp) -/* DB7FC 801450FC 8FB00010 */ lw $s0, 0x10($sp) -/* DB800 80145100 03E00008 */ jr $ra -/* DB804 80145104 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/hud_element/func_801413F8.s b/ver/us/asm/nonmatchings/hud_element/func_801413F8.s deleted file mode 100644 index 1e940c3886..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/func_801413F8.s +++ /dev/null @@ -1,47 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_801413F8 -/* D7AF8 801413F8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* D7AFC 801413FC 240200EF */ addiu $v0, $zero, 0xef -/* D7B00 80141400 24040003 */ addiu $a0, $zero, 3 -/* D7B04 80141404 0000282D */ daddu $a1, $zero, $zero -/* D7B08 80141408 00A0302D */ daddu $a2, $a1, $zero -/* D7B0C 8014140C 2407013F */ addiu $a3, $zero, 0x13f -/* D7B10 80141410 AFBF0018 */ sw $ra, 0x18($sp) -/* D7B14 80141414 0C00B8C5 */ jal set_cam_viewport -/* D7B18 80141418 AFA20010 */ sw $v0, 0x10($sp) -/* D7B1C 8014141C 3C02800B */ lui $v0, %hi(gCameras) -/* D7B20 80141420 24421D80 */ addiu $v0, $v0, %lo(gCameras) -/* D7B24 80141424 3C014320 */ lui $at, 0x4320 -/* D7B28 80141428 44810000 */ mtc1 $at, $f0 -/* D7B2C 8014142C 3C01C2F0 */ lui $at, 0xc2f0 -/* D7B30 80141430 44811000 */ mtc1 $at, $f2 -/* D7B34 80141434 3C013F80 */ lui $at, 0x3f80 -/* D7B38 80141438 44812000 */ mtc1 $at, $f4 -/* D7B3C 8014143C 94441008 */ lhu $a0, 0x1008($v0) -/* D7B40 80141440 24030002 */ addiu $v1, $zero, 2 -/* D7B44 80141444 A443100C */ sh $v1, 0x100c($v0) -/* D7B48 80141448 24030001 */ addiu $v1, $zero, 1 -/* D7B4C 8014144C A443100E */ sh $v1, 0x100e($v0) -/* D7B50 80141450 24033CBF */ addiu $v1, $zero, 0x3cbf -/* D7B54 80141454 A4431028 */ sh $v1, 0x1028($v0) -/* D7B58 80141458 24030010 */ addiu $v1, $zero, 0x10 -/* D7B5C 8014145C A443101A */ sh $v1, 0x101a($v0) -/* D7B60 80141460 24034000 */ addiu $v1, $zero, 0x4000 -/* D7B64 80141464 A4401024 */ sh $zero, 0x1024($v0) -/* D7B68 80141468 A4401026 */ sh $zero, 0x1026($v0) -/* D7B6C 8014146C A440102A */ sh $zero, 0x102a($v0) -/* D7B70 80141470 AC401064 */ sw $zero, 0x1064($v0) -/* D7B74 80141474 A443101C */ sh $v1, 0x101c($v0) -/* D7B78 80141478 A4401034 */ sh $zero, 0x1034($v0) -/* D7B7C 8014147C A4401036 */ sh $zero, 0x1036($v0) -/* D7B80 80141480 A4401038 */ sh $zero, 0x1038($v0) -/* D7B84 80141484 3084FFF9 */ andi $a0, $a0, 0xfff9 -/* D7B88 80141488 E440105C */ swc1 $f0, 0x105c($v0) -/* D7B8C 8014148C E4421060 */ swc1 $f2, 0x1060($v0) -/* D7B90 80141490 E4441020 */ swc1 $f4, 0x1020($v0) -/* D7B94 80141494 A4441008 */ sh $a0, 0x1008($v0) -/* D7B98 80141498 8FBF0018 */ lw $ra, 0x18($sp) -/* D7B9C 8014149C 03E00008 */ jr $ra -/* D7BA0 801414A0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/hud_element/set_hud_element_nonworld_cache.s b/ver/us/asm/nonmatchings/hud_element/set_hud_element_nonworld_cache.s deleted file mode 100644 index ba954933da..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/set_hud_element_nonworld_cache.s +++ /dev/null @@ -1,19 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_hud_element_nonworld_cache -/* DB9E8 801452E8 3C018015 */ lui $at, %hi(D_8014EFC0) -/* DB9EC 801452EC AC24EFC0 */ sw $a0, %lo(D_8014EFC0)($at) -/* DB9F0 801452F0 14800005 */ bnez $a0, .L80145308 -/* DB9F4 801452F4 3C020001 */ lui $v0, 1 -/* DB9F8 801452F8 34421000 */ ori $v0, $v0, 0x1000 -/* DB9FC 801452FC 3C018015 */ lui $at, %hi(D_8014EFC4) -/* DBA00 80145300 03E00008 */ jr $ra -/* DBA04 80145304 AC22EFC4 */ sw $v0, %lo(D_8014EFC4)($at) -.L80145308: -/* DBA08 80145308 3C018015 */ lui $at, %hi(D_8014EFC4) -/* DBA0C 8014530C 03E00008 */ jr $ra -/* DBA10 80145310 AC25EFC4 */ sw $a1, %lo(D_8014EFC4)($at) -/* DBA14 80145314 00000000 */ nop -/* DBA18 80145318 00000000 */ nop -/* DBA1C 8014531C 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/hud_element/set_hud_element_transform_pos.s b/ver/us/asm/nonmatchings/hud_element/set_hud_element_transform_pos.s deleted file mode 100644 index e77a2a4fc2..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/set_hud_element_transform_pos.s +++ /dev/null @@ -1,25 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_hud_element_transform_pos -/* DB884 80145184 2402F7FF */ addiu $v0, $zero, -0x801 -/* DB888 80145188 00822024 */ and $a0, $a0, $v0 -/* DB88C 8014518C 00042080 */ sll $a0, $a0, 2 -/* DB890 80145190 3C030001 */ lui $v1, 1 -/* DB894 80145194 3C028015 */ lui $v0, %hi(hudElements) -/* DB898 80145198 8C427960 */ lw $v0, %lo(hudElements)($v0) -/* DB89C 8014519C 44850000 */ mtc1 $a1, $f0 -/* DB8A0 801451A0 00822021 */ addu $a0, $a0, $v0 -/* DB8A4 801451A4 8C840000 */ lw $a0, ($a0) -/* DB8A8 801451A8 44861000 */ mtc1 $a2, $f2 -/* DB8AC 801451AC 8C820000 */ lw $v0, ($a0) -/* DB8B0 801451B0 44872000 */ mtc1 $a3, $f4 -/* DB8B4 801451B4 00431024 */ and $v0, $v0, $v1 -/* DB8B8 801451B8 10400004 */ beqz $v0, .L801451CC -/* DB8BC 801451BC 8C83001C */ lw $v1, 0x1c($a0) -/* DB8C0 801451C0 E4600004 */ swc1 $f0, 4($v1) -/* DB8C4 801451C4 E4620008 */ swc1 $f2, 8($v1) -/* DB8C8 801451C8 E464000C */ swc1 $f4, 0xc($v1) -.L801451CC: -/* DB8CC 801451CC 03E00008 */ jr $ra -/* DB8D0 801451D0 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/hud_element/set_hud_element_transform_rotation.s b/ver/us/asm/nonmatchings/hud_element/set_hud_element_transform_rotation.s deleted file mode 100644 index f05e37f0cc..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/set_hud_element_transform_rotation.s +++ /dev/null @@ -1,25 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_hud_element_transform_rotation -/* DB924 80145224 2402F7FF */ addiu $v0, $zero, -0x801 -/* DB928 80145228 00822024 */ and $a0, $a0, $v0 -/* DB92C 8014522C 00042080 */ sll $a0, $a0, 2 -/* DB930 80145230 3C030001 */ lui $v1, 1 -/* DB934 80145234 3C028015 */ lui $v0, %hi(hudElements) -/* DB938 80145238 8C427960 */ lw $v0, %lo(hudElements)($v0) -/* DB93C 8014523C 44850000 */ mtc1 $a1, $f0 -/* DB940 80145240 00822021 */ addu $a0, $a0, $v0 -/* DB944 80145244 8C840000 */ lw $a0, ($a0) -/* DB948 80145248 44861000 */ mtc1 $a2, $f2 -/* DB94C 8014524C 8C820000 */ lw $v0, ($a0) -/* DB950 80145250 44872000 */ mtc1 $a3, $f4 -/* DB954 80145254 00431024 */ and $v0, $v0, $v1 -/* DB958 80145258 10400004 */ beqz $v0, .L8014526C -/* DB95C 8014525C 8C83001C */ lw $v1, 0x1c($a0) -/* DB960 80145260 E4600010 */ swc1 $f0, 0x10($v1) -/* DB964 80145264 E4620014 */ swc1 $f2, 0x14($v1) -/* DB968 80145268 E4640018 */ swc1 $f4, 0x18($v1) -.L8014526C: -/* DB96C 8014526C 03E00008 */ jr $ra -/* DB970 80145270 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/hud_element/set_hud_element_transform_rotation_pivot.s b/ver/us/asm/nonmatchings/hud_element/set_hud_element_transform_rotation_pivot.s deleted file mode 100644 index 5adfde3828..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/set_hud_element_transform_rotation_pivot.s +++ /dev/null @@ -1,21 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_hud_element_transform_rotation_pivot -/* DB974 80145274 2402F7FF */ addiu $v0, $zero, -0x801 -/* DB978 80145278 00822024 */ and $a0, $a0, $v0 -/* DB97C 8014527C 3C028015 */ lui $v0, %hi(hudElements) -/* DB980 80145280 8C427960 */ lw $v0, %lo(hudElements)($v0) -/* DB984 80145284 00042080 */ sll $a0, $a0, 2 -/* DB988 80145288 00822021 */ addu $a0, $a0, $v0 -/* DB98C 8014528C 8C840000 */ lw $a0, ($a0) -/* DB990 80145290 8C820000 */ lw $v0, ($a0) -/* DB994 80145294 3C030001 */ lui $v1, 1 -/* DB998 80145298 00431024 */ and $v0, $v0, $v1 -/* DB99C 8014529C 10400003 */ beqz $v0, .L801452AC -/* DB9A0 801452A0 8C83001C */ lw $v1, 0x1c($a0) -/* DB9A4 801452A4 A4650028 */ sh $a1, 0x28($v1) -/* DB9A8 801452A8 A466002A */ sh $a2, 0x2a($v1) -.L801452AC: -/* DB9AC 801452AC 03E00008 */ jr $ra -/* DB9B0 801452B0 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/hud_element/set_hud_element_transform_scale.s b/ver/us/asm/nonmatchings/hud_element/set_hud_element_transform_scale.s deleted file mode 100644 index e140a31a00..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/set_hud_element_transform_scale.s +++ /dev/null @@ -1,25 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_hud_element_transform_scale -/* DB8D4 801451D4 2402F7FF */ addiu $v0, $zero, -0x801 -/* DB8D8 801451D8 00822024 */ and $a0, $a0, $v0 -/* DB8DC 801451DC 00042080 */ sll $a0, $a0, 2 -/* DB8E0 801451E0 3C030001 */ lui $v1, 1 -/* DB8E4 801451E4 3C028015 */ lui $v0, %hi(hudElements) -/* DB8E8 801451E8 8C427960 */ lw $v0, %lo(hudElements)($v0) -/* DB8EC 801451EC 44850000 */ mtc1 $a1, $f0 -/* DB8F0 801451F0 00822021 */ addu $a0, $a0, $v0 -/* DB8F4 801451F4 8C840000 */ lw $a0, ($a0) -/* DB8F8 801451F8 44861000 */ mtc1 $a2, $f2 -/* DB8FC 801451FC 8C820000 */ lw $v0, ($a0) -/* DB900 80145200 44872000 */ mtc1 $a3, $f4 -/* DB904 80145204 00431024 */ and $v0, $v0, $v1 -/* DB908 80145208 10400004 */ beqz $v0, .L8014521C -/* DB90C 8014520C 8C83001C */ lw $v1, 0x1c($a0) -/* DB910 80145210 E460001C */ swc1 $f0, 0x1c($v1) -/* DB914 80145214 E4620020 */ swc1 $f2, 0x20($v1) -/* DB918 80145218 E4640024 */ swc1 $f4, 0x24($v1) -.L8014521C: -/* DB91C 8014521C 03E00008 */ jr $ra -/* DB920 80145220 00000000 */ nop