diff --git a/include/common_structs.h b/include/common_structs.h index 1943f76901..bb7681e0cd 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -1917,7 +1917,7 @@ typedef struct Actor { /* 0x434 */ s16 renderMode; /* initially 0xD, set to 0x22 if any part is transparent */ /* 0x436 */ s16 hudElementDataIndex; /* 0x438 */ s32 unk_438[2]; /* ??? see FUN_80253974 */ - /* 0x440 */ struct HudElement* debuffIcon; + /* 0x440 */ struct EffectInstance* debuffIcon; // TODO: figure out the type of data field of debuffIcon } Actor; // size = 0x444 typedef struct BackgroundHeader { @@ -2415,4 +2415,15 @@ typedef struct UnkStruct0 { /* 0x0C */ UnkStruct1* unk_0C; } UnkStruct0; +typedef struct FoldImageRecPart { + /* 0x00 */ s8* raster; + /* 0x04 */ s8* palette; + /* 0x08 */ u16 width; + /* 0x0A */ u16 height; + /* 0x0C */ s16 xOffset; + /* 0x0E */ s16 yOffset; + /* 0x10 */ u8 unk_10; + /* 0x11 */ char unk_11[0x7]; +} FoldImageRecPart; // size = 0x18 + #endif diff --git a/include/effects.h b/include/effects.h index c913800aa9..2326484e14 100644 --- a/include/effects.h +++ b/include/effects.h @@ -799,7 +799,7 @@ void fx_3D(s32, f32, f32, f32, f32, f32, f32, s32, s32*); EffectInstance* fx_blast(s32, f32, f32, f32, f32, s32); EffectInstance* fx_fire_flower(s32, f32, f32, f32, s32); EffectInstance* fx_recover(s32, f32, f32, f32, s32); -struct HudElement* fx_disable_x(s32, f32, f32, f32, s32); +EffectInstance* fx_disable_x(s32, f32, f32, f32, s32); EffectInstance* fx_bombette_breaking(s32, s32, s32, f32, s32, s32); EffectInstance* fx_firework(s32, f32, f32, f32, f32, s32); EffectInstance* fx_confetti(s32, f32, f32, f32, f32, s32); diff --git a/src/165490.c b/src/165490.c index bb540b1105..43bd00efb5 100644 --- a/src/165490.c +++ b/src/165490.c @@ -310,7 +310,7 @@ void filemenu_main_init(MenuPanel* menu) { for (i = 0; i < ARRAY_COUNT(filemenu_hudElemIDs); i++) { filemenu_hudElemIDs[i] = create_hud_element(D_80249E20[i]); - set_hud_element_flags(filemenu_hudElemIDs[i], 0x80); + set_hud_element_flags(filemenu_hudElemIDs[i], HUD_ELEMENT_FLAGS_80); } for (i = 0; i < ARRAY_COUNT(D_80249EA0); i++) { diff --git a/src/16F740.c b/src/16F740.c index 6b952338ef..0e97e193f7 100644 --- a/src/16F740.c +++ b/src/16F740.c @@ -291,7 +291,7 @@ void btl_state_update_victory(void) { player->transStatus = 0; player->koStatus = 0; player->koDuration = 0; - player->debuffIcon->ptrPropertyList[15] = 0; + ((s32*)player->debuffIcon->data)[15] = 0; if (partner != NULL) { if (partner->koStatus == 0xD) { @@ -304,7 +304,7 @@ void btl_state_update_victory(void) { partner->transStatus = 0; partner->koStatus = 0; partner->koDuration = 0; - partner->debuffIcon->ptrPropertyList[15] = 0; + ((s32*)partner->debuffIcon->data)[15] = 0; } break; case BATTLE_STATE2_PLAYER_DEFEATED: @@ -497,7 +497,7 @@ void btl_state_update_defeat(void) { remove_status_debuff(player->hudElementDataIndex); player->koStatus = 0; player->koDuration = 0; - player->debuffIcon->ptrPropertyList[15] = 0; + ((s32*)player->debuffIcon->data)[15] = 0; } func_8024E40C(0x19); diff --git a/src/16c8e0.c b/src/16c8e0.c index 965138f1dd..c957d881cc 100644 --- a/src/16c8e0.c +++ b/src/16c8e0.c @@ -93,10 +93,10 @@ extern s32 D_8029EFBC; extern s32 D_8029EFC0[10]; extern s32 D_8029EFE8[10]; extern s32 D_8029F010[10]; -extern HudScript HudScript_HPBar; -extern HudScript HudScript_Item_SmallStarPoint; -extern HudScript HudScript_Item_StarPoint; -extern HudScript HudScript_StatusSPShine; +extern HudScript HudScript_HPBar[]; +extern HudScript HudScript_Item_SmallStarPoint[]; +extern HudScript HudScript_Item_StarPoint[]; +extern HudScript HudScript_StatusSPShine[]; void func_8023ED5C(void); void func_8023F088(Camera*); @@ -198,24 +198,24 @@ void initialize_battle(void) { func_8024EDC0(); func_80268E88(); set_windows_visible(WINDOW_GROUP_1); - D_8029EFBC = create_hud_element(&HudScript_HPBar); - set_hud_element_flags(D_8029EFBC, 0x80); + D_8029EFBC = create_hud_element(HudScript_HPBar); + set_hud_element_flags(D_8029EFBC, HUD_ELEMENT_FLAGS_80); for (i = 0; i < ARRAY_COUNT(D_8029EFC0); i++) { - hudElemID = D_8029EFC0[i] = create_hud_element(&HudScript_Item_StarPoint); - set_hud_element_flags(hudElemID, 0x80 | 0x2); + hudElemID = D_8029EFC0[i] = create_hud_element(HudScript_Item_StarPoint); + set_hud_element_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_depth(hudElemID, 20); } for (i = 0; i < ARRAY_COUNT(D_8029EFE8); i++) { - hudElemID = D_8029EFE8[i] = create_hud_element(&HudScript_StatusSPShine); - set_hud_element_flags(hudElemID, 0x80 | 0x2); + hudElemID = D_8029EFE8[i] = create_hud_element(HudScript_StatusSPShine); + set_hud_element_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_depth(hudElemID, 20); } for (i = 0; i < ARRAY_COUNT(D_8029F010); i++) { - hudElemID = D_8029F010[i] = create_hud_element(&HudScript_Item_SmallStarPoint); - set_hud_element_flags(hudElemID, 0x80 | 0x2); + hudElemID = D_8029F010[i] = create_hud_element(HudScript_Item_SmallStarPoint); + set_hud_element_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_depth(hudElemID, 20); } diff --git a/src/18C790.c b/src/18C790.c index 4a08fe8aff..9d006d210a 100644 --- a/src/18C790.c +++ b/src/18C790.c @@ -307,57 +307,57 @@ void btl_state_update_celebration(void) { id = create_hud_element(D_802A9F0C); D_8029FA80[0] = id; set_hud_element_render_pos(id, 310, 140); - set_hud_element_flags(id, 0x80); + set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80); id = create_hud_element(D_802A9F5C); D_8029FA80[1] = id; set_hud_element_render_pos(id, 158, 340); - set_hud_element_flags(id, 0x80); + set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80); id = create_hud_element(D_802A9F84); D_8029FA80[3] = id; set_hud_element_render_pos(id, 158, 340); - set_hud_element_flags(id, 0x80); + set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80); id = create_hud_element(D_802A9FAC); D_8029FA80[2] = id; set_hud_element_render_pos(id, 6, 140); - set_hud_element_flags(id, 0x80); + set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80); id = create_hud_element(D_802841B4); D_8029FA90[0][0] = id; set_hud_element_render_pos(id, 160, 317); - set_hud_element_flags(id, 0x80); + set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80); for (i = 1; i < ARRAY_COUNT(D_8029FA90[0]); i++) { id = create_hud_element(D_802841C0[0]); D_8029FA90[0][i] = id; set_hud_element_render_pos(id, 160, 317); - set_hud_element_flags(id, 0x82); + set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); } id = create_hud_element(D_802841B8); D_8029FA90[0][7] = id; set_hud_element_render_pos(id, 312, 117); - set_hud_element_flags(id, 0x80); + set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80); for (i = 1; i < ARRAY_COUNT(D_8029FA90[0]); i++) { id = create_hud_element(D_802841C0[10]); D_8029FA90[1][i] = id; set_hud_element_render_pos(id, 312, 117); - set_hud_element_flags(id, 0x82); + set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); } id = create_hud_element(D_802841BC); D_8029FA90[2][0] = id; set_hud_element_render_pos(id, 8, 117); - set_hud_element_flags(id, 0x80); + set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80); for (i = 1; i < ARRAY_COUNT(D_8029FA90[20]); i++) { id = create_hud_element(D_802841C0[20]); D_8029FA90[2][i] = id; set_hud_element_render_pos(id, 8, 117); - set_hud_element_flags(id, 0x82); + set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); } D_8029FB60[0] = 0; @@ -370,20 +370,20 @@ void btl_state_update_celebration(void) { fpOnes = playerData->curMaxFP % 10; set_hud_element_anim(id, D_80284238[fpTens]); if (fpTens != 0) { - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); } get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x - 14, y + 46); id = D_8029FA90[0][2]; set_hud_element_anim(id, D_80284238[fpOnes]); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x - 8, y + 46); id = D_8029FA90[0][3]; set_hud_element_anim(id, D_802AA320); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x - 3, y + 46); @@ -393,14 +393,14 @@ void btl_state_update_celebration(void) { fpOnes = temp_v1_4 % 10; set_hud_element_anim(id, D_802841C0[fpTens]); if (fpTens != 0) { - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); } get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x + 3, y + 46); id = D_8029FA90[0][5]; set_hud_element_anim(id, D_802841C0[fpOnes]); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x + 10, y + 46); } else { @@ -409,14 +409,14 @@ void btl_state_update_celebration(void) { fpOnes = playerData->curMaxFP % 10; set_hud_element_anim(id, D_802841C0[fpTens]); if (fpTens != 0) { - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); } get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x - 6, y + 46); id = D_8029FA90[0][5]; set_hud_element_anim(id, D_802841C0[fpOnes]); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x + 2, y + 46); D_8029FB60[1] = 1; @@ -425,7 +425,7 @@ void btl_state_update_celebration(void) { if (is_ability_active(0xC)) { id = D_8029FAA8; set_hud_element_anim(id, gItemHudScripts[gItemTable[248].iconID][0]); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_scale(id, 0.5f); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x + 17, y + 46); @@ -440,20 +440,20 @@ void btl_state_update_celebration(void) { fpOnes = playerData->curMaxHP % 10; set_hud_element_anim(id, D_80284260[fpTens]); if (fpTens != 0) { - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); } get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x - 14, y + 46); id = D_8029FA90[1][2]; set_hud_element_anim(id, scriptsTemp[fpOnes + 10]); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x - 8, y + 46); id = D_8029FA90[1][3]; set_hud_element_anim(id, D_802AA694); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x - 3, y + 46); @@ -466,14 +466,14 @@ void btl_state_update_celebration(void) { new_var = scriptsTemp[fpOnes + 10]; set_hud_element_anim(id, D_802841E8[fpTens]); if (fpTens != 0) { - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); } get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x + 3, y + 46); id = D_8029FA90[1][5]; set_hud_element_anim(id, new_var); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x + 10, y + 46); } else { @@ -485,14 +485,14 @@ void btl_state_update_celebration(void) { fpOnes = playerData->curMaxHP % 10; set_hud_element_anim(id, scriptsTemp[fpTens]); if (fpTens != 0) { - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); } get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x - 6, y + 46); id = D_8029FA90[1][5]; set_hud_element_anim(id, scriptsTemp[fpOnes + 10]); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x + 2, y + 46); D_8029FB60[0] = 1; @@ -501,7 +501,7 @@ void btl_state_update_celebration(void) { if (is_ability_active(4)) { id = D_8029FAC4; set_hud_element_anim(id, gItemHudScripts[gItemTable[231].iconID][0]); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_scale(id, 0.5f); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x + 17, y + 46); @@ -518,20 +518,20 @@ void btl_state_update_celebration(void) { fpOnes = playerData->maxBP % 10; set_hud_element_anim(id, D_80284288[fpTens]); if (fpTens != 0) { - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); } get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x - 14, y + 46); id = D_8029FA90[2][2]; set_hud_element_anim(id, scriptsTemp[fpOnes + 20]); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x - 8, y + 46); id = D_8029FA90[2][3]; set_hud_element_anim(id, new_var2); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x - 3, y + 46); temp_v1_5 = playerData->maxBP + 3; @@ -542,26 +542,26 @@ void btl_state_update_celebration(void) { fpOnes = temp_v1_5 % 10; set_hud_element_anim(id, D_80284210[fpTens]); if (fpTens != 0) { - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); } get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x + 3, y + 46); id = D_8029FA90[2][5]; set_hud_element_anim(id, scriptsTemp[fpOnes + 20]); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x + 10, y + 46); } else { id = D_8029FA90[2][4]; set_hud_element_anim(id, D_802841C0[23]); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x - 6, y + 46); id = D_8029FA90[2][5]; set_hud_element_anim(id, D_802841C0[20]); - clear_hud_element_flags(id, 2); + clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED); get_hud_element_render_pos(id, &x, &y); set_hud_element_render_pos(id, x + 2, y + 46); D_8029FB60[2] = 1; @@ -575,11 +575,11 @@ void btl_state_update_celebration(void) { set_hud_element_transform_rotation(id, 0.0f, 0.0f, 180.0f); set_hud_element_transform_scale(id, 1.0f, 1.5f, 1.0f); set_hud_element_alpha(id, 200); - set_hud_element_flags(id, 0x8080); + set_hud_element_flags(id, HUD_ELEMENT_FLAGS_8000 | HUD_ELEMENT_FLAGS_80); D_8029FB48 = id = create_hud_element(D_802AAA30); set_hud_element_render_pos(id, 0, 0); - set_hud_element_flags(id, 0x80); + set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80); battleStatus->currentSubmenu = 1; D_8029FB4C = 10; gBattleState2 = BATTLE_STATE2_UNK_7; @@ -729,27 +729,27 @@ void btl_state_update_celebration(void) { if ((gGameStatusPtr->frameCounter % 2) != 0) { switch (battleStatus->currentSubmenu) { case 0: - set_hud_element_flags(D_8029FA80[0], 2); + set_hud_element_flags(D_8029FA80[0], HUD_ELEMENT_FLAGS_DISABLED); break; case 1: - set_hud_element_flags(D_8029FA80[1], 2); - set_hud_element_flags(D_8029FA80[3], 2); + set_hud_element_flags(D_8029FA80[1], HUD_ELEMENT_FLAGS_DISABLED); + set_hud_element_flags(D_8029FA80[3], HUD_ELEMENT_FLAGS_DISABLED); break; case 2: - set_hud_element_flags(D_8029FA88, 2); + set_hud_element_flags(D_8029FA88, HUD_ELEMENT_FLAGS_DISABLED); break; } } else { switch (battleStatus->currentSubmenu) { case 0: - clear_hud_element_flags(D_8029FA80[0], 2); + clear_hud_element_flags(D_8029FA80[0], HUD_ELEMENT_FLAGS_DISABLED); break; case 1: - clear_hud_element_flags(D_8029FA80[1], 2); - clear_hud_element_flags(D_8029FA80[3], 2); + clear_hud_element_flags(D_8029FA80[1], HUD_ELEMENT_FLAGS_DISABLED); + clear_hud_element_flags(D_8029FA80[3], HUD_ELEMENT_FLAGS_DISABLED); break; case 2: - clear_hud_element_flags(D_8029FA88, 2); + clear_hud_element_flags(D_8029FA88, HUD_ELEMENT_FLAGS_DISABLED); break; } } diff --git a/src/190B20.c b/src/190B20.c index 75f331357e..1795211320 100644 --- a/src/190B20.c +++ b/src/190B20.c @@ -2754,7 +2754,7 @@ s32 inflict_status(Actor* target, s32 statusTypeKey, s32 duration) { if (target->debuff != statusTypeKey) { target->status = statusTypeKey; } - target->debuffIcon->ptrPropertyList[15] = 0; + ((s32*)target->debuffIcon->data)[15] = 0; target->debuff = statusTypeKey; target->debuffDuration = duration; if ((s8)duration > 9) { @@ -3502,7 +3502,7 @@ void btl_update_ko_status(void) { player->koDuration = player->debuffDuration; if (player->koDuration > 0) { player->koStatus = STATUS_DAZE; - player->debuffIcon->ptrPropertyList[15] = player->koDuration; + ((s32*)player->debuffIcon->data)[15] = player->koDuration; if (koDuration == 0) { sfx_play_sound(SOUND_2107); @@ -3517,7 +3517,7 @@ void btl_update_ko_status(void) { if (partner->koDuration > 0) { partner->koStatus = STATUS_DAZE; - partner->debuffIcon->ptrPropertyList[15] = partner->koDuration; + ((s32*)partner->debuffIcon->data)[15] = partner->koDuration; } } @@ -3528,7 +3528,7 @@ void btl_update_ko_status(void) { enemy->koDuration = enemy->debuffDuration; if (enemy->koDuration > 0) { enemy->koStatus = STATUS_DAZE; - enemy->debuffIcon->ptrPropertyList[15] = enemy->koDuration; + ((s32*)enemy->debuffIcon->data)[15] = enemy->koDuration; } } } diff --git a/src/1A5830.c b/src/1A5830.c index 4e6117b7aa..a6b043c6fe 100644 --- a/src/1A5830.c +++ b/src/1A5830.c @@ -1997,7 +1997,7 @@ ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall) { actor->koStatus = 0; actor->koDuration = 0; - actor->debuffIcon->ptrPropertyList[15] = 0; + ((s32*)actor->debuffIcon->data)[15] = 0; actor->attackBoost = 0; actor->defenseBoost = 0; actor->isGlowing = 0; diff --git a/src/80850_len_3060.c b/src/80850_len_3060.c index d967fa71c1..bea8a601b7 100644 --- a/src/80850_len_3060.c +++ b/src/80850_len_3060.c @@ -332,69 +332,69 @@ void initialize_status_menu(void) { iconIndex = create_hud_element(HudScript_StatusHP); uiStatus->hpIconIndices[0] = iconIndex; - set_hud_element_flags(iconIndex, 0x80); - clear_hud_element_flags(iconIndex, 0x8000); + set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80); + clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000); iconIndex = create_hud_element(HudScript_StatusHeart); uiStatus->hpIconIndices[1] = iconIndex; - set_hud_element_flags(iconIndex, 0x80); - clear_hud_element_flags(iconIndex, 0x8000); + set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80); + clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000); iconIndex = create_hud_element(HudScript_StatusFP); uiStatus->fpIconIndices[0] = iconIndex; - set_hud_element_flags(iconIndex, 0x80); - clear_hud_element_flags(iconIndex, 0x8000); + set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80); + clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000); iconIndex = create_hud_element(HudScript_StatusFlower); uiStatus->fpIconIndices[1] = iconIndex; - set_hud_element_flags(iconIndex, 0x80); - clear_hud_element_flags(iconIndex, 0x8000); + set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80); + clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000); iconIndex = create_hud_element(HudScript_StatusCoin); uiStatus->coinIconIndex = iconIndex; - set_hud_element_flags(iconIndex, 0x80); - clear_hud_element_flags(iconIndex, 0x8000); + set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80); + clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000); iconIndex = create_hud_element(HudScript_Item_CoinSparkleRandom); uiStatus->coinSparkleIconIndex = iconIndex; - set_hud_element_flags(iconIndex, 0x80); - clear_hud_element_flags(iconIndex, 0x8000); + set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80); + clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000); iconIndex = create_hud_element(HudScript_StatusStarPoint); uiStatus->starpointsIconIndex = iconIndex; - set_hud_element_flags(iconIndex, 0x80); - clear_hud_element_flags(iconIndex, 0x8000); + set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80); + clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000); iconIndex = create_hud_element(HudScript_StatusSPShine); uiStatus->starpointsShineIconIndex = iconIndex; - set_hud_element_flags(iconIndex, 0x80); - clear_hud_element_flags(iconIndex, 0x8000); + set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80); + clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000); newVar = create_hud_element(HudScript_StatusTimes); iconIndex = newVar; uiStatus->iconIndex8 = iconIndex; - set_hud_element_flags(iconIndex, 0x82); - clear_hud_element_flags(iconIndex, 0x8000); + set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); + clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000); iconIndex = create_hud_element(HudScript_StatusTimes); uiStatus->iconIndex9 = iconIndex; - set_hud_element_flags(iconIndex, 0x82); - clear_hud_element_flags(iconIndex, 0x8000); + set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); + clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000); iconIndex = create_hud_element(HudScript_StatusTimes); uiStatus->iconIndexA = iconIndex; - set_hud_element_flags(iconIndex, 0x82); - clear_hud_element_flags(iconIndex, 0x8000); + set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); + clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000); iconIndex = create_hud_element(HudScript_StatusTimes); uiStatus->iconIndexB = iconIndex; - set_hud_element_flags(iconIndex, 0x82); - clear_hud_element_flags(iconIndex, 0x8000); + set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); + clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000); iconIndex = create_hud_element(HudScript_StatusStar1); uiStatus->starIconIndex = iconIndex; - set_hud_element_flags(iconIndex, 0x80); - clear_hud_element_flags(iconIndex, 0x8000); + set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80); + clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000); func_800F0D5C(); } @@ -413,7 +413,7 @@ void status_menu_draw_number(s32 iconID, s32 x, s32 y, s32 value, s32 numDigits) x += 8; y2 = y + 8; set_hud_element_render_pos(iconID, x, y + 7); - clear_hud_element_flags(iconID, 2); + clear_hud_element_flags(iconID, HUD_ELEMENT_FLAGS_DISABLED); draw_hud_element_2(iconID); // Write each digit of the input number into the digits array @@ -436,7 +436,7 @@ void status_menu_draw_number(s32 iconID, s32 x, s32 y, s32 value, s32 numDigits) keepDrawing = TRUE; set_hud_element_anim(iconID, DigitHudScripts[digit]); set_hud_element_render_pos(iconID, x, y2); - clear_hud_element_flags(iconID, 2); + clear_hud_element_flags(iconID, HUD_ELEMENT_FLAGS_DISABLED); draw_hud_element_2(iconID); } } @@ -530,11 +530,11 @@ void show_coin_counter(void) { set_window_update(0x14, basic_window_update); index = create_hud_element(HudScript_MenuTimes); uiStatus->iconIndex10 = index; - set_hud_element_flags(index, 0x80); + set_hud_element_flags(index, HUD_ELEMENT_FLAGS_80); set_hud_element_tint(index, 0xff, 0xff, 0xff); index = create_hud_element(HudScript_StatusCoin); uiStatus->iconIndex11 = index; - set_hud_element_flags(index, 0x80); + set_hud_element_flags(index, HUD_ELEMENT_FLAGS_80); set_hud_element_tint(index, 0xff, 0xff, 0xff); uiStatus->unk_6C[0] = 0; diff --git a/src/8a860_len_3f30.c b/src/8a860_len_3f30.c index f2761a8366..71a31eab4d 100644 --- a/src/8a860_len_3f30.c +++ b/src/8a860_len_3f30.c @@ -163,58 +163,58 @@ s32 popup_menu_update(void) { D_8010D68C = 0; elementID = create_hud_element(HudScript_EmptyBar); D_8010D65C = elementID; - set_hud_element_flags(elementID, 0x80); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80); set_hud_element_tint(elementID, 255, 255, 255); if (gPopupMenu->popupType != 2) { - set_hud_element_flags(elementID, 2); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED); } one = 1; // required to match (why is 1 loaded so early?) elementID = create_hud_element(gPopupMenu->ptrIcon[0]); D_8010D678 = elementID; set_hud_element_scale(elementID, 0.45f); - set_hud_element_flags(elementID, 0x8080); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_8000 | HUD_ELEMENT_FLAGS_80); elementID = create_hud_element(HudScript_AnimatedHandPointer); D_8010D66C = elementID; - set_hud_element_flags(elementID, 0x20000080); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_SHADOW | HUD_ELEMENT_FLAGS_80); elementID = create_hud_element(HudScript_GreenArrowUp); D_8010D670 = elementID; - set_hud_element_flags(elementID, 0x20000080); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_SHADOW | HUD_ELEMENT_FLAGS_80); elementID = create_hud_element(HudScript_GreenArrowDown); D_8010D674 = elementID; - set_hud_element_flags(elementID, 0x20000080); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_SHADOW | HUD_ELEMENT_FLAGS_80); if (gPopupMenu->popupType == 3) { D_8010D660 = create_hud_element(HudScript_StatusStarPiece); elementID = D_8010D660; - set_hud_element_flags(elementID, 0x80); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80); set_hud_element_tint(elementID, 255, 255, 255); } if (gPopupMenu->popupType == 4) { D_8010D660 = create_hud_element(HudScript_StatusStarPiece); elementID = D_8010D660; - set_hud_element_flags(elementID, 0x8080); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_8000 | HUD_ELEMENT_FLAGS_80); set_hud_element_tint(elementID, 255, 255, 255); } if (gPopupMenu->popupType == 5) { D_8010D660 = create_hud_element(HudScript_StatusCoin); elementID = D_8010D660; - set_hud_element_flags(elementID, 0x80); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80); set_hud_element_tint(elementID, 255, 255, 255); } if (gPopupMenu->popupType == 3 || gPopupMenu->popupType == 4) { D_8010D664 = create_hud_element(HudScript_MenuTimes); elementID = D_8010D664; - set_hud_element_flags(elementID, 0x80); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80); set_hud_element_tint(elementID, 255, 255, 255); } if (gPopupMenu->popupType == one || gPopupMenu->popupType == 4) { D_8010D668 = create_hud_element(D_80109890[0]); elementID = D_8010D668; - set_hud_element_flags(elementID, 0x80); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80); set_hud_element_tint(elementID, 255, 255, 255); } diff --git a/src/a5dd0_len_114e0.c b/src/a5dd0_len_114e0.c index b69fd88c62..fe80224e4e 100644 --- a/src/a5dd0_len_114e0.c +++ b/src/a5dd0_len_114e0.c @@ -949,9 +949,9 @@ extern ModelCustomGfxBuilderList* gCurrentCustomModelGfxBuildersPtr; extern s32 D_801512BC; extern s32 D_801512C0; extern s32 gEntityHeapBase; -extern s32 D_801512C8; +extern s32 gHudElementCacheTableRaster; extern ModelList* gCurrentModels; -extern s32 D_801512D0[4]; +extern s32 gHudElementCacheTablePalette[4]; extern ModelNode** gCurrentModelTreeRoot; extern ModelTransformGroupList* gCurrentTransformGroups; extern s8 gMsgGlobalWaveCounter[0x4]; diff --git a/src/battle/action_cmd/07.c b/src/battle/action_cmd/07.c index f18feeebe7..6614da95df 100644 --- a/src/battle/action_cmd/07.c +++ b/src/battle/action_cmd/07.c @@ -5,9 +5,9 @@ extern s32 D_80294280; extern s32 D_802A9620; -extern HudScript HudScript_BlueMeter; -extern HudScript HudScript_AButton; -extern HudScript HudScript_RunAwayOK; +extern HudScript HudScript_BlueMeter[]; +extern HudScript HudScript_AButton[]; +extern HudScript HudScript_RunAwayOK[]; s32 func_8024FAFC(s32); @@ -33,7 +33,7 @@ ApiStatus func_802A9000_425B50(Evt* script, s32 isInitialCall) { hudElement = create_hud_element(HudScript_AButton); actionCommandStatus->hudElements[0] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); @@ -45,14 +45,14 @@ ApiStatus func_802A9000_425B50(Evt* script, s32 isInitialCall) { set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_RunAwayOK); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); battleStatus->flags1 &= ~0x8000; diff --git a/src/battle/action_cmd/0A.c b/src/battle/action_cmd/0A.c index c28ee2e15d..ceaf1ed3ef 100644 --- a/src/battle/action_cmd/0A.c +++ b/src/battle/action_cmd/0A.c @@ -5,9 +5,9 @@ extern s32 D_802942E0; extern s32 HudScript_MashAButton; -extern HudScript HudScript_100pct; -extern HudScript HudScript_BlueMeter; -extern HudScript HudScript_AButton; +extern HudScript HudScript_100pct[]; +extern HudScript HudScript_BlueMeter[]; +extern HudScript HudScript_AButton[]; ApiStatus func_802A9000_4273B0(Evt* script, s32 isInitialCall) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; @@ -40,19 +40,19 @@ ApiStatus func_802A9000_4273B0(Evt* script, s32 isInitialCall) { actionCommandStatus->hudElements[0] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_BlueMeter); actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_100pct); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } diff --git a/src/battle/action_cmd/air_lift.c b/src/battle/action_cmd/air_lift.c index c33505f183..823f774d1a 100644 --- a/src/battle/action_cmd/air_lift.c +++ b/src/battle/action_cmd/air_lift.c @@ -7,9 +7,9 @@ void func_80268834(s32, s32, s16, s32); -extern HudScript HudScript_BlueMeter; -extern HudScript HudScript_AButton; -extern HudScript HudScript_100pct; +extern HudScript HudScript_BlueMeter[]; +extern HudScript HudScript_AButton[]; +extern HudScript HudScript_100pct[]; extern s32 D_80294340; BSS s32 air_lift_bss_0; @@ -42,19 +42,19 @@ ApiStatus func_802A9000_428A70(Evt* script, s32 isInitialCall) { actionCommandStatus->hudElements[0] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_BlueMeter); actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_100pct); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } diff --git a/src/battle/action_cmd/air_raid.c b/src/battle/action_cmd/air_raid.c index 266df5e813..ac788c54f1 100644 --- a/src/battle/action_cmd/air_raid.c +++ b/src/battle/action_cmd/air_raid.c @@ -3,9 +3,9 @@ #define NAMESPACE action_command_air_raid -extern HudScript HudScript_BlueMeter; -extern HudScript HudScript_StickNeutral; -extern HudScript HudScript_100pct; +extern HudScript HudScript_BlueMeter[]; +extern HudScript HudScript_StickNeutral[]; +extern HudScript HudScript_100pct[]; extern s32 D_80294360; @@ -41,19 +41,19 @@ ApiStatus func_802A9000_429320(void) { actionCommandStatus->hudElements[0] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_BlueMeter); actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_100pct); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } diff --git a/src/battle/action_cmd/body_slam.c b/src/battle/action_cmd/body_slam.c index d7f1ad83d1..fe64e8ee7f 100644 --- a/src/battle/action_cmd/body_slam.c +++ b/src/battle/action_cmd/body_slam.c @@ -38,25 +38,25 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { actionCommandStatus->hudElements[0] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_BlueMeter); actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_FillGaugeResult); actionCommandStatus->hudElements[3] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_TimingWait); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 22); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x80); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80); return ApiStatus_DONE2; } diff --git a/src/battle/action_cmd/bomb.c b/src/battle/action_cmd/bomb.c index ddc85dc87d..cf24801245 100644 --- a/src/battle/action_cmd/bomb.c +++ b/src/battle/action_cmd/bomb.c @@ -3,9 +3,9 @@ #define NAMESPACE action_command_bomb -extern HudScript HudScript_BlueMeter; -extern HudScript HudScript_AButton; -extern HudScript HudScript_100pct; +extern HudScript HudScript_BlueMeter[]; +extern HudScript HudScript_AButton[]; +extern HudScript HudScript_100pct[]; extern s32 D_80294300; extern HudScript HudScript_MashAButton; @@ -57,19 +57,19 @@ ApiStatus func_802A9000_427A70(Evt* script, s32 isInitialCall) { actionCommandStatus->hudElements[0] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_BlueMeter); actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_100pct); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } @@ -88,13 +88,13 @@ void func_802A928C_427CFC(void) { hudElement = actionCommandStatus->hudElements[0]; set_hud_element_alpha(hudElement, 255); if (actionCommandStatus->unk_61) { - clear_hud_element_flags(hudElement, 0x2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } hudElement = actionCommandStatus->hudElements[1]; set_hud_element_alpha(hudElement, 255); if (actionCommandStatus->unk_61) { - clear_hud_element_flags(hudElement, 0x2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } actionCommandStatus->state = 1; @@ -163,7 +163,7 @@ void func_802A928C_427CFC(void) { actionCommandStatus->unk_68 = TRUE; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28); - clear_hud_element_flags(hudElement, 0x2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100; diff --git a/src/battle/action_cmd/break_free.c b/src/battle/action_cmd/break_free.c index f8981890c8..7a8c2960da 100644 --- a/src/battle/action_cmd/break_free.c +++ b/src/battle/action_cmd/break_free.c @@ -4,10 +4,10 @@ #define NAMESPACE action_command_break_free extern s32 D_80294220; -extern HudScript HudScript_AButton; -extern HudScript HudScript_BlueMeter; -extern HudScript HudScript_RunningAway; -extern HudScript HudScript_RunAwayOK; +extern HudScript HudScript_AButton[]; +extern HudScript HudScript_BlueMeter[]; +extern HudScript HudScript_RunningAway[]; +extern HudScript HudScript_RunAwayOK[]; ApiStatus func_802A9000_4233F0(Evt* script, s32 isInitialCall) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; @@ -39,25 +39,25 @@ ApiStatus func_802A9000_4233F0(Evt* script, s32 isInitialCall) { actionCommandStatus->hudElements[0] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_BlueMeter); actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_RunningAway); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_RunAwayOK); actionCommandStatus->hudElements[3] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } diff --git a/src/battle/action_cmd/dizzy_shell.c b/src/battle/action_cmd/dizzy_shell.c index 0f1f872b12..3108f2f147 100644 --- a/src/battle/action_cmd/dizzy_shell.c +++ b/src/battle/action_cmd/dizzy_shell.c @@ -4,9 +4,9 @@ #define NAMESPACE action_command_dizzy_shell extern s32 D_802942A0; -extern HudScript HudScript_BlueMeter; -extern HudScript HudScript_AButton; -extern HudScript HudScript_100pct; +extern HudScript HudScript_BlueMeter[]; +extern HudScript HudScript_AButton[]; +extern HudScript HudScript_100pct[]; ApiStatus func_802A9000_426170(void) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; @@ -38,19 +38,19 @@ ApiStatus func_802A9000_426170(void) { actionCommandStatus->hudElements[0] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_BlueMeter); actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_100pct); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } diff --git a/src/battle/action_cmd/fire_shell.c b/src/battle/action_cmd/fire_shell.c index 9baa3e647e..831618dbf8 100644 --- a/src/battle/action_cmd/fire_shell.c +++ b/src/battle/action_cmd/fire_shell.c @@ -4,9 +4,9 @@ #define NAMESPACE action_command_fire_shell extern s32 D_802942C0; -extern HudScript HudScript_StickNeutral; -extern HudScript HudScript_BlueMeter; -extern HudScript HudScript_100pct; +extern HudScript HudScript_StickNeutral[]; +extern HudScript HudScript_BlueMeter[]; +extern HudScript HudScript_100pct[]; ApiStatus func_802A9000_4269D0(void) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; @@ -39,19 +39,19 @@ ApiStatus func_802A9000_4269D0(void) { actionCommandStatus->hudElements[0] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_BlueMeter); actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_100pct); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } diff --git a/src/battle/action_cmd/flee.c b/src/battle/action_cmd/flee.c index 546119a3f1..8eb211db25 100644 --- a/src/battle/action_cmd/flee.c +++ b/src/battle/action_cmd/flee.c @@ -42,25 +42,25 @@ ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) { actionCommandStatus->hudElements[0] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_BlueMeter); actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_RunningAway); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_RunAwayOK); actionCommandStatus->hudElements[3] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); xOffset = 29 - ((100 - actionCommandStatus->unk_46) * 60) / 100; set_hud_element_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY + 17); @@ -70,7 +70,7 @@ ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) { actionCommandStatus->hudElements[4] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } @@ -105,25 +105,25 @@ void func_802A9378_422E48(void) { hudElement = actionCommandStatus->hudElements[0]; set_hud_element_alpha(hudElement, 0xFF); if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } hudElement = actionCommandStatus->hudElements[1]; set_hud_element_alpha(hudElement, 0xFF); if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } hudElement = actionCommandStatus->hudElements[2]; set_hud_element_alpha(hudElement, 0xFF); if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } hudElement = actionCommandStatus->hudElements[3]; set_hud_element_alpha(hudElement, 0xFF); if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } actionCommandStatus->state = 1; @@ -155,7 +155,7 @@ void func_802A9378_422E48(void) { actionCommandStatus->barFillLevel = 10000; actionCommandStatus->unk_68 = 1; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28); - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100; diff --git a/src/battle/action_cmd/hammer.c b/src/battle/action_cmd/hammer.c index 2e4ff527c7..6d90c8cfec 100644 --- a/src/battle/action_cmd/hammer.c +++ b/src/battle/action_cmd/hammer.c @@ -38,43 +38,43 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { hudElement = create_hud_element(HudScript_TimingBar1Chance); actionCommandStatus->hudElements[0] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 10); hudElement = create_hud_element(HudScript_TimingWait); actionCommandStatus->hudElements[1] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); hudElement = create_hud_element(HudScript_TimingCharge4a); actionCommandStatus->hudElements[2] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); hudElement = create_hud_element(HudScript_TimingCharge4b); actionCommandStatus->hudElements[3] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); hudElement = create_hud_element(HudScript_TimingCharge4c); actionCommandStatus->hudElements[4] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); hudElement = create_hud_element(HudScript_StickHoldLeft); actionCommandStatus->hudElements[5] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); hudElement = create_hud_element(HudScript_RightOn); actionCommandStatus->hudElements[6] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); set_hud_element_alpha(hudElement, 0xFF); diff --git a/src/battle/action_cmd/hurricane.c b/src/battle/action_cmd/hurricane.c index 047ef9dfa7..7d5e9f3194 100644 --- a/src/battle/action_cmd/hurricane.c +++ b/src/battle/action_cmd/hurricane.c @@ -4,10 +4,10 @@ #define NAMESPACE action_command_hurricane extern s32 D_80294420; -extern HudScript HudScript_BlueMeter; -extern HudScript HudScript_AButton; -extern HudScript HudScript_BButton; -extern HudScript HudScript_100pct; +extern HudScript HudScript_BlueMeter[]; +extern HudScript HudScript_AButton[]; +extern HudScript HudScript_BButton[]; +extern HudScript HudScript_100pct[]; ApiStatus func_802A9000_42F6E0(void) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; @@ -35,13 +35,13 @@ ApiStatus func_802A9000_42F6E0(void) { hudElement = create_hud_element(HudScript_AButton); actionCommandStatus->hudElements[0] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); hudElement = create_hud_element(HudScript_BButton); actionCommandStatus->hudElements[2] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); @@ -49,13 +49,13 @@ ApiStatus func_802A9000_42F6E0(void) { actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_100pct); actionCommandStatus->hudElements[4] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } diff --git a/src/battle/action_cmd/jump.c b/src/battle/action_cmd/jump.c index c0b857b275..c961c5dbf4 100644 --- a/src/battle/action_cmd/jump.c +++ b/src/battle/action_cmd/jump.c @@ -32,14 +32,14 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { hudElement = create_hud_element(HudScript_AButton); actionCommandStatus->hudElements[0] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); set_hud_element_alpha(hudElement, 0xFF); hudElement = create_hud_element(HudScript_RightOn); actionCommandStatus->hudElements[1] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); set_hud_element_alpha(hudElement, 0xFF); @@ -71,7 +71,7 @@ ApiStatus func_802A9120_421B10(Evt* script, s32 isInitialCall) { battleStatus->flags1 &= ~0x2000; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } actionCommandStatus->state = 10; @@ -107,14 +107,14 @@ void N(update)(void) { hudElement = actionCommandStatus->hudElements[0]; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); if (actionCommandStatus->unk_61) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } if (actionCommandStatus->autoSucceed) { hudElement = actionCommandStatus->hudElements[1]; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY); if (actionCommandStatus->unk_61) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); break; } } @@ -152,7 +152,7 @@ void N(update)(void) { if (battleStatus->actionSuccess >= 0) { hudElement = actionCommandStatus->hudElements[0]; if (actionCommandStatus->unk_61 != 0) { - set_hud_element_flags(hudElement, 2); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } } } diff --git a/src/battle/action_cmd/mega_shock.c b/src/battle/action_cmd/mega_shock.c index 164e8d2fcd..09ff89121e 100644 --- a/src/battle/action_cmd/mega_shock.c +++ b/src/battle/action_cmd/mega_shock.c @@ -3,10 +3,10 @@ #define NAMESPACE action_command_mega_shock -extern HudScript HudScript_BlueMeter; -extern HudScript HudScript_AButton; -extern HudScript HudScript_BButton; -extern HudScript HudScript_100pct; +extern HudScript HudScript_BlueMeter[]; +extern HudScript HudScript_AButton[]; +extern HudScript HudScript_BButton[]; +extern HudScript HudScript_100pct[]; extern s32 D_802943C0; extern HudScript HudScript_MashAButton; @@ -51,13 +51,13 @@ ApiStatus func_802A9000_42DA10(Evt* script, s32 isInitialCall) { elementID = create_hud_element(HudScript_AButton); actionCommandStatus->hudElements[0] = elementID; - set_hud_element_flags(elementID, 0x82); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(elementID, 0); elementID = create_hud_element(HudScript_BButton); actionCommandStatus->hudElements[2] = elementID; - set_hud_element_flags(elementID, 0x82); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(elementID, 0); @@ -65,13 +65,13 @@ ApiStatus func_802A9000_42DA10(Evt* script, s32 isInitialCall) { actionCommandStatus->hudElements[1] = elementID; set_hud_element_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 0x1C); set_hud_element_render_depth(elementID, 0); - set_hud_element_flags(elementID, 0x82); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); elementID = create_hud_element(HudScript_100pct); actionCommandStatus->hudElements[4] = elementID; set_hud_element_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 0x1C); set_hud_element_render_depth(elementID, 0); - set_hud_element_flags(elementID, 0x82); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } @@ -132,20 +132,20 @@ void func_802A92A0_42DCB0(void) { hudElement = actionCommandStatus->hudElements[0]; if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } set_hud_element_alpha(hudElement, 255); hudElement = actionCommandStatus->hudElements[2]; if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } set_hud_element_alpha(hudElement, 255); hudElement = actionCommandStatus->hudElements[1]; set_hud_element_alpha(hudElement, 255); if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } actionCommandStatus->state = 1; @@ -269,7 +269,7 @@ void func_802A92A0_42DCB0(void) { actionCommandStatus->unk_68 = 1; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28); - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } adjustedFillLevel = actionCommandStatus->barFillLevel / 100; diff --git a/src/battle/action_cmd/power_shock.c b/src/battle/action_cmd/power_shock.c index 5154d3c29e..354964fbfb 100644 --- a/src/battle/action_cmd/power_shock.c +++ b/src/battle/action_cmd/power_shock.c @@ -44,7 +44,7 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { hudElement = create_hud_element(HudScript_AButton); actionCommandStatus->hudElements[0] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); @@ -52,19 +52,19 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_100pct); actionCommandStatus->hudElements[3] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_RunAwayOK); actionCommandStatus->hudElements[4] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); temp_v1 = (100 - actionCommandStatus->unk_46) * 60; temp_v1 /= 100; @@ -115,18 +115,18 @@ void func_802A9310_42D220(void) { btl_set_popup_duration(99); hudElement = actionCommandStatus->hudElements[0]; if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } set_hud_element_alpha(hudElement, 0xFF); hudElement = actionCommandStatus->hudElements[1]; set_hud_element_alpha(hudElement, 0xFF); if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } hudElement = actionCommandStatus->hudElements[4]; set_hud_element_alpha(hudElement, 0xFF); if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } actionCommandStatus->state = 1; break; @@ -208,7 +208,7 @@ void func_802A9310_42D220(void) { hudElement, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28); - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } battleStatus->unk_84 = actionCommandStatus->unk_44 / 100; diff --git a/src/battle/action_cmd/smack.c b/src/battle/action_cmd/smack.c index e5dc1d5bb3..eadb7d2401 100644 --- a/src/battle/action_cmd/smack.c +++ b/src/battle/action_cmd/smack.c @@ -4,10 +4,10 @@ #define NAMESPACE action_command_smack -extern HudScript HudScript_BlueMeter; -extern HudScript HudScript_StickNeutral; -extern HudScript HudScript_100pct; -extern HudScript HudScript_StickMashLeft; +extern HudScript HudScript_BlueMeter[]; +extern HudScript HudScript_StickNeutral[]; +extern HudScript HudScript_100pct[]; +extern HudScript HudScript_StickMashLeft[]; extern s32 D_802943E0; typedef struct UnkVec2s { @@ -69,19 +69,19 @@ ApiStatus func_802A9000_42E3A0(void) { actionCommandStatus->hudElements[0] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_BlueMeter); actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_100pct); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } @@ -102,12 +102,12 @@ void func_802A9298_42E638(void) { hudElement = actionCommandStatus->hudElements[0]; set_hud_element_alpha(hudElement, 255); if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } hudElement = actionCommandStatus->hudElements[1]; set_hud_element_alpha(hudElement, 255); if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } actionCommandStatus->state = 1; break; @@ -134,7 +134,7 @@ void func_802A9298_42E638(void) { actionCommandStatus->unk_4E--; break; } - set_hud_element_anim(actionCommandStatus->hudElements[0], &HudScript_StickMashLeft); + set_hud_element_anim(actionCommandStatus->hudElements[0], HudScript_StickMashLeft); actionCommandStatus->barFillLevel = 0; battleStatus->unk_85 = 0; actionCommandStatus->unk_5C = 0; @@ -188,7 +188,7 @@ void func_802A9298_42E638(void) { actionCommandStatus->unk_68 = 1; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28); - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100; diff --git a/src/battle/action_cmd/spiny_surge.c b/src/battle/action_cmd/spiny_surge.c index 504a8d5720..86965bbbad 100644 --- a/src/battle/action_cmd/spiny_surge.c +++ b/src/battle/action_cmd/spiny_surge.c @@ -4,9 +4,9 @@ #define NAMESPACE action_command_spiny_surge extern s32 D_80294400; -extern HudScript HudScript_BlueMeter; -extern HudScript HudScript_StickNeutral; -extern HudScript HudScript_100pct; +extern HudScript HudScript_BlueMeter[]; +extern HudScript HudScript_StickNeutral[]; +extern HudScript HudScript_100pct[]; ApiStatus func_802A9000_42EE20(void) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; @@ -39,19 +39,19 @@ ApiStatus func_802A9000_42EE20(void) { actionCommandStatus->hudElements[0] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_BlueMeter); actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_100pct); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } diff --git a/src/battle/action_cmd/spook.c b/src/battle/action_cmd/spook.c index d649f33772..1da0198035 100644 --- a/src/battle/action_cmd/spook.c +++ b/src/battle/action_cmd/spook.c @@ -38,19 +38,19 @@ ApiStatus func_802A9000_430020(void) { actionCommandStatus->hudElements[0] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_BlueMeter); actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(HudScript_100pct); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } diff --git a/src/battle/action_cmd/squirt.c b/src/battle/action_cmd/squirt.c index 766ed2f06b..b52a2c86cd 100644 --- a/src/battle/action_cmd/squirt.c +++ b/src/battle/action_cmd/squirt.c @@ -32,7 +32,7 @@ ApiStatus func_802A9000_429D20(void) { hudElement = create_hud_element(HudScript_AButton); actionCommandStatus->hudElements[0] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); @@ -40,7 +40,7 @@ ApiStatus func_802A9000_429D20(void) { actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } diff --git a/src/battle/action_cmd/stop_leech.c b/src/battle/action_cmd/stop_leech.c index 292e1b8341..061a20b5ea 100644 --- a/src/battle/action_cmd/stop_leech.c +++ b/src/battle/action_cmd/stop_leech.c @@ -31,7 +31,7 @@ ApiStatus func_802A9000_425590(Evt* script, s32 isInitialCall) { hudElement = create_hud_element(HudScript_AButton); actionCommandStatus->hudElements[0] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); @@ -39,7 +39,7 @@ ApiStatus func_802A9000_425590(Evt* script, s32 isInitialCall) { actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } @@ -80,13 +80,13 @@ void func_802A91F8_425788(void) { btl_set_popup_duration(99); hudElement = actionCommandStatus->hudElements[0]; if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } set_hud_element_alpha(hudElement, 0xFF); hudElement = actionCommandStatus->hudElements[1]; set_hud_element_alpha(hudElement, 0xFF); if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } actionCommandStatus->state = 1; break; diff --git a/src/battle/action_cmd/tidal_wave.c b/src/battle/action_cmd/tidal_wave.c index 4cf97679e0..e218078fc8 100644 --- a/src/battle/action_cmd/tidal_wave.c +++ b/src/battle/action_cmd/tidal_wave.c @@ -37,14 +37,14 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { actionCommandStatus->hudElements[0] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); for (i = 1; i < ARRAY_COUNT(actionCommandStatus->hudElements); i++) { hudElement = create_hud_element(HudScript_AButton); actionCommandStatus->hudElements[i] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); } return ApiStatus_DONE2; @@ -95,7 +95,7 @@ void N(update)(void) { btl_set_popup_duration(99); hudElement = actionCommandStatus->hudElements[0]; if (actionCommandStatus->unk_61 != 0) { - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); } set_hud_element_alpha(hudElement, 0xFF); actionCommandStatus->state = 1; @@ -140,7 +140,7 @@ void N(update)(void) { hudElement, actionCommandStatus->hudElementX + ((actionCommandStatus->unk_5D - 1) * 20) + 16, actionCommandStatus->hudElementY); - clear_hud_element_flags(hudElement, 2); + clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); sfx_play_sound(0x233); actionCommandStatus->unk_70 = 1; actionCommandStatus->state = 12; diff --git a/src/battle/action_cmd/whirlwind.c b/src/battle/action_cmd/whirlwind.c index 2643a0252b..d558bebb67 100644 --- a/src/battle/action_cmd/whirlwind.c +++ b/src/battle/action_cmd/whirlwind.c @@ -37,7 +37,7 @@ ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall) { hudElement = create_hud_element(HudScript_AButton); actionCommandStatus->hudElements[0] = hudElement; - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_depth(hudElement, 0); @@ -45,19 +45,19 @@ ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall) { actionCommandStatus->hudElements[1] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(&D_802AA7F0_425460); actionCommandStatus->hudElements[2] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 54, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hudElement = create_hud_element(&D_802AA818_425488); actionCommandStatus->hudElements[3] = hudElement; set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 60, actionCommandStatus->hudElementY + 28); set_hud_element_render_depth(hudElement, 0); - set_hud_element_flags(hudElement, 0x82); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); return ApiStatus_DONE2; } diff --git a/src/battle/area_kmr_part_3/actor/spiked_para_jr_troopa.c b/src/battle/area_kmr_part_3/actor/spiked_para_jr_troopa.c index 8caeca6be7..80d6295067 100644 --- a/src/battle/area_kmr_part_3/actor/spiked_para_jr_troopa.c +++ b/src/battle/area_kmr_part_3/actor/spiked_para_jr_troopa.c @@ -549,7 +549,7 @@ ApiStatus func_802189DC_447E1C(Evt* script, s32 isInitialCall) { set_hud_element_render_pos(icon, posX, posY); set_hud_element_scale(icon, 1.5f); - clear_hud_element_flags(icon, 0x200002); + clear_hud_element_flags(icon, HUD_ELEMENT_FLAGS_200000 | HUD_ELEMENT_FLAGS_DISABLED); evt_set_variable(script, *args++, icon); load_tattle_flags(0x8B); return ApiStatus_DONE2; diff --git a/src/battle/item/food.c b/src/battle/item/food.c index d3e58c00e4..17e604152a 100644 --- a/src/battle/item/food.c +++ b/src/battle/item/food.c @@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_7333BC)(Evt* script, s32 isInitialCall) { partner->koDuration = 0; } if (partner->koDuration > 0) { - partner->debuffIcon->ptrPropertyList[0xF] = partner->koDuration; + ((s32*)partner->debuffIcon->data)[0xF] = partner->koDuration; } else { partner->koStatus = 0; dispatch_event_partner(0x34); - partner->debuffIcon->ptrPropertyList[0xF] = 0; + ((s32*)partner->debuffIcon->data)[0xF] = 0; } return ApiStatus_DONE2; diff --git a/src/battle/item/life_shroom.c b/src/battle/item/life_shroom.c index 738f223713..04a379382d 100644 --- a/src/battle/item/life_shroom.c +++ b/src/battle/item/life_shroom.c @@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_72E81C)(Evt* script, s32 isInitialCall) { partner->koDuration = 0; } if (partner->koDuration > 0) { - partner->debuffIcon->ptrPropertyList[0xF] = partner->koDuration; + ((s32*)partner->debuffIcon->data)[0xF] = partner->koDuration; } else { partner->koStatus = 0; dispatch_event_partner(0x34); - partner->debuffIcon->ptrPropertyList[0xF] = 0; + ((s32*)partner->debuffIcon->data)[0xF] = 0; } return ApiStatus_DONE2; diff --git a/src/battle/item/mushroom.c b/src/battle/item/mushroom.c index caeaa22755..44f034cef1 100644 --- a/src/battle/item/mushroom.c +++ b/src/battle/item/mushroom.c @@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_715B3C)(Evt* script, s32 isInitialCall) { partner->koDuration = 0; } if (partner->koDuration > 0) { - partner->debuffIcon->ptrPropertyList[0xF] = partner->koDuration; + ((s32*)partner->debuffIcon->data)[0xF] = partner->koDuration; } else { partner->koStatus = 0; dispatch_event_partner(0x34); - partner->debuffIcon->ptrPropertyList[0xF] = 0; + ((s32*)partner->debuffIcon->data)[0xF] = 0; } return ApiStatus_DONE2; diff --git a/src/battle/item/mystery.c b/src/battle/item/mystery.c index 1e2ecfaaa8..0a8c42f29e 100644 --- a/src/battle/item/mystery.c +++ b/src/battle/item/mystery.c @@ -94,7 +94,7 @@ ApiStatus N(func_802A13E4_72C994)(Evt* script, s32 isInitialCall) { for (; i < 7; i++, iconPtr++) { icon = create_hud_element(ic[itemTable[D_802A25FC[i]].iconID].iconId); *iconPtr = icon; - set_hud_element_flags(icon, 0x80); + set_hud_element_flags(icon, HUD_ELEMENT_FLAGS_80); } D_802A25E4 = 1; } diff --git a/src/battle/item/strange_cake.c b/src/battle/item/strange_cake.c index 12a48f9484..fcb1579e7c 100644 --- a/src/battle/item/strange_cake.c +++ b/src/battle/item/strange_cake.c @@ -87,7 +87,7 @@ ApiStatus N(func_802A13E4_7316E4)(Evt* script, s32 isInitialCall) { HudElement* icon = create_hud_element(*(B48Ptr + * (B58Ptr + i))); *(&D_802A2DD8 + i) = icon; - set_hud_element_flags(icon, 0x80); + set_hud_element_flags(icon, HUD_ELEMENT_FLAGS_80); } D_802A2DEC = 1; } diff --git a/src/battle/item/super_soda.c b/src/battle/item/super_soda.c index 24ca3e29fd..e3170d9eaa 100644 --- a/src/battle/item/super_soda.c +++ b/src/battle/item/super_soda.c @@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_724FCC)(Evt* script, s32 isInitialCall) { partner->koDuration = 0; } if (partner->koDuration > 0) { - partner->debuffIcon->ptrPropertyList[0xF] = partner->koDuration; + ((s32*)partner->debuffIcon->data)[0xF] = partner->koDuration; } else { partner->koStatus = 0; dispatch_event_partner(0x34); - partner->debuffIcon->ptrPropertyList[0xF] = 0; + ((s32*)partner->debuffIcon->data)[0xF] = 0; } return ApiStatus_DONE2; @@ -64,7 +64,7 @@ ApiStatus N(func_802A1378_725058)(Evt* script, s32 isInitialCall) { break; } - actor->debuffIcon->ptrPropertyList[15] = 0; + ((s32*)actor->debuffIcon->data)[15] = 0; } btl_update_ko_status(); diff --git a/src/battle/item/tasty_tonic.c b/src/battle/item/tasty_tonic.c index a81c1c8f4d..c54e4c2f2d 100644 --- a/src/battle/item/tasty_tonic.c +++ b/src/battle/item/tasty_tonic.c @@ -1,4 +1,5 @@ #include "tasty_tonic.h" +#include "effects.h" #include "ItemRefund.inc.c" @@ -23,7 +24,7 @@ ApiStatus N(func_802A123C_72223C)(Evt* script, s32 isInitialCall) { case ACTOR_CLASS_PARTNER: dispatch_event_partner(0x31); } - actor->debuffIcon->ptrPropertyList[15] = 0; + ((s32*)(actor->debuffIcon->data))[15] = 0; } return ApiStatus_DONE2; diff --git a/src/battle/star/refresh/78B600.c b/src/battle/star/refresh/78B600.c index b6f5d70948..312ff8e08f 100644 --- a/src/battle/star/refresh/78B600.c +++ b/src/battle/star/refresh/78B600.c @@ -22,7 +22,7 @@ ApiStatus func_802A17D4_78BDD4(Evt* script, s32 isInitialCall) { if (actor->koStatus != 0) { actor->koDuration = 0; actor->koStatus = 0; - actor->debuffIcon->ptrPropertyList[15] = 0; + ((s32*)actor->debuffIcon->data)[15] = 0; } btl_update_ko_status(); diff --git a/src/bss3.c b/src/bss3.c index 084e52449d..9b893911ac 100644 --- a/src/bss3.c +++ b/src/bss3.c @@ -9,14 +9,14 @@ #endif BSS s32 D_801512B0; -BSS s32 D_801512B4; +BSS s32 gHudElementsNumber; BSS s32 gCurrentCustomModelGfxBuildersPtr; BSS s32 D_801512BC; BSS s32 D_801512C0; BSS s32 gEntityHeapBase; -BSS s32 D_801512C8; +BSS s32 gHudElementCacheTableRaster; BSS s32 gCurrentModels; -BSS s32 D_801512D0; +BSS s32 gHudElementCacheTablePalette; BSS s32 gAnimCount; BSS s16 gMsgBGScrollAmtX; BSS s16 D_801512DA; @@ -35,7 +35,7 @@ BSS s32 D_80151308; BSS s16 gMsgBGScrollAmtY; BSS s16 D_8015130E; BSS s32 D_80151310; -BSS s32 D_80151314; +BSS s32 gHudElementCacheBuffer; BSS s32 gEntityModelCount; BSS s32 D_8015131C; BSS char D_80151320[0x4]; @@ -45,7 +45,7 @@ BSS s32 D_8015132C; BSS s32 D_80151330; BSS s32 gTriggerCount; BSS s32 D_80151338; -BSS s32 D_8015133C; +BSS s32 gHudElementCacheSize; BSS s32 gCurrentDoorSoundsSet; BSS s32 D_80151344; BSS char D_80151348[0x38]; @@ -210,19 +210,19 @@ BSS s8 D_80156968[0x8]; BSS s8 D_80156970[0x10]; BSS s8 fold_groupDescriptors[0x5A0]; BSS s8 fold_gfxDataCache[0x40]; -BSS s8 D_80156F60[0x500]; -BSS s8 D_80157460[0x500]; +BSS s8 gHudElementsWorld[0x500]; +BSS s8 gHudElementsBattle[0x500]; BSS s32 gHudElements; -BSS s32 D_80157964; -BSS s32 D_80157968; +BSS s32 gHudElementCacheBufferWorld; +BSS s32 gHudElementCacheSizeWorld; BSS char D_8015796C[0x4]; -BSS s8 D_80157970[0x600]; -BSS s8 D_80157F70[0x600]; -BSS s32 D_80158570; -BSS s32 D_80158574; +BSS s8 gHudElementCacheTableRasterWorld[0x600]; +BSS s8 gHudElementCacheTablePaletteWorld[0x600]; +BSS s32 gHudElementCacheBufferBattle; +BSS s32 gHudElementCacheSizeBattle; BSS char D_80158578[0x8]; -BSS s8 D_80158580[0x600]; -BSS s8 D_80158B80[0x600]; +BSS s8 gHudElementCacheTableRasterBattle[0x600]; +BSS s8 gHudElementCacheTablePaletteBattle[0x600]; BSS s8 D_80159180[0x10]; BSS s8 wTriggerList[0x100]; BSS s8 bTriggerList[0x100]; diff --git a/src/hud_element.c b/src/hud_element.c index 6c3ea9f7e8..be9f94c49a 100644 --- a/src/hud_element.c +++ b/src/hud_element.c @@ -1,17 +1,29 @@ #include "common.h" #include "hud_element.h" #include "nu/nusys.h" +#include "ld_addrs.h" -extern HudElementList* gHudElements; +#define MAX_HUD_CACHE_ENTRIES 192 -s32 D_8014EFC0[] = { 0x00000000, }; -s32 D_8014EFC4[] = { 0x00011000, }; +typedef struct HudElementSize { + s16 width; + s16 height; + s16 size; +} HudElementSize; + +typedef struct HudCacheEntry { + /* 0x00 */ s32 id; + /* 0x04 */ u8* data; +} HudCacheEntry; // size = 0x08; + +u8* gHudElementCacheNonWorld = NULL; +s32 gHudElementCacheCapacity = 0x11000; HudScript hud_element_defaultAnim = { he_End, }; -Vec3s gHudElementSizes[26] = { +HudElementSize gHudElementSizes[] = { { 8, 8, 32 }, { 16, 16, 128 }, { 24, 24, 288 }, @@ -40,94 +52,643 @@ Vec3s gHudElementSizes[26] = { { 20, 32, 0 } }; -s32 D_8014F062[] = { - 0x00220020, 0x00000028, 0x002803C8, 0x00000000, 0xED000000, 0x005003C0, 0xE7000000, - 0x00000000, 0xE3000A11, 0x00002CF0, 0xE2001E01, 0x00000000, 0xDF000000, 0x00000000, 0xED000000, 0x005003C0, - 0xE7000000, 0x00000000, 0xE3000A11, 0x00002CF0, 0xE2001E01, 0x00000000, 0xDF000000, 0x00000000, +s16 D_8014F068[] = { 34, 32, 0, 40, 40, 968, 0, 0 }; +Gfx gHudElementsDLBackUI[] = { + gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), + gsDPPipeSync(), + gsSPSetOtherMode(G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 18, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE), + gsDPSetAlphaCompare(G_AC_NONE), + gsSPEndDisplayList() +}; +Gfx gHudElementsDLFrontUI[] = { + gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), + gsDPPipeSync(), + gsSPSetOtherMode(G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 18, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE), + gsDPSetAlphaCompare(G_AC_NONE), + gsSPEndDisplayList() }; -s32 D_8014F0C8[] = { - 0xFFF40000, 0x00000000, 0x08000800, 0x000000FF, 0x00330000, 0x00000000, 0x00000800, 0x000000FF, - 0x0033003F, 0x00000000, 0x00000000, 0x000000FF, 0xFFF4003F, 0x00000000, 0x08000000, 0x000000FF, -}; - -Lights1 D_8014F108 = { - .a = { - .l = { - .col = { 255, 255, 255 }, - .colc = { 255, 255, 255 }, +Vtx D_8014F0C8[] = { + { + .v = { + .ob = { -12, 0, 0}, + .flag = 0, + .tc = { 0x800, 0x800 }, + .cn = { 0, 0, 0, 255} } }, - .l = { - { - .l = { - .col = { 0, 0, 0 }, - .colc = { 0, 0, 0 }, - .dir = { 0, 0, 0}, - } + { + .v = { + .ob = { 51, 0, 0}, + .flag = 0, + .tc = { 0, 0x800 }, + .cn = { 0, 0, 0, 255} + } + }, + { + .v = { + .ob = { 51, 63, 0}, + .flag = 0, + .tc = { 0, 0 }, + .cn = { 0, 0, 0, 255} + } + }, + { + .v = { + .ob = { -12, 63, 0}, + .flag = 0, + .tc = { 0x800, 0 }, + .cn = { 0, 0, 0, 255} } } }; -extern s32 D_801512B4; // no of hud elements? +Lights1 D_8014F108 = gdSPDefLights1(255, 255, 255, 0, 0, 0, 0, 0, 0); + +extern s32 gHudElementsNumber; extern s32 D_80159180; -extern HudElementList D_80156F60; -extern HudElementList D_80157460; -extern void* D_8015133C; -extern void* D_80157968; -extern void* D_801512C8; -extern void* D_80157970; -extern void* D_801512D0; -extern void* D_80157F70; -extern void* D_80158574; -extern void* D_80158580; -extern void* D_80158B80; -extern s32* D_80157964; -extern s32* D_80158570; -extern s32* D_80151314; +extern HudElementList* gHudElements; +extern HudElementList gHudElementsWorld; +extern HudElementList gHudElementsBattle; +extern s32* gHudElementCacheSize; +extern s32 gHudElementCacheSizeWorld; +extern s32 gHudElementCacheSizeBattle; +extern HudCacheEntry* gHudElementCacheTableRaster; +extern HudCacheEntry* gHudElementCacheTablePalette; +extern HudCacheEntry gHudElementCacheTableRasterWorld[]; +extern HudCacheEntry gHudElementCacheTablePaletteWorld[]; +extern HudCacheEntry gHudElementCacheTableRasterBattle[]; +extern HudCacheEntry gHudElementCacheTablePaletteBattle[]; +extern u8* gHudElementCacheBufferWorld; +extern u8* gHudElementCacheBufferBattle; +extern u8* gHudElementCacheBuffer; -INCLUDE_ASM(void, "hud_element", load_hud_element, HudElement* hudElement, const HudScript* anim); +s32 fold_appendGfx_component(s32 idx, FoldImageRecPart* image, u32 flagBits, Matrix4f mtx); +void func_801413F8(void); -INCLUDE_ASM(void, "hud_element", draw_rect_hud_element, - HudElement* hudElement, - s32 texSizeX, - s32 texSizeY, - s32 drawSizeX, - s32 drawSizeY, - s32 offsetX, - s32 offsetY, - s32 clamp, - s32 dropShadow -) +void load_hud_element(HudElement* hudElement, const HudScript* anim) { + s32* pos = (s32*)anim; + s32 raster; + s32 palette; + s32 preset; + Vec3s* size; + HudCacheEntry* entry; + s32 i; + s32 capacity; -INCLUDE_ASM(void, "hud_element", clear_hud_element_cache, void); + if (pos == NULL) { + return; + } + + preset = 0; + + while (TRUE) { + switch (*pos++) { + case HUD_ELEMENT_OP_End: + return; + case HUD_ELEMENT_OP_SetCI: + pos += 3; + break; + case HUD_ELEMENT_OP_SetTileSize: + preset = *pos++; + hudElement->drawSizePreset = hudElement->tileSizePreset = preset; + break; + case HUD_ELEMENT_OP_SetSizesAutoScale: + case HUD_ELEMENT_OP_SetSizesFixedScale: + preset = *pos; + pos += 2; + hudElement->drawSizePreset = hudElement->tileSizePreset = preset; + break; + case HUD_ELEMENT_OP_SetCustomSize: + hudElement->customDrawSize.x = hudElement->customImageSize.x = *pos++; + hudElement->customDrawSize.y = hudElement->customImageSize.y = *pos++; + hudElement->flags |= HUD_ELEMENT_FLAGS_CUSTOM_SIZE; + break; + case HUD_ELEMENT_OP_AddTexelOffsetX: + case HUD_ELEMENT_OP_AddTexelOffsetY: + case HUD_ELEMENT_OP_SetScale: + case HUD_ELEMENT_OP_SetAlpha: + case HUD_ELEMENT_OP_op_15: + case HUD_ELEMENT_OP_RandomBranch: + case HUD_ELEMENT_OP_SetFlags: + case HUD_ELEMENT_OP_ClearFlags: + case HUD_ELEMENT_OP_PlaySound: + pos++; + break; + case HUD_ELEMENT_OP_SetRGBA: + case HUD_ELEMENT_OP_SetTexelOffset: + case HUD_ELEMENT_OP_RandomDelay: + case HUD_ELEMENT_OP_RandomRestart: + case HUD_ELEMENT_OP_SetPivot: + pos += 2; + break; + case HUD_ELEMENT_OP_SetImage: + pos++; + raster = *pos++; + palette = *pos++; + + i = 0; + entry = gHudElementCacheTableRaster; + while (TRUE) { + if (entry->id == -1) { + entry->id = raster; + entry->data = &gHudElementCacheBuffer[*gHudElementCacheSize]; + if (!gGameStatusPtr->isBattle) { + capacity = gHudElementCacheCapacity; + } else { + capacity = gHudElementCacheCapacity / 2; + } + ASSERT(capacity > *gHudElementCacheSize + gHudElementSizes[preset].size); + nuPiReadRom((s32)icon_present_VRAM + raster, entry->data, gHudElementSizes[preset].size); + *gHudElementCacheSize += gHudElementSizes[preset].size; + if (!gGameStatusPtr->isBattle) { + *pos = i; + } else { + *pos = (u16)(*pos) | (i << 16); + } + i++; + break; + } else if (entry->id == raster) { + if (!gGameStatusPtr->isBattle) { + *pos = i; + } else { + *pos = (u16)(*pos) | (i << 16); + } + break; + } + entry++; + i++; + } + + pos++; + ASSERT(i < MAX_HUD_CACHE_ENTRIES); + + entry = gHudElementCacheTablePalette; + i = 0; + while (TRUE) { + if (entry->id == -1) { + entry->id = palette; + entry->data = &gHudElementCacheBuffer[*gHudElementCacheSize]; + if (!gGameStatusPtr->isBattle) { + capacity = gHudElementCacheCapacity; + } else { + capacity = gHudElementCacheCapacity / 2; + } + ASSERT(capacity > *gHudElementCacheSize + 32); + nuPiReadRom((s32)icon_present_VRAM + palette, entry->data, 32); + *gHudElementCacheSize += 32; + if (!gGameStatusPtr->isBattle) { + *pos = i; + } else { + *pos = (u16)(*pos) | (i << 16); + } + i++; + break; + } else if (entry->id == palette) { + if (!gGameStatusPtr->isBattle) { + *pos = i; + } else { + *pos = (u16)(*pos) | (i << 16); + } + break; + } + entry++; + i++; + } + + pos++; + ASSERT(i < MAX_HUD_CACHE_ENTRIES); + break; + } + } +} + +void draw_rect_hud_element(HudElement* hudElement, s16 texSizeX, s16 texSizeY, s16 drawSizeX, s16 drawSizeY, + s16 offsetX, s16 offsetY, s32 clamp, s32 dropShadow) { + u32 isFmtCI4; + u32 isFmtIA8; + s32 flipX, flipY; + s32 fmt; + s32 widthScale, heightScale; + s32 texStartX, texStartY; + u32 isLastTileX, isLastTileY; + s32 uls, ult, lrs, lrt; + s32 uly, lry, ulx, lrx; + s32 masks, maskt; + s32 screenPosOffsetScaledX, screenPosOffsetScaledY; + u8* imageAddr; + u8* paletteAddr; + s16 baseX, baseY; + s32 tileMode; + u32 flags1, flags2; + u16 renderPosX, renderPosY; + s16 tempX, tempY; + + imageAddr = hudElement->imageAddr; + paletteAddr = hudElement->paletteAddr; + + screenPosOffsetScaledX = hudElement->screenPosOffset.x * 1024; + screenPosOffsetScaledY = hudElement->screenPosOffset.y * 1024; + widthScale = hudElement->widthScale; + screenPosOffsetScaledX /= widthScale; + heightScale = hudElement->heightScale; + screenPosOffsetScaledY /= heightScale; + + renderPosX = hudElement->worldPosOffset.x; + renderPosY = hudElement->worldPosOffset.y; + renderPosX += hudElement->renderPosX + screenPosOffsetScaledX; + renderPosY += hudElement->renderPosY + screenPosOffsetScaledY; + tempX = offsetX; + tempY = offsetY; + tempX += renderPosX; + tempY += renderPosY; + + baseX = tempX; + baseY = tempY; + + if (dropShadow) { + baseX = tempX + 2; + baseY = tempY + 2; + } + + + flags1 = (hudElement->flags & HUD_ELEMENT_FLAGS_FMT_CI4); + isFmtCI4 = flags1 != 0; + flags1 = (hudElement->flags & HUD_ELEMENT_FLAGS_FMT_IA8); + isFmtIA8 = flags1 != 0; + flags1 = (hudElement->flags & HUD_ELEMENT_FLAGS_FLIPX); + flipX = flags1 != 0; + flags2 = (hudElement->flags & HUD_ELEMENT_FLAGS_FLIPY); + flipY = flags2 != 0; + + fmt = 0; // stays the same if (isFmtCI4 == FALSE && isFmtIA8 == FALSE) + if (isFmtCI4 == TRUE && isFmtIA8 == TRUE) { + fmt = 0; // RGBA + } + if (isFmtCI4 == TRUE && isFmtIA8 == FALSE) { + fmt = 1; // CI + } + if (isFmtCI4 == FALSE && isFmtIA8 == TRUE) { + fmt = 2; // IA + } + if (isFmtCI4 == TRUE && isFmtIA8 == TRUE) { + fmt = 2; // IA + } + + masks = 6; + maskt = 5; + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_SCALED)) { + switch (drawSizeX) { + case 8: + masks = 3; + break; + case 16: + masks = 4; + break; + case 32: + masks = 5; + break; + } + + switch (drawSizeY) { + case 8: + maskt = 3; + break; + case 16: + maskt = 4; + break; + case 32: + maskt = 5; + break; + } + } + + switch (fmt) { + case 0: + gDPSetRenderMode(gMasterGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); + gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE); + break; + case 1: + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_TRANSPARENT)) { + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_ANTIALIASING)) { + gDPSetRenderMode(gMasterGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); + } else { + gDPSetRenderMode(gMasterGfxPos++, G_RM_AA_TEX_EDGE, G_RM_AA_TEX_EDGE2); + } + } else { + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_ANTIALIASING)) { + gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); + } else { + gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF | AA_EN, G_RM_CLD_SURF2 | AA_EN); + } + } + gDPSetTextureLUT(gMasterGfxPos++, G_TT_RGBA16); + gDPLoadTLUT_pal16(gMasterGfxPos++, 0, paletteAddr); + break; + case 2: + gDPSetRenderMode(gMasterGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); + gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE); + break; + } + + if (hudElement->flags & HUD_ELEMENT_FLAGS_8000) { + gDPSetTextureFilter(gMasterGfxPos++, G_TF_AVERAGE); + } else { + gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT); + } + + ult = 0; + isLastTileY = FALSE; + uly = baseY; + while (TRUE) { + lry = uly + 1024.0 / heightScale * 32.0; + lrt = ult + 31; + if (flipY) { + texStartY = texSizeY; + } else { + texStartY = 0; + } + + if (lry < 0 || uly > SCREEN_HEIGHT) { + break; + } + + if (lry >= SCREEN_HEIGHT) { + s32 temp = ult + SCREEN_HEIGHT + 31; + temp -= baseY + lrt; + lrt = temp - 1; + + lry = SCREEN_HEIGHT; + isLastTileY = TRUE; + } + + if (lrt + 1 >= texSizeY) { + lrt = texSizeY - 1; + if (texSizeY > 16) { + lry = baseY + drawSizeY - 1; + } else { + lry = baseY + drawSizeY; + } + isLastTileY = TRUE; + } + + isLastTileX = FALSE; + uls = 0; + ulx = baseX; + while (TRUE) { + lrx = ulx + 1024.0 / widthScale * 64.0; + lrs = uls + 63; + if (flipX) { + texStartX = texSizeX; + } else { + texStartX = 0; + } + + if (lrx < 0 || ulx > SCREEN_WIDTH) { + break; + } + + if (lrx >= SCREEN_WIDTH) { + s32 temp = uls + SCREEN_WIDTH + 63; + temp -= baseX + lrs; + lrs = temp - 1; + + lrx = SCREEN_WIDTH; + isLastTileX = TRUE; + } + + if (lrs + 1 >= texSizeX) { + lrs = texSizeX - 1; + if (texSizeX > 16) { + lrx = baseX + drawSizeX - 1; + } else { + lrx = baseX + drawSizeX; + } + isLastTileX = TRUE; + } + + gDPPipeSync(gMasterGfxPos++); + + if (isLastTileX ) { + tileMode = !isLastTileY; + } + if (!isLastTileX && !isLastTileY) { + tileMode = 0; + } + if (!isLastTileX && isLastTileY) { + tileMode = 2; + } + if (isLastTileX && isLastTileY) { + tileMode = 3; + } + + switch (fmt) { + case 0: + gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_TRANSPARENT)) { + gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); + } else { + gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0); + } + + if (hudElement->flags & HUD_ELEMENT_FLAGS_TRANSPARENT) { + gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, hudElement->opacity); + } + + if (!flipX && !flipY) { + gDPLoadTextureTile(gMasterGfxPos++, imageAddr, G_IM_FMT_RGBA, G_IM_SIZ_32b, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + } else { + gDPLoadTextureTile(gMasterGfxPos++, imageAddr, G_IM_FMT_RGBA, G_IM_SIZ_32b, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + } + break; + case 1: + if (!dropShadow) { + if (hudElement->flags & HUD_ELEMENT_FLAGS_TRANSPARENT) { + gDPSetCombineLERP(gMasterGfxPos++, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0); + } else { + gDPSetCombineLERP(gMasterGfxPos++, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0); + } + + if (hudElement->flags & HUD_ELEMENT_FLAGS_TRANSPARENT) { + gDPSetPrimColor(gMasterGfxPos++, 0, 0, hudElement->tint.r, hudElement->tint.g, hudElement->tint.b, hudElement->opacity); + } else { + gDPSetPrimColor(gMasterGfxPos++, 0, 0, hudElement->tint.r, hudElement->tint.g, hudElement->tint.b, 255); + } + } else { + gDPSetRenderMode(gMasterGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); + gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); + gDPSetPrimColor(gMasterGfxPos++, 0, 0, 40, 40, 40, 72); + } + + if (!flipX && !flipY) { + if (!clamp) { + gDPLoadTextureTile_4b(gMasterGfxPos++, imageAddr, G_IM_FMT_CI, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + } else { + switch (tileMode) { + case 0: + gDPLoadTextureTile_4b(gMasterGfxPos++, imageAddr, G_IM_FMT_CI, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + break; + case 1: + gDPLoadTextureTile_4b(gMasterGfxPos++, imageAddr, G_IM_FMT_CI, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + break; + case 2: + gDPLoadTextureTile_4b(gMasterGfxPos++, imageAddr, G_IM_FMT_CI, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + break; + case 3: + gDPLoadTextureTile_4b(gMasterGfxPos++, imageAddr, G_IM_FMT_CI, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + break; + } + } + } else { + gDPLoadTextureTile_4b(gMasterGfxPos++, imageAddr, G_IM_FMT_CI, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + } + break; + case 2: + gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0); + gDPSetPrimColor(gMasterGfxPos++, 0, 0, hudElement->tint.r, hudElement->tint.g, hudElement->tint.b, hudElement->opacity); + + if (!flipX && !flipY) { + if (!clamp) { + switch (tileMode) { + case 0: + gDPLoadTextureTile(gMasterGfxPos++, imageAddr, G_IM_FMT_IA, G_IM_SIZ_8b, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + break; + case 1: + gDPLoadTextureTile(gMasterGfxPos++, imageAddr, G_IM_FMT_IA, G_IM_SIZ_8b, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + break; + case 2: + gDPLoadTextureTile(gMasterGfxPos++, imageAddr, G_IM_FMT_IA, G_IM_SIZ_8b, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + break; + case 3: + gDPLoadTextureTile(gMasterGfxPos++, imageAddr, G_IM_FMT_IA, G_IM_SIZ_8b, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + break; + } + } else { + gDPLoadTextureTile(gMasterGfxPos++, imageAddr, G_IM_FMT_IA, G_IM_SIZ_8b, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + } + } else { + gDPLoadTextureTile(gMasterGfxPos++, imageAddr, G_IM_FMT_IA, G_IM_SIZ_8b, texSizeX, texSizeY, uls, ult, lrs, lrt, 0, + G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + } + break; + } + + if (hudElement->flags & HUD_ELEMENT_FLAGS_8000) { + gSPScisTextureRectangle(gMasterGfxPos++, ulx * 4, uly * 4, lrx * 4, lry * 4, 0, texStartX * 32 + 16, texStartY * 32 + 16, widthScale, heightScale); + } else { + gSPScisTextureRectangle(gMasterGfxPos++, ulx * 4, uly * 4, lrx * 4, lry * 4, 0, texStartX * 32, texStartY * 32, widthScale, heightScale); + } + if (isLastTileX) { + break; + } + ulx += 1024.0 / widthScale * 64.0; + uls += 64; + } + + if (isLastTileY) { + break; + } + + ult += 32; + uly += 1024.0 / heightScale * 32.0; + } + + gDPPipeSync(gMasterGfxPos++); +} + +void clear_hud_element_cache(void) { + s32 i; + HudCacheEntry* entryRaster; + HudCacheEntry* entryPalette; + + if (!gGameStatusPtr->isBattle) { + gHudElements = &gHudElementsWorld; + gHudElementCacheSize = &gHudElementCacheSizeWorld; + gHudElementCacheTableRaster = gHudElementCacheTableRasterWorld; + gHudElementCacheTablePalette = gHudElementCacheTablePaletteWorld; + } else { + gHudElements = &gHudElementsBattle; + gHudElementCacheSize = &gHudElementCacheSizeBattle; + gHudElementCacheTableRaster = gHudElementCacheTableRasterBattle; + gHudElementCacheTablePalette = gHudElementCacheTablePaletteBattle; + } + + if (!gGameStatusPtr->isBattle) { + gHudElementCacheBuffer = general_heap_malloc(gHudElementCacheCapacity); + ASSERT(gHudElementCacheBuffer); + gHudElementCacheBufferWorld = gHudElementCacheBuffer; + *gHudElementCacheSize = 0; + entryRaster = gHudElementCacheTableRaster; + entryPalette = gHudElementCacheTablePalette; + for (i = 0; i < MAX_HUD_CACHE_ENTRIES; i++) { + entryRaster[i].id = -1; + entryPalette[i].id = -1; + } + } else { + if (gHudElementCacheNonWorld == NULL) { + gHudElementCacheBuffer = general_heap_malloc(gHudElementCacheCapacity / 2); + ASSERT(gHudElementCacheBuffer); + } else { + gHudElementCacheBuffer = gHudElementCacheNonWorld; + } + gHudElementCacheBufferBattle = gHudElementCacheBuffer; + *gHudElementCacheSize = 0; + entryRaster = gHudElementCacheTableRaster; + entryPalette = gHudElementCacheTablePalette; + for (i = 0; i < MAX_HUD_CACHE_ENTRIES; i++) { + entryRaster[i].id = -1; + entryPalette[i].id = -1; + } + } + + for (i = 0; i < ARRAY_COUNT(*gHudElements); i++) { + (*gHudElements)[i] = NULL; + } + + gHudElementsNumber = 0; + D_80159180 = 0; + func_801413F8(); +} void init_hud_element_list(void) { if (!gGameStatusPtr->isBattle) { - if (D_80158570 != NULL) { - general_heap_free(D_80158570); - D_80158570 = NULL; + if (gHudElementCacheBufferBattle != NULL) { + general_heap_free(gHudElementCacheBufferBattle); + gHudElementCacheBufferBattle = NULL; } - gHudElements = &D_80156F60; - D_8015133C = &D_80157968; - D_801512C8 = &D_80157970; - D_801512D0 = &D_80157F70; - D_80151314 = D_80157964; + gHudElements = &gHudElementsWorld; + gHudElementCacheSize = &gHudElementCacheSizeWorld; + gHudElementCacheTableRaster = gHudElementCacheTableRasterWorld; + gHudElementCacheTablePalette = gHudElementCacheTablePaletteWorld; + gHudElementCacheBuffer = gHudElementCacheBufferWorld; } else { - gHudElements = &D_80157460; - D_8015133C = &D_80158574; - D_801512C8 = &D_80158580; - D_801512D0 = &D_80158B80; - D_80151314 = D_80158570; + gHudElements = &gHudElementsBattle; + gHudElementCacheSize = &gHudElementCacheSizeBattle; + gHudElementCacheTableRaster = gHudElementCacheTableRasterBattle; + gHudElementCacheTablePalette = gHudElementCacheTablePaletteBattle; + gHudElementCacheBuffer = gHudElementCacheBufferBattle; } - D_801512B4 = 0; + gHudElementsNumber = 0; D_80159180 = 0; } void func_801413F8(void) { - set_cam_viewport(3, 0, 0, 0x13F, 0xEF); + set_cam_viewport(CAM_CAM3, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); gCameras[CAM_CAM3].updateMode = 2; gCameras[CAM_CAM3].unk_06 = 1; gCameras[CAM_CAM3].unk_20 = 0x3CBF; @@ -159,11 +720,11 @@ s32 create_hud_element(const HudScript* anim) { ASSERT(id < ARRAY_COUNT(*gHudElements)); (*gHudElements)[id] = hudElement = heap_malloc(sizeof(HudElement)); - D_801512B4 += 1; + gHudElementsNumber += 1; ASSERT(hudElement != NULL); - hudElement->flags.as_word = 1; + hudElement->flags = HUD_ELEMENT_FLAGS_INITIALIZED; hudElement->readPos = anim; if (anim == NULL) { hudElement->readPos = &hud_element_defaultAnim; @@ -173,7 +734,7 @@ s32 create_hud_element(const HudScript* anim) { hudElement->tileSizePreset = -1; hudElement->renderPosX = 0; hudElement->renderPosY = 0; - hudElement->ptrPropertyList = (s32*) anim; // TODO: what + hudElement->loopStartPos = anim; hudElement->widthScale = X10(1.0f); hudElement->heightScale = X10(1.0f); hudElement->anim = hudElement->readPos; @@ -189,7 +750,7 @@ s32 create_hud_element(const HudScript* anim) { hudElement->tint.b = 255; if (gGameStatusPtr->isBattle) { - hudElement->flags.as_word |= 0x400; + hudElement->flags |= HUD_ELEMENT_FLAGS_BATTLE; id |= 0x800; } @@ -206,18 +767,18 @@ void update_hud_elements(void) { for (i = 0; i < ARRAY_COUNT(*gHudElements);) { HudElement* elem = (*gHudElements)[i]; - if (elem != NULL && (elem->flags.as_word != 0) && !(elem->flags.as_word & 2)) { - if (elem->flags.as_word & 0x40000) { + if (elem != NULL && elem->flags && !(elem->flags & HUD_ELEMENT_FLAGS_DISABLED)) { + if (elem->flags & HUD_ELEMENT_FLAGS_DELETE) { free_hud_element(i); i++; - } else if (elem->readPos != 0) { + } else if (elem->readPos != NULL) { elem->updateTimer--; if (elem->updateTimer == 0) { while (hud_element_update(elem) != 0); } - if (elem->flags.as_word & 0x100) { - elem->unkImgScale[0] += elem->unk_20; - elem->unkImgScale[1] += elem->unk_24; + if (elem->flags & HUD_ELEMENT_FLAGS_FIXEDSCALE) { + elem->unkImgScale[0] += elem->deltaSizeX; + elem->unkImgScale[1] += elem->deltaSizeY; } i++; } else { @@ -229,21 +790,946 @@ void update_hud_elements(void) { } } -INCLUDE_ASM(s32, "hud_element", hud_element_update, HudElement* hudElement); +s32 hud_element_update(HudElement* hudElement) { + HudCacheEntry* entryRaster; + HudCacheEntry* entryPalette; + s32 i; + s32 drawSizePreset; + s32 tileSizePreset; + u8 sizePreset; + f32 xScaled, yScaled; + s32 imageWidth, imageHeight, drawWidth, drawHeight; + u32 min, max; + u32 flags; + s32 raster, palette; + s32 s1, s2; + s32 arg1, arg2; + f32 uniformScale; + HudScript* newReadPos; -INCLUDE_ASM(void, "hud_element", render_hud_elements_backUI, void); + HudTransform* hudTransform = hudElement->hudTransform; + s32* nextPos = (s32*)hudElement->readPos; -INCLUDE_ASM(void, "hud_element", render_hud_elements_frontUI, void); + switch (*nextPos++) { + case HUD_ELEMENT_OP_End: + hudElement->updateTimer = 60; + flags = hudElement->flags; + hudElement->flags = flags | HUD_ELEMENT_FLAGS_ANIMATION_FINISHED; + break; + case HUD_ELEMENT_OP_Delete: + hudElement->updateTimer = 60; + hudElement->flags |= HUD_ELEMENT_FLAGS_DELETE; + break; + case HUD_ELEMENT_OP_UseIA8: + hudElement->readPos = (HudScript*)nextPos; + hudElement->flags |= HUD_ELEMENT_FLAGS_FMT_IA8; + return TRUE; + case HUD_ELEMENT_OP_SetVisible: + hudElement->readPos = (HudScript*)nextPos; + hudElement->flags |= HUD_ELEMENT_FLAGS_FMT_CI4; + return TRUE; + case HUD_ELEMENT_OP_SetHidden: + hudElement->readPos = (HudScript*)nextPos; + hudElement->flags &= ~HUD_ELEMENT_FLAGS_FMT_CI4; + return TRUE; + case HUD_ELEMENT_OP_SetFlags: + s1 = *nextPos++; + hudElement->readPos = (HudScript*)nextPos; + hudElement->flags |= s1; + return TRUE; + case HUD_ELEMENT_OP_ClearFlags: + s1 = *nextPos++; + hudElement->readPos = (HudScript*)nextPos; + hudElement->flags &= ~s1; + return TRUE; + case HUD_ELEMENT_OP_SetRGBA: + hudElement->updateTimer = *nextPos++; + hudElement->imageAddr = (u8*)*nextPos++; + hudElement->readPos = (HudScript*)nextPos; + if (hudElement->flags & HUD_ELEMENT_FLAGS_MEMOFFSET) { + hudElement->imageAddr += hudElement->memOffset; + } + + if (hudElement->flags & HUD_ELEMENT_FLAGS_FIXEDSCALE) { + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + tileSizePreset = hudElement->tileSizePreset; + drawSizePreset = hudElement->drawSizePreset; + imageWidth = gHudElementSizes[tileSizePreset].width; + imageHeight = gHudElementSizes[tileSizePreset].height; + drawWidth = gHudElementSizes[drawSizePreset].width; + drawHeight = gHudElementSizes[drawSizePreset].height; + } else { + imageWidth = hudElement->customImageSize.x; + imageHeight = hudElement->customImageSize.y; + drawWidth = hudElement->customDrawSize.x; + drawHeight = hudElement->customDrawSize.y; + } + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_200)) { + hudElement->flags |= HUD_ELEMENT_FLAGS_200; + hudElement->unkImgScale[0] = imageWidth; + hudElement->unkImgScale[1] = imageHeight; + hudElement->deltaSizeX = ((f32)drawWidth - (f32)imageWidth) / (f32)hudElement->updateTimer; + hudElement->deltaSizeY = ((f32)drawHeight - (f32)imageHeight) / (f32)hudElement->updateTimer; + } else { + hudElement->flags &= ~HUD_ELEMENT_FLAGS_200; + hudElement->unkImgScale[0] = drawWidth; + hudElement->unkImgScale[1] = drawHeight; + hudElement->deltaSizeX = ((f32)imageWidth - (f32)drawWidth) / (f32)hudElement->updateTimer; + hudElement->deltaSizeY = ((f32)imageHeight - (f32)drawHeight) / (f32)hudElement->updateTimer; + } + } + break; + case HUD_ELEMENT_OP_SetCI: + hudElement->updateTimer = *nextPos++; + hudElement->imageAddr = (u8*)*nextPos++; + hudElement->paletteAddr = (u8*)*nextPos++; + hudElement->readPos = (HudScript*)nextPos; + + if (hudElement->flags & HUD_ELEMENT_FLAGS_MEMOFFSET) { + hudElement->imageAddr += hudElement->memOffset; + hudElement->paletteAddr += hudElement->memOffset; + } + + if (hudElement->flags & HUD_ELEMENT_FLAGS_FIXEDSCALE) { + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + tileSizePreset = hudElement->tileSizePreset; + drawSizePreset = hudElement->drawSizePreset; + imageWidth = gHudElementSizes[tileSizePreset].width; + imageHeight = gHudElementSizes[tileSizePreset].height; + drawWidth = gHudElementSizes[drawSizePreset].width; + drawHeight = gHudElementSizes[drawSizePreset].height; + } else { + imageWidth = hudElement->customImageSize.x; + imageHeight = hudElement->customImageSize.y; + drawWidth = hudElement->customDrawSize.x; + drawHeight = hudElement->customDrawSize.y; + } + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_200)) { + hudElement->flags |= HUD_ELEMENT_FLAGS_200; + hudElement->unkImgScale[0] = imageWidth; + hudElement->unkImgScale[1] = imageHeight; + hudElement->deltaSizeX = ((f32)drawWidth - (f32)imageWidth) / (f32)hudElement->updateTimer; + hudElement->deltaSizeY = ((f32)drawHeight - (f32)imageHeight) / (f32)hudElement->updateTimer; + } else { + hudElement->flags &= ~HUD_ELEMENT_FLAGS_200; + hudElement->unkImgScale[0] = drawWidth; + hudElement->unkImgScale[1] = drawHeight; + hudElement->deltaSizeX = ((f32)imageWidth - (f32)drawWidth) / (f32)hudElement->updateTimer; + hudElement->deltaSizeY = ((f32)imageHeight - (f32)drawHeight) / (f32)hudElement->updateTimer; + } + } + break; + case HUD_ELEMENT_OP_SetImage: + hudElement->updateTimer = *nextPos++; + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_BATTLE)) { + entryRaster = gHudElementCacheTableRasterWorld; + entryPalette = gHudElementCacheTablePaletteWorld; + } else { + entryRaster = gHudElementCacheTableRasterBattle; + entryPalette = gHudElementCacheTablePaletteBattle; + } + + i = 0; + while (TRUE) { + if (entryRaster[i].id == *nextPos) { + break; + } + ASSERT(++i < MAX_HUD_CACHE_ENTRIES); + } + + nextPos++; + hudElement->imageAddr = entryRaster[i].data; + + i = 0; + while (TRUE) { + if (entryPalette[i].id == *nextPos) { + break; + } + ASSERT(++i < MAX_HUD_CACHE_ENTRIES); + } + hudElement->paletteAddr = entryPalette[i].data; + nextPos += 3; + hudElement->readPos = (HudScript*)nextPos; + + if (hudElement->flags & HUD_ELEMENT_FLAGS_FIXEDSCALE) { + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + tileSizePreset = hudElement->tileSizePreset; + drawSizePreset = hudElement->drawSizePreset; + imageWidth = gHudElementSizes[tileSizePreset].width; + imageHeight = gHudElementSizes[tileSizePreset].height; + drawWidth = gHudElementSizes[drawSizePreset].width; + drawHeight = gHudElementSizes[drawSizePreset].height; + } else { + imageWidth = hudElement->customImageSize.x; + imageHeight = hudElement->customImageSize.y; + drawWidth = hudElement->customDrawSize.x; + drawHeight = hudElement->customDrawSize.y; + } + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_200)) { + hudElement->flags |= HUD_ELEMENT_FLAGS_200; + hudElement->unkImgScale[0] = imageWidth; + hudElement->unkImgScale[1] = imageHeight; + hudElement->deltaSizeX = ((f32)drawWidth - (f32)imageWidth) / (f32)hudElement->updateTimer; + hudElement->deltaSizeY = ((f32)drawHeight - (f32)imageHeight) / (f32)hudElement->updateTimer; + } else { + hudElement->flags &= ~HUD_ELEMENT_FLAGS_200; + hudElement->unkImgScale[0] = drawWidth; + hudElement->unkImgScale[1] = drawHeight; + hudElement->deltaSizeX = ((f32)imageWidth - (f32)drawWidth) / (f32)hudElement->updateTimer; + hudElement->deltaSizeY = ((f32)imageHeight - (f32)drawHeight) / (f32)hudElement->updateTimer; + } + } + break; + case HUD_ELEMENT_OP_Restart: + hudElement->readPos = hudElement->loopStartPos; + return TRUE; + case HUD_ELEMENT_OP_Loop: + hudElement->loopStartPos = (HudScript*)nextPos; + hudElement->readPos = (HudScript*)nextPos; + return TRUE; + case HUD_ELEMENT_OP_RandomRestart: + s1 = *nextPos++; + s2 = *nextPos++; + if (rand_int(s1) < s2) { + hudElement->readPos = hudElement->loopStartPos; + } else { + hudElement->readPos = (HudScript*)nextPos; + } + return TRUE; + case HUD_ELEMENT_OP_SetTileSize: + sizePreset = *nextPos++; + hudElement->widthScale = X10(1); + hudElement->heightScale = X10(1); + hudElement->readPos = (HudScript*)nextPos; + hudElement->drawSizePreset = sizePreset; + hudElement->tileSizePreset = sizePreset; + hudElement->flags &= ~HUD_ELEMENT_FLAGS_FIXEDSCALE; + hudElement->flags &= ~HUD_ELEMENT_FLAGS_REPEATED; + return TRUE; + case HUD_ELEMENT_OP_SetSizesAutoScale: + tileSizePreset = *nextPos++; + arg2 = *nextPos++; + + hudElement->readPos = (HudScript*)nextPos; + hudElement->tileSizePreset = tileSizePreset; + hudElement->drawSizePreset = arg2; + + imageWidth = gHudElementSizes[tileSizePreset].width; + imageHeight = gHudElementSizes[tileSizePreset].height; + drawWidth = gHudElementSizes[arg2].width; + drawHeight = gHudElementSizes[arg2].height; + + xScaled = (f32) drawWidth / (f32) imageWidth; + yScaled = (f32) drawHeight / (f32) imageHeight; + + xScaled = 1.0f / xScaled; + yScaled = 1.0f / yScaled; + + hudElement->widthScale = X10(xScaled); + hudElement->heightScale = X10(yScaled); + + hudElement->flags &= ~HUD_ELEMENT_FLAGS_FIXEDSCALE; + hudElement->flags |= HUD_ELEMENT_FLAGS_REPEATED; + return TRUE; + case HUD_ELEMENT_OP_SetSizesFixedScale: + tileSizePreset = *nextPos++; + drawSizePreset = *nextPos++; + + hudElement->widthScale = X10(1); + hudElement->heightScale = X10(1); + hudElement->readPos = (HudScript*)nextPos; + hudElement->tileSizePreset = tileSizePreset; + hudElement->drawSizePreset = drawSizePreset; + hudElement->flags |= HUD_ELEMENT_FLAGS_FIXEDSCALE; + hudElement->flags &= ~HUD_ELEMENT_FLAGS_REPEATED; + hudElement->flags &= ~HUD_ELEMENT_FLAGS_200; + return TRUE; + case HUD_ELEMENT_OP_AddTexelOffsetX: + s1 = *nextPos++; + hudElement->readPos = (HudScript*)nextPos; + hudElement->screenPosOffset.x += s1; + return TRUE; + case HUD_ELEMENT_OP_AddTexelOffsetY: + s2 = *nextPos++; + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_FLIPY)) { + hudElement->screenPosOffset.y += s2; + } else { + hudElement->screenPosOffset.y -= s2; + } + hudElement->readPos = (HudScript*)nextPos; + return TRUE; + case HUD_ELEMENT_OP_SetTexelOffset: + s1 = *nextPos++; + s2 = *nextPos++; + hudElement->screenPosOffset.x = s1; + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_FLIPY)) { + hudElement->screenPosOffset.y = s2; + } else { + hudElement->screenPosOffset.y = -s2; + } + hudElement->readPos = (HudScript*)nextPos; + return TRUE; + case HUD_ELEMENT_OP_SetScale: + uniformScale = (f32)*nextPos++; + uniformScale /= 65536; + hudElement->uniformScale = uniformScale; + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + imageWidth = gHudElementSizes[hudElement->tileSizePreset].width; + imageHeight = gHudElementSizes[hudElement->tileSizePreset].height; + drawWidth = gHudElementSizes[hudElement->drawSizePreset].width; + drawHeight = gHudElementSizes[hudElement->drawSizePreset].height; + } else { + imageWidth = hudElement->customImageSize.x; + imageHeight = hudElement->customImageSize.y; + drawWidth = hudElement->customDrawSize.x; + drawHeight = hudElement->customDrawSize.y; + } + + hudElement->sizeX = drawWidth * uniformScale; + hudElement->sizeY = drawHeight * uniformScale; + + xScaled = (f32) drawWidth / (f32) imageWidth * uniformScale; + yScaled = (f32) drawHeight / (f32) imageHeight * uniformScale; + + xScaled = 1.0f / xScaled; + yScaled = 1.0f / yScaled; + + hudElement->widthScale = X10(xScaled); + hudElement->heightScale = X10(yScaled); + + hudElement->readPos = (HudScript*)nextPos; + hudElement->flags &= ~HUD_ELEMENT_FLAGS_FIXEDSCALE; + hudElement->flags |= HUD_ELEMENT_FLAGS_REPEATED | HUD_ELEMENT_FLAGS_SCALED; + return TRUE; + case HUD_ELEMENT_OP_SetAlpha: + s1 = *nextPos++; + hudElement->opacity = s1; + hudElement->flags |= HUD_ELEMENT_FLAGS_TRANSPARENT; + if (hudElement->opacity == 255) { + hudElement->flags &= ~HUD_ELEMENT_FLAGS_TRANSPARENT; + } + hudElement->readPos = (HudScript*)nextPos; + return TRUE; + case HUD_ELEMENT_OP_RandomDelay: + s1 = *nextPos++; + s2 = *nextPos++; + hudElement->updateTimer = rand_int(s2 - s1) + s1; + hudElement->readPos = (HudScript*)nextPos; + break; + case HUD_ELEMENT_OP_SetCustomSize: + hudElement->customDrawSize.x = hudElement->customImageSize.x = *nextPos++; + hudElement->customDrawSize.y = hudElement->customImageSize.y = *nextPos++; + hudElement->readPos = (HudScript*)nextPos; + hudElement->widthScale = X10(1); + hudElement->heightScale = X10(1); + hudElement->drawSizePreset = 0; + hudElement->tileSizePreset = 0; + hudElement->flags &= ~HUD_ELEMENT_FLAGS_FIXEDSCALE; + hudElement->flags &= ~HUD_ELEMENT_FLAGS_REPEATED; + hudElement->flags |= HUD_ELEMENT_FLAGS_CUSTOM_SIZE; + return TRUE; + case HUD_ELEMENT_OP_op_15: + s1 = *nextPos++; + hudElement->readPos = (HudScript*)nextPos; + hudElement->flags &= ~(HUD_ELEMENT_FLAGS_1000000 | HUD_ELEMENT_FLAGS_2000000 | HUD_ELEMENT_FLAGS_4000000 | HUD_ELEMENT_FLAGS_8000000); + hudElement->flags |= s1 << 24; + return TRUE; + case HUD_ELEMENT_OP_RandomBranch: + s1 = *nextPos++; + newReadPos = (HudScript*)nextPos[rand_int(s1 - 1)]; + hudElement->readPos = newReadPos; + load_hud_element(hudElement, newReadPos); + return TRUE; + case HUD_ELEMENT_OP_PlaySound: + arg2 = *nextPos++; + sfx_play_sound(arg2); + hudElement->readPos = (HudScript*)nextPos; + return TRUE; + case HUD_ELEMENT_OP_SetPivot: + arg1 = *nextPos++; + arg2 = *nextPos++; + hudElement->readPos = (HudScript*)nextPos; + if (hudElement->flags & HUD_ELEMENT_FLAGS_TRANSFORM) { + hudTransform->pivot.x = arg1; + // TODO find better match + do { + hudTransform->pivot.y = arg2; + } while (0); + } + return TRUE; + case HUD_ELEMENT_OP_op_16: + break; + } + + return FALSE; +} + +void render_hud_elements_backUI(void) { + s32 i, count, j; + s32 sortedElements[ARRAY_COUNT(*gHudElements)]; + s32 el1, el2; + s32 texSizeX, texSizeY; + s32 drawSizeX, drawSizeY, offsetX, offsetY; + HudElement* hudElement; + + D_80159180++; + if (D_80159180 > 2) { + D_80159180 = 0; + } + gSPDisplayList(gMasterGfxPos++, VIRTUAL_TO_PHYSICAL(gHudElementsDLBackUI)); + + count = 0; + for (i = 0; i < ARRAY_COUNT(*gHudElements); i++) { + hudElement = (*gHudElements)[i]; + if (hudElement != NULL) { + s32 flags = hudElement->flags; + if (flags && !(flags & HUD_ELEMENT_FLAGS_DISABLED)) { + if (!(flags & (HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_TRANSFORM | HUD_ELEMENT_FLAGS_200000 | HUD_ELEMENT_FLAGS_10000000 | HUD_ELEMENT_FLAGS_40000000))) { + if (!(flags & HUD_ELEMENT_FLAGS_FRONTUI) && hudElement->drawSizePreset >= 0) { + sortedElements[count++] = i; + } + } + } + } + } + + for (i = 0; i < count - 1; i++) { + for (j = i + 1; j < count; j++) { + el1 = sortedElements[i]; + el2 = sortedElements[j]; + if ((*gHudElements)[el1]->worldPosOffset.z < (*gHudElements)[el2]->worldPosOffset.z) { + sortedElements[i] = el2; + sortedElements[j] = el1; + } + } + } + + for (i = 0; i < count; i++) { + hudElement = (*gHudElements)[sortedElements[i]]; + + if (hudElement->readPos == NULL) { + break; + } + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_FIXEDSCALE)) { + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + texSizeX = gHudElementSizes[hudElement->tileSizePreset].width; + texSizeY = gHudElementSizes[hudElement->tileSizePreset].height; + } else { + texSizeX = hudElement->customImageSize.x; + texSizeY = hudElement->customImageSize.y; + } + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_SCALED)) { + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + drawSizeX = gHudElementSizes[hudElement->drawSizePreset].width; + drawSizeY = gHudElementSizes[hudElement->drawSizePreset].height; + offsetX = -drawSizeX / 2; + offsetY = -drawSizeY / 2; + } else { + // TODO find better match + do { + drawSizeX = hudElement->customDrawSize.x; + drawSizeY = hudElement->customDrawSize.y; + offsetX = -drawSizeX / 2; + } while (0); + offsetY = -drawSizeY / 2; + + } + } else { + drawSizeX = hudElement->sizeX; + drawSizeY = hudElement->sizeY; + offsetX = -drawSizeX / 2; + offsetY = -drawSizeY / 2; + } + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_REPEATED)) { + if (hudElement->flags & HUD_ELEMENT_FLAGS_SHADOW) { + draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, TRUE); + } + draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, FALSE); + } else { + if (hudElement->flags & HUD_ELEMENT_FLAGS_SHADOW) { + draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE); + } + draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE); + } + } else { + f32 xScaled, yScaled; + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + texSizeX = gHudElementSizes[hudElement->tileSizePreset].width; + texSizeY = gHudElementSizes[hudElement->tileSizePreset].height; + } else { + texSizeX = hudElement->customImageSize.x; + texSizeY = hudElement->customImageSize.y; + } + + drawSizeX = hudElement->unkImgScale[0]; + drawSizeY = hudElement->unkImgScale[1]; + + offsetX = -hudElement->unkImgScale[0] / 2; + offsetY = -hudElement->unkImgScale[1] / 2; + + xScaled = (f32) drawSizeX / (f32) texSizeX; + yScaled = (f32) drawSizeY / (f32) texSizeY; + + xScaled = 1.0f / xScaled; + yScaled = 1.0f / yScaled; + + hudElement->widthScale = X10(xScaled); + hudElement->heightScale = X10(yScaled); + + if (hudElement->flags & HUD_ELEMENT_FLAGS_SHADOW) { + draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE); + } + draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE); + } + } +} + +void render_hud_elements_frontUI(void) { + s32 i, count, j; + s32 sortedElements[ARRAY_COUNT(*gHudElements)]; + s32 el1, el2; + s32 texSizeX, texSizeY; + s32 drawSizeX, drawSizeY, offsetX, offsetY; + HudElement* hudElement; + + gSPDisplayList(gMasterGfxPos++, VIRTUAL_TO_PHYSICAL(gHudElementsDLFrontUI)); + + count = 0; + for (i = 0; i < ARRAY_COUNT(*gHudElements); i++) { + hudElement = (*gHudElements)[i]; + if (hudElement != NULL) { + s32 flags = hudElement->flags; + if (flags && !(flags & HUD_ELEMENT_FLAGS_DISABLED)) { + if (!(flags & (HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_TRANSFORM | HUD_ELEMENT_FLAGS_200000 | HUD_ELEMENT_FLAGS_10000000))) { + if ((flags & HUD_ELEMENT_FLAGS_FRONTUI) && hudElement->drawSizePreset >= 0) { + sortedElements[count++] = i; + } + } + } + } + } + + for (i = 0; i < count - 1; i++) { + for (j = i + 1; j < count; j++) { + el1 = sortedElements[i]; + el2 = sortedElements[j]; + if ((*gHudElements)[el1]->worldPosOffset.z < (*gHudElements)[el2]->worldPosOffset.z) { + sortedElements[i] = el2; + sortedElements[j] = el1; + } + } + } + + for (i = 0; i < count; i++) { + hudElement = (*gHudElements)[sortedElements[i]]; + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_FIXEDSCALE)) { + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + texSizeX = gHudElementSizes[hudElement->tileSizePreset].width; + texSizeY = gHudElementSizes[hudElement->tileSizePreset].height; + } else { + texSizeX = hudElement->customImageSize.x; + texSizeY = hudElement->customImageSize.y; + } + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_SCALED)) { + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + drawSizeX = gHudElementSizes[hudElement->drawSizePreset].width; + drawSizeY = gHudElementSizes[hudElement->drawSizePreset].height; + offsetX = -drawSizeX / 2; + offsetY = -drawSizeY / 2; + } else { + // TODO find better match + do { + drawSizeX = hudElement->customDrawSize.x; + drawSizeY = hudElement->customDrawSize.y; + offsetX = -drawSizeX / 2; + } while (0); + offsetY = -drawSizeY / 2; + + } + } else { + drawSizeX = hudElement->sizeX; + drawSizeY = hudElement->sizeY; + offsetX = -drawSizeX / 2; + offsetY = -drawSizeY / 2; + } + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_REPEATED)) { + if (hudElement->flags & HUD_ELEMENT_FLAGS_SHADOW) { + draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, TRUE); + } + draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, FALSE); + } else { + if (hudElement->flags & HUD_ELEMENT_FLAGS_SHADOW) { + draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE); + } + draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE); + } + } else { + f32 xScaled, yScaled; + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + texSizeX = gHudElementSizes[hudElement->drawSizePreset].width; + texSizeY = gHudElementSizes[hudElement->drawSizePreset].height; + } else { + texSizeX = hudElement->customImageSize.x; + texSizeY = hudElement->customImageSize.y; + } + + drawSizeX = hudElement->unkImgScale[0]; + drawSizeY = hudElement->unkImgScale[1]; + + offsetX = -hudElement->unkImgScale[0] / 2; + offsetY = -hudElement->unkImgScale[1] / 2; + + xScaled = (f32) drawSizeX / (f32) texSizeX; + yScaled = (f32) drawSizeY / (f32) texSizeY; + + xScaled = 1.0f / xScaled; + yScaled = 1.0f / yScaled; + + hudElement->widthScale = X10(xScaled); + hudElement->heightScale = X10(yScaled); + + if (hudElement->flags & HUD_ELEMENT_FLAGS_SHADOW) { + draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE); + } + draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE); + } + } +} + +//issues with vtx assingment in case 2 +#ifdef NON_EQUIVALENT +void render_hud_element(HudElement* hudElement) { + Matrix4f sp20; + Matrix4f sp60; + Matrix4f spA0; + Matrix4f spE0; + Matrix4f sp120; + Matrix4f sp160; + Matrix4f sp1A0; + Matrix4f sp1E0; + Matrix4f sp220; + Matrix4f sp260; + FoldImageRecPart sp2A0; + f32 phi_f24, phi_f20; + s32 height, width; + HudTransform* transform; + s32 mode; + u32 flags; + u8* raster; + u8* palette; + u32 a0, v1; + int nv2; + s32 nv; + s32 ulx, uly, lrx, lry; + Vtx* vtx; + + if (hudElement->flags & HUD_ELEMENT_FLAGS_8000) { + gDPSetTextureFilter(gMasterGfxPos++, G_TF_AVERAGE); + } else { + gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT); + } + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_FIXEDSCALE)) { + phi_f24 = 1.0f; + phi_f20 = 1.0f; + } else { + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + phi_f24 = gHudElementSizes[hudElement->tileSizePreset].width; + phi_f20 = gHudElementSizes[hudElement->tileSizePreset].height; + } else { + phi_f24 = hudElement->customImageSize.x; + phi_f20 = hudElement->customImageSize.y; + } + phi_f24 /= hudElement->unkImgScale[0]; + phi_f24 = 1.0f / phi_f24; + phi_f20 /= hudElement->unkImgScale[1]; + phi_f20 = 1.0f / phi_f20; + } + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + width = gHudElementSizes[hudElement->tileSizePreset].width; + height = gHudElementSizes[hudElement->tileSizePreset].height; + } else { + width = hudElement->customImageSize.x; + height = hudElement->customImageSize.y; + } + + transform = hudElement->hudTransform; + + guTranslateF(sp1E0, transform->pivot.x, -transform->pivot.y, 0.0f); + guTranslateF(sp220, -transform->pivot.x, transform->pivot.y, 0.0f); + guTranslateF(sp1A0, hudElement->renderPosX + hudElement->screenPosOffset.x + hudElement->worldPosOffset.x + transform->position.x, + -hudElement->renderPosY - hudElement->screenPosOffset.y + hudElement->worldPosOffset.y + transform->position.y, + - (hudElement->worldPosOffset.z / 10.0) + transform->position.z); + guScaleF(sp260, hudElement->uniformScale * phi_f24 * transform->scale.x, + hudElement->uniformScale * phi_f20 * transform->scale.y, + transform->scale.z); + guRotateF(sp120, transform->rotation.y, 0.0f, 1.0f, 0.0f); + guRotateF(sp160, transform->rotation.z, 0.0f, 0.0f, 1.0f); + nv = HUD_ELEMENT_FLAGS_FMT_CI4; + guRotateF(spE0, transform->rotation.x, 1.0f, 0.0f, 0.0f); + guMtxCatF(sp160, spE0, sp20); + guMtxCatF(sp20, sp120, spA0); + guMtxCatF(sp260, sp1E0, sp20); + guMtxCatF(sp20, spA0, sp60); + guMtxCatF(sp60, sp220, sp20); + guMtxCatF(sp20, sp1A0, sp60); + guMtxF2L(sp60, &gDisplayContext->matrixStack[gMatrixListPos]); + gSPMatrix(gMasterGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + + mode = 0; + a0 = mode; + a0 = (hudElement->flags & nv) > a0; + v1 = mode < (hudElement->flags & HUD_ELEMENT_FLAGS_FMT_IA8); + + if (a0 == TRUE) { + mode = (v1 < 1); + } + if (a0 == FALSE) { + if (v1 == TRUE) { + mode = 2; + } + } + + if (a0 == TRUE) { + if (v1 == a0) { + mode = 2; + } + } + + switch (mode) { + case 1: + if (hudElement->flags & HUD_ELEMENT_FLAGS_NO_FOLD) { + if (hudElement->flags & HUD_ELEMENT_FLAGS_TRANSPARENT) { + fold_update(0, 7, 255, 255, 255, hudElement->opacity, 0); + } else { + fold_update(0, 0, 0, 0, 0, 0, 0); + } + } else { + if (hudElement->flags & HUD_ELEMENT_FLAGS_TRANSPARENT) { + fold_update(transform->unk_00, 7, 255, 255, 255, hudElement->opacity, 0); + } else { + fold_update(transform->unk_00, 0, 0, 0, 0, 0, 0); + } + } + + sp2A0.raster = hudElement->imageAddr; + palette = hudElement->paletteAddr; + sp2A0.xOffset = -width / 2; + sp2A0.yOffset = height / 2; + sp2A0.width = width; + sp2A0.unk_10 = 255; + sp2A0.height = height; + sp2A0.palette = palette; + + if (hudElement->flags & HUD_ELEMENT_FLAGS_NO_FOLD) { + if (hudElement->flags & HUD_ELEMENT_FLAGS_ANTIALIASING) { + fold_appendGfx_component(0, &sp2A0, 0x40, sp60); + } else { + fold_appendGfx_component(0, &sp2A0, 0x40, sp60); + } + } else { + fold_appendGfx_component(transform->unk_00, &sp2A0, 0x40, sp60); + } + break; + case 2: + vtx = transform->unk_30[D_80159180].vtx; + memcpy(&transform->unk_30[D_80159180].vtx[0], &D_8014F0C8[0], sizeof(Vtx)); + memcpy(&transform->unk_30[D_80159180].vtx[1], &D_8014F0C8[1], sizeof(Vtx)); + memcpy(&transform->unk_30[D_80159180].vtx[2], &D_8014F0C8[2], sizeof(Vtx)); + memcpy(&transform->unk_30[D_80159180].vtx[3], &D_8014F0C8[3], sizeof(Vtx)); + + vtx[0].v.ob[0] = -width / 2; + vtx[0].v.ob[1] = -height / 2; + vtx[0].v.ob[2] = 0; + vtx[0].v.tc[0] = 0; + vtx[0].v.tc[1] = height * 32; + + vtx[1].v.ob[0] = width / 2 - 1; + vtx[1].v.ob[1] = -height / 2; + vtx[1].v.ob[2] = 0; + vtx[1].v.tc[0] = width * 32; + vtx[1].v.tc[1] = height * 32; + + vtx[2].v.ob[0] = width / 2 - 1; + vtx[2].v.ob[1] = height / 2 - 1; + vtx[2].v.ob[2] = 0; + vtx[2].v.tc[0] = width * 32; + vtx[2].v.tc[1] = 0; + + vtx[3].v.ob[0] = -width / 2; + vtx[3].v.ob[1] = height / 2 - 1; + vtx[3].v.ob[2] = 0; + vtx[3].v.tc[0] = 0; + vtx[3].v.tc[1] = 0; + + gDPPipeSync(gMasterGfxPos++); + gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0); + gDPSetPrimColor(gMasterGfxPos++, 0, 0, hudElement->tint.r, hudElement->tint.g, hudElement->tint.b, hudElement->opacity); + + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_TRANSPARENT)) { + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_ANTIALIASING)) { + gDPSetRenderMode(gMasterGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); + } else { + gDPSetRenderMode(gMasterGfxPos++, G_RM_AA_TEX_EDGE, G_RM_AA_TEX_EDGE2); + } + } else { + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_ANTIALIASING)) { + gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); + } else { + gDPSetRenderMode(gMasterGfxPos++, AA_EN | G_RM_CLD_SURF, AA_EN | G_RM_CLD_SURF2); + } + } + + gDPLoadTextureBlock(gMasterGfxPos++, hudElement->imageAddr, G_IM_FMT_IA, G_IM_SIZ_8b , width, height, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + + gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE); + gSPVertex(gMasterGfxPos++, &transform->unk_30[D_80159180], 4, 0); + gSP1Triangle(gMasterGfxPos++, 0, 1, 2, 0); + gSP1Triangle(gMasterGfxPos++, 0, 2, 3, 0); + break; + } + + gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW); + gDPPipeSync(gMasterGfxPos++); +} +#else INCLUDE_ASM(void, "hud_element", render_hud_element, HudElement* hudElement); +#endif -INCLUDE_ASM(void, "hud_element", render_hud_elements_world, void); + +void render_hud_elements_world(void) { + s32 i, count, j; + s32 sortedElements[ARRAY_COUNT(*gHudElements)]; + s32 el1, el2; + HudElement* hudElement; + s16 tempOffsetZ; + + // TODO fix this terrible match + do { + do { + count = 0; + if (gCurrentCamID == CAM_CAM3) { + for (i = 0; i < ARRAY_COUNT(*gHudElements); i++) { + hudElement = (*gHudElements)[i]; + if (hudElement != NULL) { + s32 flags = hudElement->flags; + if (flags && !(flags & HUD_ELEMENT_FLAGS_DISABLED)) { + if (!(flags & (HUD_ELEMENT_FLAGS_200000 | HUD_ELEMENT_FLAGS_10000000))) { + if (flags & HUD_ELEMENT_FLAGS_TRANSFORM) { + if (!(flags & HUD_ELEMENT_FLAGS_40000000)) { + if (!(flags & HUD_ELEMENT_FLAGS_FRONTUI) && hudElement->drawSizePreset >= 0 && !(flags & HUD_ELEMENT_FLAGS_80)) { + sortedElements[count++] = i; + } + } + } + } + } + } + } + + if (count != 0) { + for (i = 0; i < count - 1; i++) { + for (j = i + 1; j < count; j++) { + el1 = sortedElements[i]; + el2 = sortedElements[j]; + tempOffsetZ = (*gHudElements)[el1]->worldPosOffset.z; + do {} while(0); + if (tempOffsetZ < (*gHudElements)[el2]->worldPosOffset.z) { + sortedElements[i] = el2; + sortedElements[j] = el1; + } + } + } + + gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 12, 20, 308, 220); + gDPPipeSync(gMasterGfxPos++); + gSPClearGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH); + gSPSetGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH); + gSPNumLights(gMasterGfxPos++, 1); + gSPLight(gMasterGfxPos++, &D_8014F108.l, 1); + gSPLight(gMasterGfxPos++, &D_8014F108.a, 2); + gSPTexture(gMasterGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON); + gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE); + gSPSetOtherMode(gMasterGfxPos++, G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 18, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_PERSP | G_CYC_1CYCLE); + + for (i = 0; i < count; i++) { + render_hud_element((*gHudElements)[sortedElements[i]]); + } + } + } + count = 0; + if (gCurrentCamID == CAM_BATTLE) { + for (i = 0; i < ARRAY_COUNT(*gHudElements); i++) { + hudElement = (*gHudElements)[i]; + if (hudElement != NULL) { + s32 flags = hudElement->flags; + if (flags && !(flags & HUD_ELEMENT_FLAGS_DISABLED)) { + if (!(flags & (HUD_ELEMENT_FLAGS_200000 | HUD_ELEMENT_FLAGS_10000000))) { + if (flags & HUD_ELEMENT_FLAGS_TRANSFORM) { + if (flags & HUD_ELEMENT_FLAGS_40000000) { + if (!(flags & HUD_ELEMENT_FLAGS_FRONTUI) && hudElement->drawSizePreset >= 0 && !(flags & HUD_ELEMENT_FLAGS_80)) { + sortedElements[count++] = i; + } + } + } + } + } + } + } + + if (count != 0) { + for (i = 0; i < count - 1; i++) { + for (j = i + 1; j < count; j++) { + el1 = sortedElements[i]; + el2 = sortedElements[j]; + tempOffsetZ = (*gHudElements)[el1]->worldPosOffset.z; + do {} while(0); + if ((*gHudElements)[el1]->worldPosOffset.z < (*gHudElements)[el2]->worldPosOffset.z) { + sortedElements[i] = el2; + sortedElements[j] = el1; + } + } + } + + gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 12, 20, 308, 220); + gDPPipeSync(gMasterGfxPos++); + gSPClearGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH); + gSPSetGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH); + gSPNumLights(gMasterGfxPos++, 1); + gSPLight(gMasterGfxPos++, &D_8014F108.l, 1); + gSPLight(gMasterGfxPos++, &D_8014F108.a, 2); + gSPTexture(gMasterGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON); + gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE); + gSPSetOtherMode(gMasterGfxPos++, G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 18, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_PERSP | G_CYC_1CYCLE); + + for (i = 0; i < count; i++) { + render_hud_element((*gHudElements)[sortedElements[i]]); + } + } + } + } while (0); + } while (0); +} void func_80143C48(s32 elemID, s32 arg1, s32 camID) { Camera* camera = &gCameras[camID]; if (arg1 > 0) { - if (camera->flags == 0 || (camera->flags & 2)) { + if (!camera->flags || (camera->flags & 2)) { return; } @@ -260,13 +1746,15 @@ void func_80143C48(s32 elemID, s32 arg1, s32 camID) { gDPSetRenderMode(gMasterGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2); gSPClipRatio(gMasterGfxPos++, FRUSTRATIO_2); gDPPipeSync(gMasterGfxPos++); + //clear Z buffer inside camera viewport gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL); gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxZBuffer)); - gDPSetFillColor(gMasterGfxPos++, 0xFFFCFFFC); + gDPSetFillColor(gMasterGfxPos++, GPACK_ZDZ(G_MAXFBZ, 0)<<16 | GPACK_ZDZ(G_MAXFBZ, 0)); gDPFillRectangle(gMasterGfxPos++, camera->viewportStartX, camera->viewportStartY, camera->viewportStartX + camera->viewportW - 1, camera->viewportStartY + camera->viewportH - 1); gDPPipeSync(gMasterGfxPos++); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr)); gDPPipeSync(gMasterGfxPos++); @@ -299,10 +1787,10 @@ void func_80143C48(s32 elemID, s32 arg1, s32 camID) { elem = (*gHudElements)[elemID]; if (elem != NULL) { - if (elem->flags.as_word != 0 && !(elem->flags.as_word & 2)) { - if (!(elem->flags.as_word & 0x10200000)) { - if (elem->flags.as_word & 0x10000) { - if (!(elem->flags.as_word & 0x40) && (elem->drawSizePreset >= 0) && (elem->flags.as_word & 0x80)) { + if (elem->flags && !(elem->flags & HUD_ELEMENT_FLAGS_DISABLED)) { + if (!(elem->flags & (HUD_ELEMENT_FLAGS_200000 | HUD_ELEMENT_FLAGS_10000000))) { + if (elem->flags & HUD_ELEMENT_FLAGS_TRANSFORM) { + if (!(elem->flags & HUD_ELEMENT_FLAGS_FRONTUI) && (elem->drawSizePreset >= 0) && (elem->flags & HUD_ELEMENT_FLAGS_80)) { render_hud_element(elem); } } @@ -335,8 +1823,8 @@ void draw_hud_element(s32 id, s32 clipMode) { s32 offsetX, offsetY; s32 preset; - if ((elem->flags.as_word != 0) && !(elem->flags.as_word & 2)) { - if (!(elem->flags.as_word & 0x10200000) && (elem->drawSizePreset >= 0)) { + if (elem->flags && !(elem->flags & HUD_ELEMENT_FLAGS_DISABLED)) { + if (!(elem->flags & (HUD_ELEMENT_FLAGS_200000 | HUD_ELEMENT_FLAGS_10000000)) && (elem->drawSizePreset >= 0)) { if (clipMode != 1) { if (clipMode == 0) { gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 12, 20, 308, 220); @@ -355,20 +1843,20 @@ void draw_hud_element(s32 id, s32 clipMode) { gSPTexture(gMasterGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON); } - if (!(elem->flags.as_word & 0x100)) { - if (!(elem->flags.as_word & 0x100000)) { + if (!(elem->flags & HUD_ELEMENT_FLAGS_FIXEDSCALE)) { + if (!(elem->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { preset = elem->tileSizePreset; - texSizeX = gHudElementSizes[preset].x; - texSizeY = gHudElementSizes[preset].y; + texSizeX = gHudElementSizes[preset].width; + texSizeY = gHudElementSizes[preset].height; } else { texSizeX = elem->customImageSize.x; texSizeY = elem->customImageSize.y; } - if (!(elem->flags.as_word & 0x10)) { - if (!(elem->flags.as_word & 0x100000)) { - drawSizeX = gHudElementSizes[elem->drawSizePreset].x; - drawSizeY = gHudElementSizes[elem->drawSizePreset].y; + if (!(elem->flags & HUD_ELEMENT_FLAGS_SCALED)) { + if (!(elem->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + drawSizeX = gHudElementSizes[elem->drawSizePreset].width; + drawSizeY = gHudElementSizes[elem->drawSizePreset].height; } else { drawSizeX = elem->customDrawSize.x; drawSizeY = elem->customDrawSize.y; @@ -381,15 +1869,15 @@ void draw_hud_element(s32 id, s32 clipMode) { do { offsetX = -drawSizeX / 2; offsetY = -drawSizeY / 2; - } while (0); // TODO required to match + } while (0); // required to match - if (!(elem->flags.as_word & 0x800)) { - if (elem->flags.as_word & 0x20000000) { + if (!(elem->flags & HUD_ELEMENT_FLAGS_REPEATED)) { + if (elem->flags & HUD_ELEMENT_FLAGS_SHADOW) { draw_rect_hud_element(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, TRUE); } draw_rect_hud_element(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, FALSE); } else { - if (elem->flags.as_word & 0x20000000) { + if (elem->flags & HUD_ELEMENT_FLAGS_SHADOW) { draw_rect_hud_element(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE); } draw_rect_hud_element(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE); @@ -397,10 +1885,10 @@ void draw_hud_element(s32 id, s32 clipMode) { } else { f32 xScaled, yScaled; - if (!(elem->flags.as_word & 0x100000)) { + if (!(elem->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { preset = elem->tileSizePreset; - texSizeX = gHudElementSizes[preset].x; - texSizeY = gHudElementSizes[preset].y; + texSizeX = gHudElementSizes[preset].width; + texSizeY = gHudElementSizes[preset].height; } else { texSizeX = elem->customImageSize.x; texSizeY = elem->customImageSize.y; @@ -421,7 +1909,7 @@ void draw_hud_element(s32 id, s32 clipMode) { elem->widthScale = X10(xScaled); elem->heightScale = X10(yScaled); - if (elem->flags.as_word & 0x20000000) { + if (elem->flags & HUD_ELEMENT_FLAGS_SHADOW) { draw_rect_hud_element(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE); } draw_rect_hud_element(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE); @@ -450,18 +1938,18 @@ void set_hud_element_anim(s32 id, const HudScript* anim) { } hudElement->updateTimer = 1; - hudElement->widthScale = 1024; - hudElement->heightScale = 1024; + hudElement->widthScale = X10(1.0f); + hudElement->heightScale = X10(1.0f); hudElement->readPos = anim; hudElement->anim = anim; - hudElement->ptrPropertyList = (s32*)anim; + hudElement->loopStartPos = anim; hudElement->screenPosOffset.x = 0; hudElement->screenPosOffset.y = 0; hudElement->worldPosOffset.x = 0; hudElement->worldPosOffset.y = 0; - hudElement->flags.as_word &= ~4; + hudElement->flags &= ~HUD_ELEMENT_FLAGS_ANIMATION_FINISHED; hudElement->uniformScale = 1.0f; - hudElement->flags.as_word &= ~0x930; + hudElement->flags &= ~(HUD_ELEMENT_FLAGS_SCALED | HUD_ELEMENT_FLAGS_TRANSPARENT | HUD_ELEMENT_FLAGS_FIXEDSCALE | HUD_ELEMENT_FLAGS_REPEATED); load_hud_element(hudElement, anim); while (hud_element_update(hudElement) != 0) {} @@ -476,13 +1964,13 @@ HudElement* get_hud_element(s32 id) { } void free_hud_element(s32 id) { - if ((*gHudElements)[id & ~0x800]->flags.as_word & 0x10000) { + if ((*gHudElements)[id & ~0x800]->flags & HUD_ELEMENT_FLAGS_TRANSFORM) { free_hud_element_transform(id & ~0x800); } heap_free((*gHudElements)[id & ~0x800]); (*gHudElements)[id & ~0x800] = NULL; - D_801512B4--; + gHudElementsNumber--; } void set_hud_element_render_pos(s32 id, s32 x, s32 y) { @@ -504,14 +1992,52 @@ void set_hud_element_render_depth(s32 id, s32 z) { } void set_hud_element_flags(s32 id, s32 flags) { - (*gHudElements)[id & ~0x800]->flags.as_word |= flags; + (*gHudElements)[id & ~0x800]->flags |= flags; } void clear_hud_element_flags(s32 id, s32 flags) { - (*gHudElements)[id & ~0x800]->flags.as_word &= ~flags; + (*gHudElements)[id & ~0x800]->flags &= ~flags; } -INCLUDE_ASM(void, "hud_element", ALT_clear_hud_element_cache, void); +void ALT_clear_hud_element_cache(void) { + s32 i; + + if (!gGameStatusPtr->isBattle) { + heap_free(gHudElementCacheBuffer); + gHudElementCacheBuffer = heap_malloc(gHudElementCacheCapacity); + ASSERT(gHudElementCacheBuffer); + gHudElementCacheBufferWorld = gHudElementCacheBuffer; + *gHudElementCacheSize = 0; + gHudElementCacheSize = &gHudElementCacheSizeWorld; + gHudElementCacheTableRaster = gHudElementCacheTableRasterWorld; + gHudElementCacheTablePalette = gHudElementCacheTablePaletteWorld; + gHudElementCacheBuffer = gHudElementCacheBufferWorld; + + for (i = 0; i < MAX_HUD_CACHE_ENTRIES; i++) { + gHudElementCacheTableRasterWorld[i].id = -1; + gHudElementCacheTablePaletteWorld[i].id = -1; + } + } else { + if (gHudElementCacheNonWorld == NULL) { + heap_free(gHudElementCacheBuffer); + gHudElementCacheBuffer = heap_malloc(gHudElementCacheCapacity / 2); + ASSERT(gHudElementCacheBuffer); + } else { + gHudElementCacheBuffer = gHudElementCacheNonWorld; + } + gHudElementCacheBufferBattle = gHudElementCacheBuffer; + *gHudElementCacheSize = 0; + gHudElementCacheSize = &gHudElementCacheSizeBattle; + gHudElementCacheTableRaster = gHudElementCacheTableRasterBattle; + gHudElementCacheTablePalette = gHudElementCacheTablePaletteBattle; + gHudElementCacheBuffer = gHudElementCacheBufferBattle; + + for (i = 0; i < MAX_HUD_CACHE_ENTRIES; i++) { + gHudElementCacheTableRasterBattle[i].id = -1; + gHudElementCacheTablePaletteBattle[i].id = -1; + } + } +} void set_hud_element_scale(s32 index, f32 scale) { HudElement* elem = (*gHudElements)[index & ~0x800]; @@ -522,11 +2048,11 @@ void set_hud_element_scale(s32 index, f32 scale) { f32 xScaled, yScaled; elem->uniformScale = scale; - if (!(elem->flags.as_word & 0x100000)) { - imgSizeX = gHudElementSizes[elem->tileSizePreset].x; - imgSizeY = gHudElementSizes[elem->tileSizePreset].y; - drawSizeX = gHudElementSizes[elem->drawSizePreset].x; - drawSizeY = gHudElementSizes[elem->drawSizePreset].y; + if (!(elem->flags & HUD_ELEMENT_FLAGS_CUSTOM_SIZE)) { + imgSizeX = gHudElementSizes[elem->tileSizePreset].width; + imgSizeY = gHudElementSizes[elem->tileSizePreset].height; + drawSizeX = gHudElementSizes[elem->drawSizePreset].width; + drawSizeY = gHudElementSizes[elem->drawSizePreset].height; } else { imgSizeX = elem->customImageSize.x; imgSizeY = elem->customImageSize.y; @@ -535,8 +2061,8 @@ void set_hud_element_scale(s32 index, f32 scale) { } elem->sizeX = drawSizeX * scale; elem->sizeY = drawSizeY * scale; - elem->flags.as_word &= ~0x100; - elem->flags.as_word |= 0x800 | 0x10; + elem->flags &= ~HUD_ELEMENT_FLAGS_FIXEDSCALE; + elem->flags |= HUD_ELEMENT_FLAGS_REPEATED | HUD_ELEMENT_FLAGS_SCALED; xScaled = ((f32) drawSizeX / (f32) imgSizeX) * scale; yScaled = ((f32) drawSizeY / (f32) imgSizeY) * scale; @@ -548,37 +2074,37 @@ void set_hud_element_scale(s32 index, f32 scale) { elem->heightScale = X10(yScaled); } -void set_hud_element_size(s32 id, s8 size) { +void set_hud_element_size_preset(s32 id, s8 sizePreset) { HudElement* hudElement = (*gHudElements)[id & ~0x800]; - hudElement->widthScale = 1024; - hudElement->heightScale = 1024; - hudElement->tileSizePreset = size; - hudElement->drawSizePreset = size; + hudElement->widthScale = X10(1.0f); + hudElement->heightScale = X10(1.0f); + hudElement->tileSizePreset = sizePreset; + hudElement->drawSizePreset = sizePreset; hudElement->uniformScale = 1.0f; - hudElement->flags.as_word &= ~0x100; - hudElement->flags.as_word &= ~0x810; + hudElement->flags &= ~HUD_ELEMENT_FLAGS_FIXEDSCALE; + hudElement->flags &= ~(HUD_ELEMENT_FLAGS_SCALED | HUD_ELEMENT_FLAGS_REPEATED); } s32 func_80144E4C(s32 id) { - return (*gHudElements)[id & ~0x800]->flags.as_bitfields.f4; + return ((*gHudElements)[id & ~0x800]->flags >> 24) & 0xF; } void func_80144E74(s32 id, s32 arg1) { HudElement* hudElement = (*gHudElements)[id & ~0x800]; - hudElement->flags.as_word &= ~0xF000000; - hudElement->flags.as_word |= arg1 << 24; + hudElement->flags &= ~(HUD_ELEMENT_FLAGS_1000000 | HUD_ELEMENT_FLAGS_2000000 | HUD_ELEMENT_FLAGS_4000000 | HUD_ELEMENT_FLAGS_8000000); + hudElement->flags |= arg1 << 24; } void set_hud_element_alpha(s32 id, s32 opacity) { HudElement* hudElement = (*gHudElements)[id & ~0x800]; - hudElement->flags.as_word |= 0x20; + hudElement->flags |= HUD_ELEMENT_FLAGS_TRANSPARENT; hudElement->opacity = opacity; if (opacity == 255) { - hudElement->flags.as_word &= ~0x20; + hudElement->flags &= ~HUD_ELEMENT_FLAGS_TRANSPARENT; } } @@ -592,12 +2118,12 @@ void set_hud_element_tint(s32 id, s32 r, s32 g, s32 b) { void create_hud_element_transform_A(s32 id) { HudElement* element = (*gHudElements)[id & ~0x800]; - HudTransform* transform = general_heap_malloc(sizeof(*transform)); + HudTransform* transform = general_heap_malloc(sizeof(HudTransform)); element->hudTransform = transform; ASSERT(transform != NULL); - element->flags.as_word |= 0x10000; - transform->unk_00 = func_8013A704(1); + element->flags |= HUD_ELEMENT_FLAGS_TRANSFORM; + transform->foldIdx = func_8013A704(1); transform->position.x = 0.0f; transform->position.y = 0.0f; transform->position.z = 0.0f; @@ -614,12 +2140,12 @@ void create_hud_element_transform_A(s32 id) { void create_hud_element_transform_B(s32 id) { HudElement* element = (*gHudElements)[id & ~0x800]; - HudTransform* transform = general_heap_malloc(sizeof(*transform)); + HudTransform* transform = general_heap_malloc(sizeof(HudTransform)); element->hudTransform = transform; ASSERT(transform != NULL); - element->flags.as_word |= 0x30000; - transform->unk_00 = 0; + element->flags |= HUD_ELEMENT_FLAGS_TRANSFORM | HUD_ELEMENT_FLAGS_NO_FOLD; + transform->foldIdx = 0; transform->position.x = 0.0f; transform->position.y = 0.0f; transform->position.z = 0.0f; @@ -634,12 +2160,12 @@ void create_hud_element_transform_B(s32 id) { void create_hud_element_transform_C(s32 id) { HudElement* element = (*gHudElements)[id & ~0x800]; - HudTransform* transform = general_heap_malloc(sizeof(*transform)); + HudTransform* transform = general_heap_malloc(sizeof(HudTransform)); element->hudTransform = transform; ASSERT(transform != NULL); - element->flags.as_word |= 0x40030000; - transform->unk_00 = 0; + element->flags |= HUD_ELEMENT_FLAGS_40000000 | HUD_ELEMENT_FLAGS_NO_FOLD | HUD_ELEMENT_FLAGS_TRANSFORM; + transform->foldIdx = 0; transform->position.x = 0.0f; transform->position.y = 0.0f; transform->position.z = 0.0f; @@ -656,20 +2182,20 @@ void free_hud_element_transform(s32 id) { HudElement* hudElement = (*gHudElements)[id & ~0x800]; HudTransform* hudTransform = hudElement->hudTransform; - if (!(hudElement->flags.as_word & 0x20000)) { - func_8013A854(hudTransform->unk_00); + if (!(hudElement->flags & HUD_ELEMENT_FLAGS_NO_FOLD)) { + func_8013A854(hudTransform->foldIdx); } heap_free(hudElement->hudTransform); hudElement->hudTransform = NULL; - hudElement->flags.as_word &= ~(0x40000000 | 0x20000 | 0x10000); + hudElement->flags &= ~(HUD_ELEMENT_FLAGS_40000000 | HUD_ELEMENT_FLAGS_NO_FOLD | HUD_ELEMENT_FLAGS_TRANSFORM); } void set_hud_element_transform_pos(s32 id, f32 x, f32 y, f32 z) { HudElement* element = (*gHudElements)[id & ~0x800]; HudTransform* transform = element->hudTransform; - if (element->flags.as_word & 0x10000) { + if (element->flags & HUD_ELEMENT_FLAGS_TRANSFORM) { transform->position.x = x; transform->position.y = y; transform->position.z = z; @@ -680,7 +2206,7 @@ void set_hud_element_transform_scale(s32 id, f32 x, f32 y, f32 z) { HudElement* element = (*gHudElements)[id & ~0x800]; HudTransform* transform = element->hudTransform; - if (element->flags.as_word & 0x10000) { + if (element->flags & HUD_ELEMENT_FLAGS_TRANSFORM) { transform->scale.x = x; transform->scale.y = y; transform->scale.z = z; @@ -691,7 +2217,7 @@ void set_hud_element_transform_rotation(s32 id, f32 x, f32 y, f32 z) { HudElement* element = (*gHudElements)[id & ~0x800]; HudTransform* transform = element->hudTransform; - if (element->flags.as_word & 0x10000) { + if (element->flags & HUD_ELEMENT_FLAGS_TRANSFORM) { transform->rotation.x = x; transform->rotation.y = y; transform->rotation.z = z; @@ -702,21 +2228,21 @@ void set_hud_element_transform_rotation_pivot(s32 id, s32 dx, s32 dy) { HudElement* element = (*gHudElements)[id & ~0x800]; HudTransform* transform = element->hudTransform; - if (element->flags.as_word & 0x10000) { + if (element->flags & HUD_ELEMENT_FLAGS_TRANSFORM) { transform->pivot.x = dx; transform->pivot.y = dy; } } void copy_world_hud_element_ref_to_battle(s32 worldID, s32 battleID) { - D_80157460[battleID & ~0x800] = D_80156F60[worldID & ~0x800]; + gHudElementsBattle[battleID & ~0x800] = gHudElementsWorld[worldID & ~0x800]; } void set_hud_element_nonworld_cache(void* base, s32 size) { - D_8014EFC0[0] = (s32)base; + gHudElementCacheNonWorld = (u8*)base; if (base == NULL) { - D_8014EFC4[0] = 0x11000; + gHudElementCacheCapacity = 0x11000; } else { - D_8014EFC4[0] = size; + gHudElementCacheCapacity = size; } } diff --git a/src/hud_element.h b/src/hud_element.h index 7d08e40fb5..f7cf6c1d65 100644 --- a/src/hud_element.h +++ b/src/hud_element.h @@ -16,7 +16,7 @@ typedef enum { HUD_ELEMENT_OP_SetHidden, HUD_ELEMENT_OP_AddTexelOffsetX, HUD_ELEMENT_OP_AddTexelOffsetY, - HUD_ELEMENT_OP_AddTexelOffset, + HUD_ELEMENT_OP_SetTexelOffset, HUD_ELEMENT_OP_SetImage, HUD_ELEMENT_OP_SetScale, HUD_ELEMENT_OP_SetAlpha, @@ -31,7 +31,7 @@ typedef enum { HUD_ELEMENT_OP_SetFlags, HUD_ELEMENT_OP_ClearFlags, HUD_ELEMENT_OP_PlaySound, - HUD_ELEMENT_OP_op_1B, + HUD_ELEMENT_OP_SetPivot, } HudScript[0]; enum { @@ -62,40 +62,70 @@ enum { HUD_ELEMENT_SIZE_32x24, }; - -typedef union { - struct { - u32 f0: 4; - u32 f4: 4; - } as_bitfields; - u32 as_word; -} HudFlags; +enum HudElementFlags { + HUD_ELEMENT_FLAGS_INITIALIZED = 0x00000001, + HUD_ELEMENT_FLAGS_DISABLED = 0x00000002, + HUD_ELEMENT_FLAGS_ANIMATION_FINISHED = 0x00000004, + HUD_ELEMENT_FLAGS_8 = 0x00000008, + HUD_ELEMENT_FLAGS_SCALED = 0x00000010, + HUD_ELEMENT_FLAGS_TRANSPARENT = 0x00000020, + HUD_ELEMENT_FLAGS_FRONTUI = 0x00000040, + HUD_ELEMENT_FLAGS_80 = 0x00000080, + HUD_ELEMENT_FLAGS_FIXEDSCALE = 0x00000100, + HUD_ELEMENT_FLAGS_200 = 0x00000200, + HUD_ELEMENT_FLAGS_BATTLE = 0x00000400, + HUD_ELEMENT_FLAGS_REPEATED = 0x00000800, + HUD_ELEMENT_FLAGS_FLIPX = 0x00001000, + HUD_ELEMENT_FLAGS_FLIPY = 0x00002000, + HUD_ELEMENT_FLAGS_FMT_CI4 = 0x00004000, + HUD_ELEMENT_FLAGS_8000 = 0x00008000, + HUD_ELEMENT_FLAGS_TRANSFORM = 0x00010000, + HUD_ELEMENT_FLAGS_NO_FOLD = 0x00020000, + HUD_ELEMENT_FLAGS_DELETE = 0x00040000, + HUD_ELEMENT_FLAGS_FMT_IA8 = 0x00080000, + HUD_ELEMENT_FLAGS_CUSTOM_SIZE = 0x00100000, + HUD_ELEMENT_FLAGS_200000 = 0x00200000, + HUD_ELEMENT_FLAGS_MEMOFFSET = 0x00400000, + HUD_ELEMENT_FLAGS_ANTIALIASING = 0x00800000, + HUD_ELEMENT_FLAGS_1000000 = 0x01000000, + HUD_ELEMENT_FLAGS_2000000 = 0x02000000, + HUD_ELEMENT_FLAGS_4000000 = 0x04000000, + HUD_ELEMENT_FLAGS_8000000 = 0x08000000, + HUD_ELEMENT_FLAGS_10000000 = 0x10000000, + HUD_ELEMENT_FLAGS_SHADOW = 0x20000000, + HUD_ELEMENT_FLAGS_40000000 = 0x40000000, + HUD_ELEMENT_FLAGS_80000000 = 0x80000000, +}; typedef struct HudScriptPair { /* 0x00 */ HudScript* enabled; /* 0x04 */ HudScript* disabled; } HudScriptPair; // size = 0x08 +typedef struct VtxRect { + Vtx vtx[4]; +} VtxRect; // size = 0x40 + typedef struct HudTransform { - /* 0x00 */ s32 unk_00; + /* 0x00 */ s32 foldIdx; /* 0x04 */ Vec3f position; /* 0x10 */ Vec3f rotation; /* 0x1C */ Vec3f scale; /* 0x28 */ Vec2s pivot; - /* 0x30 */ char unk_30[0xC4]; + /* 0x30 */ VtxRect unk_30[3]; } HudTransform; // size = 0xF0 typedef struct HudElement { - /* 0x00 */ HudFlags flags; + /* 0x00 */ u32 flags; /* 0x04 */ const HudScript* readPos; /* 0x08 */ const HudScript* anim; - /* 0x0C */ s32* ptrPropertyList; - /* 0x10 */ s32* imageAddr; - /* 0x14 */ s32* paletteAddr; + /* 0x0C */ HudScript* loopStartPos; + /* 0x10 */ u8* imageAddr; + /* 0x14 */ u8* paletteAddr; /* 0x18 */ s32 memOffset; /* 0x1C */ HudTransform* hudTransform; - /* 0x20 */ f32 unk_20; - /* 0x24 */ f32 unk_24; + /* 0x20 */ f32 deltaSizeX; + /* 0x24 */ f32 deltaSizeY; /* 0x28 */ f32 unkImgScale[2]; /* 0x30 */ f32 uniformScale; /* 0x34 */ s32 widthScale; ///< X10 @@ -112,7 +142,7 @@ typedef struct HudElement { /* 0x4A */ u8 opacity; /* 0x4B */ Color_RGB8 tint; /* 0x4E */ Vec2bu customImageSize; - /* 0x40 */ Vec2bu customDrawSize; + /* 0x50 */ Vec2bu customDrawSize; } HudElement; // size = 0x54 typedef HudElement* HudElementList[320]; @@ -128,13 +158,13 @@ extern HudScript HudScript_MenuTimes[]; #define he_Restart HUD_ELEMENT_OP_Restart #define he_Loop HUD_ELEMENT_OP_Loop #define he_SetTileSize(size) HUD_ELEMENT_OP_SetTileSize, size -#define he_SetSizesAutoScale(size1, size2) HUD_ELEMENT_OP_SetSizesAutoScale, size1, size1 -#define he_SetSizesFixedScale(size1, size2) HUD_ELEMENT_OP_SetSizesFixedScale, size2, size2 +#define he_SetSizesAutoScale(size1, size2) HUD_ELEMENT_OP_SetSizesAutoScale, size1, size2 +#define he_SetSizesFixedScale(size1, size2) HUD_ELEMENT_OP_SetSizesFixedScale, size1, size2 #define he_SetVisible HUD_ELEMENT_OP_SetVisible #define he_SetHidden HUD_ELEMENT_OP_SetHidden #define he_AddTexelOffsetX(x) HUD_ELEMENT_OP_AddTexelOffsetX, x #define he_AddTexelOffsetY(y) HUD_ELEMENT_OP_AddTexelOffsetY, y -#define he_AddTexelOffset(x, y) HUD_ELEMENT_OP_AddTexelOffset, x, y +#define he_SetTexelOffset(x, y) HUD_ELEMENT_OP_SetTexelOffset, x, y #define he_SetImage(arg0, raster, palette, arg2, arg3) HUD_ELEMENT_OP_SetImage, arg0, raster, palette, arg2, arg3 #define he_SetScale(scale) HUD_ELEMENT_OP_SetScale, (s32)(scale * 65536.0f) #define he_SetAlpha(alpha) HUD_ELEMENT_OP_SetAlpha, alpha @@ -151,23 +181,13 @@ extern HudScript HudScript_MenuTimes[]; #define he_SetFlags(arg0) HUD_ELEMENT_OP_SetFlags, arg0 #define he_ClearFlags(arg0) HUD_ELEMENT_OP_ClearFlags, arg0 #define he_PlaySound(arg0) HUD_ELEMENT_OP_PlaySound, arg0 -#define he_op_1B(arg0, arg1) HUD_ELEMENT_OP_op_1B, arg0, arg1 +#define he_SetPivot(arg0, arg1) HUD_ELEMENT_OP_SetPivot, arg0, arg1 void load_hud_element(HudElement* hudElement, const HudScript* anim); /// @param clamp 0 = repeat; 1 = clamp /// @param dropShadow Whether to render a drop shadow or not -void draw_rect_hud_element( - HudElement* hudElement, - s32 texSizeX, - s32 texSizeY, - s16 drawSizeX, - s16 drawSizeY, - s16 offsetX, - s16 offsetY, - s32 clamp, - s32 dropShadow -); +void draw_rect_hud_element(HudElement* hudElement, s16 texSizeX, s16 texSizeY, s16 drawSizeX, s16 drawSizeY, s16 offsetX, s16 offsetY, s32 clamp, s32 dropShadow); void clear_hud_element_cache(void); @@ -189,7 +209,7 @@ void render_hud_element(HudElement* hudElement); void render_hud_elements_world(void); -void func_80143C48(s32 arg0, s32 arg1, s32 arg2); +void func_80143C48(s32 arg0, s32 arg1, s32 camID); void func_80144218(s32 arg0); void func_80144238(s32 arg0); void func_80144258(s32 arg0); @@ -225,7 +245,7 @@ void ALT_clear_hud_element_cache(void); void set_hud_element_scale(s32 index, f32 scale); -void set_hud_element_size(s32 id, s8 size); +void set_hud_element_size_preset(s32 id, s8 size); s32 func_80144E4C(s32 id); diff --git a/src/pause/pause_badges.c b/src/pause/pause_badges.c index 94b6e1d4f0..3b20fa6638 100644 --- a/src/pause/pause_badges.c +++ b/src/pause/pause_badges.c @@ -436,13 +436,13 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width if (i == 1) { badgeIconElement = iconIDs[badgeIndex]; - clear_hud_element_flags(badgeIconElement, 0x20000000); - set_hud_element_flags(badgeIconElement, 0x8000); + clear_hud_element_flags(badgeIconElement, HUD_ELEMENT_FLAGS_SHADOW); + set_hud_element_flags(badgeIconElement, HUD_ELEMENT_FLAGS_8000); if (isNone) { badgeIconElement = gPauseBadgesIconIDs[21]; } else { if (isSelected) { - set_hud_element_flags(badgeIconElement, 0x20000000); + set_hud_element_flags(badgeIconElement, HUD_ELEMENT_FLAGS_SHADOW); gPauseCurrentDescIconScript = gItemHudScripts[gItemTable[badgeID].iconID].enabled; } @@ -791,7 +791,7 @@ void pause_badges_init(MenuPanel* panel) { s32 iconID = create_hud_element(gPauseBadgesElements[i]); gPauseBadgesIconIDs[i] = iconID; - set_hud_element_flags(iconID, 0x80); + set_hud_element_flags(iconID, HUD_ELEMENT_FLAGS_80); } for (i = 0; i < ARRAY_COUNT(gPauseBadgesWindowBPs); i++) { diff --git a/src/pause/pause_items.c b/src/pause/pause_items.c index 52b0b3eb82..44fbcd6c53 100644 --- a/src/pause/pause_items.c +++ b/src/pause/pause_items.c @@ -226,13 +226,13 @@ void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, if (i == 1) { itemIcon = iconIDs[totalItemIndex]; - clear_hud_element_flags(itemIcon, 0x20000000); - set_hud_element_flags(itemIcon, 0x8000); + clear_hud_element_flags(itemIcon, HUD_ELEMENT_FLAGS_SHADOW); + set_hud_element_flags(itemIcon, HUD_ELEMENT_FLAGS_8000); if (isNone) { itemIcon = gPauseItemsIconIDs[19]; } else { if (isSelected) { - set_hud_element_flags(itemIcon, 0x20000000); + set_hud_element_flags(itemIcon, HUD_ELEMENT_FLAGS_SHADOW); gPauseCurrentDescIconScript = gItemHudScripts[gItemTable[itemID].iconID].enabled; } @@ -431,7 +431,7 @@ void pause_items_init(MenuPanel* panel) { for (i = 0; i < ARRAY_COUNT(gPauseItemsIconIDs); i++) { gPauseItemsIconIDs[i] = create_hud_element(gPauseItemsElements[i]); - set_hud_element_flags(gPauseItemsIconIDs[i], 0x80); + set_hud_element_flags(gPauseItemsIconIDs[i], HUD_ELEMENT_FLAGS_80); } for (i = 0; i < ARRAY_COUNT(gPauseItemsWindowBPs); i++) { diff --git a/src/pause/pause_main.c b/src/pause/pause_main.c index cea423ae17..ce28b143ff 100644 --- a/src/pause/pause_main.c +++ b/src/pause/pause_main.c @@ -476,8 +476,8 @@ void pause_textbox_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 widt gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); set_hud_element_render_pos(gPauseCommonIconIDs[3], baseX - 4, baseY + 16); set_hud_element_anim(gPauseCommonIconIDs[3], gPauseShownDescIconScript); - set_hud_element_flags(gPauseCommonIconIDs[3], 0x20000000); - clear_hud_element_flags(gPauseCommonIconIDs[3], 0x8000); + set_hud_element_flags(gPauseCommonIconIDs[3], HUD_ELEMENT_FLAGS_SHADOW); + clear_hud_element_flags(gPauseCommonIconIDs[3], HUD_ELEMENT_FLAGS_8000); set_hud_element_scale(gPauseCommonIconIDs[3], 1.0f); draw_hud_element_3(gPauseCommonIconIDs[3]); } @@ -559,7 +559,7 @@ void pause_tutorial_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 wid margin2 = (s32)(width - msgWidth2) >> 1; draw_msg(pause_get_menu_msg(gPauseTutorialDescMessages[state]), baseX + margin2, baseY + 13 + state * 140 - gPauseTutorialScrollPos, 255, 10, 1); set_hud_element_render_pos(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], baseX + width / 2 - 2, baseY + 52); - set_hud_element_flags(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], 0x8000); + set_hud_element_flags(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], HUD_ELEMENT_FLAGS_8000); set_hud_element_scale(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], 0.5f); draw_hud_element_3(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]]); @@ -583,9 +583,9 @@ void pause_init(void) { for (i = 0; i < ARRAY_COUNT(gPauseIconScripts); i++) { gPauseCommonIconIDs[i] = create_hud_element(gPauseIconScripts[i]); if (gPauseIconScripts[i] == HudScript_AnimatedCursorHand) { - set_hud_element_flags(gPauseCommonIconIDs[i], 0x20000080); + set_hud_element_flags(gPauseCommonIconIDs[i], HUD_ELEMENT_FLAGS_SHADOW | HUD_ELEMENT_FLAGS_80); } else { - set_hud_element_flags(gPauseCommonIconIDs[i], 0x80); + set_hud_element_flags(gPauseCommonIconIDs[i], HUD_ELEMENT_FLAGS_80); } } diff --git a/src/pause/pause_map.c b/src/pause/pause_map.c index 84f6a38141..213f5297db 100644 --- a/src/pause/pause_map.c +++ b/src/pause/pause_map.c @@ -386,7 +386,7 @@ void pause_map_init(MenuPanel* tab) { for (i = 0; i < ARRAY_COUNT(gPauseMapIconScripts); i++) { gPauseMapIconIDs[i] = create_hud_element(gPauseMapIconScripts[i]); - set_hud_element_flags(gPauseMapIconIDs[i], 0x80); + set_hud_element_flags(gPauseMapIconIDs[i], HUD_ELEMENT_FLAGS_80); } for (i = 0; i < ARRAY_COUNT(gPauseMapWindowBPs); i++) { diff --git a/src/pause/pause_partners.c b/src/pause/pause_partners.c index dce3e90bb0..3f0a03cc81 100644 --- a/src/pause/pause_partners.c +++ b/src/pause/pause_partners.c @@ -519,7 +519,7 @@ void pause_partners_init(MenuPanel* panel) { for (i = 0; i < ARRAY_COUNT(gPausePartnersIconScripts); i++) { gPausePartnersIconIDs[i] = create_hud_element(gPausePartnersIconScripts[i]); - set_hud_element_flags(gPausePartnersIconIDs[i], 0x80); + set_hud_element_flags(gPausePartnersIconIDs[i], HUD_ELEMENT_FLAGS_80); } for (i = 0; i < ARRAY_COUNT(gPausePartnersWindowBPs); i++) { diff --git a/src/pause/pause_stats.c b/src/pause/pause_stats.c index d4c6bd703d..f3134ef4a0 100644 --- a/src/pause/pause_stats.c +++ b/src/pause/pause_stats.c @@ -101,7 +101,7 @@ void pause_stats_init(MenuPanel* panel) { s32 iconID = create_hud_element(gStatsMenuElements[i]); gPauseStatsIconIDs[i] = iconID; - set_hud_element_flags(iconID, 0x80); + set_hud_element_flags(iconID, HUD_ELEMENT_FLAGS_80); } for (i = 0; i < ARRAY_COUNT(gStatsMenuWindowBPs); i++) { diff --git a/src/pause/pause_tabs.c b/src/pause/pause_tabs.c index f0047a3faa..f6bcec2909 100644 --- a/src/pause/pause_tabs.c +++ b/src/pause/pause_tabs.c @@ -148,10 +148,10 @@ void pause_tabs_draw_invis(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 void pause_tabs_draw_stats(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { if (darkening != 0) { - set_hud_element_flags(gPauseTabsIconIDs[0], 0x20); + set_hud_element_flags(gPauseTabsIconIDs[0], HUD_ELEMENT_FLAGS_TRANSPARENT); set_hud_element_alpha(gPauseTabsIconIDs[0], 255.0 - darkening * 0.5); } else { - clear_hud_element_flags(gPauseTabsIconIDs[0], 0x20); + clear_hud_element_flags(gPauseTabsIconIDs[0], HUD_ELEMENT_FLAGS_TRANSPARENT); set_hud_element_alpha(gPauseTabsIconIDs[0], 255); } @@ -166,10 +166,10 @@ void pause_tabs_draw_stats(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 void pause_tabs_draw_badges(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { if (darkening != 0) { - set_hud_element_flags(gPauseTabsIconIDs[1], 0x20); + set_hud_element_flags(gPauseTabsIconIDs[1], HUD_ELEMENT_FLAGS_TRANSPARENT); set_hud_element_alpha(gPauseTabsIconIDs[1], 255.0 - darkening * 0.5); } else { - clear_hud_element_flags(gPauseTabsIconIDs[1], 0x20); + clear_hud_element_flags(gPauseTabsIconIDs[1], HUD_ELEMENT_FLAGS_TRANSPARENT); set_hud_element_alpha(gPauseTabsIconIDs[1], 255); } @@ -184,10 +184,10 @@ void pause_tabs_draw_badges(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s3 void pause_tabs_draw_items(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { if (darkening != 0) { - set_hud_element_flags(gPauseTabsIconIDs[2], 0x20); + set_hud_element_flags(gPauseTabsIconIDs[2], HUD_ELEMENT_FLAGS_TRANSPARENT); set_hud_element_alpha(gPauseTabsIconIDs[2], 255.0 - darkening * 0.5); } else { - clear_hud_element_flags(gPauseTabsIconIDs[2], 0x20); + clear_hud_element_flags(gPauseTabsIconIDs[2], HUD_ELEMENT_FLAGS_TRANSPARENT); set_hud_element_alpha(gPauseTabsIconIDs[2], 255); } @@ -202,10 +202,10 @@ void pause_tabs_draw_items(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 void pause_tabs_draw_party(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { if (darkening != 0) { - set_hud_element_flags(gPauseTabsIconIDs[3], 0x20); + set_hud_element_flags(gPauseTabsIconIDs[3], HUD_ELEMENT_FLAGS_TRANSPARENT); set_hud_element_alpha(gPauseTabsIconIDs[3], 255.0 - darkening * 0.5); } else { - clear_hud_element_flags(gPauseTabsIconIDs[3], 0x20); + clear_hud_element_flags(gPauseTabsIconIDs[3], HUD_ELEMENT_FLAGS_TRANSPARENT); set_hud_element_alpha(gPauseTabsIconIDs[3], 255); } @@ -220,10 +220,10 @@ void pause_tabs_draw_party(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 void pause_tabs_draw_spirits(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { if (darkening != 0) { - set_hud_element_flags(gPauseTabsIconIDs[4], 0x20); + set_hud_element_flags(gPauseTabsIconIDs[4], HUD_ELEMENT_FLAGS_TRANSPARENT); set_hud_element_alpha(gPauseTabsIconIDs[4], 255.0 - darkening * 0.5); } else { - clear_hud_element_flags(gPauseTabsIconIDs[4], 0x20); + clear_hud_element_flags(gPauseTabsIconIDs[4], HUD_ELEMENT_FLAGS_TRANSPARENT); set_hud_element_alpha(gPauseTabsIconIDs[4], 255); } @@ -238,10 +238,10 @@ void pause_tabs_draw_spirits(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s void pause_tabs_draw_map(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { if (darkening != 0) { - set_hud_element_flags(gPauseTabsIconIDs[5], 0x20); + set_hud_element_flags(gPauseTabsIconIDs[5], HUD_ELEMENT_FLAGS_TRANSPARENT); set_hud_element_alpha(gPauseTabsIconIDs[5], 255.0 - darkening * 0.5); } else { - clear_hud_element_flags(gPauseTabsIconIDs[5], 0x20); + clear_hud_element_flags(gPauseTabsIconIDs[5], HUD_ELEMENT_FLAGS_TRANSPARENT); set_hud_element_alpha(gPauseTabsIconIDs[5], 255); } @@ -259,7 +259,7 @@ void pause_tabs_init(MenuPanel* tab) { for (i = 0; i < ARRAY_COUNT(gPauseTabsHudScripts); i++) { gPauseTabsIconIDs[i] = create_hud_element(gPauseTabsHudScripts[i]); - set_hud_element_flags(gPauseTabsIconIDs[i], 0x80); + set_hud_element_flags(gPauseTabsIconIDs[i], HUD_ELEMENT_FLAGS_80); } for (i = 0; i < ARRAY_COUNT(gPauseTabsWindowBPs); i++) { diff --git a/src/status_icons.c b/src/status_icons.c index 86c646ae5e..a7d80efd2b 100644 --- a/src/status_icons.c +++ b/src/status_icons.c @@ -337,8 +337,8 @@ void update_all_status_icons(PopupMessage* popup) { elementID = icon->status1.activeElementID = create_hud_element(&HudScript_Item_Present); break; } - set_hud_element_flags(elementID, 2); - set_hud_element_flags(elementID, 0x80); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80); icon->status1.activeTask = STATUS_ICON_TASK_DRAW; } @@ -401,8 +401,8 @@ void update_all_status_icons(PopupMessage* popup) { break; } - set_hud_element_flags(elementID, 2); - set_hud_element_flags(elementID, 0x80); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80); icon->status2.activeTask = STATUS_ICON_TASK_DRAW; } @@ -443,8 +443,8 @@ void update_all_status_icons(PopupMessage* popup) { break; } - set_hud_element_flags(elementID, 2); - set_hud_element_flags(elementID, 0x80); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80); icon->status3.activeTask = STATUS_ICON_TASK_DRAW; } @@ -477,8 +477,8 @@ void update_all_status_icons(PopupMessage* popup) { if (icon->status4.activeTask == STATUS_ICON_TASK_LOAD) { elementID = icon->status4.activeElementID = create_hud_element(&HudScript_WeakenedBegin); - set_hud_element_flags(elementID, 2); - set_hud_element_flags(elementID, 0x80); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED); + set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80); icon->status4.activeTask = STATUS_ICON_TASK_DRAW; } @@ -505,7 +505,7 @@ void update_all_status_icons(PopupMessage* popup) { if (icon->boostJump.removing == 1) { s32 index = icon->prevIndexBoostJump; - if (get_hud_element(index)->flags.as_word & 4) { + if (get_hud_element(index)->flags & HUD_ELEMENT_FLAGS_ANIMATION_FINISHED) { free_hud_element(index); icon->boostJump.removing = 0; } @@ -516,7 +516,7 @@ void update_all_status_icons(PopupMessage* popup) { if (icon->boostHammer.removing == 1) { s32 index = icon->prevIndexBoostHammer; - if (get_hud_element(index)->flags.as_word & 4) { + if (get_hud_element(index)->flags & HUD_ELEMENT_FLAGS_ANIMATION_FINISHED) { free_hud_element(index); icon->boostHammer.removing = 0; } @@ -558,9 +558,9 @@ void draw_all_status_icons(PopupMessage* popup) { 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); + set_hud_element_flags(icon->status1.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { - clear_hud_element_flags(icon->status1.activeElementID, 2); + clear_hud_element_flags(icon->status1.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); x = icon->worldPos.x; y = icon->worldPos.y + icon->status1OffsetY; @@ -577,7 +577,7 @@ void draw_all_status_icons(PopupMessage* popup) { } 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); + clear_hud_element_flags(icon->status1.removingElementID, HUD_ELEMENT_FLAGS_DISABLED); if (isActiveDrawn == 0) { iconCounter++; @@ -597,9 +597,9 @@ void draw_all_status_icons(PopupMessage* popup) { 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); + set_hud_element_flags(icon->status2.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { - clear_hud_element_flags(icon->status2.activeElementID, 2); + clear_hud_element_flags(icon->status2.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); offsetY = 0; if (iconCounter == 0) { @@ -622,7 +622,7 @@ void draw_all_status_icons(PopupMessage* popup) { } 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); + clear_hud_element_flags(icon->status2.removingElementID, HUD_ELEMENT_FLAGS_DISABLED); offsetY = 0; if (iconCounter == 0) { @@ -646,9 +646,9 @@ void draw_all_status_icons(PopupMessage* popup) { 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); + set_hud_element_flags(icon->status3.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { - clear_hud_element_flags(icon->status3.activeElementID, 2); + clear_hud_element_flags(icon->status3.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); offsetY = 0; if (iconCounter == 1) { @@ -672,7 +672,7 @@ void draw_all_status_icons(PopupMessage* popup) { } 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); + clear_hud_element_flags(icon->status3.removingElementID, HUD_ELEMENT_FLAGS_DISABLED); offsetY = 0; if (iconCounter == 1) { @@ -699,9 +699,9 @@ void draw_all_status_icons(PopupMessage* popup) { 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); + set_hud_element_flags(icon->status4.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { - clear_hud_element_flags(icon->status4.activeElementID, 2); + clear_hud_element_flags(icon->status4.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); offsetY = 0; if (iconCounter == 2) { @@ -729,7 +729,7 @@ void draw_all_status_icons(PopupMessage* popup) { } 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); + clear_hud_element_flags(icon->status4.removingElementID, HUD_ELEMENT_FLAGS_DISABLED); offsetY = 0; if (iconCounter == 2) { @@ -759,9 +759,9 @@ void draw_all_status_icons(PopupMessage* popup) { do { if (icon->boostJump.active) { if (icon->flags & STATUS_ICON_FLAG_BOOST_JUMP) { - set_hud_element_flags(icon->boostJump.activeElementID, 2); + set_hud_element_flags(icon->boostJump.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { - clear_hud_element_flags(icon->boostJump.activeElementID, 2); + clear_hud_element_flags(icon->boostJump.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); x = icon->worldPos.x; z = icon->worldPos.z; @@ -775,7 +775,7 @@ void draw_all_status_icons(PopupMessage* popup) { } while (0); if (icon->boostJump.removing) { - clear_hud_element_flags(icon->prevIndexBoostJump, 2); + clear_hud_element_flags(icon->prevIndexBoostJump, HUD_ELEMENT_FLAGS_DISABLED); x = icon->worldPos.x; z = icon->worldPos.z; @@ -789,9 +789,9 @@ void draw_all_status_icons(PopupMessage* popup) { do { if (icon->boostHammer.active) { if (icon->flags & STATUS_ICON_FLAG_BOOST_HAMMER) { - set_hud_element_flags(icon->boostHammer.activeElementID, 2); + set_hud_element_flags(icon->boostHammer.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { - clear_hud_element_flags(icon->boostHammer.activeElementID, 2); + clear_hud_element_flags(icon->boostHammer.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); x = icon->worldPos.x; z = icon->worldPos.z; @@ -805,7 +805,7 @@ void draw_all_status_icons(PopupMessage* popup) { } while (0); if (icon->boostHammer.removing) { - clear_hud_element_flags(icon->prevIndexBoostHammer, 2); + clear_hud_element_flags(icon->prevIndexBoostHammer, HUD_ELEMENT_FLAGS_DISABLED); x = icon->worldPos.x; z = icon->worldPos.z; @@ -819,9 +819,9 @@ void draw_all_status_icons(PopupMessage* popup) { do { if (icon->boostPartner.active) { if (icon->flags & STATUS_ICON_FLAG_BOOST_PARTNER) { - set_hud_element_flags(icon->boostPartner.activeElementID, 2); + set_hud_element_flags(icon->boostPartner.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { - clear_hud_element_flags(icon->boostPartner.activeElementID, 2); + clear_hud_element_flags(icon->boostPartner.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); x = icon->worldPos.x; z = icon->worldPos.z; @@ -837,9 +837,9 @@ void draw_all_status_icons(PopupMessage* popup) { do { if (icon->surprise.active) { if (icon->flags & STATUS_ICON_FLAG_SURPRISE) { - set_hud_element_flags(icon->surprise.activeElementID, 2); + set_hud_element_flags(icon->surprise.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { - clear_hud_element_flags(icon->surprise.activeElementID, 2); + clear_hud_element_flags(icon->surprise.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); x = icon->worldPos.x; z = icon->worldPos.z; @@ -855,9 +855,9 @@ void draw_all_status_icons(PopupMessage* popup) { do { if (icon->peril.active) { if (icon->flags & STATUS_ICON_FLAG_PERIL) { - set_hud_element_flags(icon->peril.activeElementID, 2); + set_hud_element_flags(icon->peril.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { - clear_hud_element_flags(icon->peril.activeElementID, 2); + clear_hud_element_flags(icon->peril.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); x = icon->worldPos.x; z = icon->worldPos.z; @@ -873,9 +873,9 @@ void draw_all_status_icons(PopupMessage* popup) { do { if (icon->danger.active) { if (icon->flags & STATUS_ICON_FLAG_DANGER) { - set_hud_element_flags(icon->danger.activeElementID, 2); + set_hud_element_flags(icon->danger.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); } else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) { - clear_hud_element_flags(icon->danger.activeElementID, 2); + clear_hud_element_flags(icon->danger.activeElementID, HUD_ELEMENT_FLAGS_DISABLED); x = icon->worldPos.x; z = icon->worldPos.z; @@ -1113,8 +1113,8 @@ void create_status_icon_boost_jump(s32 iconID) { if (!statusIcon->boostJump.active) { statusIcon->boostJump.active = TRUE; hudElement = create_hud_element(&HudScript_BoostJumpBegin); - set_hud_element_flags(hudElement, 2); - set_hud_element_flags(hudElement, 0x80); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80); statusIcon->boostJump.activeElementID = hudElement; } } @@ -1145,8 +1145,8 @@ void create_status_icon_boost_hammer(s32 iconID) { if (!statusIcon->boostHammer.active) { statusIcon->boostHammer.active = TRUE; hudElement = create_hud_element(&HudScript_BoostHammerBegin); - set_hud_element_flags(hudElement, 2); - set_hud_element_flags(hudElement, 0x80); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80); statusIcon->boostHammer.activeElementID = hudElement; } } @@ -1177,8 +1177,8 @@ void create_status_icon_boost_partner(s32 iconID) { if (!statusIcon->boostPartner.active) { statusIcon->boostPartner.active = TRUE; hudElement = create_hud_element(&HudScript_BoostPartner); - set_hud_element_flags(hudElement, 2); - set_hud_element_flags(hudElement, 0x80); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80); statusIcon->boostPartner.activeElementID = hudElement; } } @@ -1206,8 +1206,8 @@ void create_status_icon_surprise(s32 iconID) { if (!statusIcon->surprise.active) { statusIcon->surprise.active = TRUE; hudElement = create_hud_element(&HudScript_Surprise); - set_hud_element_flags(hudElement, 2); - set_hud_element_flags(hudElement, 0x80); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80); statusIcon->surprise.activeElementID = hudElement; } } @@ -1235,8 +1235,8 @@ void create_status_icon_peril(s32 iconID) { if (!statusIcon->peril.active) { statusIcon->peril.active = TRUE; hudElement = create_hud_element(&HudScript_Peril); - set_hud_element_flags(hudElement, 2); - set_hud_element_flags(hudElement, 0x80); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80); statusIcon->peril.activeElementID = hudElement; } } @@ -1264,8 +1264,8 @@ void create_status_icon_danger(s32 iconID) { if (!statusIcon->danger.active) { statusIcon->danger.active = TRUE; hudElement = create_hud_element(&HudScript_Danger); - set_hud_element_flags(hudElement, 2); - set_hud_element_flags(hudElement, 0x80); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED); + set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80); statusIcon->danger.activeElementID = hudElement; } } diff --git a/src/windows.c b/src/windows.c index b4fb6495ba..5d3d73317a 100644 --- a/src/windows.c +++ b/src/windows.c @@ -357,7 +357,7 @@ void render_window_root(void) { gDPPipelineMode(gMasterGfxPos++, G_PM_NPRIMITIVE); gDPSetCombineMode(gMasterGfxPos++, G_CC_SHADE, G_CC_SHADE); gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE); - gSPSetOtherMode(gMasterGfxPos++, G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 16, 0x2CF0); // WHAT?? does it make several operations at once? + gSPSetOtherMode(gMasterGfxPos++, G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 16, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE); gSPClipRatio(gMasterGfxPos++, FRUSTRATIO_2); gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr)); gDPPipeSync(gMasterGfxPos++); diff --git a/src/world/area_gv/gv_01/E1E460.c b/src/world/area_gv/gv_01/E1E460.c index 3a2ace6cd0..10d3b620eb 100644 --- a/src/world/area_gv/gv_01/E1E460.c +++ b/src/world/area_gv/gv_01/E1E460.c @@ -1,5 +1,6 @@ #include "gv_01.h" #include "sprite.h" +#include "hud_element.h" #include "world/common/SetPlayerStatusAnimFlags100000.inc.c" diff --git a/src/world/script_api/7E0E80.c b/src/world/script_api/7E0E80.c index 2a5625bf7f..aa8a27ee3e 100644 --- a/src/world/script_api/7E0E80.c +++ b/src/world/script_api/7E0E80.c @@ -899,8 +899,8 @@ s32 MakeShop(Evt* script, s32 isInitialCall) { } shop->costIconID = create_hud_element(&HudScript_Item_Coin); - set_hud_element_flags(shop->costIconID, 0x80); - clear_hud_element_flags(shop->costIconID, 0x8000); + set_hud_element_flags(shop->costIconID, HUD_ELEMENT_FLAGS_80); + clear_hud_element_flags(shop->costIconID, HUD_ELEMENT_FLAGS_8000); get_generic_entity(create_generic_entity_frontUI(NULL, draw_shop_items)); set_window_properties(0xA, 100, 66, 120, 28, 0, shop_draw_item_name, NULL, -1); set_window_properties(0xB, 32, 184, 256, 32, 1, shop_draw_item_desc, NULL, -1); diff --git a/tools/disasm_hud_element_animation.py b/tools/disasm_hud_element_animation.py index 38568fdb65..11944b855f 100755 --- a/tools/disasm_hud_element_animation.py +++ b/tools/disasm_hud_element_animation.py @@ -105,7 +105,7 @@ class HudElementScript(): elif op == 0x0B: print(f"{indent}he_AddTexelOffsetY({next(buf)}),") elif op == 0x0C: - print(f"{indent}he_AddTexelOffset({next(buf)}, {next(buf)}),") + print(f"{indent}he_SetTexelOffset({next(buf)}, {next(buf)}),") elif op == 0x0D: print(f"{indent}he_SetImage({next(buf)}, {next(buf)}, {next(buf)}, {next(buf)}, {next(buf)}),") elif op == 0x0E: @@ -137,7 +137,7 @@ class HudElementScript(): elif op == 0x1A: print(f"{indent}he_PlaySound({next(buf)}),") elif op == 0x1B: - print(f"{indent}he_op_1B({next(buf)}),") + print(f"{indent}he_SetPivot({next(buf)}),") else: print(f"{indent}{op},") diff --git a/ver/us/asm/nonmatchings/C50A0/appendGfx_item_entity.s b/ver/us/asm/nonmatchings/C50A0/appendGfx_item_entity.s index 38833920b5..6a5e96ab01 100644 --- a/ver/us/asm/nonmatchings/C50A0/appendGfx_item_entity.s +++ b/ver/us/asm/nonmatchings/C50A0/appendGfx_item_entity.s @@ -285,8 +285,8 @@ glabel appendGfx_item_entity /* C8CD8 801325D8 ADE20000 */ sw $v0, ($t7) /* C8CDC 801325DC 25C20018 */ addiu $v0, $t6, 0x18 /* C8CE0 801325E0 ADE20000 */ sw $v0, ($t7) -/* C8CE4 801325E4 3C028015 */ lui $v0, %hi(D_801512D0) -/* C8CE8 801325E8 8C4212D0 */ lw $v0, %lo(D_801512D0)($v0) +/* C8CE4 801325E4 3C028015 */ lui $v0, %hi(gHudElementCacheTablePalette) +/* C8CE8 801325E8 8C4212D0 */ lw $v0, %lo(gHudElementCacheTablePalette)($v0) /* C8CEC 801325EC 000318C0 */ sll $v1, $v1, 3 /* C8CF0 801325F0 00621821 */ addu $v1, $v1, $v0 /* C8CF4 801325F4 8C630004 */ lw $v1, 4($v1) @@ -355,8 +355,8 @@ glabel appendGfx_item_entity /* C8DF0 801326F0 ADE20000 */ sw $v0, ($t7) /* C8DF4 801326F4 25C20070 */ addiu $v0, $t6, 0x70 /* C8DF8 801326F8 ADE20000 */ sw $v0, ($t7) -/* C8DFC 801326FC 3C028015 */ lui $v0, %hi(D_801512C8) -/* C8E00 80132700 8C4212C8 */ lw $v0, %lo(D_801512C8)($v0) +/* C8DFC 801326FC 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster) +/* C8E00 80132700 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0) /* C8E04 80132704 000318C0 */ sll $v1, $v1, 3 /* C8E08 80132708 00621821 */ addu $v1, $v1, $v0 /* C8E0C 8013270C 8C630004 */ lw $v1, 4($v1) @@ -440,8 +440,8 @@ glabel appendGfx_item_entity /* C8F3C 8013283C ADE20000 */ sw $v0, ($t7) /* C8F40 80132840 25C20058 */ addiu $v0, $t6, 0x58 /* C8F44 80132844 ADE20000 */ sw $v0, ($t7) -/* C8F48 80132848 3C028015 */ lui $v0, %hi(D_801512C8) -/* C8F4C 8013284C 8C4212C8 */ lw $v0, %lo(D_801512C8)($v0) +/* C8F48 80132848 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster) +/* C8F4C 8013284C 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0) /* C8F50 80132850 000318C0 */ sll $v1, $v1, 3 /* C8F54 80132854 00621821 */ addu $v1, $v1, $v0 /* C8F58 80132858 8C630004 */ lw $v1, 4($v1) @@ -494,8 +494,8 @@ glabel appendGfx_item_entity /* C900C 8013290C ADE20000 */ sw $v0, ($t7) /* C9010 80132910 25C20018 */ addiu $v0, $t6, 0x18 /* C9014 80132914 ADE20000 */ sw $v0, ($t7) -/* C9018 80132918 3C028015 */ lui $v0, %hi(D_801512D0) -/* C901C 8013291C 8C4212D0 */ lw $v0, %lo(D_801512D0)($v0) +/* C9018 80132918 3C028015 */ lui $v0, %hi(gHudElementCacheTablePalette) +/* C901C 8013291C 8C4212D0 */ lw $v0, %lo(gHudElementCacheTablePalette)($v0) /* C9020 80132920 000318C0 */ sll $v1, $v1, 3 /* C9024 80132924 00621821 */ addu $v1, $v1, $v0 /* C9028 80132928 8C630004 */ lw $v1, 4($v1) @@ -564,8 +564,8 @@ glabel appendGfx_item_entity /* C9124 80132A24 ADE20000 */ sw $v0, ($t7) /* C9128 80132A28 25C20070 */ addiu $v0, $t6, 0x70 /* C912C 80132A2C ADE20000 */ sw $v0, ($t7) -/* C9130 80132A30 3C028015 */ lui $v0, %hi(D_801512C8) -/* C9134 80132A34 8C4212C8 */ lw $v0, %lo(D_801512C8)($v0) +/* C9130 80132A30 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster) +/* C9134 80132A34 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0) /* C9138 80132A38 000318C0 */ sll $v1, $v1, 3 /* C913C 80132A3C 00621821 */ addu $v1, $v1, $v0 /* C9140 80132A40 8C630004 */ lw $v1, 4($v1) @@ -649,8 +649,8 @@ glabel appendGfx_item_entity /* C9270 80132B70 ADE20000 */ sw $v0, ($t7) /* C9274 80132B74 25C20058 */ addiu $v0, $t6, 0x58 /* C9278 80132B78 ADE20000 */ sw $v0, ($t7) -/* C927C 80132B7C 3C028015 */ lui $v0, %hi(D_801512C8) -/* C9280 80132B80 8C4212C8 */ lw $v0, %lo(D_801512C8)($v0) +/* C927C 80132B7C 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster) +/* C9280 80132B80 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0) /* C9284 80132B84 000318C0 */ sll $v1, $v1, 3 /* C9288 80132B88 00621821 */ addu $v1, $v1, $v0 /* C928C 80132B8C 8C630004 */ lw $v1, 4($v1) diff --git a/ver/us/asm/nonmatchings/C50A0/item_entity_load.s b/ver/us/asm/nonmatchings/C50A0/item_entity_load.s index ea1054ce06..00a79d1e3e 100644 --- a/ver/us/asm/nonmatchings/C50A0/item_entity_load.s +++ b/ver/us/asm/nonmatchings/C50A0/item_entity_load.s @@ -60,8 +60,8 @@ glabel item_entity_load /* C78DC 801311DC 24120120 */ addiu $s2, $zero, 0x120 /* C78E0 801311E0 24120200 */ addiu $s2, $zero, 0x200 .L801311E4: -/* C78E4 801311E4 3C038015 */ lui $v1, %hi(D_801512C8) -/* C78E8 801311E8 8C6312C8 */ lw $v1, %lo(D_801512C8)($v1) +/* C78E4 801311E4 3C038015 */ lui $v1, %hi(gHudElementCacheTableRaster) +/* C78E8 801311E8 8C6312C8 */ lw $v1, %lo(gHudElementCacheTableRaster)($v1) /* C78EC 801311EC 0000882D */ daddu $s1, $zero, $zero /* C78F0 801311F0 0220982D */ daddu $s3, $s1, $zero /* C78F4 801311F4 24650004 */ addiu $a1, $v1, 4 @@ -69,10 +69,10 @@ glabel item_entity_load /* C78F8 801311F8 8C620000 */ lw $v0, ($v1) /* C78FC 801311FC 1457001F */ bne $v0, $s7, .L8013127C /* C7900 80131200 00000000 */ nop -/* C7904 80131204 3C048015 */ lui $a0, %hi(D_8015133C) -/* C7908 80131208 8C84133C */ lw $a0, %lo(D_8015133C)($a0) -/* C790C 8013120C 3C028015 */ lui $v0, %hi(D_80151314) -/* C7910 80131210 8C421314 */ lw $v0, %lo(D_80151314)($v0) +/* C7904 80131204 3C048015 */ lui $a0, %hi(gHudElementCacheSize) +/* C7908 80131208 8C84133C */ lw $a0, %lo(gHudElementCacheSize)($a0) +/* C790C 8013120C 3C028015 */ lui $v0, %hi(gHudElementCacheBuffer) +/* C7910 80131210 8C421314 */ lw $v0, %lo(gHudElementCacheBuffer)($v0) /* C7914 80131214 AC660000 */ sw $a2, ($v1) /* C7918 80131218 8C830000 */ lw $v1, ($a0) /* C791C 8013121C 00431021 */ addu $v0, $v0, $v1 @@ -89,8 +89,8 @@ glabel item_entity_load /* C7940 80131240 8CA50000 */ lw $a1, ($a1) /* C7944 80131244 0C017D24 */ jal nuPiReadRom /* C7948 80131248 0240302D */ daddu $a2, $s2, $zero -/* C794C 8013124C 3C038015 */ lui $v1, %hi(D_8015133C) -/* C7950 80131250 8C63133C */ lw $v1, %lo(D_8015133C)($v1) +/* C794C 8013124C 3C038015 */ lui $v1, %hi(gHudElementCacheSize) +/* C7950 80131250 8C63133C */ lw $v1, %lo(gHudElementCacheSize)($v1) /* C7954 80131254 8C620000 */ lw $v0, ($v1) /* C7958 80131258 00521021 */ addu $v0, $v0, $s2 /* C795C 8013125C AC620000 */ sw $v0, ($v1) @@ -132,18 +132,18 @@ glabel item_entity_load /* C79D4 801312D4 0804C4B5 */ j .L801312D4 /* C79D8 801312D8 00000000 */ nop .L801312DC: -/* C79DC 801312DC 3C038015 */ lui $v1, %hi(D_801512D0) -/* C79E0 801312E0 8C6312D0 */ lw $v1, %lo(D_801512D0)($v1) +/* C79DC 801312DC 3C038015 */ lui $v1, %hi(gHudElementCacheTablePalette) +/* C79E0 801312E0 8C6312D0 */ lw $v1, %lo(gHudElementCacheTablePalette)($v1) /* C79E4 801312E4 0220902D */ daddu $s2, $s1, $zero /* C79E8 801312E8 24650004 */ addiu $a1, $v1, 4 .L801312EC: /* C79EC 801312EC 8C620000 */ lw $v0, ($v1) /* C79F0 801312F0 1457001F */ bne $v0, $s7, .L80131370 /* C79F4 801312F4 00000000 */ nop -/* C79F8 801312F8 3C048015 */ lui $a0, %hi(D_8015133C) -/* C79FC 801312FC 8C84133C */ lw $a0, %lo(D_8015133C)($a0) -/* C7A00 80131300 3C028015 */ lui $v0, %hi(D_80151314) -/* C7A04 80131304 8C421314 */ lw $v0, %lo(D_80151314)($v0) +/* C79F8 801312F8 3C048015 */ lui $a0, %hi(gHudElementCacheSize) +/* C79FC 801312FC 8C84133C */ lw $a0, %lo(gHudElementCacheSize)($a0) +/* C7A00 80131300 3C028015 */ lui $v0, %hi(gHudElementCacheBuffer) +/* C7A04 80131304 8C421314 */ lw $v0, %lo(gHudElementCacheBuffer)($v0) /* C7A08 80131308 AC740000 */ sw $s4, ($v1) /* C7A0C 8013130C 8C830000 */ lw $v1, ($a0) /* C7A10 80131310 00431021 */ addu $v0, $v0, $v1 @@ -160,8 +160,8 @@ glabel item_entity_load /* C7A34 80131334 8CA50000 */ lw $a1, ($a1) /* C7A38 80131338 0C017D24 */ jal nuPiReadRom /* C7A3C 8013133C 24060020 */ addiu $a2, $zero, 0x20 -/* C7A40 80131340 3C038015 */ lui $v1, %hi(D_8015133C) -/* C7A44 80131344 8C63133C */ lw $v1, %lo(D_8015133C)($v1) +/* C7A40 80131340 3C038015 */ lui $v1, %hi(gHudElementCacheSize) +/* C7A44 80131344 8C63133C */ lw $v1, %lo(gHudElementCacheSize)($v1) /* C7A48 80131348 8C620000 */ lw $v0, ($v1) /* C7A4C 8013134C 24420020 */ addiu $v0, $v0, 0x20 /* C7A50 80131350 AC620000 */ sw $v0, ($v1) diff --git a/ver/us/asm/nonmatchings/C50A0/render_item_entities.s b/ver/us/asm/nonmatchings/C50A0/render_item_entities.s index acb528f1e0..603264d183 100644 --- a/ver/us/asm/nonmatchings/C50A0/render_item_entities.s +++ b/ver/us/asm/nonmatchings/C50A0/render_item_entities.s @@ -305,8 +305,8 @@ glabel render_item_entities /* C99D4 801332D4 AE220000 */ sw $v0, ($s1) /* C99D8 801332D8 25A20018 */ addiu $v0, $t5, 0x18 /* C99DC 801332DC AE220000 */ sw $v0, ($s1) -/* C99E0 801332E0 3C028015 */ lui $v0, %hi(D_801512D0) -/* C99E4 801332E4 8C4212D0 */ lw $v0, %lo(D_801512D0)($v0) +/* C99E0 801332E0 3C028015 */ lui $v0, %hi(gHudElementCacheTablePalette) +/* C99E4 801332E4 8C4212D0 */ lw $v0, %lo(gHudElementCacheTablePalette)($v0) /* C99E8 801332E8 000318C0 */ sll $v1, $v1, 3 /* C99EC 801332EC 00621821 */ addu $v1, $v1, $v0 /* C99F0 801332F0 8C630004 */ lw $v1, 4($v1) @@ -371,8 +371,8 @@ glabel render_item_entities /* C9ADC 801333DC 25A20068 */ addiu $v0, $t5, 0x68 /* C9AE0 801333E0 3C0F0808 */ lui $t7, 0x808 /* C9AE4 801333E4 AE220000 */ sw $v0, ($s1) -/* C9AE8 801333E8 3C028015 */ lui $v0, %hi(D_801512C8) -/* C9AEC 801333EC 8C4212C8 */ lw $v0, %lo(D_801512C8)($v0) +/* C9AE8 801333E8 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster) +/* C9AEC 801333EC 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0) /* C9AF0 801333F0 000318C0 */ sll $v1, $v1, 3 /* C9AF4 801333F4 00621821 */ addu $v1, $v1, $v0 /* C9AF8 801333F8 8C630004 */ lw $v1, 4($v1) @@ -456,8 +456,8 @@ glabel render_item_entities /* C9C28 80133528 AE220000 */ sw $v0, ($s1) /* C9C2C 8013352C 25A20058 */ addiu $v0, $t5, 0x58 /* C9C30 80133530 AE220000 */ sw $v0, ($s1) -/* C9C34 80133534 3C028015 */ lui $v0, %hi(D_801512C8) -/* C9C38 80133538 8C4212C8 */ lw $v0, %lo(D_801512C8)($v0) +/* C9C34 80133534 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster) +/* C9C38 80133538 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0) /* C9C3C 8013353C 000318C0 */ sll $v1, $v1, 3 /* C9C40 80133540 00621821 */ addu $v1, $v1, $v0 /* C9C44 80133544 8C630004 */ lw $v1, 4($v1) @@ -504,8 +504,8 @@ glabel render_item_entities /* C9CE0 801335E0 AE220000 */ sw $v0, ($s1) /* C9CE4 801335E4 25A20018 */ addiu $v0, $t5, 0x18 /* C9CE8 801335E8 AE220000 */ sw $v0, ($s1) -/* C9CEC 801335EC 3C028015 */ lui $v0, %hi(D_801512D0) -/* C9CF0 801335F0 8C4212D0 */ lw $v0, %lo(D_801512D0)($v0) +/* C9CEC 801335EC 3C028015 */ lui $v0, %hi(gHudElementCacheTablePalette) +/* C9CF0 801335F0 8C4212D0 */ lw $v0, %lo(gHudElementCacheTablePalette)($v0) /* C9CF4 801335F4 000318C0 */ sll $v1, $v1, 3 /* C9CF8 801335F8 00621821 */ addu $v1, $v1, $v0 /* C9CFC 801335FC 8C630004 */ lw $v1, 4($v1) @@ -570,8 +570,8 @@ glabel render_item_entities /* C9DE8 801336E8 25A20068 */ addiu $v0, $t5, 0x68 /* C9DEC 801336EC 3C190808 */ lui $t9, 0x808 /* C9DF0 801336F0 AE220000 */ sw $v0, ($s1) -/* C9DF4 801336F4 3C028015 */ lui $v0, %hi(D_801512C8) -/* C9DF8 801336F8 8C4212C8 */ lw $v0, %lo(D_801512C8)($v0) +/* C9DF4 801336F4 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster) +/* C9DF8 801336F8 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0) /* C9DFC 801336FC 000318C0 */ sll $v1, $v1, 3 /* C9E00 80133700 00621821 */ addu $v1, $v1, $v0 /* C9E04 80133704 8C630004 */ lw $v1, 4($v1) @@ -655,8 +655,8 @@ glabel render_item_entities /* C9F34 80133834 AE220000 */ sw $v0, ($s1) /* C9F38 80133838 25A20058 */ addiu $v0, $t5, 0x58 /* C9F3C 8013383C AE220000 */ sw $v0, ($s1) -/* C9F40 80133840 3C028015 */ lui $v0, %hi(D_801512C8) -/* C9F44 80133844 8C4212C8 */ lw $v0, %lo(D_801512C8)($v0) +/* C9F40 80133840 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster) +/* C9F44 80133844 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0) /* C9F48 80133848 000318C0 */ sll $v1, $v1, 3 /* C9F4C 8013384C 00621821 */ addu $v1, $v1, $v0 /* C9F50 80133850 8C630004 */ lw $v1, 4($v1) diff --git a/ver/us/asm/nonmatchings/hud_element/ALT_clear_hud_element_cache.s b/ver/us/asm/nonmatchings/hud_element/ALT_clear_hud_element_cache.s deleted file mode 100644 index 5de5c8904e..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/ALT_clear_hud_element_cache.s +++ /dev/null @@ -1,126 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel ALT_clear_hud_element_cache -/* DB15C 80144A5C 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* DB160 80144A60 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* DB164 80144A64 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* DB168 80144A68 AFBF0014 */ sw $ra, 0x14($sp) -/* DB16C 80144A6C AFB00010 */ sw $s0, 0x10($sp) -/* DB170 80144A70 80420070 */ lb $v0, 0x70($v0) -/* DB174 80144A74 14400030 */ bnez $v0, .L80144B38 -/* DB178 80144A78 00000000 */ nop -/* DB17C 80144A7C 3C108015 */ lui $s0, %hi(D_80151314) -/* DB180 80144A80 26101314 */ addiu $s0, $s0, %lo(D_80151314) -/* DB184 80144A84 0C00AB4B */ jal heap_free -/* DB188 80144A88 8E040000 */ lw $a0, ($s0) -/* DB18C 80144A8C 3C048015 */ lui $a0, %hi(D_8014EFC4) -/* DB190 80144A90 0C00AB39 */ jal heap_malloc -/* DB194 80144A94 8C84EFC4 */ lw $a0, %lo(D_8014EFC4)($a0) -/* DB198 80144A98 14400003 */ bnez $v0, .L80144AA8 -/* DB19C 80144A9C AE020000 */ sw $v0, ($s0) -.L80144AA0: -/* DB1A0 80144AA0 080512A8 */ j .L80144AA0 -/* DB1A4 80144AA4 00000000 */ nop -.L80144AA8: -/* DB1A8 80144AA8 0000482D */ daddu $t1, $zero, $zero -/* DB1AC 80144AAC 240AFFFF */ addiu $t2, $zero, -1 -/* DB1B0 80144AB0 3C028015 */ lui $v0, %hi(D_80157F70) -/* DB1B4 80144AB4 24427F70 */ addiu $v0, $v0, %lo(D_80157F70) -/* DB1B8 80144AB8 0040402D */ daddu $t0, $v0, $zero -/* DB1BC 80144ABC 3C028015 */ lui $v0, %hi(D_80157970) -/* DB1C0 80144AC0 24427970 */ addiu $v0, $v0, %lo(D_80157970) -/* DB1C4 80144AC4 0040382D */ daddu $a3, $v0, $zero -/* DB1C8 80144AC8 3C068015 */ lui $a2, %hi(D_80151314) -/* DB1CC 80144ACC 24C61314 */ addiu $a2, $a2, %lo(D_80151314) -/* DB1D0 80144AD0 3C058015 */ lui $a1, %hi(D_8015133C) -/* DB1D4 80144AD4 24A5133C */ addiu $a1, $a1, %lo(D_8015133C) -/* DB1D8 80144AD8 8CC30000 */ lw $v1, ($a2) -/* DB1DC 80144ADC 8CA40000 */ lw $a0, ($a1) -/* DB1E0 80144AE0 3C028015 */ lui $v0, %hi(D_80157964) -/* DB1E4 80144AE4 24427964 */ addiu $v0, $v0, %lo(D_80157964) -/* DB1E8 80144AE8 AC430000 */ sw $v1, ($v0) -/* DB1EC 80144AEC AC800000 */ sw $zero, ($a0) -/* DB1F0 80144AF0 8C430000 */ lw $v1, ($v0) -/* DB1F4 80144AF4 3C028015 */ lui $v0, %hi(D_80157968) -/* DB1F8 80144AF8 24427968 */ addiu $v0, $v0, %lo(D_80157968) -/* DB1FC 80144AFC ACA20000 */ sw $v0, ($a1) -/* DB200 80144B00 3C018015 */ lui $at, %hi(D_801512C8) -/* DB204 80144B04 AC2712C8 */ sw $a3, %lo(D_801512C8)($at) -/* DB208 80144B08 3C018015 */ lui $at, %hi(D_801512D0) -/* DB20C 80144B0C AC2812D0 */ sw $t0, %lo(D_801512D0)($at) -/* DB210 80144B10 ACC30000 */ sw $v1, ($a2) -.L80144B14: -/* DB214 80144B14 ACEA0000 */ sw $t2, ($a3) -/* DB218 80144B18 AD0A0000 */ sw $t2, ($t0) -/* DB21C 80144B1C 25080008 */ addiu $t0, $t0, 8 -/* DB220 80144B20 25290001 */ addiu $t1, $t1, 1 -/* DB224 80144B24 292200C0 */ slti $v0, $t1, 0xc0 -/* DB228 80144B28 1440FFFA */ bnez $v0, .L80144B14 -/* DB22C 80144B2C 24E70008 */ addiu $a3, $a3, 8 -/* DB230 80144B30 08051304 */ j .L80144C10 -/* DB234 80144B34 00000000 */ nop -.L80144B38: -/* DB238 80144B38 3C028015 */ lui $v0, %hi(D_8014EFC0) -/* DB23C 80144B3C 8C42EFC0 */ lw $v0, %lo(D_8014EFC0)($v0) -/* DB240 80144B40 1440000F */ bnez $v0, .L80144B80 -/* DB244 80144B44 00000000 */ nop -/* DB248 80144B48 3C108015 */ lui $s0, %hi(D_80151314) -/* DB24C 80144B4C 26101314 */ addiu $s0, $s0, %lo(D_80151314) -/* DB250 80144B50 0C00AB4B */ jal heap_free -/* DB254 80144B54 8E040000 */ lw $a0, ($s0) -/* DB258 80144B58 3C048015 */ lui $a0, %hi(D_8014EFC4) -/* DB25C 80144B5C 8C84EFC4 */ lw $a0, %lo(D_8014EFC4)($a0) -/* DB260 80144B60 000417C2 */ srl $v0, $a0, 0x1f -/* DB264 80144B64 00822021 */ addu $a0, $a0, $v0 -/* DB268 80144B68 0C00AB39 */ jal heap_malloc -/* DB26C 80144B6C 00042043 */ sra $a0, $a0, 1 -/* DB270 80144B70 14400005 */ bnez $v0, .L80144B88 -/* DB274 80144B74 AE020000 */ sw $v0, ($s0) -.L80144B78: -/* DB278 80144B78 080512DE */ j .L80144B78 -/* DB27C 80144B7C 00000000 */ nop -.L80144B80: -/* DB280 80144B80 3C018015 */ lui $at, %hi(D_80151314) -/* DB284 80144B84 AC221314 */ sw $v0, %lo(D_80151314)($at) -.L80144B88: -/* DB288 80144B88 0000482D */ daddu $t1, $zero, $zero -/* DB28C 80144B8C 240AFFFF */ addiu $t2, $zero, -1 -/* DB290 80144B90 3C028016 */ lui $v0, %hi(D_80158B80) -/* DB294 80144B94 24428B80 */ addiu $v0, $v0, %lo(D_80158B80) -/* DB298 80144B98 0040402D */ daddu $t0, $v0, $zero -/* DB29C 80144B9C 3C028016 */ lui $v0, %hi(D_80158580) -/* DB2A0 80144BA0 24428580 */ addiu $v0, $v0, %lo(D_80158580) -/* DB2A4 80144BA4 0040382D */ daddu $a3, $v0, $zero -/* DB2A8 80144BA8 3C068015 */ lui $a2, %hi(D_80151314) -/* DB2AC 80144BAC 24C61314 */ addiu $a2, $a2, %lo(D_80151314) -/* DB2B0 80144BB0 3C058015 */ lui $a1, %hi(D_8015133C) -/* DB2B4 80144BB4 24A5133C */ addiu $a1, $a1, %lo(D_8015133C) -/* DB2B8 80144BB8 8CC30000 */ lw $v1, ($a2) -/* DB2BC 80144BBC 8CA40000 */ lw $a0, ($a1) -/* DB2C0 80144BC0 3C028016 */ lui $v0, %hi(D_80158570) -/* DB2C4 80144BC4 24428570 */ addiu $v0, $v0, %lo(D_80158570) -/* DB2C8 80144BC8 AC430000 */ sw $v1, ($v0) -/* DB2CC 80144BCC AC800000 */ sw $zero, ($a0) -/* DB2D0 80144BD0 8C430000 */ lw $v1, ($v0) -/* DB2D4 80144BD4 3C028016 */ lui $v0, %hi(D_80158574) -/* DB2D8 80144BD8 24428574 */ addiu $v0, $v0, %lo(D_80158574) -/* DB2DC 80144BDC ACA20000 */ sw $v0, ($a1) -/* DB2E0 80144BE0 3C018015 */ lui $at, %hi(D_801512C8) -/* DB2E4 80144BE4 AC2712C8 */ sw $a3, %lo(D_801512C8)($at) -/* DB2E8 80144BE8 3C018015 */ lui $at, %hi(D_801512D0) -/* DB2EC 80144BEC AC2812D0 */ sw $t0, %lo(D_801512D0)($at) -/* DB2F0 80144BF0 ACC30000 */ sw $v1, ($a2) -.L80144BF4: -/* DB2F4 80144BF4 ACEA0000 */ sw $t2, ($a3) -/* DB2F8 80144BF8 AD0A0000 */ sw $t2, ($t0) -/* DB2FC 80144BFC 25080008 */ addiu $t0, $t0, 8 -/* DB300 80144C00 25290001 */ addiu $t1, $t1, 1 -/* DB304 80144C04 292200C0 */ slti $v0, $t1, 0xc0 -/* DB308 80144C08 1440FFFA */ bnez $v0, .L80144BF4 -/* DB30C 80144C0C 24E70008 */ addiu $a3, $a3, 8 -.L80144C10: -/* DB310 80144C10 8FBF0014 */ lw $ra, 0x14($sp) -/* DB314 80144C14 8FB00010 */ lw $s0, 0x10($sp) -/* DB318 80144C18 03E00008 */ jr $ra -/* DB31C 80144C1C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/hud_element/clear_hud_element_cache.s b/ver/us/asm/nonmatchings/hud_element/clear_hud_element_cache.s deleted file mode 100644 index f76c64bc94..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/clear_hud_element_cache.s +++ /dev/null @@ -1,144 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel clear_hud_element_cache -/* D7800 80141100 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* D7804 80141104 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* D7808 80141108 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D780C 8014110C AFBF0010 */ sw $ra, 0x10($sp) -/* D7810 80141110 80420070 */ lb $v0, 0x70($v0) -/* D7814 80141114 14400011 */ bnez $v0, .L8014115C -/* D7818 80141118 00000000 */ nop -/* D781C 8014111C 3C028015 */ lui $v0, %hi(D_80156F60) -/* D7820 80141120 24426F60 */ addiu $v0, $v0, %lo(D_80156F60) -/* D7824 80141124 3C018015 */ lui $at, %hi(gHudElements) -/* D7828 80141128 AC227960 */ sw $v0, %lo(gHudElements)($at) -/* D782C 8014112C 3C028015 */ lui $v0, %hi(D_80157968) -/* D7830 80141130 24427968 */ addiu $v0, $v0, %lo(D_80157968) -/* D7834 80141134 3C018015 */ lui $at, %hi(D_8015133C) -/* D7838 80141138 AC22133C */ sw $v0, %lo(D_8015133C)($at) -/* D783C 8014113C 3C028015 */ lui $v0, %hi(D_80157970) -/* D7840 80141140 24427970 */ addiu $v0, $v0, %lo(D_80157970) -/* D7844 80141144 3C018015 */ lui $at, %hi(D_801512C8) -/* D7848 80141148 AC2212C8 */ sw $v0, %lo(D_801512C8)($at) -/* D784C 8014114C 3C028015 */ lui $v0, %hi(D_80157F70) -/* D7850 80141150 24427F70 */ addiu $v0, $v0, %lo(D_80157F70) -/* D7854 80141154 08050465 */ j .L80141194 -/* D7858 80141158 00000000 */ nop -.L8014115C: -/* D785C 8014115C 3C028015 */ lui $v0, %hi(D_80157460) -/* D7860 80141160 24427460 */ addiu $v0, $v0, %lo(D_80157460) -/* D7864 80141164 3C018015 */ lui $at, %hi(gHudElements) -/* D7868 80141168 AC227960 */ sw $v0, %lo(gHudElements)($at) -/* D786C 8014116C 3C028016 */ lui $v0, %hi(D_80158574) -/* D7870 80141170 24428574 */ addiu $v0, $v0, %lo(D_80158574) -/* D7874 80141174 3C018015 */ lui $at, %hi(D_8015133C) -/* D7878 80141178 AC22133C */ sw $v0, %lo(D_8015133C)($at) -/* D787C 8014117C 3C028016 */ lui $v0, %hi(D_80158580) -/* D7880 80141180 24428580 */ addiu $v0, $v0, %lo(D_80158580) -/* D7884 80141184 3C018015 */ lui $at, %hi(D_801512C8) -/* D7888 80141188 AC2212C8 */ sw $v0, %lo(D_801512C8)($at) -/* D788C 8014118C 3C028016 */ lui $v0, %hi(D_80158B80) -/* D7890 80141190 24428B80 */ addiu $v0, $v0, %lo(D_80158B80) -.L80141194: -/* D7894 80141194 3C018015 */ lui $at, %hi(D_801512D0) -/* D7898 80141198 AC2212D0 */ sw $v0, %lo(D_801512D0)($at) -/* D789C 8014119C 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* D78A0 801411A0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* D78A4 801411A4 80420070 */ lb $v0, 0x70($v0) -/* D78A8 801411A8 1440001F */ bnez $v0, .L80141228 -/* D78AC 801411AC 00000000 */ nop -/* D78B0 801411B0 3C048015 */ lui $a0, %hi(D_8014EFC4) -/* D78B4 801411B4 0C00AB0A */ jal general_heap_malloc -/* D78B8 801411B8 8C84EFC4 */ lw $a0, %lo(D_8014EFC4)($a0) -/* D78BC 801411BC 3C018015 */ lui $at, %hi(D_80151314) -/* D78C0 801411C0 AC221314 */ sw $v0, %lo(D_80151314)($at) -/* D78C4 801411C4 14400003 */ bnez $v0, .L801411D4 -/* D78C8 801411C8 0000202D */ daddu $a0, $zero, $zero -.L801411CC: -/* D78CC 801411CC 08050473 */ j .L801411CC -/* D78D0 801411D0 00000000 */ nop -.L801411D4: -/* D78D4 801411D4 3C028015 */ lui $v0, %hi(D_80151314) -/* D78D8 801411D8 8C421314 */ lw $v0, %lo(D_80151314)($v0) -/* D78DC 801411DC 3C038015 */ lui $v1, %hi(D_8015133C) -/* D78E0 801411E0 8C63133C */ lw $v1, %lo(D_8015133C)($v1) -/* D78E4 801411E4 2406FFFF */ addiu $a2, $zero, -1 -/* D78E8 801411E8 3C018015 */ lui $at, %hi(D_80157964) -/* D78EC 801411EC AC227964 */ sw $v0, %lo(D_80157964)($at) -/* D78F0 801411F0 AC600000 */ sw $zero, ($v1) -/* D78F4 801411F4 3C058015 */ lui $a1, %hi(D_801512D0) -/* D78F8 801411F8 8CA512D0 */ lw $a1, %lo(D_801512D0)($a1) -/* D78FC 801411FC 3C038015 */ lui $v1, %hi(D_801512C8) -/* D7900 80141200 8C6312C8 */ lw $v1, %lo(D_801512C8)($v1) -.L80141204: -/* D7904 80141204 AC660000 */ sw $a2, ($v1) -/* D7908 80141208 ACA60000 */ sw $a2, ($a1) -/* D790C 8014120C 24A50008 */ addiu $a1, $a1, 8 -/* D7910 80141210 24840001 */ addiu $a0, $a0, 1 -/* D7914 80141214 288200C0 */ slti $v0, $a0, 0xc0 -/* D7918 80141218 1440FFFA */ bnez $v0, .L80141204 -/* D791C 8014121C 24630008 */ addiu $v1, $v1, 8 -/* D7920 80141220 080504AF */ j .L801412BC -/* D7924 80141224 00000000 */ nop -.L80141228: -/* D7928 80141228 3C028015 */ lui $v0, %hi(D_8014EFC0) -/* D792C 8014122C 8C42EFC0 */ lw $v0, %lo(D_8014EFC0)($v0) -/* D7930 80141230 5440000D */ bnel $v0, $zero, .L80141268 -/* D7934 80141234 0000202D */ daddu $a0, $zero, $zero -/* D7938 80141238 3C048015 */ lui $a0, %hi(D_8014EFC4) -/* D793C 8014123C 8C84EFC4 */ lw $a0, %lo(D_8014EFC4)($a0) -/* D7940 80141240 000417C2 */ srl $v0, $a0, 0x1f -/* D7944 80141244 00822021 */ addu $a0, $a0, $v0 -/* D7948 80141248 0C00AB0A */ jal general_heap_malloc -/* D794C 8014124C 00042043 */ sra $a0, $a0, 1 -/* D7950 80141250 3C018015 */ lui $at, %hi(D_80151314) -/* D7954 80141254 AC221314 */ sw $v0, %lo(D_80151314)($at) -/* D7958 80141258 54400005 */ bnel $v0, $zero, .L80141270 -/* D795C 8014125C 0000202D */ daddu $a0, $zero, $zero -.L80141260: -/* D7960 80141260 08050498 */ j .L80141260 -/* D7964 80141264 00000000 */ nop -.L80141268: -/* D7968 80141268 3C018015 */ lui $at, %hi(D_80151314) -/* D796C 8014126C AC221314 */ sw $v0, %lo(D_80151314)($at) -.L80141270: -/* D7970 80141270 3C028015 */ lui $v0, %hi(D_80151314) -/* D7974 80141274 8C421314 */ lw $v0, %lo(D_80151314)($v0) -/* D7978 80141278 3C038015 */ lui $v1, %hi(D_8015133C) -/* D797C 8014127C 8C63133C */ lw $v1, %lo(D_8015133C)($v1) -/* D7980 80141280 2406FFFF */ addiu $a2, $zero, -1 -/* D7984 80141284 3C018016 */ lui $at, %hi(D_80158570) -/* D7988 80141288 AC228570 */ sw $v0, %lo(D_80158570)($at) -/* D798C 8014128C AC600000 */ sw $zero, ($v1) -/* D7990 80141290 3C058015 */ lui $a1, %hi(D_801512D0) -/* D7994 80141294 8CA512D0 */ lw $a1, %lo(D_801512D0)($a1) -/* D7998 80141298 3C038015 */ lui $v1, %hi(D_801512C8) -/* D799C 8014129C 8C6312C8 */ lw $v1, %lo(D_801512C8)($v1) -.L801412A0: -/* D79A0 801412A0 AC660000 */ sw $a2, ($v1) -/* D79A4 801412A4 ACA60000 */ sw $a2, ($a1) -/* D79A8 801412A8 24A50008 */ addiu $a1, $a1, 8 -/* D79AC 801412AC 24840001 */ addiu $a0, $a0, 1 -/* D79B0 801412B0 288200C0 */ slti $v0, $a0, 0xc0 -/* D79B4 801412B4 1440FFFA */ bnez $v0, .L801412A0 -/* D79B8 801412B8 24630008 */ addiu $v1, $v1, 8 -.L801412BC: -/* D79BC 801412BC 3C028015 */ lui $v0, %hi(gHudElements) -/* D79C0 801412C0 8C427960 */ lw $v0, %lo(gHudElements)($v0) -/* D79C4 801412C4 2404013F */ addiu $a0, $zero, 0x13f -/* D79C8 801412C8 244204FC */ addiu $v0, $v0, 0x4fc -.L801412CC: -/* D79CC 801412CC AC400000 */ sw $zero, ($v0) -/* D79D0 801412D0 2484FFFF */ addiu $a0, $a0, -1 -/* D79D4 801412D4 0481FFFD */ bgez $a0, .L801412CC -/* D79D8 801412D8 2442FFFC */ addiu $v0, $v0, -4 -/* D79DC 801412DC 3C018015 */ lui $at, %hi(D_801512B4) -/* D79E0 801412E0 AC2012B4 */ sw $zero, %lo(D_801512B4)($at) -/* D79E4 801412E4 3C018016 */ lui $at, %hi(D_80159180) -/* D79E8 801412E8 AC209180 */ sw $zero, %lo(D_80159180)($at) -/* D79EC 801412EC 0C0504FE */ jal func_801413F8 -/* D79F0 801412F0 00000000 */ nop -/* D79F4 801412F4 8FBF0010 */ lw $ra, 0x10($sp) -/* D79F8 801412F8 03E00008 */ jr $ra -/* D79FC 801412FC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/hud_element/draw_rect_hud_element.s b/ver/us/asm/nonmatchings/hud_element/draw_rect_hud_element.s deleted file mode 100644 index 64b6bf21d3..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/draw_rect_hud_element.s +++ /dev/null @@ -1,1776 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel draw_rect_hud_element -/* D5E04 8013F704 27BDFF48 */ addiu $sp, $sp, -0xb8 -/* D5E08 8013F708 AFB3009C */ sw $s3, 0x9c($sp) -/* D5E0C 8013F70C 0080982D */ daddu $s3, $a0, $zero -/* D5E10 8013F710 AFBE00B0 */ sw $fp, 0xb0($sp) -/* D5E14 8013F714 AFB700AC */ sw $s7, 0xac($sp) -/* D5E18 8013F718 AFB600A8 */ sw $s6, 0xa8($sp) -/* D5E1C 8013F71C AFB500A4 */ sw $s5, 0xa4($sp) -/* D5E20 8013F720 AFB400A0 */ sw $s4, 0xa0($sp) -/* D5E24 8013F724 AFB20098 */ sw $s2, 0x98($sp) -/* D5E28 8013F728 AFB10094 */ sw $s1, 0x94($sp) -/* D5E2C 8013F72C AFB00090 */ sw $s0, 0x90($sp) -/* D5E30 8013F730 82680040 */ lb $t0, 0x40($s3) -/* D5E34 8013F734 8E760034 */ lw $s6, 0x34($s3) -/* D5E38 8013F738 00084280 */ sll $t0, $t0, 0xa -/* D5E3C 8013F73C AFA8008C */ sw $t0, 0x8c($sp) -/* D5E40 8013F740 16C00002 */ bnez $s6, .L8013F74C -/* D5E44 8013F744 0116001A */ div $zero, $t0, $s6 -/* D5E48 8013F748 0007000D */ break 7 -.L8013F74C: -/* D5E4C 8013F74C 2401FFFF */ addiu $at, $zero, -1 -/* D5E50 8013F750 16C10004 */ bne $s6, $at, .L8013F764 -/* D5E54 8013F754 3C018000 */ lui $at, 0x8000 -/* D5E58 8013F758 15010002 */ bne $t0, $at, .L8013F764 -/* D5E5C 8013F75C 00000000 */ nop -/* D5E60 8013F760 0006000D */ break 6 -.L8013F764: -/* D5E64 8013F764 00004012 */ mflo $t0 -/* D5E68 8013F768 AFB6000C */ sw $s6, 0xc($sp) -/* D5E6C 8013F76C AFA8008C */ sw $t0, 0x8c($sp) -/* D5E70 8013F770 82690041 */ lb $t1, 0x41($s3) -/* D5E74 8013F774 8E760038 */ lw $s6, 0x38($s3) -/* D5E78 8013F778 00094A80 */ sll $t1, $t1, 0xa -/* D5E7C 8013F77C 16C00002 */ bnez $s6, .L8013F788 -/* D5E80 8013F780 0136001A */ div $zero, $t1, $s6 -/* D5E84 8013F784 0007000D */ break 7 -.L8013F788: -/* D5E88 8013F788 2401FFFF */ addiu $at, $zero, -1 -/* D5E8C 8013F78C 16C10004 */ bne $s6, $at, .L8013F7A0 -/* D5E90 8013F790 3C018000 */ lui $at, 0x8000 -/* D5E94 8013F794 15210002 */ bne $t1, $at, .L8013F7A0 -/* D5E98 8013F798 00000000 */ nop -/* D5E9C 8013F79C 0006000D */ break 6 -.L8013F7A0: -/* D5EA0 8013F7A0 00004812 */ mflo $t1 -/* D5EA4 8013F7A4 00A0782D */ daddu $t7, $a1, $zero -/* D5EA8 8013F7A8 00C0702D */ daddu $t6, $a2, $zero -/* D5EAC 8013F7AC 97AB00CA */ lhu $t3, 0xca($sp) -/* D5EB0 8013F7B0 00E0602D */ daddu $t4, $a3, $zero -/* D5EB4 8013F7B4 AFB60010 */ sw $s6, 0x10($sp) -/* D5EB8 8013F7B8 92620042 */ lbu $v0, 0x42($s3) -/* D5EBC 8013F7BC 92640043 */ lbu $a0, 0x43($s3) -/* D5EC0 8013F7C0 9663003C */ lhu $v1, 0x3c($s3) -/* D5EC4 8013F7C4 8E700010 */ lw $s0, 0x10($s3) -/* D5EC8 8013F7C8 8FB600D8 */ lw $s6, 0xd8($sp) -/* D5ECC 8013F7CC 00021600 */ sll $v0, $v0, 0x18 -/* D5ED0 8013F7D0 00021603 */ sra $v0, $v0, 0x18 -/* D5ED4 8013F7D4 00042600 */ sll $a0, $a0, 0x18 -/* D5ED8 8013F7D8 00042603 */ sra $a0, $a0, 0x18 -/* D5EDC 8013F7DC 00681821 */ addu $v1, $v1, $t0 -/* D5EE0 8013F7E0 00431021 */ addu $v0, $v0, $v1 -/* D5EE4 8013F7E4 8FA800CC */ lw $t0, 0xcc($sp) -/* D5EE8 8013F7E8 8FA300D0 */ lw $v1, 0xd0($sp) -/* D5EEC 8013F7EC 01028821 */ addu $s1, $t0, $v0 -/* D5EF0 8013F7F0 9662003E */ lhu $v0, 0x3e($s3) -/* D5EF4 8013F7F4 0220682D */ daddu $t5, $s1, $zero -/* D5EF8 8013F7F8 00491021 */ addu $v0, $v0, $t1 -/* D5EFC 8013F7FC 00822021 */ addu $a0, $a0, $v0 -/* D5F00 8013F800 00641821 */ addu $v1, $v1, $a0 -/* D5F04 8013F804 8E690014 */ lw $t1, 0x14($s3) -/* D5F08 8013F808 12C00003 */ beqz $s6, .L8013F818 -/* D5F0C 8013F80C 0060502D */ daddu $t2, $v1, $zero -/* D5F10 8013F810 262D0002 */ addiu $t5, $s1, 2 -/* D5F14 8013F814 246A0002 */ addiu $t2, $v1, 2 -.L8013F818: -/* D5F18 8013F818 8E630000 */ lw $v1, ($s3) -/* D5F1C 8013F81C AFA00008 */ sw $zero, 8($sp) -/* D5F20 8013F820 30624000 */ andi $v0, $v1, 0x4000 -/* D5F24 8013F824 0002202B */ sltu $a0, $zero, $v0 -/* D5F28 8013F828 3C020008 */ lui $v0, 8 -/* D5F2C 8013F82C 00621024 */ and $v0, $v1, $v0 -/* D5F30 8013F830 0002282B */ sltu $a1, $zero, $v0 -/* D5F34 8013F834 30621000 */ andi $v0, $v1, 0x1000 -/* D5F38 8013F838 0002102B */ sltu $v0, $zero, $v0 -/* D5F3C 8013F83C 30632000 */ andi $v1, $v1, 0x2000 -/* D5F40 8013F840 0003182B */ sltu $v1, $zero, $v1 -/* D5F44 8013F844 AFA20000 */ sw $v0, ($sp) -/* D5F48 8013F848 24020001 */ addiu $v0, $zero, 1 -/* D5F4C 8013F84C 14820003 */ bne $a0, $v0, .L8013F85C -/* D5F50 8013F850 AFA30004 */ sw $v1, 4($sp) -/* D5F54 8013F854 00A2402B */ sltu $t0, $a1, $v0 -/* D5F58 8013F858 AFA80008 */ sw $t0, 8($sp) -.L8013F85C: -/* D5F5C 8013F85C 54800005 */ bnel $a0, $zero, .L8013F874 -/* D5F60 8013F860 24020001 */ addiu $v0, $zero, 1 -/* D5F64 8013F864 14A20003 */ bne $a1, $v0, .L8013F874 -/* D5F68 8013F868 24020001 */ addiu $v0, $zero, 1 -/* D5F6C 8013F86C 24160002 */ addiu $s6, $zero, 2 -/* D5F70 8013F870 AFB60008 */ sw $s6, 8($sp) -.L8013F874: -/* D5F74 8013F874 14820006 */ bne $a0, $v0, .L8013F890 -/* D5F78 8013F878 24160006 */ addiu $s6, $zero, 6 -/* D5F7C 8013F87C 54A40005 */ bnel $a1, $a0, .L8013F894 -/* D5F80 8013F880 AFB60034 */ sw $s6, 0x34($sp) -/* D5F84 8013F884 24080002 */ addiu $t0, $zero, 2 -/* D5F88 8013F888 AFA80008 */ sw $t0, 8($sp) -/* D5F8C 8013F88C 24160006 */ addiu $s6, $zero, 6 -.L8013F890: -/* D5F90 8013F890 AFB60034 */ sw $s6, 0x34($sp) -.L8013F894: -/* D5F94 8013F894 8E620000 */ lw $v0, ($s3) -/* D5F98 8013F898 24080005 */ addiu $t0, $zero, 5 -/* D5F9C 8013F89C 30420010 */ andi $v0, $v0, 0x10 -/* D5FA0 8013F8A0 1440002C */ bnez $v0, .L8013F954 -/* D5FA4 8013F8A4 AFA80038 */ sw $t0, 0x38($sp) -/* D5FA8 8013F8A8 000C1400 */ sll $v0, $t4, 0x10 -/* D5FAC 8013F8AC 00021C03 */ sra $v1, $v0, 0x10 -/* D5FB0 8013F8B0 24020010 */ addiu $v0, $zero, 0x10 -/* D5FB4 8013F8B4 1062000E */ beq $v1, $v0, .L8013F8F0 -/* D5FB8 8013F8B8 28620011 */ slti $v0, $v1, 0x11 -/* D5FBC 8013F8BC 10400005 */ beqz $v0, .L8013F8D4 -/* D5FC0 8013F8C0 24020008 */ addiu $v0, $zero, 8 -/* D5FC4 8013F8C4 10620008 */ beq $v1, $v0, .L8013F8E8 -/* D5FC8 8013F8C8 000B1400 */ sll $v0, $t3, 0x10 -/* D5FCC 8013F8CC 0804FE43 */ j .L8013F90C -/* D5FD0 8013F8D0 00021C03 */ sra $v1, $v0, 0x10 -.L8013F8D4: -/* D5FD4 8013F8D4 24020020 */ addiu $v0, $zero, 0x20 -/* D5FD8 8013F8D8 10620008 */ beq $v1, $v0, .L8013F8FC -/* D5FDC 8013F8DC 000B1400 */ sll $v0, $t3, 0x10 -/* D5FE0 8013F8E0 0804FE43 */ j .L8013F90C -/* D5FE4 8013F8E4 00021C03 */ sra $v1, $v0, 0x10 -.L8013F8E8: -/* D5FE8 8013F8E8 0804FE40 */ j .L8013F900 -/* D5FEC 8013F8EC 24160003 */ addiu $s6, $zero, 3 -.L8013F8F0: -/* D5FF0 8013F8F0 24080004 */ addiu $t0, $zero, 4 -/* D5FF4 8013F8F4 0804FE41 */ j .L8013F904 -/* D5FF8 8013F8F8 AFA80034 */ sw $t0, 0x34($sp) -.L8013F8FC: -/* D5FFC 8013F8FC 24160005 */ addiu $s6, $zero, 5 -.L8013F900: -/* D6000 8013F900 AFB60034 */ sw $s6, 0x34($sp) -.L8013F904: -/* D6004 8013F904 000B1400 */ sll $v0, $t3, 0x10 -/* D6008 8013F908 00021C03 */ sra $v1, $v0, 0x10 -.L8013F90C: -/* D600C 8013F90C 24020010 */ addiu $v0, $zero, 0x10 -/* D6010 8013F910 1062000C */ beq $v1, $v0, .L8013F944 -/* D6014 8013F914 28620011 */ slti $v0, $v1, 0x11 -/* D6018 8013F918 10400005 */ beqz $v0, .L8013F930 -/* D601C 8013F91C 24020008 */ addiu $v0, $zero, 8 -/* D6020 8013F920 1062000B */ beq $v1, $v0, .L8013F950 -/* D6024 8013F924 24080003 */ addiu $t0, $zero, 3 -/* D6028 8013F928 0804FE55 */ j .L8013F954 -/* D602C 8013F92C 00000000 */ nop -.L8013F930: -/* D6030 8013F930 24020020 */ addiu $v0, $zero, 0x20 -/* D6034 8013F934 10620006 */ beq $v1, $v0, .L8013F950 -/* D6038 8013F938 24080005 */ addiu $t0, $zero, 5 -/* D603C 8013F93C 0804FE55 */ j .L8013F954 -/* D6040 8013F940 00000000 */ nop -.L8013F944: -/* D6044 8013F944 24160004 */ addiu $s6, $zero, 4 -/* D6048 8013F948 0804FE55 */ j .L8013F954 -/* D604C 8013F94C AFB60038 */ sw $s6, 0x38($sp) -.L8013F950: -/* D6050 8013F950 AFA80038 */ sw $t0, 0x38($sp) -.L8013F954: -/* D6054 8013F954 8FB60008 */ lw $s6, 8($sp) -/* D6058 8013F958 24020001 */ addiu $v0, $zero, 1 -/* D605C 8013F95C 12C2000C */ beq $s6, $v0, .L8013F990 -/* D6060 8013F960 2AC20002 */ slti $v0, $s6, 2 -/* D6064 8013F964 10400005 */ beqz $v0, .L8013F97C -/* D6068 8013F968 24020002 */ addiu $v0, $zero, 2 -/* D606C 8013F96C 12C00060 */ beqz $s6, .L8013FAF0 -/* D6070 8013F970 3C06E200 */ lui $a2, 0xe200 -/* D6074 8013F974 0804FECD */ j .L8013FB34 -/* D6078 8013F978 00000000 */ nop -.L8013F97C: -/* D607C 8013F97C 8FA80008 */ lw $t0, 8($sp) -/* D6080 8013F980 1102005B */ beq $t0, $v0, .L8013FAF0 -/* D6084 8013F984 3C06E200 */ lui $a2, 0xe200 -/* D6088 8013F988 0804FECD */ j .L8013FB34 -/* D608C 8013F98C 00000000 */ nop -.L8013F990: -/* D6090 8013F990 8E630000 */ lw $v1, ($s3) -/* D6094 8013F994 30620020 */ andi $v0, $v1, 0x20 -/* D6098 8013F998 14400012 */ bnez $v0, .L8013F9E4 -/* D609C 8013F99C 3C020080 */ lui $v0, 0x80 -/* D60A0 8013F9A0 00621024 */ and $v0, $v1, $v0 -/* D60A4 8013F9A4 14400008 */ bnez $v0, .L8013F9C8 -/* D60A8 8013F9A8 3C06E200 */ lui $a2, 0xe200 -/* D60AC 8013F9AC 34C6001C */ ori $a2, $a2, 0x1c -/* D60B0 8013F9B0 3C050F0A */ lui $a1, 0xf0a -/* D60B4 8013F9B4 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* D60B8 8013F9B8 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* D60BC 8013F9BC 8C820000 */ lw $v0, ($a0) -/* D60C0 8013F9C0 0804FE89 */ j .L8013FA24 -/* D60C4 8013F9C4 34A57008 */ ori $a1, $a1, 0x7008 -.L8013F9C8: -/* D60C8 8013F9C8 34C6001C */ ori $a2, $a2, 0x1c -/* D60CC 8013F9CC 3C050055 */ lui $a1, 0x55 -/* D60D0 8013F9D0 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* D60D4 8013F9D4 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* D60D8 8013F9D8 8C820000 */ lw $v0, ($a0) -/* D60DC 8013F9DC 0804FE89 */ j .L8013FA24 -/* D60E0 8013F9E0 34A53048 */ ori $a1, $a1, 0x3048 -.L8013F9E4: -/* D60E4 8013F9E4 00621024 */ and $v0, $v1, $v0 -/* D60E8 8013F9E8 14400008 */ bnez $v0, .L8013FA0C -/* D60EC 8013F9EC 3C06E200 */ lui $a2, 0xe200 -/* D60F0 8013F9F0 34C6001C */ ori $a2, $a2, 0x1c -/* D60F4 8013F9F4 3C050050 */ lui $a1, 0x50 -/* D60F8 8013F9F8 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* D60FC 8013F9FC 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* D6100 8013FA00 8C820000 */ lw $v0, ($a0) -/* D6104 8013FA04 0804FE89 */ j .L8013FA24 -/* D6108 8013FA08 34A54340 */ ori $a1, $a1, 0x4340 -.L8013FA0C: -/* D610C 8013FA0C 34C6001C */ ori $a2, $a2, 0x1c -/* D6110 8013FA10 3C050050 */ lui $a1, 0x50 -/* D6114 8013FA14 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* D6118 8013FA18 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* D611C 8013FA1C 8C820000 */ lw $v0, ($a0) -/* D6120 8013FA20 34A54348 */ ori $a1, $a1, 0x4348 -.L8013FA24: -/* D6124 8013FA24 0040182D */ daddu $v1, $v0, $zero -/* D6128 8013FA28 24420008 */ addiu $v0, $v0, 8 -/* D612C 8013FA2C AC820000 */ sw $v0, ($a0) -/* D6130 8013FA30 AC660000 */ sw $a2, ($v1) -/* D6134 8013FA34 AC650004 */ sw $a1, 4($v1) -/* D6138 8013FA38 3C03E300 */ lui $v1, 0xe300 -/* D613C 8013FA3C 34631001 */ ori $v1, $v1, 0x1001 -/* D6140 8013FA40 3C06F500 */ lui $a2, 0xf500 -/* D6144 8013FA44 34C60100 */ ori $a2, $a2, 0x100 -/* D6148 8013FA48 3C070703 */ lui $a3, 0x703 -/* D614C 8013FA4C 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* D6150 8013FA50 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* D6154 8013FA54 8C820000 */ lw $v0, ($a0) -/* D6158 8013FA58 34E7C000 */ ori $a3, $a3, 0xc000 -/* D615C 8013FA5C 0040282D */ daddu $a1, $v0, $zero -/* D6160 8013FA60 24420008 */ addiu $v0, $v0, 8 -/* D6164 8013FA64 AC820000 */ sw $v0, ($a0) -/* D6168 8013FA68 ACA30000 */ sw $v1, ($a1) -/* D616C 8013FA6C 34038000 */ ori $v1, $zero, 0x8000 -/* D6170 8013FA70 ACA30004 */ sw $v1, 4($a1) -/* D6174 8013FA74 24430008 */ addiu $v1, $v0, 8 -/* D6178 8013FA78 AC830000 */ sw $v1, ($a0) -/* D617C 8013FA7C 3C03FD10 */ lui $v1, 0xfd10 -/* D6180 8013FA80 AC430000 */ sw $v1, ($v0) -/* D6184 8013FA84 24430010 */ addiu $v1, $v0, 0x10 -/* D6188 8013FA88 AC490004 */ sw $t1, 4($v0) -/* D618C 8013FA8C AC830000 */ sw $v1, ($a0) -/* D6190 8013FA90 3C03E800 */ lui $v1, 0xe800 -/* D6194 8013FA94 AC430008 */ sw $v1, 8($v0) -/* D6198 8013FA98 24430018 */ addiu $v1, $v0, 0x18 -/* D619C 8013FA9C AC40000C */ sw $zero, 0xc($v0) -/* D61A0 8013FAA0 AC830000 */ sw $v1, ($a0) -/* D61A4 8013FAA4 3C030700 */ lui $v1, 0x700 -/* D61A8 8013FAA8 AC430014 */ sw $v1, 0x14($v0) -/* D61AC 8013FAAC 24430020 */ addiu $v1, $v0, 0x20 -/* D61B0 8013FAB0 AC460010 */ sw $a2, 0x10($v0) -/* D61B4 8013FAB4 AC830000 */ sw $v1, ($a0) -/* D61B8 8013FAB8 3C03E600 */ lui $v1, 0xe600 -/* D61BC 8013FABC AC430018 */ sw $v1, 0x18($v0) -/* D61C0 8013FAC0 24430028 */ addiu $v1, $v0, 0x28 -/* D61C4 8013FAC4 AC40001C */ sw $zero, 0x1c($v0) -/* D61C8 8013FAC8 AC830000 */ sw $v1, ($a0) -/* D61CC 8013FACC 3C03F000 */ lui $v1, 0xf000 -/* D61D0 8013FAD0 AC430020 */ sw $v1, 0x20($v0) -/* D61D4 8013FAD4 24430030 */ addiu $v1, $v0, 0x30 -/* D61D8 8013FAD8 AC470024 */ sw $a3, 0x24($v0) -/* D61DC 8013FADC AC830000 */ sw $v1, ($a0) -/* D61E0 8013FAE0 3C03E700 */ lui $v1, 0xe700 -/* D61E4 8013FAE4 AC430028 */ sw $v1, 0x28($v0) -/* D61E8 8013FAE8 0804FECD */ j .L8013FB34 -/* D61EC 8013FAEC AC40002C */ sw $zero, 0x2c($v0) -.L8013FAF0: -/* D61F0 8013FAF0 34C6001C */ ori $a2, $a2, 0x1c -/* D61F4 8013FAF4 3C050050 */ lui $a1, 0x50 -/* D61F8 8013FAF8 34A54240 */ ori $a1, $a1, 0x4240 -/* D61FC 8013FAFC 3C07E300 */ lui $a3, 0xe300 -/* D6200 8013FB00 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* D6204 8013FB04 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* D6208 8013FB08 8C820000 */ lw $v0, ($a0) -/* D620C 8013FB0C 34E71001 */ ori $a3, $a3, 0x1001 -/* D6210 8013FB10 0040182D */ daddu $v1, $v0, $zero -/* D6214 8013FB14 24420008 */ addiu $v0, $v0, 8 -/* D6218 8013FB18 AC820000 */ sw $v0, ($a0) -/* D621C 8013FB1C AC660000 */ sw $a2, ($v1) -/* D6220 8013FB20 AC650004 */ sw $a1, 4($v1) -/* D6224 8013FB24 24430008 */ addiu $v1, $v0, 8 -/* D6228 8013FB28 AC830000 */ sw $v1, ($a0) -/* D622C 8013FB2C AC470000 */ sw $a3, ($v0) -/* D6230 8013FB30 AC400004 */ sw $zero, 4($v0) -.L8013FB34: -/* D6234 8013FB34 8E620000 */ lw $v0, ($s3) -/* D6238 8013FB38 30428000 */ andi $v0, $v0, 0x8000 -/* D623C 8013FB3C 1040000C */ beqz $v0, .L8013FB70 -/* D6240 8013FB40 3C05E300 */ lui $a1, 0xe300 -/* D6244 8013FB44 3C03800A */ lui $v1, %hi(gMasterGfxPos) -/* D6248 8013FB48 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos) -/* D624C 8013FB4C 8C620000 */ lw $v0, ($v1) -/* D6250 8013FB50 34A51201 */ ori $a1, $a1, 0x1201 -/* D6254 8013FB54 0040202D */ daddu $a0, $v0, $zero -/* D6258 8013FB58 24420008 */ addiu $v0, $v0, 8 -/* D625C 8013FB5C AC620000 */ sw $v0, ($v1) -/* D6260 8013FB60 24023000 */ addiu $v0, $zero, 0x3000 -/* D6264 8013FB64 AC850000 */ sw $a1, ($a0) -/* D6268 8013FB68 0804FEE5 */ j .L8013FB94 -/* D626C 8013FB6C AC820004 */ sw $v0, 4($a0) -.L8013FB70: -/* D6270 8013FB70 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* D6274 8013FB74 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* D6278 8013FB78 8C820000 */ lw $v0, ($a0) -/* D627C 8013FB7C 34A51201 */ ori $a1, $a1, 0x1201 -/* D6280 8013FB80 0040182D */ daddu $v1, $v0, $zero -/* D6284 8013FB84 24420008 */ addiu $v0, $v0, 8 -/* D6288 8013FB88 AC820000 */ sw $v0, ($a0) -/* D628C 8013FB8C AC650000 */ sw $a1, ($v1) -/* D6290 8013FB90 AC600004 */ sw $zero, 4($v1) -.L8013FB94: -/* D6294 8013FB94 000A1400 */ sll $v0, $t2, 0x10 -/* D6298 8013FB98 00021403 */ sra $v0, $v0, 0x10 -/* D629C 8013FB9C 0040B02D */ daddu $s6, $v0, $zero -/* D62A0 8013FBA0 000E7400 */ sll $t6, $t6, 0x10 -/* D62A4 8013FBA4 000E4403 */ sra $t0, $t6, 0x10 -/* D62A8 8013FBA8 AFB60040 */ sw $s6, 0x40($sp) -/* D62AC 8013FBAC 29160011 */ slti $s6, $t0, 0x11 -/* D62B0 8013FBB0 AFA20028 */ sw $v0, 0x28($sp) -/* D62B4 8013FBB4 000B1400 */ sll $v0, $t3, 0x10 -/* D62B8 8013FBB8 00021403 */ sra $v0, $v0, 0x10 -/* D62BC 8013FBBC 3C014090 */ lui $at, 0x4090 -/* D62C0 8013FBC0 44812800 */ mtc1 $at, $f5 -/* D62C4 8013FBC4 44802000 */ mtc1 $zero, $f4 -/* D62C8 8013FBC8 000D6C00 */ sll $t5, $t5, 0x10 -/* D62CC 8013FBCC AFB60048 */ sw $s6, 0x48($sp) -/* D62D0 8013FBD0 000DB403 */ sra $s6, $t5, 0x10 -/* D62D4 8013FBD4 AFA80044 */ sw $t0, 0x44($sp) -/* D62D8 8013FBD8 8FA80028 */ lw $t0, 0x28($sp) -/* D62DC 8013FBDC 000F7C00 */ sll $t7, $t7, 0x10 -/* D62E0 8013FBE0 AFA00024 */ sw $zero, 0x24($sp) -/* D62E4 8013FBE4 AFA00020 */ sw $zero, 0x20($sp) -/* D62E8 8013FBE8 AFAE003C */ sw $t6, 0x3c($sp) -/* D62EC 8013FBEC AFA2004C */ sw $v0, 0x4c($sp) -/* D62F0 8013FBF0 AFAD0054 */ sw $t5, 0x54($sp) -/* D62F4 8013FBF4 AFB6005C */ sw $s6, 0x5c($sp) -/* D62F8 8013FBF8 AFAF0058 */ sw $t7, 0x58($sp) -/* D62FC 8013FBFC 01024021 */ addu $t0, $t0, $v0 -/* D6300 8013FC00 AFA80050 */ sw $t0, 0x50($sp) -/* D6304 8013FC04 000F4403 */ sra $t0, $t7, 0x10 -/* D6308 8013FC08 29160011 */ slti $s6, $t0, 0x11 -/* D630C 8013FC0C 000C1400 */ sll $v0, $t4, 0x10 -/* D6310 8013FC10 00021403 */ sra $v0, $v0, 0x10 -/* D6314 8013FC14 AFA80060 */ sw $t0, 0x60($sp) -/* D6318 8013FC18 AFB60064 */ sw $s6, 0x64($sp) -/* D631C 8013FC1C AFA20068 */ sw $v0, 0x68($sp) -.L8013FC20: -/* D6320 8013FC20 C7A00010 */ lwc1 $f0, 0x10($sp) -/* D6324 8013FC24 46800021 */ cvt.d.w $f0, $f0 -/* D6328 8013FC28 3C014040 */ lui $at, 0x4040 -/* D632C 8013FC2C 44811800 */ mtc1 $at, $f3 -/* D6330 8013FC30 44801000 */ mtc1 $zero, $f2 -/* D6334 8013FC34 46202003 */ div.d $f0, $f4, $f0 -/* D6338 8013FC38 46220002 */ mul.d $f0, $f0, $f2 -/* D633C 8013FC3C 00000000 */ nop -/* D6340 8013FC40 8FA80024 */ lw $t0, 0x24($sp) -/* D6344 8013FC44 8FB60004 */ lw $s6, 4($sp) -/* D6348 8013FC48 C7A20028 */ lwc1 $f2, 0x28($sp) -/* D634C 8013FC4C 468010A1 */ cvt.d.w $f2, $f2 -/* D6350 8013FC50 46201080 */ add.d $f2, $f2, $f0 -/* D6354 8013FC54 AFA00018 */ sw $zero, 0x18($sp) -/* D6358 8013FC58 2505001F */ addiu $a1, $t0, 0x1f -/* D635C 8013FC5C 4620118D */ trunc.w.d $f6, $f2 -/* D6360 8013FC60 12C00004 */ beqz $s6, .L8013FC74 -/* D6364 8013FC64 E7A6002C */ swc1 $f6, 0x2c($sp) -/* D6368 8013FC68 8FA8003C */ lw $t0, 0x3c($sp) -/* D636C 8013FC6C 00084403 */ sra $t0, $t0, 0x10 -/* D6370 8013FC70 AFA80018 */ sw $t0, 0x18($sp) -.L8013FC74: -/* D6374 8013FC74 8FB6002C */ lw $s6, 0x2c($sp) -/* D6378 8013FC78 06C0050D */ bltz $s6, .L801410B0 -/* D637C 8013FC7C 00000000 */ nop -/* D6380 8013FC80 8FA80028 */ lw $t0, 0x28($sp) -/* D6384 8013FC84 290200F1 */ slti $v0, $t0, 0xf1 -/* D6388 8013FC88 10400509 */ beqz $v0, .L801410B0 -/* D638C 8013FC8C 2AC200F0 */ slti $v0, $s6, 0xf0 -/* D6390 8013FC90 1440000B */ bnez $v0, .L8013FCC0 -/* D6394 8013FC94 00000000 */ nop -/* D6398 8013FC98 8FB60024 */ lw $s6, 0x24($sp) -/* D639C 8013FC9C 26C2010F */ addiu $v0, $s6, 0x10f -/* D63A0 8013FCA0 8FA80040 */ lw $t0, 0x40($sp) -/* D63A4 8013FCA4 241600F0 */ addiu $s6, $zero, 0xf0 -/* D63A8 8013FCA8 AFB6002C */ sw $s6, 0x2c($sp) -/* D63AC 8013FCAC 01051821 */ addu $v1, $t0, $a1 -/* D63B0 8013FCB0 00431023 */ subu $v0, $v0, $v1 -/* D63B4 8013FCB4 2445FFFF */ addiu $a1, $v0, -1 -/* D63B8 8013FCB8 24080001 */ addiu $t0, $zero, 1 -/* D63BC 8013FCBC AFA80020 */ sw $t0, 0x20($sp) -.L8013FCC0: -/* D63C0 8013FCC0 8FB60044 */ lw $s6, 0x44($sp) -/* D63C4 8013FCC4 24A20001 */ addiu $v0, $a1, 1 -/* D63C8 8013FCC8 0056102A */ slt $v0, $v0, $s6 -/* D63CC 8013FCCC 1440000F */ bnez $v0, .L8013FD0C -/* D63D0 8013FCD0 0000602D */ daddu $t4, $zero, $zero -/* D63D4 8013FCD4 8FA80048 */ lw $t0, 0x48($sp) -/* D63D8 8013FCD8 15000005 */ bnez $t0, .L8013FCF0 -/* D63DC 8013FCDC 26C5FFFF */ addiu $a1, $s6, -1 -/* D63E0 8013FCE0 8FB60050 */ lw $s6, 0x50($sp) -/* D63E4 8013FCE4 26D6FFFF */ addiu $s6, $s6, -1 -/* D63E8 8013FCE8 0804FF40 */ j .L8013FD00 -/* D63EC 8013FCEC AFB6002C */ sw $s6, 0x2c($sp) -.L8013FCF0: -/* D63F0 8013FCF0 8FA80040 */ lw $t0, 0x40($sp) -/* D63F4 8013FCF4 8FB6004C */ lw $s6, 0x4c($sp) -/* D63F8 8013FCF8 01164021 */ addu $t0, $t0, $s6 -/* D63FC 8013FCFC AFA8002C */ sw $t0, 0x2c($sp) -.L8013FD00: -/* D6400 8013FD00 24080001 */ addiu $t0, $zero, 1 -/* D6404 8013FD04 AFA80020 */ sw $t0, 0x20($sp) -/* D6408 8013FD08 0000602D */ daddu $t4, $zero, $zero -.L8013FD0C: -/* D640C 8013FD0C 3C0A800A */ lui $t2, %hi(gMasterGfxPos) -/* D6410 8013FD10 254AA66C */ addiu $t2, $t2, %lo(gMasterGfxPos) -/* D6414 8013FD14 3C17E700 */ lui $s7, 0xe700 -/* D6418 8013FD18 3C040700 */ lui $a0, 0x700 -/* D641C 8013FD1C 3C1EE600 */ lui $fp, 0xe600 -/* D6420 8013FD20 8FB60054 */ lw $s6, 0x54($sp) -/* D6424 8013FD24 8FA8005C */ lw $t0, 0x5c($sp) -/* D6428 8013FD28 0016B403 */ sra $s6, $s6, 0x10 -/* D642C 8013FD2C AFB60030 */ sw $s6, 0x30($sp) -/* D6430 8013FD30 8FB60068 */ lw $s6, 0x68($sp) -/* D6434 8013FD34 0180682D */ daddu $t5, $t4, $zero -/* D6438 8013FD38 AFA0001C */ sw $zero, 0x1c($sp) -/* D643C 8013FD3C AFA00080 */ sw $zero, 0x80($sp) -/* D6440 8013FD40 01164021 */ addu $t0, $t0, $s6 -/* D6444 8013FD44 AFA8006C */ sw $t0, 0x6c($sp) -/* D6448 8013FD48 8FA80060 */ lw $t0, 0x60($sp) -/* D644C 8013FD4C 8FB60038 */ lw $s6, 0x38($sp) -/* D6450 8013FD50 2502FFFF */ addiu $v0, $t0, -1 -/* D6454 8013FD54 0016AB80 */ sll $s5, $s6, 0xe -/* D6458 8013FD58 8FA80034 */ lw $t0, 0x34($sp) -/* D645C 8013FD5C 8FB60024 */ lw $s6, 0x24($sp) -/* D6460 8013FD60 30420FFF */ andi $v0, $v0, 0xfff -/* D6464 8013FD64 AFA20070 */ sw $v0, 0x70($sp) -/* D6468 8013FD68 0008A100 */ sll $s4, $t0, 4 -/* D646C 8013FD6C 02841025 */ or $v0, $s4, $a0 -/* D6470 8013FD70 02A29025 */ or $s2, $s5, $v0 -/* D6474 8013FD74 00161880 */ sll $v1, $s6, 2 -/* D6478 8013FD78 30630FFF */ andi $v1, $v1, 0xfff -/* D647C 8013FD7C 3C02F400 */ lui $v0, 0xf400 -/* D6480 8013FD80 0062C825 */ or $t9, $v1, $v0 -/* D6484 8013FD84 00051080 */ sll $v0, $a1, 2 -/* D6488 8013FD88 304E0FFF */ andi $t6, $v0, 0xfff -/* D648C 8013FD8C 01C4C025 */ or $t8, $t6, $a0 -/* D6490 8013FD90 02B48825 */ or $s1, $s5, $s4 -/* D6494 8013FD94 3C02F200 */ lui $v0, %hi(D_F1FFFFFF) -/* D6498 8013FD98 00627825 */ or $t7, $v1, $v0 -/* D649C 8013FD9C 8FA80058 */ lw $t0, 0x58($sp) -/* D64A0 8013FDA0 8FB60028 */ lw $s6, 0x28($sp) -/* D64A4 8013FDA4 00081443 */ sra $v0, $t0, 0x11 -/* D64A8 8013FDA8 2442FFFF */ addiu $v0, $v0, %lo(D_F1FFFFFF) -/* D64AC 8013FDAC 30420FFF */ andi $v0, $v0, 0xfff -/* D64B0 8013FDB0 AFA20074 */ sw $v0, 0x74($sp) -/* D64B4 8013FDB4 00161480 */ sll $v0, $s6, 0x12 -/* D64B8 8013FDB8 00021403 */ sra $v0, $v0, 0x10 -/* D64BC 8013FDBC 30480FFF */ andi $t0, $v0, 0xfff -/* D64C0 8013FDC0 AFA20078 */ sw $v0, 0x78($sp) -/* D64C4 8013FDC4 AFA8007C */ sw $t0, 0x7c($sp) -.L8013FDC8: -/* D64C8 8013FDC8 C7A0000C */ lwc1 $f0, 0xc($sp) -/* D64CC 8013FDCC 46800021 */ cvt.d.w $f0, $f0 -/* D64D0 8013FDD0 3C014050 */ lui $at, 0x4050 -/* D64D4 8013FDD4 44811800 */ mtc1 $at, $f3 -/* D64D8 8013FDD8 44801000 */ mtc1 $zero, $f2 -/* D64DC 8013FDDC 46202003 */ div.d $f0, $f4, $f0 -/* D64E0 8013FDE0 46220002 */ mul.d $f0, $f0, $f2 -/* D64E4 8013FDE4 00000000 */ nop -/* D64E8 8013FDE8 8FB60000 */ lw $s6, ($sp) -/* D64EC 8013FDEC C7A20030 */ lwc1 $f2, 0x30($sp) -/* D64F0 8013FDF0 468010A1 */ cvt.d.w $f2, $f2 -/* D64F4 8013FDF4 46201080 */ add.d $f2, $f2, $f0 -/* D64F8 8013FDF8 AFA00014 */ sw $zero, 0x14($sp) -/* D64FC 8013FDFC 4620118D */ trunc.w.d $f6, $f2 -/* D6500 8013FE00 E7A60088 */ swc1 $f6, 0x88($sp) -/* D6504 8013FE04 12C00004 */ beqz $s6, .L8013FE18 -/* D6508 8013FE08 258B003F */ addiu $t3, $t4, 0x3f -/* D650C 8013FE0C 8FA80058 */ lw $t0, 0x58($sp) -/* D6510 8013FE10 00084403 */ sra $t0, $t0, 0x10 -/* D6514 8013FE14 AFA80014 */ sw $t0, 0x14($sp) -.L8013FE18: -/* D6518 8013FE18 8FB60088 */ lw $s6, 0x88($sp) -/* D651C 8013FE1C 06C00490 */ bltz $s6, .L80141060 -/* D6520 8013FE20 00000000 */ nop -/* D6524 8013FE24 8FA80030 */ lw $t0, 0x30($sp) -/* D6528 8013FE28 29020141 */ slti $v0, $t0, 0x141 -/* D652C 8013FE2C 1040048C */ beqz $v0, .L80141060 -/* D6530 8013FE30 2AC20140 */ slti $v0, $s6, 0x140 -/* D6534 8013FE34 14400009 */ bnez $v0, .L8013FE5C -/* D6538 8013FE38 2582017F */ addiu $v0, $t4, 0x17f -/* D653C 8013FE3C 8FB6005C */ lw $s6, 0x5c($sp) -/* D6540 8013FE40 24080140 */ addiu $t0, $zero, 0x140 -/* D6544 8013FE44 AFA80088 */ sw $t0, 0x88($sp) -/* D6548 8013FE48 02CB1821 */ addu $v1, $s6, $t3 -/* D654C 8013FE4C 00431023 */ subu $v0, $v0, $v1 -/* D6550 8013FE50 244BFFFF */ addiu $t3, $v0, -1 -/* D6554 8013FE54 24160001 */ addiu $s6, $zero, 1 -/* D6558 8013FE58 AFB6001C */ sw $s6, 0x1c($sp) -.L8013FE5C: -/* D655C 8013FE5C 8FA80060 */ lw $t0, 0x60($sp) -/* D6560 8013FE60 25620001 */ addiu $v0, $t3, 1 -/* D6564 8013FE64 0048102A */ slt $v0, $v0, $t0 -/* D6568 8013FE68 1440000E */ bnez $v0, .L8013FEA4 -/* D656C 8013FE6C 00000000 */ nop -/* D6570 8013FE70 8FB60064 */ lw $s6, 0x64($sp) -/* D6574 8013FE74 16C00005 */ bnez $s6, .L8013FE8C -/* D6578 8013FE78 250BFFFF */ addiu $t3, $t0, -1 -/* D657C 8013FE7C 8FA8006C */ lw $t0, 0x6c($sp) -/* D6580 8013FE80 2508FFFF */ addiu $t0, $t0, -1 -/* D6584 8013FE84 0804FFA7 */ j .L8013FE9C -/* D6588 8013FE88 AFA80088 */ sw $t0, 0x88($sp) -.L8013FE8C: -/* D658C 8013FE8C 8FB6005C */ lw $s6, 0x5c($sp) -/* D6590 8013FE90 8FA80068 */ lw $t0, 0x68($sp) -/* D6594 8013FE94 02C8B021 */ addu $s6, $s6, $t0 -/* D6598 8013FE98 AFB60088 */ sw $s6, 0x88($sp) -.L8013FE9C: -/* D659C 8013FE9C 24160001 */ addiu $s6, $zero, 1 -/* D65A0 8013FEA0 AFB6001C */ sw $s6, 0x1c($sp) -.L8013FEA4: -/* D65A4 8013FEA4 8D420000 */ lw $v0, ($t2) -/* D65A8 8013FEA8 0040182D */ daddu $v1, $v0, $zero -/* D65AC 8013FEAC 24420008 */ addiu $v0, $v0, 8 -/* D65B0 8013FEB0 AD420000 */ sw $v0, ($t2) -/* D65B4 8013FEB4 AC770000 */ sw $s7, ($v1) -/* D65B8 8013FEB8 AC600004 */ sw $zero, 4($v1) -/* D65BC 8013FEBC 8FA8001C */ lw $t0, 0x1c($sp) -/* D65C0 8013FEC0 11000004 */ beqz $t0, .L8013FED4 -/* D65C4 8013FEC4 00000000 */ nop -/* D65C8 8013FEC8 8FB60020 */ lw $s6, 0x20($sp) -/* D65CC 8013FECC 0804FFBC */ j .L8013FEF0 -/* D65D0 8013FED0 2EC90001 */ sltiu $t1, $s6, 1 -.L8013FED4: -/* D65D4 8013FED4 8FA80020 */ lw $t0, 0x20($sp) -/* D65D8 8013FED8 15000007 */ bnez $t0, .L8013FEF8 -/* D65DC 8013FEDC 24090002 */ addiu $t1, $zero, 2 -/* D65E0 8013FEE0 11000005 */ beqz $t0, .L8013FEF8 -/* D65E4 8013FEE4 0000482D */ daddu $t1, $zero, $zero -/* D65E8 8013FEE8 0804FFBE */ j .L8013FEF8 -/* D65EC 8013FEEC 24090002 */ addiu $t1, $zero, 2 -.L8013FEF0: -/* D65F0 8013FEF0 56C00001 */ bnel $s6, $zero, .L8013FEF8 -/* D65F4 8013FEF4 24090003 */ addiu $t1, $zero, 3 -.L8013FEF8: -/* D65F8 8013FEF8 8FA80008 */ lw $t0, 8($sp) -/* D65FC 8013FEFC 24160001 */ addiu $s6, $zero, 1 -/* D6600 8013FF00 1116007C */ beq $t0, $s6, .L801400F4 -/* D6604 8013FF04 29020002 */ slti $v0, $t0, 2 -/* D6608 8013FF08 10400005 */ beqz $v0, .L8013FF20 -/* D660C 8013FF0C 24020002 */ addiu $v0, $zero, 2 -/* D6610 8013FF10 11000007 */ beqz $t0, .L8013FF30 -/* D6614 8013FF14 3C04FCFF */ lui $a0, 0xfcff -/* D6618 8013FF18 0805032C */ j .L80140CB0 -/* D661C 8013FF1C 00000000 */ nop -.L8013FF20: -/* D6620 8013FF20 11020211 */ beq $t0, $v0, .L80140768 -/* D6624 8013FF24 3C04FC11 */ lui $a0, 0xfc11 -/* D6628 8013FF28 0805032C */ j .L80140CB0 -/* D662C 8013FF2C 00000000 */ nop -.L8013FF30: -/* D6630 8013FF30 3484FFFF */ ori $a0, $a0, 0xffff -/* D6634 8013FF34 3C03FFFC */ lui $v1, 0xfffc -/* D6638 8013FF38 8D450000 */ lw $a1, ($t2) -/* D663C 8013FF3C 3463F279 */ ori $v1, $v1, 0xf279 -/* D6640 8013FF40 00A0102D */ daddu $v0, $a1, $zero -/* D6644 8013FF44 AC440000 */ sw $a0, ($v0) -/* D6648 8013FF48 AC430004 */ sw $v1, 4($v0) -/* D664C 8013FF4C 8E620000 */ lw $v0, ($s3) -/* D6650 8013FF50 24A50008 */ addiu $a1, $a1, 8 -/* D6654 8013FF54 30420020 */ andi $v0, $v0, 0x20 -/* D6658 8013FF58 10400005 */ beqz $v0, .L8013FF70 -/* D665C 8013FF5C AD450000 */ sw $a1, ($t2) -/* D6660 8013FF60 3C04FCFF */ lui $a0, 0xfcff -/* D6664 8013FF64 3484B3FF */ ori $a0, $a0, 0xb3ff -/* D6668 8013FF68 3C03FF2C */ lui $v1, 0xff2c -/* D666C 8013FF6C 3463FE7F */ ori $v1, $v1, 0xfe7f -.L8013FF70: -/* D6670 8013FF70 24A20008 */ addiu $v0, $a1, 8 -/* D6674 8013FF74 AD420000 */ sw $v0, ($t2) -/* D6678 8013FF78 ACA40000 */ sw $a0, ($a1) -/* D667C 8013FF7C ACA30004 */ sw $v1, 4($a1) -/* D6680 8013FF80 8E620000 */ lw $v0, ($s3) -/* D6684 8013FF84 30420020 */ andi $v0, $v0, 0x20 -/* D6688 8013FF88 10400008 */ beqz $v0, .L8013FFAC -/* D668C 8013FF8C 3C16FA00 */ lui $s6, 0xfa00 -/* D6690 8013FF90 8D420000 */ lw $v0, ($t2) -/* D6694 8013FF94 0040182D */ daddu $v1, $v0, $zero -/* D6698 8013FF98 24420008 */ addiu $v0, $v0, 8 -/* D669C 8013FF9C AD420000 */ sw $v0, ($t2) -/* D66A0 8013FFA0 AC760000 */ sw $s6, ($v1) -/* D66A4 8013FFA4 9262004A */ lbu $v0, 0x4a($s3) -/* D66A8 8013FFA8 AC620004 */ sw $v0, 4($v1) -.L8013FFAC: -/* D66AC 8013FFAC 8FA80000 */ lw $t0, ($sp) -/* D66B0 8013FFB0 15000034 */ bnez $t0, .L80140084 -/* D66B4 8013FFB4 3C050704 */ lui $a1, 0x704 -/* D66B8 8013FFB8 8FB60004 */ lw $s6, 4($sp) -/* D66BC 8013FFBC 16C00032 */ bnez $s6, .L80140088 -/* D66C0 8013FFC0 34A50100 */ ori $a1, $a1, 0x100 -/* D66C4 8013FFC4 3C02FD18 */ lui $v0, 0xfd18 -/* D66C8 8013FFC8 31A60FFF */ andi $a2, $t5, 0xfff -/* D66CC 8013FFCC 00063300 */ sll $a2, $a2, 0xc -/* D66D0 8013FFD0 000B2880 */ sll $a1, $t3, 2 -/* D66D4 8013FFD4 8D430000 */ lw $v1, ($t2) -/* D66D8 8013FFD8 30A50FFF */ andi $a1, $a1, 0xfff -/* D66DC 8013FFDC 0060202D */ daddu $a0, $v1, $zero -/* D66E0 8013FFE0 24630008 */ addiu $v1, $v1, 8 -/* D66E4 8013FFE4 AD430000 */ sw $v1, ($t2) -/* D66E8 8013FFE8 8FA80070 */ lw $t0, 0x70($sp) -/* D66EC 8013FFEC 00052B00 */ sll $a1, $a1, 0xc -/* D66F0 8013FFF0 AC900004 */ sw $s0, 4($a0) -/* D66F4 8013FFF4 01021025 */ or $v0, $t0, $v0 -/* D66F8 8013FFF8 AC820000 */ sw $v0, ($a0) -/* D66FC 8013FFFC 24620008 */ addiu $v0, $v1, 8 -/* D6700 80140000 016C2023 */ subu $a0, $t3, $t4 -/* D6704 80140004 00042040 */ sll $a0, $a0, 1 -/* D6708 80140008 24840009 */ addiu $a0, $a0, 9 -/* D670C 8014000C 000420C3 */ sra $a0, $a0, 3 -/* D6710 80140010 308401FF */ andi $a0, $a0, 0x1ff -/* D6714 80140014 00042240 */ sll $a0, $a0, 9 -/* D6718 80140018 AD420000 */ sw $v0, ($t2) -/* D671C 8014001C 3C02F518 */ lui $v0, 0xf518 -/* D6720 80140020 00822025 */ or $a0, $a0, $v0 -/* D6724 80140024 24620010 */ addiu $v0, $v1, 0x10 -/* D6728 80140028 AC640000 */ sw $a0, ($v1) -/* D672C 8014002C AC720004 */ sw $s2, 4($v1) -/* D6730 80140030 AD420000 */ sw $v0, ($t2) -/* D6734 80140034 24620018 */ addiu $v0, $v1, 0x18 -/* D6738 80140038 AC7E0008 */ sw $fp, 8($v1) -/* D673C 8014003C AC60000C */ sw $zero, 0xc($v1) -/* D6740 80140040 AD420000 */ sw $v0, ($t2) -/* D6744 80140044 00D91025 */ or $v0, $a2, $t9 -/* D6748 80140048 AC620010 */ sw $v0, 0x10($v1) -/* D674C 8014004C 00B81025 */ or $v0, $a1, $t8 -/* D6750 80140050 AC620014 */ sw $v0, 0x14($v1) -/* D6754 80140054 24620020 */ addiu $v0, $v1, 0x20 -/* D6758 80140058 AD420000 */ sw $v0, ($t2) -/* D675C 8014005C 24620028 */ addiu $v0, $v1, 0x28 -/* D6760 80140060 AC770018 */ sw $s7, 0x18($v1) -/* D6764 80140064 AC60001C */ sw $zero, 0x1c($v1) -/* D6768 80140068 AD420000 */ sw $v0, ($t2) -/* D676C 8014006C 24620030 */ addiu $v0, $v1, 0x30 -/* D6770 80140070 00CF3025 */ or $a2, $a2, $t7 -/* D6774 80140074 00AE2825 */ or $a1, $a1, $t6 -/* D6778 80140078 AC640020 */ sw $a0, 0x20($v1) -/* D677C 8014007C 08050329 */ j .L80140CA4 -/* D6780 80140080 AC710024 */ sw $s1, 0x24($v1) -.L80140084: -/* D6784 80140084 34A50100 */ ori $a1, $a1, 0x100 -.L80140088: -/* D6788 80140088 3C070004 */ lui $a3, 4 -/* D678C 8014008C 34E70100 */ ori $a3, $a3, 0x100 -/* D6790 80140090 3C02FD18 */ lui $v0, 0xfd18 -/* D6794 80140094 02852825 */ or $a1, $s4, $a1 -/* D6798 80140098 02A52825 */ or $a1, $s5, $a1 -/* D679C 8014009C 31A60FFF */ andi $a2, $t5, 0xfff -/* D67A0 801400A0 00063300 */ sll $a2, $a2, 0xc -/* D67A4 801400A4 8D430000 */ lw $v1, ($t2) -/* D67A8 801400A8 02873825 */ or $a3, $s4, $a3 -/* D67AC 801400AC 0060202D */ daddu $a0, $v1, $zero -/* D67B0 801400B0 24630008 */ addiu $v1, $v1, 8 -/* D67B4 801400B4 AD430000 */ sw $v1, ($t2) -/* D67B8 801400B8 8FB60070 */ lw $s6, 0x70($sp) -/* D67BC 801400BC 02A73825 */ or $a3, $s5, $a3 -/* D67C0 801400C0 AC900004 */ sw $s0, 4($a0) -/* D67C4 801400C4 02C21025 */ or $v0, $s6, $v0 -/* D67C8 801400C8 AC820000 */ sw $v0, ($a0) -/* D67CC 801400CC 24620008 */ addiu $v0, $v1, 8 -/* D67D0 801400D0 016C2023 */ subu $a0, $t3, $t4 -/* D67D4 801400D4 00042040 */ sll $a0, $a0, 1 -/* D67D8 801400D8 24840009 */ addiu $a0, $a0, 9 -/* D67DC 801400DC 000420C3 */ sra $a0, $a0, 3 -/* D67E0 801400E0 308401FF */ andi $a0, $a0, 0x1ff -/* D67E4 801400E4 00042240 */ sll $a0, $a0, 9 -/* D67E8 801400E8 AD420000 */ sw $v0, ($t2) -/* D67EC 801400EC 0805030E */ j .L80140C38 -/* D67F0 801400F0 3C02F518 */ lui $v0, 0xf518 -.L801400F4: -/* D67F4 801400F4 8FA800D8 */ lw $t0, 0xd8($sp) -/* D67F8 801400F8 15000031 */ bnez $t0, .L801401C0 -/* D67FC 801400FC 3C06E200 */ lui $a2, 0xe200 -/* D6800 80140100 3C05FC30 */ lui $a1, 0xfc30 -/* D6804 80140104 34A5B261 */ ori $a1, $a1, 0xb261 -/* D6808 80140108 3C04FF2F */ lui $a0, 0xff2f -/* D680C 8014010C 8D420000 */ lw $v0, ($t2) -/* D6810 80140110 3484FFFF */ ori $a0, $a0, 0xffff -/* D6814 80140114 0040182D */ daddu $v1, $v0, $zero -/* D6818 80140118 24420008 */ addiu $v0, $v0, 8 -/* D681C 8014011C AD420000 */ sw $v0, ($t2) -/* D6820 80140120 AC650000 */ sw $a1, ($v1) -/* D6824 80140124 AC640004 */ sw $a0, 4($v1) -/* D6828 80140128 8E620000 */ lw $v0, ($s3) -/* D682C 8014012C 30420020 */ andi $v0, $v0, 0x20 -/* D6830 80140130 10400012 */ beqz $v0, .L8014017C -/* D6834 80140134 3C16FA00 */ lui $s6, 0xfa00 -/* D6838 80140138 8D420000 */ lw $v0, ($t2) -/* D683C 8014013C 0040282D */ daddu $a1, $v0, $zero -/* D6840 80140140 24420008 */ addiu $v0, $v0, 8 -/* D6844 80140144 AD420000 */ sw $v0, ($t2) -/* D6848 80140148 ACB60000 */ sw $s6, ($a1) -/* D684C 8014014C 9262004B */ lbu $v0, 0x4b($s3) -/* D6850 80140150 9263004C */ lbu $v1, 0x4c($s3) -/* D6854 80140154 9264004D */ lbu $a0, 0x4d($s3) -/* D6858 80140158 00021600 */ sll $v0, $v0, 0x18 -/* D685C 8014015C 00031C00 */ sll $v1, $v1, 0x10 -/* D6860 80140160 00431025 */ or $v0, $v0, $v1 -/* D6864 80140164 00042200 */ sll $a0, $a0, 8 -/* D6868 80140168 9263004A */ lbu $v1, 0x4a($s3) -/* D686C 8014016C 00441025 */ or $v0, $v0, $a0 -/* D6870 80140170 00431025 */ or $v0, $v0, $v1 -/* D6874 80140174 08050088 */ j .L80140220 -/* D6878 80140178 ACA20004 */ sw $v0, 4($a1) -.L8014017C: -/* D687C 8014017C 8D420000 */ lw $v0, ($t2) -/* D6880 80140180 0040282D */ daddu $a1, $v0, $zero -/* D6884 80140184 24420008 */ addiu $v0, $v0, 8 -/* D6888 80140188 3C08FA00 */ lui $t0, 0xfa00 -/* D688C 8014018C AD420000 */ sw $v0, ($t2) -/* D6890 80140190 ACA80000 */ sw $t0, ($a1) -/* D6894 80140194 9262004B */ lbu $v0, 0x4b($s3) -/* D6898 80140198 9264004C */ lbu $a0, 0x4c($s3) -/* D689C 8014019C 9263004D */ lbu $v1, 0x4d($s3) -/* D68A0 801401A0 00021600 */ sll $v0, $v0, 0x18 -/* D68A4 801401A4 00042400 */ sll $a0, $a0, 0x10 -/* D68A8 801401A8 00441025 */ or $v0, $v0, $a0 -/* D68AC 801401AC 00031A00 */ sll $v1, $v1, 8 -/* D68B0 801401B0 00431025 */ or $v0, $v0, $v1 -/* D68B4 801401B4 344200FF */ ori $v0, $v0, 0xff -/* D68B8 801401B8 08050088 */ j .L80140220 -/* D68BC 801401BC ACA20004 */ sw $v0, 4($a1) -.L801401C0: -/* D68C0 801401C0 34C6001C */ ori $a2, $a2, 0x1c -/* D68C4 801401C4 3C040050 */ lui $a0, 0x50 -/* D68C8 801401C8 34844240 */ ori $a0, $a0, 0x4240 -/* D68CC 801401CC 3C07FCFF */ lui $a3, 0xfcff -/* D68D0 801401D0 34E797FF */ ori $a3, $a3, 0x97ff -/* D68D4 801401D4 3C05FF2D */ lui $a1, 0xff2d -/* D68D8 801401D8 34A5FEFF */ ori $a1, $a1, 0xfeff -/* D68DC 801401DC 3C162828 */ lui $s6, 0x2828 -/* D68E0 801401E0 8D430000 */ lw $v1, ($t2) -/* D68E4 801401E4 36D62848 */ ori $s6, $s6, 0x2848 -/* D68E8 801401E8 0060102D */ daddu $v0, $v1, $zero -/* D68EC 801401EC 24630008 */ addiu $v1, $v1, 8 -/* D68F0 801401F0 AD430000 */ sw $v1, ($t2) -/* D68F4 801401F4 AC460000 */ sw $a2, ($v0) -/* D68F8 801401F8 AC440004 */ sw $a0, 4($v0) -/* D68FC 801401FC 24620008 */ addiu $v0, $v1, 8 -/* D6900 80140200 AD420000 */ sw $v0, ($t2) -/* D6904 80140204 24620010 */ addiu $v0, $v1, 0x10 -/* D6908 80140208 3C08FA00 */ lui $t0, 0xfa00 -/* D690C 8014020C AC670000 */ sw $a3, ($v1) -/* D6910 80140210 AC650004 */ sw $a1, 4($v1) -/* D6914 80140214 AD420000 */ sw $v0, ($t2) -/* D6918 80140218 AC680008 */ sw $t0, 8($v1) -/* D691C 8014021C AC76000C */ sw $s6, 0xc($v1) -.L80140220: -/* D6920 80140220 8FB60000 */ lw $s6, ($sp) -/* D6924 80140224 16C0010D */ bnez $s6, .L8014065C -/* D6928 80140228 3C050704 */ lui $a1, 0x704 -/* D692C 8014022C 8FA80004 */ lw $t0, 4($sp) -/* D6930 80140230 1500010B */ bnez $t0, .L80140660 -/* D6934 80140234 34A50100 */ ori $a1, $a1, 0x100 -/* D6938 80140238 8FB600D4 */ lw $s6, 0xd4($sp) -/* D693C 8014023C 16C00033 */ bnez $s6, .L8014030C -/* D6940 80140240 24080001 */ addiu $t0, $zero, 1 -/* D6944 80140244 8D440000 */ lw $a0, ($t2) -/* D6948 80140248 0080182D */ daddu $v1, $a0, $zero -/* D694C 8014024C 24840008 */ addiu $a0, $a0, 8 -/* D6950 80140250 AD440000 */ sw $a0, ($t2) -/* D6954 80140254 8FA80074 */ lw $t0, 0x74($sp) -/* D6958 80140258 3C02FD48 */ lui $v0, 0xfd48 -/* D695C 8014025C AC700004 */ sw $s0, 4($v1) -/* D6960 80140260 01021025 */ or $v0, $t0, $v0 -/* D6964 80140264 AC620000 */ sw $v0, ($v1) -/* D6968 80140268 24820008 */ addiu $v0, $a0, 8 -/* D696C 8014026C 016C1823 */ subu $v1, $t3, $t4 -/* D6970 80140270 24630001 */ addiu $v1, $v1, 1 -/* D6974 80140274 00031843 */ sra $v1, $v1, 1 -/* D6978 80140278 24630007 */ addiu $v1, $v1, 7 -/* D697C 8014027C 000318C3 */ sra $v1, $v1, 3 -/* D6980 80140280 306301FF */ andi $v1, $v1, 0x1ff -/* D6984 80140284 00031A40 */ sll $v1, $v1, 9 -/* D6988 80140288 AD420000 */ sw $v0, ($t2) -/* D698C 8014028C 3C02F548 */ lui $v0, 0xf548 -/* D6990 80140290 00621025 */ or $v0, $v1, $v0 -/* D6994 80140294 AC820000 */ sw $v0, ($a0) -/* D6998 80140298 24820010 */ addiu $v0, $a0, 0x10 -/* D699C 8014029C AC920004 */ sw $s2, 4($a0) -/* D69A0 801402A0 AD420000 */ sw $v0, ($t2) -/* D69A4 801402A4 24820018 */ addiu $v0, $a0, 0x18 -/* D69A8 801402A8 AC9E0008 */ sw $fp, 8($a0) -/* D69AC 801402AC AC80000C */ sw $zero, 0xc($a0) -/* D69B0 801402B0 AD420000 */ sw $v0, ($t2) -/* D69B4 801402B4 8FB60080 */ lw $s6, 0x80($sp) -/* D69B8 801402B8 32C20FFF */ andi $v0, $s6, 0xfff -/* D69BC 801402BC 00021300 */ sll $v0, $v0, 0xc -/* D69C0 801402C0 00591025 */ or $v0, $v0, $t9 -/* D69C4 801402C4 AC820010 */ sw $v0, 0x10($a0) -/* D69C8 801402C8 000B1040 */ sll $v0, $t3, 1 -/* D69CC 801402CC 30420FFF */ andi $v0, $v0, 0xfff -/* D69D0 801402D0 00021300 */ sll $v0, $v0, 0xc -/* D69D4 801402D4 00581025 */ or $v0, $v0, $t8 -/* D69D8 801402D8 AC820014 */ sw $v0, 0x14($a0) -/* D69DC 801402DC 24820020 */ addiu $v0, $a0, 0x20 -/* D69E0 801402E0 AD420000 */ sw $v0, ($t2) -/* D69E4 801402E4 24820028 */ addiu $v0, $a0, 0x28 -/* D69E8 801402E8 AC970018 */ sw $s7, 0x18($a0) -/* D69EC 801402EC AC80001C */ sw $zero, 0x1c($a0) -/* D69F0 801402F0 AD420000 */ sw $v0, ($t2) -/* D69F4 801402F4 3C02F540 */ lui $v0, 0xf540 -/* D69F8 801402F8 00621825 */ or $v1, $v1, $v0 -/* D69FC 801402FC 24820030 */ addiu $v0, $a0, 0x30 -/* D6A00 80140300 AC830020 */ sw $v1, 0x20($a0) -/* D6A04 80140304 080501CF */ j .L8014073C -/* D6A08 80140308 AC910024 */ sw $s1, 0x24($a0) -.L8014030C: -/* D6A0C 8014030C 1128003E */ beq $t1, $t0, .L80140408 -/* D6A10 80140310 29220002 */ slti $v0, $t1, 2 -/* D6A14 80140314 10400005 */ beqz $v0, .L8014032C -/* D6A18 80140318 24020002 */ addiu $v0, $zero, 2 -/* D6A1C 8014031C 11200009 */ beqz $t1, .L80140344 -/* D6A20 80140320 3C02FD48 */ lui $v0, 0xfd48 -/* D6A24 80140324 0805032C */ j .L80140CB0 -/* D6A28 80140328 00000000 */ nop -.L8014032C: -/* D6A2C 8014032C 11220068 */ beq $t1, $v0, .L801404D0 -/* D6A30 80140330 24020003 */ addiu $v0, $zero, 3 -/* D6A34 80140334 11220098 */ beq $t1, $v0, .L80140598 -/* D6A38 80140338 3C02FD48 */ lui $v0, 0xfd48 -/* D6A3C 8014033C 0805032C */ j .L80140CB0 -/* D6A40 80140340 00000000 */ nop -.L80140344: -/* D6A44 80140344 8D440000 */ lw $a0, ($t2) -/* D6A48 80140348 0080182D */ daddu $v1, $a0, $zero -/* D6A4C 8014034C 24840008 */ addiu $a0, $a0, 8 -/* D6A50 80140350 AD440000 */ sw $a0, ($t2) -/* D6A54 80140354 8FB60074 */ lw $s6, 0x74($sp) -/* D6A58 80140358 AC700004 */ sw $s0, 4($v1) -/* D6A5C 8014035C 02C21025 */ or $v0, $s6, $v0 -/* D6A60 80140360 AC620000 */ sw $v0, ($v1) -/* D6A64 80140364 24820008 */ addiu $v0, $a0, 8 -/* D6A68 80140368 016C1823 */ subu $v1, $t3, $t4 -/* D6A6C 8014036C 24630001 */ addiu $v1, $v1, 1 -/* D6A70 80140370 00031843 */ sra $v1, $v1, 1 -/* D6A74 80140374 24630007 */ addiu $v1, $v1, 7 -/* D6A78 80140378 000318C3 */ sra $v1, $v1, 3 -/* D6A7C 8014037C 306301FF */ andi $v1, $v1, 0x1ff -/* D6A80 80140380 00031A40 */ sll $v1, $v1, 9 -/* D6A84 80140384 AD420000 */ sw $v0, ($t2) -/* D6A88 80140388 3C02F548 */ lui $v0, 0xf548 -/* D6A8C 8014038C 00621025 */ or $v0, $v1, $v0 -/* D6A90 80140390 AC820000 */ sw $v0, ($a0) -/* D6A94 80140394 24820010 */ addiu $v0, $a0, 0x10 -/* D6A98 80140398 AC920004 */ sw $s2, 4($a0) -/* D6A9C 8014039C AD420000 */ sw $v0, ($t2) -/* D6AA0 801403A0 24820018 */ addiu $v0, $a0, 0x18 -/* D6AA4 801403A4 AC9E0008 */ sw $fp, 8($a0) -/* D6AA8 801403A8 AC80000C */ sw $zero, 0xc($a0) -/* D6AAC 801403AC AD420000 */ sw $v0, ($t2) -/* D6AB0 801403B0 8FA80080 */ lw $t0, 0x80($sp) -/* D6AB4 801403B4 31020FFF */ andi $v0, $t0, 0xfff -/* D6AB8 801403B8 00021300 */ sll $v0, $v0, 0xc -/* D6ABC 801403BC 00591025 */ or $v0, $v0, $t9 -/* D6AC0 801403C0 AC820010 */ sw $v0, 0x10($a0) -/* D6AC4 801403C4 000B1040 */ sll $v0, $t3, 1 -/* D6AC8 801403C8 30420FFF */ andi $v0, $v0, 0xfff -/* D6ACC 801403CC 00021300 */ sll $v0, $v0, 0xc -/* D6AD0 801403D0 00581025 */ or $v0, $v0, $t8 -/* D6AD4 801403D4 AC820014 */ sw $v0, 0x14($a0) -/* D6AD8 801403D8 24820020 */ addiu $v0, $a0, 0x20 -/* D6ADC 801403DC AD420000 */ sw $v0, ($t2) -/* D6AE0 801403E0 24820028 */ addiu $v0, $a0, 0x28 -/* D6AE4 801403E4 AC970018 */ sw $s7, 0x18($a0) -/* D6AE8 801403E8 AC80001C */ sw $zero, 0x1c($a0) -/* D6AEC 801403EC AD420000 */ sw $v0, ($t2) -/* D6AF0 801403F0 3C02F540 */ lui $v0, 0xf540 -/* D6AF4 801403F4 00621825 */ or $v1, $v1, $v0 -/* D6AF8 801403F8 24820030 */ addiu $v0, $a0, 0x30 -/* D6AFC 801403FC AC830020 */ sw $v1, 0x20($a0) -/* D6B00 80140400 080501CF */ j .L8014073C -/* D6B04 80140404 AC910024 */ sw $s1, 0x24($a0) -.L80140408: -/* D6B08 80140408 8D440000 */ lw $a0, ($t2) -/* D6B0C 8014040C 0080182D */ daddu $v1, $a0, $zero -/* D6B10 80140410 24840008 */ addiu $a0, $a0, 8 -/* D6B14 80140414 AD440000 */ sw $a0, ($t2) -/* D6B18 80140418 8FB60074 */ lw $s6, 0x74($sp) -/* D6B1C 8014041C 3C02FD48 */ lui $v0, 0xfd48 -/* D6B20 80140420 AC700004 */ sw $s0, 4($v1) -/* D6B24 80140424 02C21025 */ or $v0, $s6, $v0 -/* D6B28 80140428 AC620000 */ sw $v0, ($v1) -/* D6B2C 8014042C 24820008 */ addiu $v0, $a0, 8 -/* D6B30 80140430 016C1823 */ subu $v1, $t3, $t4 -/* D6B34 80140434 24630001 */ addiu $v1, $v1, 1 -/* D6B38 80140438 00031843 */ sra $v1, $v1, 1 -/* D6B3C 8014043C 24630007 */ addiu $v1, $v1, 7 -/* D6B40 80140440 000318C3 */ sra $v1, $v1, 3 -/* D6B44 80140444 306301FF */ andi $v1, $v1, 0x1ff -/* D6B48 80140448 00031A40 */ sll $v1, $v1, 9 -/* D6B4C 8014044C AD420000 */ sw $v0, ($t2) -/* D6B50 80140450 3C02F548 */ lui $v0, 0xf548 -/* D6B54 80140454 00621025 */ or $v0, $v1, $v0 -/* D6B58 80140458 AC820000 */ sw $v0, ($a0) -/* D6B5C 8014045C 24820010 */ addiu $v0, $a0, 0x10 -/* D6B60 80140460 AC920004 */ sw $s2, 4($a0) -/* D6B64 80140464 AD420000 */ sw $v0, ($t2) -/* D6B68 80140468 24820018 */ addiu $v0, $a0, 0x18 -/* D6B6C 8014046C AC9E0008 */ sw $fp, 8($a0) -/* D6B70 80140470 AC80000C */ sw $zero, 0xc($a0) -/* D6B74 80140474 AD420000 */ sw $v0, ($t2) -/* D6B78 80140478 8FA80080 */ lw $t0, 0x80($sp) -/* D6B7C 8014047C 31020FFF */ andi $v0, $t0, 0xfff -/* D6B80 80140480 00021300 */ sll $v0, $v0, 0xc -/* D6B84 80140484 00591025 */ or $v0, $v0, $t9 -/* D6B88 80140488 AC820010 */ sw $v0, 0x10($a0) -/* D6B8C 8014048C 000B1040 */ sll $v0, $t3, 1 -/* D6B90 80140490 30420FFF */ andi $v0, $v0, 0xfff -/* D6B94 80140494 00021300 */ sll $v0, $v0, 0xc -/* D6B98 80140498 00581025 */ or $v0, $v0, $t8 -/* D6B9C 8014049C AC820014 */ sw $v0, 0x14($a0) -/* D6BA0 801404A0 24820020 */ addiu $v0, $a0, 0x20 -/* D6BA4 801404A4 AD420000 */ sw $v0, ($t2) -/* D6BA8 801404A8 24820028 */ addiu $v0, $a0, 0x28 -/* D6BAC 801404AC AC970018 */ sw $s7, 0x18($a0) -/* D6BB0 801404B0 AC80001C */ sw $zero, 0x1c($a0) -/* D6BB4 801404B4 AD420000 */ sw $v0, ($t2) -/* D6BB8 801404B8 3C02F540 */ lui $v0, 0xf540 -/* D6BBC 801404BC 00621825 */ or $v1, $v1, $v0 -/* D6BC0 801404C0 24820030 */ addiu $v0, $a0, 0x30 -/* D6BC4 801404C4 AC830020 */ sw $v1, 0x20($a0) -/* D6BC8 801404C8 080501CF */ j .L8014073C -/* D6BCC 801404CC AC910024 */ sw $s1, 0x24($a0) -.L801404D0: -/* D6BD0 801404D0 8D440000 */ lw $a0, ($t2) -/* D6BD4 801404D4 0080182D */ daddu $v1, $a0, $zero -/* D6BD8 801404D8 24840008 */ addiu $a0, $a0, 8 -/* D6BDC 801404DC AD440000 */ sw $a0, ($t2) -/* D6BE0 801404E0 8FB60074 */ lw $s6, 0x74($sp) -/* D6BE4 801404E4 3C02FD48 */ lui $v0, 0xfd48 -/* D6BE8 801404E8 AC700004 */ sw $s0, 4($v1) -/* D6BEC 801404EC 02C21025 */ or $v0, $s6, $v0 -/* D6BF0 801404F0 AC620000 */ sw $v0, ($v1) -/* D6BF4 801404F4 24820008 */ addiu $v0, $a0, 8 -/* D6BF8 801404F8 016C1823 */ subu $v1, $t3, $t4 -/* D6BFC 801404FC 24630001 */ addiu $v1, $v1, 1 -/* D6C00 80140500 00031843 */ sra $v1, $v1, 1 -/* D6C04 80140504 24630007 */ addiu $v1, $v1, 7 -/* D6C08 80140508 000318C3 */ sra $v1, $v1, 3 -/* D6C0C 8014050C 306301FF */ andi $v1, $v1, 0x1ff -/* D6C10 80140510 00031A40 */ sll $v1, $v1, 9 -/* D6C14 80140514 AD420000 */ sw $v0, ($t2) -/* D6C18 80140518 3C02F548 */ lui $v0, 0xf548 -/* D6C1C 8014051C 00621025 */ or $v0, $v1, $v0 -/* D6C20 80140520 AC820000 */ sw $v0, ($a0) -/* D6C24 80140524 24820010 */ addiu $v0, $a0, 0x10 -/* D6C28 80140528 AC920004 */ sw $s2, 4($a0) -/* D6C2C 8014052C AD420000 */ sw $v0, ($t2) -/* D6C30 80140530 24820018 */ addiu $v0, $a0, 0x18 -/* D6C34 80140534 AC9E0008 */ sw $fp, 8($a0) -/* D6C38 80140538 AC80000C */ sw $zero, 0xc($a0) -/* D6C3C 8014053C AD420000 */ sw $v0, ($t2) -/* D6C40 80140540 8FA80080 */ lw $t0, 0x80($sp) -/* D6C44 80140544 31020FFF */ andi $v0, $t0, 0xfff -/* D6C48 80140548 00021300 */ sll $v0, $v0, 0xc -/* D6C4C 8014054C 00591025 */ or $v0, $v0, $t9 -/* D6C50 80140550 AC820010 */ sw $v0, 0x10($a0) -/* D6C54 80140554 000B1040 */ sll $v0, $t3, 1 -/* D6C58 80140558 30420FFF */ andi $v0, $v0, 0xfff -/* D6C5C 8014055C 00021300 */ sll $v0, $v0, 0xc -/* D6C60 80140560 00581025 */ or $v0, $v0, $t8 -/* D6C64 80140564 AC820014 */ sw $v0, 0x14($a0) -/* D6C68 80140568 24820020 */ addiu $v0, $a0, 0x20 -/* D6C6C 8014056C AD420000 */ sw $v0, ($t2) -/* D6C70 80140570 24820028 */ addiu $v0, $a0, 0x28 -/* D6C74 80140574 AC970018 */ sw $s7, 0x18($a0) -/* D6C78 80140578 AC80001C */ sw $zero, 0x1c($a0) -/* D6C7C 8014057C AD420000 */ sw $v0, ($t2) -/* D6C80 80140580 3C02F540 */ lui $v0, 0xf540 -/* D6C84 80140584 00621825 */ or $v1, $v1, $v0 -/* D6C88 80140588 24820030 */ addiu $v0, $a0, 0x30 -/* D6C8C 8014058C AC830020 */ sw $v1, 0x20($a0) -/* D6C90 80140590 080501CF */ j .L8014073C -/* D6C94 80140594 AC910024 */ sw $s1, 0x24($a0) -.L80140598: -/* D6C98 80140598 8D440000 */ lw $a0, ($t2) -/* D6C9C 8014059C 0080182D */ daddu $v1, $a0, $zero -/* D6CA0 801405A0 24840008 */ addiu $a0, $a0, 8 -/* D6CA4 801405A4 AD440000 */ sw $a0, ($t2) -/* D6CA8 801405A8 8FB60074 */ lw $s6, 0x74($sp) -/* D6CAC 801405AC AC700004 */ sw $s0, 4($v1) -/* D6CB0 801405B0 02C21025 */ or $v0, $s6, $v0 -/* D6CB4 801405B4 AC620000 */ sw $v0, ($v1) -/* D6CB8 801405B8 24820008 */ addiu $v0, $a0, 8 -/* D6CBC 801405BC 016C1823 */ subu $v1, $t3, $t4 -/* D6CC0 801405C0 24630001 */ addiu $v1, $v1, 1 -/* D6CC4 801405C4 00031843 */ sra $v1, $v1, 1 -/* D6CC8 801405C8 24630007 */ addiu $v1, $v1, 7 -/* D6CCC 801405CC 000318C3 */ sra $v1, $v1, 3 -/* D6CD0 801405D0 306301FF */ andi $v1, $v1, 0x1ff -/* D6CD4 801405D4 00031A40 */ sll $v1, $v1, 9 -/* D6CD8 801405D8 AD420000 */ sw $v0, ($t2) -/* D6CDC 801405DC 3C02F548 */ lui $v0, 0xf548 -/* D6CE0 801405E0 00621025 */ or $v0, $v1, $v0 -/* D6CE4 801405E4 AC820000 */ sw $v0, ($a0) -/* D6CE8 801405E8 24820010 */ addiu $v0, $a0, 0x10 -/* D6CEC 801405EC AC920004 */ sw $s2, 4($a0) -/* D6CF0 801405F0 AD420000 */ sw $v0, ($t2) -/* D6CF4 801405F4 24820018 */ addiu $v0, $a0, 0x18 -/* D6CF8 801405F8 AC9E0008 */ sw $fp, 8($a0) -/* D6CFC 801405FC AC80000C */ sw $zero, 0xc($a0) -/* D6D00 80140600 AD420000 */ sw $v0, ($t2) -/* D6D04 80140604 8FA80080 */ lw $t0, 0x80($sp) -/* D6D08 80140608 31020FFF */ andi $v0, $t0, 0xfff -/* D6D0C 8014060C 00021300 */ sll $v0, $v0, 0xc -/* D6D10 80140610 00591025 */ or $v0, $v0, $t9 -/* D6D14 80140614 AC820010 */ sw $v0, 0x10($a0) -/* D6D18 80140618 000B1040 */ sll $v0, $t3, 1 -/* D6D1C 8014061C 30420FFF */ andi $v0, $v0, 0xfff -/* D6D20 80140620 00021300 */ sll $v0, $v0, 0xc -/* D6D24 80140624 00581025 */ or $v0, $v0, $t8 -/* D6D28 80140628 AC820014 */ sw $v0, 0x14($a0) -/* D6D2C 8014062C 24820020 */ addiu $v0, $a0, 0x20 -/* D6D30 80140630 AD420000 */ sw $v0, ($t2) -/* D6D34 80140634 24820028 */ addiu $v0, $a0, 0x28 -/* D6D38 80140638 AC970018 */ sw $s7, 0x18($a0) -/* D6D3C 8014063C AC80001C */ sw $zero, 0x1c($a0) -/* D6D40 80140640 AD420000 */ sw $v0, ($t2) -/* D6D44 80140644 3C02F540 */ lui $v0, 0xf540 -/* D6D48 80140648 00621825 */ or $v1, $v1, $v0 -/* D6D4C 8014064C 24820030 */ addiu $v0, $a0, 0x30 -/* D6D50 80140650 AC830020 */ sw $v1, 0x20($a0) -/* D6D54 80140654 080501CF */ j .L8014073C -/* D6D58 80140658 AC910024 */ sw $s1, 0x24($a0) -.L8014065C: -/* D6D5C 8014065C 34A50100 */ ori $a1, $a1, 0x100 -.L80140660: -/* D6D60 80140660 3C060004 */ lui $a2, 4 -/* D6D64 80140664 34C60100 */ ori $a2, $a2, 0x100 -/* D6D68 80140668 3C02FD48 */ lui $v0, 0xfd48 -/* D6D6C 8014066C 02852825 */ or $a1, $s4, $a1 -/* D6D70 80140670 8D440000 */ lw $a0, ($t2) -/* D6D74 80140674 02A52825 */ or $a1, $s5, $a1 -/* D6D78 80140678 0080182D */ daddu $v1, $a0, $zero -/* D6D7C 8014067C 24840008 */ addiu $a0, $a0, 8 -/* D6D80 80140680 AD440000 */ sw $a0, ($t2) -/* D6D84 80140684 8FB60074 */ lw $s6, 0x74($sp) -/* D6D88 80140688 02863025 */ or $a2, $s4, $a2 -/* D6D8C 8014068C AC700004 */ sw $s0, 4($v1) -/* D6D90 80140690 02C21025 */ or $v0, $s6, $v0 -/* D6D94 80140694 AC620000 */ sw $v0, ($v1) -/* D6D98 80140698 24820008 */ addiu $v0, $a0, 8 -/* D6D9C 8014069C 016C1823 */ subu $v1, $t3, $t4 -/* D6DA0 801406A0 24630001 */ addiu $v1, $v1, 1 -/* D6DA4 801406A4 00031843 */ sra $v1, $v1, 1 -/* D6DA8 801406A8 24630007 */ addiu $v1, $v1, 7 -/* D6DAC 801406AC 000318C3 */ sra $v1, $v1, 3 -/* D6DB0 801406B0 306301FF */ andi $v1, $v1, 0x1ff -/* D6DB4 801406B4 00031A40 */ sll $v1, $v1, 9 -/* D6DB8 801406B8 AD420000 */ sw $v0, ($t2) -/* D6DBC 801406BC 3C02F548 */ lui $v0, 0xf548 -/* D6DC0 801406C0 00621025 */ or $v0, $v1, $v0 -/* D6DC4 801406C4 AC820000 */ sw $v0, ($a0) -/* D6DC8 801406C8 24820010 */ addiu $v0, $a0, 0x10 -/* D6DCC 801406CC AC850004 */ sw $a1, 4($a0) -/* D6DD0 801406D0 AD420000 */ sw $v0, ($t2) -/* D6DD4 801406D4 24820018 */ addiu $v0, $a0, 0x18 -/* D6DD8 801406D8 AC9E0008 */ sw $fp, 8($a0) -/* D6DDC 801406DC AC80000C */ sw $zero, 0xc($a0) -/* D6DE0 801406E0 AD420000 */ sw $v0, ($t2) -/* D6DE4 801406E4 8FA80080 */ lw $t0, 0x80($sp) -/* D6DE8 801406E8 02A63025 */ or $a2, $s5, $a2 -/* D6DEC 801406EC 31020FFF */ andi $v0, $t0, 0xfff -/* D6DF0 801406F0 00021300 */ sll $v0, $v0, 0xc -/* D6DF4 801406F4 00591025 */ or $v0, $v0, $t9 -/* D6DF8 801406F8 AC820010 */ sw $v0, 0x10($a0) -/* D6DFC 801406FC 000B1040 */ sll $v0, $t3, 1 -/* D6E00 80140700 30420FFF */ andi $v0, $v0, 0xfff -/* D6E04 80140704 00021300 */ sll $v0, $v0, 0xc -/* D6E08 80140708 00581025 */ or $v0, $v0, $t8 -/* D6E0C 8014070C AC820014 */ sw $v0, 0x14($a0) -/* D6E10 80140710 24820020 */ addiu $v0, $a0, 0x20 -/* D6E14 80140714 AD420000 */ sw $v0, ($t2) -/* D6E18 80140718 24820028 */ addiu $v0, $a0, 0x28 -/* D6E1C 8014071C AC970018 */ sw $s7, 0x18($a0) -/* D6E20 80140720 AC80001C */ sw $zero, 0x1c($a0) -/* D6E24 80140724 AD420000 */ sw $v0, ($t2) -/* D6E28 80140728 3C02F540 */ lui $v0, 0xf540 -/* D6E2C 8014072C 00621825 */ or $v1, $v1, $v0 -/* D6E30 80140730 24820030 */ addiu $v0, $a0, 0x30 -/* D6E34 80140734 AC830020 */ sw $v1, 0x20($a0) -/* D6E38 80140738 AC860024 */ sw $a2, 0x24($a0) -.L8014073C: -/* D6E3C 8014073C AD420000 */ sw $v0, ($t2) -/* D6E40 80140740 31A20FFF */ andi $v0, $t5, 0xfff -/* D6E44 80140744 00021300 */ sll $v0, $v0, 0xc -/* D6E48 80140748 004F1025 */ or $v0, $v0, $t7 -/* D6E4C 8014074C AC820028 */ sw $v0, 0x28($a0) -/* D6E50 80140750 000B1080 */ sll $v0, $t3, 2 -/* D6E54 80140754 30420FFF */ andi $v0, $v0, 0xfff -/* D6E58 80140758 00021300 */ sll $v0, $v0, 0xc -/* D6E5C 8014075C 004E1025 */ or $v0, $v0, $t6 -/* D6E60 80140760 0805032C */ j .L80140CB0 -/* D6E64 80140764 AC82002C */ sw $v0, 0x2c($a0) -.L80140768: -/* D6E68 80140768 3484B223 */ ori $a0, $a0, 0xb223 -/* D6E6C 8014076C 3C03FF67 */ lui $v1, 0xff67 -/* D6E70 80140770 8D470000 */ lw $a3, ($t2) -/* D6E74 80140774 3463FFFF */ ori $v1, $v1, 0xffff -/* D6E78 80140778 00E0102D */ daddu $v0, $a3, $zero -/* D6E7C 8014077C 24E70008 */ addiu $a3, $a3, 8 -/* D6E80 80140780 AD470000 */ sw $a3, ($t2) -/* D6E84 80140784 AC440000 */ sw $a0, ($v0) -/* D6E88 80140788 AC430004 */ sw $v1, 4($v0) -/* D6E8C 8014078C 24E20008 */ addiu $v0, $a3, 8 -/* D6E90 80140790 3C16FA00 */ lui $s6, 0xfa00 -/* D6E94 80140794 AD420000 */ sw $v0, ($t2) -/* D6E98 80140798 ACF60000 */ sw $s6, ($a3) -/* D6E9C 8014079C 9262004B */ lbu $v0, 0x4b($s3) -/* D6EA0 801407A0 9263004C */ lbu $v1, 0x4c($s3) -/* D6EA4 801407A4 9264004D */ lbu $a0, 0x4d($s3) -/* D6EA8 801407A8 00021600 */ sll $v0, $v0, 0x18 -/* D6EAC 801407AC 00031C00 */ sll $v1, $v1, 0x10 -/* D6EB0 801407B0 00431025 */ or $v0, $v0, $v1 -/* D6EB4 801407B4 00042200 */ sll $a0, $a0, 8 -/* D6EB8 801407B8 9263004A */ lbu $v1, 0x4a($s3) -/* D6EBC 801407BC 00441025 */ or $v0, $v0, $a0 -/* D6EC0 801407C0 00431025 */ or $v0, $v0, $v1 -/* D6EC4 801407C4 ACE20004 */ sw $v0, 4($a3) -/* D6EC8 801407C8 8FA80000 */ lw $t0, ($sp) -/* D6ECC 801407CC 15000100 */ bnez $t0, .L80140BD0 -/* D6ED0 801407D0 3C050704 */ lui $a1, 0x704 -/* D6ED4 801407D4 8FB60004 */ lw $s6, 4($sp) -/* D6ED8 801407D8 16C000FE */ bnez $s6, .L80140BD4 -/* D6EDC 801407DC 34A50100 */ ori $a1, $a1, 0x100 -/* D6EE0 801407E0 8FA800D4 */ lw $t0, 0xd4($sp) -/* D6EE4 801407E4 550000C3 */ bnel $t0, $zero, .L80140AF4 -/* D6EE8 801407E8 3C040708 */ lui $a0, 0x708 -/* D6EEC 801407EC 24160001 */ addiu $s6, $zero, 1 -/* D6EF0 801407F0 1136003A */ beq $t1, $s6, .L801408DC -/* D6EF4 801407F4 29220002 */ slti $v0, $t1, 2 -/* D6EF8 801407F8 10400005 */ beqz $v0, .L80140810 -/* D6EFC 801407FC 00000000 */ nop -/* D6F00 80140800 1120000A */ beqz $t1, .L8014082C -/* D6F04 80140804 24E20010 */ addiu $v0, $a3, 0x10 -/* D6F08 80140808 0805032C */ j .L80140CB0 -/* D6F0C 8014080C 00000000 */ nop -.L80140810: -/* D6F10 80140810 8FA80008 */ lw $t0, 8($sp) -/* D6F14 80140814 1128005E */ beq $t1, $t0, .L80140990 -/* D6F18 80140818 24020003 */ addiu $v0, $zero, 3 -/* D6F1C 8014081C 11220089 */ beq $t1, $v0, .L80140A44 -/* D6F20 80140820 24E20010 */ addiu $v0, $a3, 0x10 -/* D6F24 80140824 0805032C */ j .L80140CB0 -/* D6F28 80140828 00000000 */ nop -.L8014082C: -/* D6F2C 8014082C AD420000 */ sw $v0, ($t2) -/* D6F30 80140830 3C02FD68 */ lui $v0, 0xfd68 -/* D6F34 80140834 016C1823 */ subu $v1, $t3, $t4 -/* D6F38 80140838 24630008 */ addiu $v1, $v1, 8 -/* D6F3C 8014083C 000318C3 */ sra $v1, $v1, 3 -/* D6F40 80140840 306301FF */ andi $v1, $v1, 0x1ff -/* D6F44 80140844 00031A40 */ sll $v1, $v1, 9 -/* D6F48 80140848 31A50FFF */ andi $a1, $t5, 0xfff -/* D6F4C 8014084C 00052B00 */ sll $a1, $a1, 0xc -/* D6F50 80140850 000B2080 */ sll $a0, $t3, 2 -/* D6F54 80140854 30840FFF */ andi $a0, $a0, 0xfff -/* D6F58 80140858 8FB60070 */ lw $s6, 0x70($sp) -/* D6F5C 8014085C 00042300 */ sll $a0, $a0, 0xc -/* D6F60 80140860 ACF0000C */ sw $s0, 0xc($a3) -/* D6F64 80140864 02C21025 */ or $v0, $s6, $v0 -/* D6F68 80140868 ACE20008 */ sw $v0, 8($a3) -/* D6F6C 8014086C 24E20018 */ addiu $v0, $a3, 0x18 -/* D6F70 80140870 AD420000 */ sw $v0, ($t2) -/* D6F74 80140874 3C02F568 */ lui $v0, 0xf568 -/* D6F78 80140878 00621825 */ or $v1, $v1, $v0 -/* D6F7C 8014087C 24E20020 */ addiu $v0, $a3, 0x20 -/* D6F80 80140880 ACE30010 */ sw $v1, 0x10($a3) -/* D6F84 80140884 ACF20014 */ sw $s2, 0x14($a3) -/* D6F88 80140888 AD420000 */ sw $v0, ($t2) -/* D6F8C 8014088C 24E20028 */ addiu $v0, $a3, 0x28 -/* D6F90 80140890 ACFE0018 */ sw $fp, 0x18($a3) -/* D6F94 80140894 ACE0001C */ sw $zero, 0x1c($a3) -/* D6F98 80140898 AD420000 */ sw $v0, ($t2) -/* D6F9C 8014089C 00B91025 */ or $v0, $a1, $t9 -/* D6FA0 801408A0 ACE20020 */ sw $v0, 0x20($a3) -/* D6FA4 801408A4 00981025 */ or $v0, $a0, $t8 -/* D6FA8 801408A8 ACE20024 */ sw $v0, 0x24($a3) -/* D6FAC 801408AC 24E20030 */ addiu $v0, $a3, 0x30 -/* D6FB0 801408B0 AD420000 */ sw $v0, ($t2) -/* D6FB4 801408B4 24E20038 */ addiu $v0, $a3, 0x38 -/* D6FB8 801408B8 ACF70028 */ sw $s7, 0x28($a3) -/* D6FBC 801408BC ACE0002C */ sw $zero, 0x2c($a3) -/* D6FC0 801408C0 AD420000 */ sw $v0, ($t2) -/* D6FC4 801408C4 24E20040 */ addiu $v0, $a3, 0x40 -/* D6FC8 801408C8 00AF2825 */ or $a1, $a1, $t7 -/* D6FCC 801408CC 008E2025 */ or $a0, $a0, $t6 -/* D6FD0 801408D0 ACE30030 */ sw $v1, 0x30($a3) -/* D6FD4 801408D4 080502F0 */ j .L80140BC0 -/* D6FD8 801408D8 ACF10034 */ sw $s1, 0x34($a3) -.L801408DC: -/* D6FDC 801408DC 24E20010 */ addiu $v0, $a3, 0x10 -/* D6FE0 801408E0 AD420000 */ sw $v0, ($t2) -/* D6FE4 801408E4 3C02FD68 */ lui $v0, 0xfd68 -/* D6FE8 801408E8 016C1823 */ subu $v1, $t3, $t4 -/* D6FEC 801408EC 24630008 */ addiu $v1, $v1, 8 -/* D6FF0 801408F0 000318C3 */ sra $v1, $v1, 3 -/* D6FF4 801408F4 306301FF */ andi $v1, $v1, 0x1ff -/* D6FF8 801408F8 00031A40 */ sll $v1, $v1, 9 -/* D6FFC 801408FC 31A50FFF */ andi $a1, $t5, 0xfff -/* D7000 80140900 00052B00 */ sll $a1, $a1, 0xc -/* D7004 80140904 000B2080 */ sll $a0, $t3, 2 -/* D7008 80140908 30840FFF */ andi $a0, $a0, 0xfff -/* D700C 8014090C 8FA80070 */ lw $t0, 0x70($sp) -/* D7010 80140910 00042300 */ sll $a0, $a0, 0xc -/* D7014 80140914 ACF0000C */ sw $s0, 0xc($a3) -/* D7018 80140918 01021025 */ or $v0, $t0, $v0 -/* D701C 8014091C ACE20008 */ sw $v0, 8($a3) -/* D7020 80140920 24E20018 */ addiu $v0, $a3, 0x18 -/* D7024 80140924 AD420000 */ sw $v0, ($t2) -/* D7028 80140928 3C02F568 */ lui $v0, 0xf568 -/* D702C 8014092C 00621825 */ or $v1, $v1, $v0 -/* D7030 80140930 24E20020 */ addiu $v0, $a3, 0x20 -/* D7034 80140934 ACE30010 */ sw $v1, 0x10($a3) -/* D7038 80140938 ACF20014 */ sw $s2, 0x14($a3) -/* D703C 8014093C AD420000 */ sw $v0, ($t2) -/* D7040 80140940 24E20028 */ addiu $v0, $a3, 0x28 -/* D7044 80140944 ACFE0018 */ sw $fp, 0x18($a3) -/* D7048 80140948 ACE0001C */ sw $zero, 0x1c($a3) -/* D704C 8014094C AD420000 */ sw $v0, ($t2) -/* D7050 80140950 00B91025 */ or $v0, $a1, $t9 -/* D7054 80140954 ACE20020 */ sw $v0, 0x20($a3) -/* D7058 80140958 00981025 */ or $v0, $a0, $t8 -/* D705C 8014095C ACE20024 */ sw $v0, 0x24($a3) -/* D7060 80140960 24E20030 */ addiu $v0, $a3, 0x30 -/* D7064 80140964 AD420000 */ sw $v0, ($t2) -/* D7068 80140968 24E20038 */ addiu $v0, $a3, 0x38 -/* D706C 8014096C ACF70028 */ sw $s7, 0x28($a3) -/* D7070 80140970 ACE0002C */ sw $zero, 0x2c($a3) -/* D7074 80140974 AD420000 */ sw $v0, ($t2) -/* D7078 80140978 24E20040 */ addiu $v0, $a3, 0x40 -/* D707C 8014097C 00AF2825 */ or $a1, $a1, $t7 -/* D7080 80140980 008E2025 */ or $a0, $a0, $t6 -/* D7084 80140984 ACE30030 */ sw $v1, 0x30($a3) -/* D7088 80140988 080502F0 */ j .L80140BC0 -/* D708C 8014098C ACF10034 */ sw $s1, 0x34($a3) -.L80140990: -/* D7090 80140990 24E20010 */ addiu $v0, $a3, 0x10 -/* D7094 80140994 AD420000 */ sw $v0, ($t2) -/* D7098 80140998 3C02FD68 */ lui $v0, 0xfd68 -/* D709C 8014099C 016C1823 */ subu $v1, $t3, $t4 -/* D70A0 801409A0 24630008 */ addiu $v1, $v1, 8 -/* D70A4 801409A4 000318C3 */ sra $v1, $v1, 3 -/* D70A8 801409A8 306301FF */ andi $v1, $v1, 0x1ff -/* D70AC 801409AC 00031A40 */ sll $v1, $v1, 9 -/* D70B0 801409B0 31A50FFF */ andi $a1, $t5, 0xfff -/* D70B4 801409B4 00052B00 */ sll $a1, $a1, 0xc -/* D70B8 801409B8 000B2080 */ sll $a0, $t3, 2 -/* D70BC 801409BC 30840FFF */ andi $a0, $a0, 0xfff -/* D70C0 801409C0 8FB60070 */ lw $s6, 0x70($sp) -/* D70C4 801409C4 00042300 */ sll $a0, $a0, 0xc -/* D70C8 801409C8 ACF0000C */ sw $s0, 0xc($a3) -/* D70CC 801409CC 02C21025 */ or $v0, $s6, $v0 -/* D70D0 801409D0 ACE20008 */ sw $v0, 8($a3) -/* D70D4 801409D4 24E20018 */ addiu $v0, $a3, 0x18 -/* D70D8 801409D8 AD420000 */ sw $v0, ($t2) -/* D70DC 801409DC 3C02F568 */ lui $v0, 0xf568 -/* D70E0 801409E0 00621825 */ or $v1, $v1, $v0 -/* D70E4 801409E4 24E20020 */ addiu $v0, $a3, 0x20 -/* D70E8 801409E8 ACE30010 */ sw $v1, 0x10($a3) -/* D70EC 801409EC ACF20014 */ sw $s2, 0x14($a3) -/* D70F0 801409F0 AD420000 */ sw $v0, ($t2) -/* D70F4 801409F4 24E20028 */ addiu $v0, $a3, 0x28 -/* D70F8 801409F8 ACFE0018 */ sw $fp, 0x18($a3) -/* D70FC 801409FC ACE0001C */ sw $zero, 0x1c($a3) -/* D7100 80140A00 AD420000 */ sw $v0, ($t2) -/* D7104 80140A04 00B91025 */ or $v0, $a1, $t9 -/* D7108 80140A08 ACE20020 */ sw $v0, 0x20($a3) -/* D710C 80140A0C 00981025 */ or $v0, $a0, $t8 -/* D7110 80140A10 ACE20024 */ sw $v0, 0x24($a3) -/* D7114 80140A14 24E20030 */ addiu $v0, $a3, 0x30 -/* D7118 80140A18 AD420000 */ sw $v0, ($t2) -/* D711C 80140A1C 24E20038 */ addiu $v0, $a3, 0x38 -/* D7120 80140A20 ACF70028 */ sw $s7, 0x28($a3) -/* D7124 80140A24 ACE0002C */ sw $zero, 0x2c($a3) -/* D7128 80140A28 AD420000 */ sw $v0, ($t2) -/* D712C 80140A2C 24E20040 */ addiu $v0, $a3, 0x40 -/* D7130 80140A30 00AF2825 */ or $a1, $a1, $t7 -/* D7134 80140A34 008E2025 */ or $a0, $a0, $t6 -/* D7138 80140A38 ACE30030 */ sw $v1, 0x30($a3) -/* D713C 80140A3C 080502F0 */ j .L80140BC0 -/* D7140 80140A40 ACF10034 */ sw $s1, 0x34($a3) -.L80140A44: -/* D7144 80140A44 AD420000 */ sw $v0, ($t2) -/* D7148 80140A48 3C02FD68 */ lui $v0, 0xfd68 -/* D714C 80140A4C 016C1823 */ subu $v1, $t3, $t4 -/* D7150 80140A50 24630008 */ addiu $v1, $v1, 8 -/* D7154 80140A54 000318C3 */ sra $v1, $v1, 3 -/* D7158 80140A58 306301FF */ andi $v1, $v1, 0x1ff -/* D715C 80140A5C 00031A40 */ sll $v1, $v1, 9 -/* D7160 80140A60 31A50FFF */ andi $a1, $t5, 0xfff -/* D7164 80140A64 00052B00 */ sll $a1, $a1, 0xc -/* D7168 80140A68 000B2080 */ sll $a0, $t3, 2 -/* D716C 80140A6C 30840FFF */ andi $a0, $a0, 0xfff -/* D7170 80140A70 8FA80070 */ lw $t0, 0x70($sp) -/* D7174 80140A74 00042300 */ sll $a0, $a0, 0xc -/* D7178 80140A78 ACF0000C */ sw $s0, 0xc($a3) -/* D717C 80140A7C 01021025 */ or $v0, $t0, $v0 -/* D7180 80140A80 ACE20008 */ sw $v0, 8($a3) -/* D7184 80140A84 24E20018 */ addiu $v0, $a3, 0x18 -/* D7188 80140A88 AD420000 */ sw $v0, ($t2) -/* D718C 80140A8C 3C02F568 */ lui $v0, 0xf568 -/* D7190 80140A90 00621825 */ or $v1, $v1, $v0 -/* D7194 80140A94 24E20020 */ addiu $v0, $a3, 0x20 -/* D7198 80140A98 ACE30010 */ sw $v1, 0x10($a3) -/* D719C 80140A9C ACF20014 */ sw $s2, 0x14($a3) -/* D71A0 80140AA0 AD420000 */ sw $v0, ($t2) -/* D71A4 80140AA4 24E20028 */ addiu $v0, $a3, 0x28 -/* D71A8 80140AA8 ACFE0018 */ sw $fp, 0x18($a3) -/* D71AC 80140AAC ACE0001C */ sw $zero, 0x1c($a3) -/* D71B0 80140AB0 AD420000 */ sw $v0, ($t2) -/* D71B4 80140AB4 00B91025 */ or $v0, $a1, $t9 -/* D71B8 80140AB8 ACE20020 */ sw $v0, 0x20($a3) -/* D71BC 80140ABC 00981025 */ or $v0, $a0, $t8 -/* D71C0 80140AC0 ACE20024 */ sw $v0, 0x24($a3) -/* D71C4 80140AC4 24E20030 */ addiu $v0, $a3, 0x30 -/* D71C8 80140AC8 AD420000 */ sw $v0, ($t2) -/* D71CC 80140ACC 24E20038 */ addiu $v0, $a3, 0x38 -/* D71D0 80140AD0 ACF70028 */ sw $s7, 0x28($a3) -/* D71D4 80140AD4 ACE0002C */ sw $zero, 0x2c($a3) -/* D71D8 80140AD8 AD420000 */ sw $v0, ($t2) -/* D71DC 80140ADC 24E20040 */ addiu $v0, $a3, 0x40 -/* D71E0 80140AE0 00AF2825 */ or $a1, $a1, $t7 -/* D71E4 80140AE4 008E2025 */ or $a0, $a0, $t6 -/* D71E8 80140AE8 ACE30030 */ sw $v1, 0x30($a3) -/* D71EC 80140AEC 080502F0 */ j .L80140BC0 -/* D71F0 80140AF0 ACF10034 */ sw $s1, 0x34($a3) -.L80140AF4: -/* D71F4 80140AF4 34840200 */ ori $a0, $a0, 0x200 -/* D71F8 80140AF8 3C060008 */ lui $a2, 8 -/* D71FC 80140AFC 34C60200 */ ori $a2, $a2, 0x200 -/* D7200 80140B00 24E20010 */ addiu $v0, $a3, 0x10 -/* D7204 80140B04 AD420000 */ sw $v0, ($t2) -/* D7208 80140B08 3C02FD68 */ lui $v0, 0xfd68 -/* D720C 80140B0C 016C1823 */ subu $v1, $t3, $t4 -/* D7210 80140B10 24630008 */ addiu $v1, $v1, 8 -/* D7214 80140B14 000318C3 */ sra $v1, $v1, 3 -/* D7218 80140B18 306301FF */ andi $v1, $v1, 0x1ff -/* D721C 80140B1C 00031A40 */ sll $v1, $v1, 9 -/* D7220 80140B20 02842025 */ or $a0, $s4, $a0 -/* D7224 80140B24 02A42025 */ or $a0, $s5, $a0 -/* D7228 80140B28 31A50FFF */ andi $a1, $t5, 0xfff -/* D722C 80140B2C 00052B00 */ sll $a1, $a1, 0xc -/* D7230 80140B30 02863025 */ or $a2, $s4, $a2 -/* D7234 80140B34 8FB60070 */ lw $s6, 0x70($sp) -/* D7238 80140B38 02A63025 */ or $a2, $s5, $a2 -/* D723C 80140B3C ACF0000C */ sw $s0, 0xc($a3) -/* D7240 80140B40 02C21025 */ or $v0, $s6, $v0 -/* D7244 80140B44 ACE20008 */ sw $v0, 8($a3) -/* D7248 80140B48 24E20018 */ addiu $v0, $a3, 0x18 -/* D724C 80140B4C AD420000 */ sw $v0, ($t2) -/* D7250 80140B50 3C02F568 */ lui $v0, 0xf568 -/* D7254 80140B54 00621825 */ or $v1, $v1, $v0 -/* D7258 80140B58 24E20020 */ addiu $v0, $a3, 0x20 -/* D725C 80140B5C ACE30010 */ sw $v1, 0x10($a3) -/* D7260 80140B60 ACE40014 */ sw $a0, 0x14($a3) -/* D7264 80140B64 AD420000 */ sw $v0, ($t2) -/* D7268 80140B68 24E20028 */ addiu $v0, $a3, 0x28 -/* D726C 80140B6C ACFE0018 */ sw $fp, 0x18($a3) -/* D7270 80140B70 ACE0001C */ sw $zero, 0x1c($a3) -/* D7274 80140B74 AD420000 */ sw $v0, ($t2) -/* D7278 80140B78 00B91025 */ or $v0, $a1, $t9 -/* D727C 80140B7C 000B2080 */ sll $a0, $t3, 2 -/* D7280 80140B80 30840FFF */ andi $a0, $a0, 0xfff -/* D7284 80140B84 00042300 */ sll $a0, $a0, 0xc -/* D7288 80140B88 ACE20020 */ sw $v0, 0x20($a3) -/* D728C 80140B8C 00981025 */ or $v0, $a0, $t8 -/* D7290 80140B90 ACE20024 */ sw $v0, 0x24($a3) -/* D7294 80140B94 24E20030 */ addiu $v0, $a3, 0x30 -/* D7298 80140B98 AD420000 */ sw $v0, ($t2) -/* D729C 80140B9C 24E20038 */ addiu $v0, $a3, 0x38 -/* D72A0 80140BA0 ACF70028 */ sw $s7, 0x28($a3) -/* D72A4 80140BA4 ACE0002C */ sw $zero, 0x2c($a3) -/* D72A8 80140BA8 AD420000 */ sw $v0, ($t2) -/* D72AC 80140BAC 24E20040 */ addiu $v0, $a3, 0x40 -/* D72B0 80140BB0 00AF2825 */ or $a1, $a1, $t7 -/* D72B4 80140BB4 008E2025 */ or $a0, $a0, $t6 -/* D72B8 80140BB8 ACE30030 */ sw $v1, 0x30($a3) -/* D72BC 80140BBC ACE60034 */ sw $a2, 0x34($a3) -.L80140BC0: -/* D72C0 80140BC0 AD420000 */ sw $v0, ($t2) -/* D72C4 80140BC4 ACE50038 */ sw $a1, 0x38($a3) -/* D72C8 80140BC8 0805032C */ j .L80140CB0 -/* D72CC 80140BCC ACE4003C */ sw $a0, 0x3c($a3) -.L80140BD0: -/* D72D0 80140BD0 34A50100 */ ori $a1, $a1, 0x100 -.L80140BD4: -/* D72D4 80140BD4 3C070004 */ lui $a3, 4 -/* D72D8 80140BD8 34E70100 */ ori $a3, $a3, 0x100 -/* D72DC 80140BDC 3C02FD68 */ lui $v0, 0xfd68 -/* D72E0 80140BE0 02852825 */ or $a1, $s4, $a1 -/* D72E4 80140BE4 02A52825 */ or $a1, $s5, $a1 -/* D72E8 80140BE8 31A60FFF */ andi $a2, $t5, 0xfff -/* D72EC 80140BEC 00063300 */ sll $a2, $a2, 0xc -/* D72F0 80140BF0 8D430000 */ lw $v1, ($t2) -/* D72F4 80140BF4 02873825 */ or $a3, $s4, $a3 -/* D72F8 80140BF8 0060202D */ daddu $a0, $v1, $zero -/* D72FC 80140BFC 24630008 */ addiu $v1, $v1, 8 -/* D7300 80140C00 AD430000 */ sw $v1, ($t2) -/* D7304 80140C04 8FA80070 */ lw $t0, 0x70($sp) -/* D7308 80140C08 02A73825 */ or $a3, $s5, $a3 -/* D730C 80140C0C AC900004 */ sw $s0, 4($a0) -/* D7310 80140C10 01021025 */ or $v0, $t0, $v0 -/* D7314 80140C14 AC820000 */ sw $v0, ($a0) -/* D7318 80140C18 24620008 */ addiu $v0, $v1, 8 -/* D731C 80140C1C 016C2023 */ subu $a0, $t3, $t4 -/* D7320 80140C20 24840008 */ addiu $a0, $a0, 8 -/* D7324 80140C24 000420C3 */ sra $a0, $a0, 3 -/* D7328 80140C28 308401FF */ andi $a0, $a0, 0x1ff -/* D732C 80140C2C 00042240 */ sll $a0, $a0, 9 -/* D7330 80140C30 AD420000 */ sw $v0, ($t2) -/* D7334 80140C34 3C02F568 */ lui $v0, 0xf568 -.L80140C38: -/* D7338 80140C38 00822025 */ or $a0, $a0, $v0 -/* D733C 80140C3C 24620010 */ addiu $v0, $v1, 0x10 -/* D7340 80140C40 AC640000 */ sw $a0, ($v1) -/* D7344 80140C44 AC650004 */ sw $a1, 4($v1) -/* D7348 80140C48 AD420000 */ sw $v0, ($t2) -/* D734C 80140C4C 24620018 */ addiu $v0, $v1, 0x18 -/* D7350 80140C50 AC7E0008 */ sw $fp, 8($v1) -/* D7354 80140C54 AC60000C */ sw $zero, 0xc($v1) -/* D7358 80140C58 AD420000 */ sw $v0, ($t2) -/* D735C 80140C5C 00D91025 */ or $v0, $a2, $t9 -/* D7360 80140C60 000B2880 */ sll $a1, $t3, 2 -/* D7364 80140C64 30A50FFF */ andi $a1, $a1, 0xfff -/* D7368 80140C68 00052B00 */ sll $a1, $a1, 0xc -/* D736C 80140C6C AC620010 */ sw $v0, 0x10($v1) -/* D7370 80140C70 00B81025 */ or $v0, $a1, $t8 -/* D7374 80140C74 AC620014 */ sw $v0, 0x14($v1) -/* D7378 80140C78 24620020 */ addiu $v0, $v1, 0x20 -/* D737C 80140C7C AD420000 */ sw $v0, ($t2) -/* D7380 80140C80 24620028 */ addiu $v0, $v1, 0x28 -/* D7384 80140C84 AC770018 */ sw $s7, 0x18($v1) -/* D7388 80140C88 AC60001C */ sw $zero, 0x1c($v1) -/* D738C 80140C8C AD420000 */ sw $v0, ($t2) -/* D7390 80140C90 24620030 */ addiu $v0, $v1, 0x30 -/* D7394 80140C94 00CF3025 */ or $a2, $a2, $t7 -/* D7398 80140C98 00AE2825 */ or $a1, $a1, $t6 -/* D739C 80140C9C AC640020 */ sw $a0, 0x20($v1) -/* D73A0 80140CA0 AC670024 */ sw $a3, 0x24($v1) -.L80140CA4: -/* D73A4 80140CA4 AD420000 */ sw $v0, ($t2) -/* D73A8 80140CA8 AC660028 */ sw $a2, 0x28($v1) -/* D73AC 80140CAC AC65002C */ sw $a1, 0x2c($v1) -.L80140CB0: -/* D73B0 80140CB0 8E620000 */ lw $v0, ($s3) -/* D73B4 80140CB4 30428000 */ andi $v0, $v0, 0x8000 -/* D73B8 80140CB8 10400065 */ beqz $v0, .L80140E50 -/* D73BC 80140CBC 00000000 */ nop -/* D73C0 80140CC0 8D440000 */ lw $a0, ($t2) -/* D73C4 80140CC4 24820008 */ addiu $v0, $a0, 8 -/* D73C8 80140CC8 AD420000 */ sw $v0, ($t2) -/* D73CC 80140CCC 8FB60088 */ lw $s6, 0x88($sp) -/* D73D0 80140CD0 00161480 */ sll $v0, $s6, 0x12 -/* D73D4 80140CD4 00021403 */ sra $v0, $v0, 0x10 -/* D73D8 80140CD8 18400005 */ blez $v0, .L80140CF0 -/* D73DC 80140CDC 30420FFF */ andi $v0, $v0, 0xfff -/* D73E0 80140CE0 00021300 */ sll $v0, $v0, 0xc -/* D73E4 80140CE4 3C03E400 */ lui $v1, 0xe400 -/* D73E8 80140CE8 0805033D */ j .L80140CF4 -/* D73EC 80140CEC 00431825 */ or $v1, $v0, $v1 -.L80140CF0: -/* D73F0 80140CF0 3C03E400 */ lui $v1, 0xe400 -.L80140CF4: -/* D73F4 80140CF4 AC830000 */ sw $v1, ($a0) -/* D73F8 80140CF8 8FA8002C */ lw $t0, 0x2c($sp) -/* D73FC 80140CFC 00081480 */ sll $v0, $t0, 0x12 -/* D7400 80140D00 00021403 */ sra $v0, $v0, 0x10 -/* D7404 80140D04 18400003 */ blez $v0, .L80140D14 -/* D7408 80140D08 30420FFF */ andi $v0, $v0, 0xfff -/* D740C 80140D0C 00621025 */ or $v0, $v1, $v0 -/* D7410 80140D10 AC820000 */ sw $v0, ($a0) -.L80140D14: -/* D7414 80140D14 8FB60030 */ lw $s6, 0x30($sp) -/* D7418 80140D18 00161480 */ sll $v0, $s6, 0x12 -/* D741C 80140D1C 00021403 */ sra $v0, $v0, 0x10 -/* D7420 80140D20 18400004 */ blez $v0, .L80140D34 -/* D7424 80140D24 24830004 */ addiu $v1, $a0, 4 -/* D7428 80140D28 30420FFF */ andi $v0, $v0, 0xfff -/* D742C 80140D2C 0805034E */ j .L80140D38 -/* D7430 80140D30 00021300 */ sll $v0, $v0, 0xc -.L80140D34: -/* D7434 80140D34 0000102D */ daddu $v0, $zero, $zero -.L80140D38: -/* D7438 80140D38 AC620000 */ sw $v0, ($v1) -/* D743C 80140D3C 8FA80078 */ lw $t0, 0x78($sp) -/* D7440 80140D40 19000004 */ blez $t0, .L80140D54 -/* D7444 80140D44 00000000 */ nop -/* D7448 80140D48 8FB6007C */ lw $s6, 0x7c($sp) -/* D744C 80140D4C 00561025 */ or $v0, $v0, $s6 -/* D7450 80140D50 AC620000 */ sw $v0, ($v1) -.L80140D54: -/* D7454 80140D54 8D420000 */ lw $v0, ($t2) -/* D7458 80140D58 0040182D */ daddu $v1, $v0, $zero -/* D745C 80140D5C 24420008 */ addiu $v0, $v0, 8 -/* D7460 80140D60 AD420000 */ sw $v0, ($t2) -/* D7464 80140D64 3C02E100 */ lui $v0, %hi(D_E1000010) -/* D7468 80140D68 AC620000 */ sw $v0, ($v1) -/* D746C 80140D6C 8FA80018 */ lw $t0, 0x18($sp) -/* D7470 80140D70 8FB60014 */ lw $s6, 0x14($sp) -/* D7474 80140D74 00081140 */ sll $v0, $t0, 5 -/* D7478 80140D78 24460010 */ addiu $a2, $v0, %lo(D_E1000010) -/* D747C 80140D7C 00161140 */ sll $v0, $s6, 5 -/* D7480 80140D80 8FA80030 */ lw $t0, 0x30($sp) -/* D7484 80140D84 24450010 */ addiu $a1, $v0, 0x10 -/* D7488 80140D88 00081480 */ sll $v0, $t0, 0x12 -/* D748C 80140D8C 00022403 */ sra $a0, $v0, 0x10 -/* D7490 80140D90 04810013 */ bgez $a0, .L80140DE0 -/* D7494 80140D94 24630004 */ addiu $v1, $v1, 4 -/* D7498 80140D98 8FB6000C */ lw $s6, 0xc($sp) -/* D749C 80140D9C 00161400 */ sll $v0, $s6, 0x10 -/* D74A0 80140DA0 00021403 */ sra $v0, $v0, 0x10 -/* D74A4 80140DA4 04410007 */ bgez $v0, .L80140DC4 -/* D74A8 80140DA8 00820018 */ mult $a0, $v0 -/* D74AC 80140DAC 00004012 */ mflo $t0 -/* D74B0 80140DB0 000811C3 */ sra $v0, $t0, 7 -/* D74B4 80140DB4 04410008 */ bgez $v0, .L80140DD8 -/* D74B8 80140DB8 00A21023 */ subu $v0, $a1, $v0 -/* D74BC 80140DBC 08050375 */ j .L80140DD4 -/* D74C0 80140DC0 0000102D */ daddu $v0, $zero, $zero -.L80140DC4: -/* D74C4 80140DC4 00004012 */ mflo $t0 -/* D74C8 80140DC8 000811C3 */ sra $v0, $t0, 7 -/* D74CC 80140DCC 5C400001 */ bgtzl $v0, .L80140DD4 -/* D74D0 80140DD0 0000102D */ daddu $v0, $zero, $zero -.L80140DD4: -/* D74D4 80140DD4 00A21023 */ subu $v0, $a1, $v0 -.L80140DD8: -/* D74D8 80140DD8 08050379 */ j .L80140DE4 -/* D74DC 80140DDC 00022400 */ sll $a0, $v0, 0x10 -.L80140DE0: -/* D74E0 80140DE0 00052400 */ sll $a0, $a1, 0x10 -.L80140DE4: -/* D74E4 80140DE4 8FB60028 */ lw $s6, 0x28($sp) -/* D74E8 80140DE8 00161080 */ sll $v0, $s6, 2 -/* D74EC 80140DEC 04410079 */ bgez $v0, .L80140FD4 -/* D74F0 80140DF0 30C2FFFF */ andi $v0, $a2, 0xffff -/* D74F4 80140DF4 8FA80010 */ lw $t0, 0x10($sp) -/* D74F8 80140DF8 00081400 */ sll $v0, $t0, 0x10 -/* D74FC 80140DFC 00021403 */ sra $v0, $v0, 0x10 -/* D7500 80140E00 0441000A */ bgez $v0, .L80140E2C -/* D7504 80140E04 00000000 */ nop -/* D7508 80140E08 8FA80078 */ lw $t0, 0x78($sp) -/* D750C 80140E0C 01020018 */ mult $t0, $v0 -/* D7510 80140E10 0000B012 */ mflo $s6 -/* D7514 80140E14 001611C3 */ sra $v0, $s6, 7 -/* D7518 80140E18 04420001 */ bltzl $v0, .L80140E20 -/* D751C 80140E1C 0000102D */ daddu $v0, $zero, $zero -.L80140E20: -/* D7520 80140E20 00C21023 */ subu $v0, $a2, $v0 -/* D7524 80140E24 080503F5 */ j .L80140FD4 -/* D7528 80140E28 3042FFFF */ andi $v0, $v0, 0xffff -.L80140E2C: -/* D752C 80140E2C 8FA80078 */ lw $t0, 0x78($sp) -/* D7530 80140E30 01020018 */ mult $t0, $v0 -/* D7534 80140E34 0000B012 */ mflo $s6 -/* D7538 80140E38 001611C3 */ sra $v0, $s6, 7 -/* D753C 80140E3C 5C400001 */ bgtzl $v0, .L80140E44 -/* D7540 80140E40 0000102D */ daddu $v0, $zero, $zero -.L80140E44: -/* D7544 80140E44 00C21023 */ subu $v0, $a2, $v0 -/* D7548 80140E48 080503F5 */ j .L80140FD4 -/* D754C 80140E4C 3042FFFF */ andi $v0, $v0, 0xffff -.L80140E50: -/* D7550 80140E50 8D440000 */ lw $a0, ($t2) -/* D7554 80140E54 24820008 */ addiu $v0, $a0, 8 -/* D7558 80140E58 AD420000 */ sw $v0, ($t2) -/* D755C 80140E5C 8FA80088 */ lw $t0, 0x88($sp) -/* D7560 80140E60 00081480 */ sll $v0, $t0, 0x12 -/* D7564 80140E64 00021403 */ sra $v0, $v0, 0x10 -/* D7568 80140E68 18400005 */ blez $v0, .L80140E80 -/* D756C 80140E6C 30420FFF */ andi $v0, $v0, 0xfff -/* D7570 80140E70 00021300 */ sll $v0, $v0, 0xc -/* D7574 80140E74 3C03E400 */ lui $v1, 0xe400 -/* D7578 80140E78 080503A1 */ j .L80140E84 -/* D757C 80140E7C 00431825 */ or $v1, $v0, $v1 -.L80140E80: -/* D7580 80140E80 3C03E400 */ lui $v1, 0xe400 -.L80140E84: -/* D7584 80140E84 AC830000 */ sw $v1, ($a0) -/* D7588 80140E88 8FB6002C */ lw $s6, 0x2c($sp) -/* D758C 80140E8C 00161480 */ sll $v0, $s6, 0x12 -/* D7590 80140E90 00021403 */ sra $v0, $v0, 0x10 -/* D7594 80140E94 18400003 */ blez $v0, .L80140EA4 -/* D7598 80140E98 30420FFF */ andi $v0, $v0, 0xfff -/* D759C 80140E9C 00621025 */ or $v0, $v1, $v0 -/* D75A0 80140EA0 AC820000 */ sw $v0, ($a0) -.L80140EA4: -/* D75A4 80140EA4 8FA80030 */ lw $t0, 0x30($sp) -/* D75A8 80140EA8 00081480 */ sll $v0, $t0, 0x12 -/* D75AC 80140EAC 00021403 */ sra $v0, $v0, 0x10 -/* D75B0 80140EB0 18400004 */ blez $v0, .L80140EC4 -/* D75B4 80140EB4 24830004 */ addiu $v1, $a0, 4 -/* D75B8 80140EB8 30420FFF */ andi $v0, $v0, 0xfff -/* D75BC 80140EBC 080503B2 */ j .L80140EC8 -/* D75C0 80140EC0 00021300 */ sll $v0, $v0, 0xc -.L80140EC4: -/* D75C4 80140EC4 0000102D */ daddu $v0, $zero, $zero -.L80140EC8: -/* D75C8 80140EC8 AC620000 */ sw $v0, ($v1) -/* D75CC 80140ECC 8FB60078 */ lw $s6, 0x78($sp) -/* D75D0 80140ED0 1AC00004 */ blez $s6, .L80140EE4 -/* D75D4 80140ED4 00000000 */ nop -/* D75D8 80140ED8 8FA8007C */ lw $t0, 0x7c($sp) -/* D75DC 80140EDC 00481025 */ or $v0, $v0, $t0 -/* D75E0 80140EE0 AC620000 */ sw $v0, ($v1) -.L80140EE4: -/* D75E4 80140EE4 8D420000 */ lw $v0, ($t2) -/* D75E8 80140EE8 0040182D */ daddu $v1, $v0, $zero -/* D75EC 80140EEC 24420008 */ addiu $v0, $v0, 8 -/* D75F0 80140EF0 AD420000 */ sw $v0, ($t2) -/* D75F4 80140EF4 3C02E100 */ lui $v0, 0xe100 -/* D75F8 80140EF8 AC620000 */ sw $v0, ($v1) -/* D75FC 80140EFC 24630004 */ addiu $v1, $v1, 4 -/* D7600 80140F00 8FB60018 */ lw $s6, 0x18($sp) -/* D7604 80140F04 8FA80014 */ lw $t0, 0x14($sp) -/* D7608 80140F08 00163140 */ sll $a2, $s6, 5 -/* D760C 80140F0C 8FB60030 */ lw $s6, 0x30($sp) -/* D7610 80140F10 00161480 */ sll $v0, $s6, 0x12 -/* D7614 80140F14 00022403 */ sra $a0, $v0, 0x10 -/* D7618 80140F18 04810013 */ bgez $a0, .L80140F68 -/* D761C 80140F1C 00082940 */ sll $a1, $t0, 5 -/* D7620 80140F20 8FA8000C */ lw $t0, 0xc($sp) -/* D7624 80140F24 00081400 */ sll $v0, $t0, 0x10 -/* D7628 80140F28 00021403 */ sra $v0, $v0, 0x10 -/* D762C 80140F2C 04410007 */ bgez $v0, .L80140F4C -/* D7630 80140F30 00820018 */ mult $a0, $v0 -/* D7634 80140F34 00004012 */ mflo $t0 -/* D7638 80140F38 000811C3 */ sra $v0, $t0, 7 -/* D763C 80140F3C 04410008 */ bgez $v0, .L80140F60 -/* D7640 80140F40 00A21023 */ subu $v0, $a1, $v0 -/* D7644 80140F44 080503D7 */ j .L80140F5C -/* D7648 80140F48 0000102D */ daddu $v0, $zero, $zero -.L80140F4C: -/* D764C 80140F4C 00004012 */ mflo $t0 -/* D7650 80140F50 000811C3 */ sra $v0, $t0, 7 -/* D7654 80140F54 5C400001 */ bgtzl $v0, .L80140F5C -/* D7658 80140F58 0000102D */ daddu $v0, $zero, $zero -.L80140F5C: -/* D765C 80140F5C 00A21023 */ subu $v0, $a1, $v0 -.L80140F60: -/* D7660 80140F60 080503DB */ j .L80140F6C -/* D7664 80140F64 00022400 */ sll $a0, $v0, 0x10 -.L80140F68: -/* D7668 80140F68 00052400 */ sll $a0, $a1, 0x10 -.L80140F6C: -/* D766C 80140F6C 8FB60028 */ lw $s6, 0x28($sp) -/* D7670 80140F70 00161080 */ sll $v0, $s6, 2 -/* D7674 80140F74 04410017 */ bgez $v0, .L80140FD4 -/* D7678 80140F78 30C2FFFF */ andi $v0, $a2, 0xffff -/* D767C 80140F7C 8FA80010 */ lw $t0, 0x10($sp) -/* D7680 80140F80 00081400 */ sll $v0, $t0, 0x10 -/* D7684 80140F84 00021403 */ sra $v0, $v0, 0x10 -/* D7688 80140F88 0441000A */ bgez $v0, .L80140FB4 -/* D768C 80140F8C 00000000 */ nop -/* D7690 80140F90 8FA80078 */ lw $t0, 0x78($sp) -/* D7694 80140F94 01020018 */ mult $t0, $v0 -/* D7698 80140F98 0000B012 */ mflo $s6 -/* D769C 80140F9C 001611C3 */ sra $v0, $s6, 7 -/* D76A0 80140FA0 04420001 */ bltzl $v0, .L80140FA8 -/* D76A4 80140FA4 0000102D */ daddu $v0, $zero, $zero -.L80140FA8: -/* D76A8 80140FA8 00C21023 */ subu $v0, $a2, $v0 -/* D76AC 80140FAC 080503F5 */ j .L80140FD4 -/* D76B0 80140FB0 3042FFFF */ andi $v0, $v0, 0xffff -.L80140FB4: -/* D76B4 80140FB4 8FA80078 */ lw $t0, 0x78($sp) -/* D76B8 80140FB8 01020018 */ mult $t0, $v0 -/* D76BC 80140FBC 0000B012 */ mflo $s6 -/* D76C0 80140FC0 001611C3 */ sra $v0, $s6, 7 -/* D76C4 80140FC4 5C400001 */ bgtzl $v0, .L80140FCC -/* D76C8 80140FC8 0000102D */ daddu $v0, $zero, $zero -.L80140FCC: -/* D76CC 80140FCC 00C21023 */ subu $v0, $a2, $v0 -/* D76D0 80140FD0 3042FFFF */ andi $v0, $v0, 0xffff -.L80140FD4: -/* D76D4 80140FD4 00821025 */ or $v0, $a0, $v0 -/* D76D8 80140FD8 AC620000 */ sw $v0, ($v1) -/* D76DC 80140FDC 8D420000 */ lw $v0, ($t2) -/* D76E0 80140FE0 0040202D */ daddu $a0, $v0, $zero -/* D76E4 80140FE4 24420008 */ addiu $v0, $v0, 8 -/* D76E8 80140FE8 AD420000 */ sw $v0, ($t2) -/* D76EC 80140FEC 3C02F100 */ lui $v0, 0xf100 -/* D76F0 80140FF0 AC820000 */ sw $v0, ($a0) -/* D76F4 80140FF4 8FA8000C */ lw $t0, 0xc($sp) -/* D76F8 80140FF8 8FB60010 */ lw $s6, 0x10($sp) -/* D76FC 80140FFC 00081400 */ sll $v0, $t0, 0x10 -/* D7700 80141000 32C3FFFF */ andi $v1, $s6, 0xffff -/* D7704 80141004 00431025 */ or $v0, $v0, $v1 -/* D7708 80141008 AC820004 */ sw $v0, 4($a0) -/* D770C 8014100C 8FA8001C */ lw $t0, 0x1c($sp) -/* D7710 80141010 15000013 */ bnez $t0, .L80141060 -/* D7714 80141014 25AD0100 */ addiu $t5, $t5, 0x100 -/* D7718 80141018 C7A0000C */ lwc1 $f0, 0xc($sp) -/* D771C 8014101C 46800021 */ cvt.d.w $f0, $f0 -/* D7720 80141020 3C014050 */ lui $at, 0x4050 -/* D7724 80141024 44811800 */ mtc1 $at, $f3 -/* D7728 80141028 44801000 */ mtc1 $zero, $f2 -/* D772C 8014102C 46202003 */ div.d $f0, $f4, $f0 -/* D7730 80141030 46220002 */ mul.d $f0, $f0, $f2 -/* D7734 80141034 00000000 */ nop -/* D7738 80141038 8FB60080 */ lw $s6, 0x80($sp) -/* D773C 8014103C C7A20030 */ lwc1 $f2, 0x30($sp) -/* D7740 80141040 468010A1 */ cvt.d.w $f2, $f2 -/* D7744 80141044 46201080 */ add.d $f2, $f2, $f0 -/* D7748 80141048 26D60080 */ addiu $s6, $s6, 0x80 -/* D774C 8014104C AFB60080 */ sw $s6, 0x80($sp) -/* D7750 80141050 4620118D */ trunc.w.d $f6, $f2 -/* D7754 80141054 E7A60030 */ swc1 $f6, 0x30($sp) -/* D7758 80141058 0804FF72 */ j .L8013FDC8 -/* D775C 8014105C 258C0040 */ addiu $t4, $t4, 0x40 -.L80141060: -/* D7760 80141060 8FB60020 */ lw $s6, 0x20($sp) -/* D7764 80141064 16C00012 */ bnez $s6, .L801410B0 -/* D7768 80141068 00000000 */ nop -/* D776C 8014106C C7A20010 */ lwc1 $f2, 0x10($sp) -/* D7770 80141070 468010A1 */ cvt.d.w $f2, $f2 -/* D7774 80141074 3C014040 */ lui $at, 0x4040 -/* D7778 80141078 44810800 */ mtc1 $at, $f1 -/* D777C 8014107C 44800000 */ mtc1 $zero, $f0 -/* D7780 80141080 46222083 */ div.d $f2, $f4, $f2 -/* D7784 80141084 46201082 */ mul.d $f2, $f2, $f0 -/* D7788 80141088 00000000 */ nop -/* D778C 8014108C 8FA80024 */ lw $t0, 0x24($sp) -/* D7790 80141090 C7A00028 */ lwc1 $f0, 0x28($sp) -/* D7794 80141094 46800021 */ cvt.d.w $f0, $f0 -/* D7798 80141098 46220000 */ add.d $f0, $f0, $f2 -/* D779C 8014109C 25080020 */ addiu $t0, $t0, 0x20 -/* D77A0 801410A0 AFA80024 */ sw $t0, 0x24($sp) -/* D77A4 801410A4 4620018D */ trunc.w.d $f6, $f0 -/* D77A8 801410A8 0804FF08 */ j .L8013FC20 -/* D77AC 801410AC E7A60028 */ swc1 $f6, 0x28($sp) -.L801410B0: -/* D77B0 801410B0 3C03800A */ lui $v1, %hi(gMasterGfxPos) -/* D77B4 801410B4 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos) -/* D77B8 801410B8 8C620000 */ lw $v0, ($v1) -/* D77BC 801410BC 0040202D */ daddu $a0, $v0, $zero -/* D77C0 801410C0 24420008 */ addiu $v0, $v0, 8 -/* D77C4 801410C4 AC620000 */ sw $v0, ($v1) -/* D77C8 801410C8 3C02E700 */ lui $v0, 0xe700 -/* D77CC 801410CC AC820000 */ sw $v0, ($a0) -/* D77D0 801410D0 AC800004 */ sw $zero, 4($a0) -/* D77D4 801410D4 8FBE00B0 */ lw $fp, 0xb0($sp) -/* D77D8 801410D8 8FB700AC */ lw $s7, 0xac($sp) -/* D77DC 801410DC 8FB600A8 */ lw $s6, 0xa8($sp) -/* D77E0 801410E0 8FB500A4 */ lw $s5, 0xa4($sp) -/* D77E4 801410E4 8FB400A0 */ lw $s4, 0xa0($sp) -/* D77E8 801410E8 8FB3009C */ lw $s3, 0x9c($sp) -/* D77EC 801410EC 8FB20098 */ lw $s2, 0x98($sp) -/* D77F0 801410F0 8FB10094 */ lw $s1, 0x94($sp) -/* D77F4 801410F4 8FB00090 */ lw $s0, 0x90($sp) -/* D77F8 801410F8 03E00008 */ jr $ra -/* D77FC 801410FC 27BD00B8 */ addiu $sp, $sp, 0xb8 diff --git a/ver/us/asm/nonmatchings/hud_element/hud_element_update.s b/ver/us/asm/nonmatchings/hud_element/hud_element_update.s deleted file mode 100644 index 5448144a29..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/hud_element_update.s +++ /dev/null @@ -1,777 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_801511B0 -.word .L80141750_D7E50, .L80141808_D7F08, .L80141920_D8020, .L80141C6C_D836C, .L80141C7C_D837C, .L80141CBC_D83BC, .L80141CFC_D83FC, .L80141DDC_D84DC, .L801417A0_D7EA0, .L801417B8_D7EB8, .L80141E28_D8528, .L80141E48_D8548, .L80141E74_D8574, .L80141A54_D8154, .L80141EA8_D85A8, .L80142080_D8780, .L801420BC_D87BC, .L80141768_D7E68, .L80141784_D7E84, .L801420E4_D87E4, .L80141C8C_D838C, .L80142144_D8844, .L801421F0_D88F0, .L80142174_D8874, .L801417CC_D7ECC, .L801417EC_D7EEC, .L801421A4_D88A4, .L801421C0_D88C0 - -.section .text - -glabel hud_element_update -/* D7E04 80141704 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* D7E08 80141708 AFB3001C */ sw $s3, 0x1c($sp) -/* D7E0C 8014170C 0080982D */ daddu $s3, $a0, $zero -/* D7E10 80141710 AFBF0020 */ sw $ra, 0x20($sp) -/* D7E14 80141714 AFB20018 */ sw $s2, 0x18($sp) -/* D7E18 80141718 AFB10014 */ sw $s1, 0x14($sp) -/* D7E1C 8014171C AFB00010 */ sw $s0, 0x10($sp) -/* D7E20 80141720 8E700004 */ lw $s0, 4($s3) -/* D7E24 80141724 8E64001C */ lw $a0, 0x1c($s3) -/* D7E28 80141728 8E030000 */ lw $v1, ($s0) -/* D7E2C 8014172C 2C62001C */ sltiu $v0, $v1, 0x1c -/* D7E30 80141730 104002AF */ beqz $v0, .L801421F0_D88F0 -/* D7E34 80141734 26100004 */ addiu $s0, $s0, 4 -/* D7E38 80141738 00031080 */ sll $v0, $v1, 2 -/* D7E3C 8014173C 3C018015 */ lui $at, %hi(jtbl_801511B0) -/* D7E40 80141740 00220821 */ addu $at, $at, $v0 -/* D7E44 80141744 8C2211B0 */ lw $v0, %lo(jtbl_801511B0)($at) -/* D7E48 80141748 00400008 */ jr $v0 -/* D7E4C 8014174C 00000000 */ nop -.L80141750_D7E50: -/* D7E50 80141750 8E620000 */ lw $v0, ($s3) -/* D7E54 80141754 2403003C */ addiu $v1, $zero, 0x3c -/* D7E58 80141758 A2630047 */ sb $v1, 0x47($s3) -/* D7E5C 8014175C 34420004 */ ori $v0, $v0, 4 -/* D7E60 80141760 0805087C */ j .L801421F0_D88F0 -/* D7E64 80141764 AE620000 */ sw $v0, ($s3) -.L80141768_D7E68: -/* D7E68 80141768 2402003C */ addiu $v0, $zero, 0x3c -/* D7E6C 8014176C A2620047 */ sb $v0, 0x47($s3) -/* D7E70 80141770 8E620000 */ lw $v0, ($s3) -/* D7E74 80141774 3C030004 */ lui $v1, 4 -/* D7E78 80141778 00431025 */ or $v0, $v0, $v1 -/* D7E7C 8014177C 0805087C */ j .L801421F0_D88F0 -/* D7E80 80141780 AE620000 */ sw $v0, ($s3) -.L80141784_D7E84: -/* D7E84 80141784 24020001 */ addiu $v0, $zero, 1 -/* D7E88 80141788 8E630000 */ lw $v1, ($s3) -/* D7E8C 8014178C 3C040008 */ lui $a0, 8 -/* D7E90 80141790 AE700004 */ sw $s0, 4($s3) -/* D7E94 80141794 00641825 */ or $v1, $v1, $a0 -/* D7E98 80141798 0805087D */ j .L801421F4 -/* D7E9C 8014179C AE630000 */ sw $v1, ($s3) -.L801417A0_D7EA0: -/* D7EA0 801417A0 8E630000 */ lw $v1, ($s3) -/* D7EA4 801417A4 24020001 */ addiu $v0, $zero, 1 -/* D7EA8 801417A8 AE700004 */ sw $s0, 4($s3) -/* D7EAC 801417AC 34634000 */ ori $v1, $v1, 0x4000 -/* D7EB0 801417B0 0805087D */ j .L801421F4 -/* D7EB4 801417B4 AE630000 */ sw $v1, ($s3) -.L801417B8_D7EB8: -/* D7EB8 801417B8 24020001 */ addiu $v0, $zero, 1 -/* D7EBC 801417BC 8E630000 */ lw $v1, ($s3) -/* D7EC0 801417C0 2404BFFF */ addiu $a0, $zero, -0x4001 -/* D7EC4 801417C4 0805073C */ j .L80141CF0 -/* D7EC8 801417C8 AE700004 */ sw $s0, 4($s3) -.L801417CC_D7ECC: -/* D7ECC 801417CC 8E110000 */ lw $s1, ($s0) -/* D7ED0 801417D0 26100004 */ addiu $s0, $s0, 4 -/* D7ED4 801417D4 8E630000 */ lw $v1, ($s3) -/* D7ED8 801417D8 24020001 */ addiu $v0, $zero, 1 -/* D7EDC 801417DC AE700004 */ sw $s0, 4($s3) -/* D7EE0 801417E0 00711825 */ or $v1, $v1, $s1 -/* D7EE4 801417E4 0805087D */ j .L801421F4 -/* D7EE8 801417E8 AE630000 */ sw $v1, ($s3) -.L801417EC_D7EEC: -/* D7EEC 801417EC 8E110000 */ lw $s1, ($s0) -/* D7EF0 801417F0 26100004 */ addiu $s0, $s0, 4 -/* D7EF4 801417F4 8E630000 */ lw $v1, ($s3) -/* D7EF8 801417F8 24020001 */ addiu $v0, $zero, 1 -/* D7EFC 801417FC AE700004 */ sw $s0, 4($s3) -/* D7F00 80141800 0805073C */ j .L80141CF0 -/* D7F04 80141804 00112027 */ nor $a0, $zero, $s1 -.L80141808_D7F08: -/* D7F08 80141808 92020003 */ lbu $v0, 3($s0) -/* D7F0C 8014180C 26100004 */ addiu $s0, $s0, 4 -/* D7F10 80141810 A2620047 */ sb $v0, 0x47($s3) -/* D7F14 80141814 8E020000 */ lw $v0, ($s0) -/* D7F18 80141818 3C030040 */ lui $v1, 0x40 -/* D7F1C 8014181C AE620010 */ sw $v0, 0x10($s3) -/* D7F20 80141820 8E620000 */ lw $v0, ($s3) -/* D7F24 80141824 26100004 */ addiu $s0, $s0, 4 -/* D7F28 80141828 00431024 */ and $v0, $v0, $v1 -/* D7F2C 8014182C 10400005 */ beqz $v0, .L80141844 -/* D7F30 80141830 AE700004 */ sw $s0, 4($s3) -/* D7F34 80141834 8E620010 */ lw $v0, 0x10($s3) -/* D7F38 80141838 8E630018 */ lw $v1, 0x18($s3) -/* D7F3C 8014183C 00431021 */ addu $v0, $v0, $v1 -/* D7F40 80141840 AE620010 */ sw $v0, 0x10($s3) -.L80141844: -/* D7F44 80141844 8E630000 */ lw $v1, ($s3) -/* D7F48 80141848 30620100 */ andi $v0, $v1, 0x100 -/* D7F4C 8014184C 10400268 */ beqz $v0, .L801421F0_D88F0 -/* D7F50 80141850 3C020010 */ lui $v0, 0x10 -/* D7F54 80141854 00621024 */ and $v0, $v1, $v0 -/* D7F58 80141858 14400012 */ bnez $v0, .L801418A4 -/* D7F5C 8014185C 00000000 */ nop -/* D7F60 80141860 3C028015 */ lui $v0, %hi(gHudElementSizes) -/* D7F64 80141864 2442EFCC */ addiu $v0, $v0, %lo(gHudElementSizes) -/* D7F68 80141868 82650046 */ lb $a1, 0x46($s3) -/* D7F6C 8014186C 82660045 */ lb $a2, 0x45($s3) -/* D7F70 80141870 00051840 */ sll $v1, $a1, 1 -/* D7F74 80141874 00651821 */ addu $v1, $v1, $a1 -/* D7F78 80141878 00031840 */ sll $v1, $v1, 1 -/* D7F7C 8014187C 00621821 */ addu $v1, $v1, $v0 -/* D7F80 80141880 84670000 */ lh $a3, ($v1) -/* D7F84 80141884 84680002 */ lh $t0, 2($v1) -/* D7F88 80141888 00061840 */ sll $v1, $a2, 1 -/* D7F8C 8014188C 00661821 */ addu $v1, $v1, $a2 -/* D7F90 80141890 00031840 */ sll $v1, $v1, 1 -/* D7F94 80141894 00621821 */ addu $v1, $v1, $v0 -/* D7F98 80141898 84640000 */ lh $a0, ($v1) -/* D7F9C 8014189C 0805062D */ j .L801418B4 -/* D7FA0 801418A0 84650002 */ lh $a1, 2($v1) -.L801418A4: -/* D7FA4 801418A4 9267004E */ lbu $a3, 0x4e($s3) -/* D7FA8 801418A8 9268004F */ lbu $t0, 0x4f($s3) -/* D7FAC 801418AC 92640050 */ lbu $a0, 0x50($s3) -/* D7FB0 801418B0 92650051 */ lbu $a1, 0x51($s3) -.L801418B4: -/* D7FB4 801418B4 8E630000 */ lw $v1, ($s3) -/* D7FB8 801418B8 30620200 */ andi $v0, $v1, 0x200 -/* D7FBC 801418BC 144000CD */ bnez $v0, .L80141BF4 -/* D7FC0 801418C0 2402FDFF */ addiu $v0, $zero, -0x201 -/* D7FC4 801418C4 34620200 */ ori $v0, $v1, 0x200 -/* D7FC8 801418C8 44870000 */ mtc1 $a3, $f0 -/* D7FCC 801418CC 00000000 */ nop -/* D7FD0 801418D0 46800020 */ cvt.s.w $f0, $f0 -/* D7FD4 801418D4 44882000 */ mtc1 $t0, $f4 -/* D7FD8 801418D8 00000000 */ nop -/* D7FDC 801418DC 46802120 */ cvt.s.w $f4, $f4 -/* D7FE0 801418E0 44841000 */ mtc1 $a0, $f2 -/* D7FE4 801418E4 00000000 */ nop -/* D7FE8 801418E8 468010A0 */ cvt.s.w $f2, $f2 -/* D7FEC 801418EC AE620000 */ sw $v0, ($s3) -/* D7FF0 801418F0 82620047 */ lb $v0, 0x47($s3) -/* D7FF4 801418F4 46001081 */ sub.s $f2, $f2, $f0 -/* D7FF8 801418F8 E6600028 */ swc1 $f0, 0x28($s3) -/* D7FFC 801418FC 44820000 */ mtc1 $v0, $f0 -/* D8000 80141900 00000000 */ nop -/* D8004 80141904 46800020 */ cvt.s.w $f0, $f0 -/* D8008 80141908 46001083 */ div.s $f2, $f2, $f0 -/* D800C 8014190C 44850000 */ mtc1 $a1, $f0 -/* D8010 80141910 00000000 */ nop -/* D8014 80141914 46800020 */ cvt.s.w $f0, $f0 -/* D8018 80141918 08050713 */ j .L80141C4C -/* D801C 8014191C E664002C */ swc1 $f4, 0x2c($s3) -.L80141920_D8020: -/* D8020 80141920 92020003 */ lbu $v0, 3($s0) -/* D8024 80141924 26100004 */ addiu $s0, $s0, 4 -/* D8028 80141928 A2620047 */ sb $v0, 0x47($s3) -/* D802C 8014192C 8E020000 */ lw $v0, ($s0) -/* D8030 80141930 26100004 */ addiu $s0, $s0, 4 -/* D8034 80141934 AE620010 */ sw $v0, 0x10($s3) -/* D8038 80141938 8E020000 */ lw $v0, ($s0) -/* D803C 8014193C 3C030040 */ lui $v1, 0x40 -/* D8040 80141940 AE620014 */ sw $v0, 0x14($s3) -/* D8044 80141944 8E620000 */ lw $v0, ($s3) -/* D8048 80141948 26100004 */ addiu $s0, $s0, 4 -/* D804C 8014194C 00431024 */ and $v0, $v0, $v1 -/* D8050 80141950 10400009 */ beqz $v0, .L80141978 -/* D8054 80141954 AE700004 */ sw $s0, 4($s3) -/* D8058 80141958 8E620010 */ lw $v0, 0x10($s3) -/* D805C 8014195C 8E640018 */ lw $a0, 0x18($s3) -/* D8060 80141960 8E630014 */ lw $v1, 0x14($s3) -/* D8064 80141964 0080282D */ daddu $a1, $a0, $zero -/* D8068 80141968 00441021 */ addu $v0, $v0, $a0 -/* D806C 8014196C 00651821 */ addu $v1, $v1, $a1 -/* D8070 80141970 AE620010 */ sw $v0, 0x10($s3) -/* D8074 80141974 AE630014 */ sw $v1, 0x14($s3) -.L80141978: -/* D8078 80141978 8E630000 */ lw $v1, ($s3) -/* D807C 8014197C 30620100 */ andi $v0, $v1, 0x100 -/* D8080 80141980 1040021B */ beqz $v0, .L801421F0_D88F0 -/* D8084 80141984 3C020010 */ lui $v0, 0x10 -/* D8088 80141988 00621024 */ and $v0, $v1, $v0 -/* D808C 8014198C 14400012 */ bnez $v0, .L801419D8 -/* D8090 80141990 00000000 */ nop -/* D8094 80141994 3C028015 */ lui $v0, %hi(gHudElementSizes) -/* D8098 80141998 2442EFCC */ addiu $v0, $v0, %lo(gHudElementSizes) -/* D809C 8014199C 82650046 */ lb $a1, 0x46($s3) -/* D80A0 801419A0 82660045 */ lb $a2, 0x45($s3) -/* D80A4 801419A4 00051840 */ sll $v1, $a1, 1 -/* D80A8 801419A8 00651821 */ addu $v1, $v1, $a1 -/* D80AC 801419AC 00031840 */ sll $v1, $v1, 1 -/* D80B0 801419B0 00621821 */ addu $v1, $v1, $v0 -/* D80B4 801419B4 84670000 */ lh $a3, ($v1) -/* D80B8 801419B8 84680002 */ lh $t0, 2($v1) -/* D80BC 801419BC 00061840 */ sll $v1, $a2, 1 -/* D80C0 801419C0 00661821 */ addu $v1, $v1, $a2 -/* D80C4 801419C4 00031840 */ sll $v1, $v1, 1 -/* D80C8 801419C8 00621821 */ addu $v1, $v1, $v0 -/* D80CC 801419CC 84640000 */ lh $a0, ($v1) -/* D80D0 801419D0 0805067A */ j .L801419E8 -/* D80D4 801419D4 84650002 */ lh $a1, 2($v1) -.L801419D8: -/* D80D8 801419D8 9267004E */ lbu $a3, 0x4e($s3) -/* D80DC 801419DC 9268004F */ lbu $t0, 0x4f($s3) -/* D80E0 801419E0 92640050 */ lbu $a0, 0x50($s3) -/* D80E4 801419E4 92650051 */ lbu $a1, 0x51($s3) -.L801419E8: -/* D80E8 801419E8 8E630000 */ lw $v1, ($s3) -/* D80EC 801419EC 30620200 */ andi $v0, $v1, 0x200 -/* D80F0 801419F0 14400080 */ bnez $v0, .L80141BF4 -/* D80F4 801419F4 2402FDFF */ addiu $v0, $zero, -0x201 -/* D80F8 801419F8 34620200 */ ori $v0, $v1, 0x200 -/* D80FC 801419FC 44870000 */ mtc1 $a3, $f0 -/* D8100 80141A00 00000000 */ nop -/* D8104 80141A04 46800020 */ cvt.s.w $f0, $f0 -/* D8108 80141A08 44882000 */ mtc1 $t0, $f4 -/* D810C 80141A0C 00000000 */ nop -/* D8110 80141A10 46802120 */ cvt.s.w $f4, $f4 -/* D8114 80141A14 44841000 */ mtc1 $a0, $f2 -/* D8118 80141A18 00000000 */ nop -/* D811C 80141A1C 468010A0 */ cvt.s.w $f2, $f2 -/* D8120 80141A20 AE620000 */ sw $v0, ($s3) -/* D8124 80141A24 82620047 */ lb $v0, 0x47($s3) -/* D8128 80141A28 46001081 */ sub.s $f2, $f2, $f0 -/* D812C 80141A2C E6600028 */ swc1 $f0, 0x28($s3) -/* D8130 80141A30 44820000 */ mtc1 $v0, $f0 -/* D8134 80141A34 00000000 */ nop -/* D8138 80141A38 46800020 */ cvt.s.w $f0, $f0 -/* D813C 80141A3C 46001083 */ div.s $f2, $f2, $f0 -/* D8140 80141A40 44850000 */ mtc1 $a1, $f0 -/* D8144 80141A44 00000000 */ nop -/* D8148 80141A48 46800020 */ cvt.s.w $f0, $f0 -/* D814C 80141A4C 08050713 */ j .L80141C4C -/* D8150 80141A50 E664002C */ swc1 $f4, 0x2c($s3) -.L80141A54_D8154: -/* D8154 80141A54 92030003 */ lbu $v1, 3($s0) -/* D8158 80141A58 8E620000 */ lw $v0, ($s3) -/* D815C 80141A5C 26100004 */ addiu $s0, $s0, 4 -/* D8160 80141A60 30420400 */ andi $v0, $v0, 0x400 -/* D8164 80141A64 14400007 */ bnez $v0, .L80141A84 -/* D8168 80141A68 A2630047 */ sb $v1, 0x47($s3) -/* D816C 80141A6C 3C058015 */ lui $a1, %hi(D_80157970) -/* D8170 80141A70 24A57970 */ addiu $a1, $a1, %lo(D_80157970) -/* D8174 80141A74 3C078015 */ lui $a3, %hi(D_80157F70) -/* D8178 80141A78 24E77F70 */ addiu $a3, $a3, %lo(D_80157F70) -/* D817C 80141A7C 080506A6 */ j .L80141A98 -/* D8180 80141A80 0000182D */ daddu $v1, $zero, $zero -.L80141A84: -/* D8184 80141A84 3C058016 */ lui $a1, %hi(D_80158580) -/* D8188 80141A88 24A58580 */ addiu $a1, $a1, %lo(D_80158580) -/* D818C 80141A8C 3C078016 */ lui $a3, %hi(D_80158B80) -/* D8190 80141A90 24E78B80 */ addiu $a3, $a3, %lo(D_80158B80) -/* D8194 80141A94 0000182D */ daddu $v1, $zero, $zero -.L80141A98: -/* D8198 80141A98 8E060000 */ lw $a2, ($s0) -/* D819C 80141A9C 00A0202D */ daddu $a0, $a1, $zero -.L80141AA0: -/* D81A0 80141AA0 8C820000 */ lw $v0, ($a0) -/* D81A4 80141AA4 50460007 */ beql $v0, $a2, .L80141AC4 -/* D81A8 80141AA8 26100004 */ addiu $s0, $s0, 4 -/* D81AC 80141AAC 24630001 */ addiu $v1, $v1, 1 -/* D81B0 80141AB0 286200C0 */ slti $v0, $v1, 0xc0 -/* D81B4 80141AB4 1440FFFA */ bnez $v0, .L80141AA0 -/* D81B8 80141AB8 24840008 */ addiu $a0, $a0, 8 -.L80141ABC: -/* D81BC 80141ABC 080506AF */ j .L80141ABC -/* D81C0 80141AC0 00000000 */ nop -.L80141AC4: -/* D81C4 80141AC4 000310C0 */ sll $v0, $v1, 3 -/* D81C8 80141AC8 0000182D */ daddu $v1, $zero, $zero -/* D81CC 80141ACC 00451021 */ addu $v0, $v0, $a1 -/* D81D0 80141AD0 8C420004 */ lw $v0, 4($v0) -/* D81D4 80141AD4 00E0202D */ daddu $a0, $a3, $zero -/* D81D8 80141AD8 AE620010 */ sw $v0, 0x10($s3) -/* D81DC 80141ADC 8E050000 */ lw $a1, ($s0) -.L80141AE0: -/* D81E0 80141AE0 8C820000 */ lw $v0, ($a0) -/* D81E4 80141AE4 10450007 */ beq $v0, $a1, .L80141B04 -/* D81E8 80141AE8 000310C0 */ sll $v0, $v1, 3 -/* D81EC 80141AEC 24630001 */ addiu $v1, $v1, 1 -/* D81F0 80141AF0 286200C0 */ slti $v0, $v1, 0xc0 -/* D81F4 80141AF4 1440FFFA */ bnez $v0, .L80141AE0 -/* D81F8 80141AF8 24840008 */ addiu $a0, $a0, 8 -.L80141AFC: -/* D81FC 80141AFC 080506BF */ j .L80141AFC -/* D8200 80141B00 00000000 */ nop -.L80141B04: -/* D8204 80141B04 00471021 */ addu $v0, $v0, $a3 -/* D8208 80141B08 8C420004 */ lw $v0, 4($v0) -/* D820C 80141B0C 8E630000 */ lw $v1, ($s3) -/* D8210 80141B10 2610000C */ addiu $s0, $s0, 0xc -/* D8214 80141B14 AE700004 */ sw $s0, 4($s3) -/* D8218 80141B18 AE620014 */ sw $v0, 0x14($s3) -/* D821C 80141B1C 30620100 */ andi $v0, $v1, 0x100 -/* D8220 80141B20 104001B3 */ beqz $v0, .L801421F0_D88F0 -/* D8224 80141B24 3C020010 */ lui $v0, 0x10 -/* D8228 80141B28 00621024 */ and $v0, $v1, $v0 -/* D822C 80141B2C 14400012 */ bnez $v0, .L80141B78 -/* D8230 80141B30 00000000 */ nop -/* D8234 80141B34 3C028015 */ lui $v0, %hi(gHudElementSizes) -/* D8238 80141B38 2442EFCC */ addiu $v0, $v0, %lo(gHudElementSizes) -/* D823C 80141B3C 82650046 */ lb $a1, 0x46($s3) -/* D8240 80141B40 82660045 */ lb $a2, 0x45($s3) -/* D8244 80141B44 00051840 */ sll $v1, $a1, 1 -/* D8248 80141B48 00651821 */ addu $v1, $v1, $a1 -/* D824C 80141B4C 00031840 */ sll $v1, $v1, 1 -/* D8250 80141B50 00621821 */ addu $v1, $v1, $v0 -/* D8254 80141B54 84670000 */ lh $a3, ($v1) -/* D8258 80141B58 84680002 */ lh $t0, 2($v1) -/* D825C 80141B5C 00061840 */ sll $v1, $a2, 1 -/* D8260 80141B60 00661821 */ addu $v1, $v1, $a2 -/* D8264 80141B64 00031840 */ sll $v1, $v1, 1 -/* D8268 80141B68 00621821 */ addu $v1, $v1, $v0 -/* D826C 80141B6C 84640000 */ lh $a0, ($v1) -/* D8270 80141B70 080506E2 */ j .L80141B88 -/* D8274 80141B74 84650002 */ lh $a1, 2($v1) -.L80141B78: -/* D8278 80141B78 9267004E */ lbu $a3, 0x4e($s3) -/* D827C 80141B7C 9268004F */ lbu $t0, 0x4f($s3) -/* D8280 80141B80 92640050 */ lbu $a0, 0x50($s3) -/* D8284 80141B84 92650051 */ lbu $a1, 0x51($s3) -.L80141B88: -/* D8288 80141B88 8E630000 */ lw $v1, ($s3) -/* D828C 80141B8C 30620200 */ andi $v0, $v1, 0x200 -/* D8290 80141B90 14400018 */ bnez $v0, .L80141BF4 -/* D8294 80141B94 2402FDFF */ addiu $v0, $zero, -0x201 -/* D8298 80141B98 34620200 */ ori $v0, $v1, 0x200 -/* D829C 80141B9C 44870000 */ mtc1 $a3, $f0 -/* D82A0 80141BA0 00000000 */ nop -/* D82A4 80141BA4 46800020 */ cvt.s.w $f0, $f0 -/* D82A8 80141BA8 44882000 */ mtc1 $t0, $f4 -/* D82AC 80141BAC 00000000 */ nop -/* D82B0 80141BB0 46802120 */ cvt.s.w $f4, $f4 -/* D82B4 80141BB4 44841000 */ mtc1 $a0, $f2 -/* D82B8 80141BB8 00000000 */ nop -/* D82BC 80141BBC 468010A0 */ cvt.s.w $f2, $f2 -/* D82C0 80141BC0 AE620000 */ sw $v0, ($s3) -/* D82C4 80141BC4 82620047 */ lb $v0, 0x47($s3) -/* D82C8 80141BC8 46001081 */ sub.s $f2, $f2, $f0 -/* D82CC 80141BCC E6600028 */ swc1 $f0, 0x28($s3) -/* D82D0 80141BD0 44820000 */ mtc1 $v0, $f0 -/* D82D4 80141BD4 00000000 */ nop -/* D82D8 80141BD8 46800020 */ cvt.s.w $f0, $f0 -/* D82DC 80141BDC 46001083 */ div.s $f2, $f2, $f0 -/* D82E0 80141BE0 44850000 */ mtc1 $a1, $f0 -/* D82E4 80141BE4 00000000 */ nop -/* D82E8 80141BE8 46800020 */ cvt.s.w $f0, $f0 -/* D82EC 80141BEC 08050713 */ j .L80141C4C -/* D82F0 80141BF0 E664002C */ swc1 $f4, 0x2c($s3) -.L80141BF4: -/* D82F4 80141BF4 00621024 */ and $v0, $v1, $v0 -/* D82F8 80141BF8 44840000 */ mtc1 $a0, $f0 -/* D82FC 80141BFC 00000000 */ nop -/* D8300 80141C00 46800020 */ cvt.s.w $f0, $f0 -/* D8304 80141C04 44852000 */ mtc1 $a1, $f4 -/* D8308 80141C08 00000000 */ nop -/* D830C 80141C0C 46802120 */ cvt.s.w $f4, $f4 -/* D8310 80141C10 44871000 */ mtc1 $a3, $f2 -/* D8314 80141C14 00000000 */ nop -/* D8318 80141C18 468010A0 */ cvt.s.w $f2, $f2 -/* D831C 80141C1C AE620000 */ sw $v0, ($s3) -/* D8320 80141C20 82620047 */ lb $v0, 0x47($s3) -/* D8324 80141C24 46001081 */ sub.s $f2, $f2, $f0 -/* D8328 80141C28 E6600028 */ swc1 $f0, 0x28($s3) -/* D832C 80141C2C E664002C */ swc1 $f4, 0x2c($s3) -/* D8330 80141C30 44820000 */ mtc1 $v0, $f0 -/* D8334 80141C34 00000000 */ nop -/* D8338 80141C38 46800020 */ cvt.s.w $f0, $f0 -/* D833C 80141C3C 46001083 */ div.s $f2, $f2, $f0 -/* D8340 80141C40 44880000 */ mtc1 $t0, $f0 -/* D8344 80141C44 00000000 */ nop -/* D8348 80141C48 46800020 */ cvt.s.w $f0, $f0 -.L80141C4C: -/* D834C 80141C4C 46040001 */ sub.s $f0, $f0, $f4 -/* D8350 80141C50 E6620020 */ swc1 $f2, 0x20($s3) -/* D8354 80141C54 44821000 */ mtc1 $v0, $f2 -/* D8358 80141C58 00000000 */ nop -/* D835C 80141C5C 468010A0 */ cvt.s.w $f2, $f2 -/* D8360 80141C60 46020003 */ div.s $f0, $f0, $f2 -/* D8364 80141C64 0805087C */ j .L801421F0_D88F0 -/* D8368 80141C68 E6600024 */ swc1 $f0, 0x24($s3) -.L80141C6C_D836C: -/* D836C 80141C6C 8E63000C */ lw $v1, 0xc($s3) -/* D8370 80141C70 24020001 */ addiu $v0, $zero, 1 -/* D8374 80141C74 0805087D */ j .L801421F4 -/* D8378 80141C78 AE630004 */ sw $v1, 4($s3) -.L80141C7C_D837C: -/* D837C 80141C7C 24020001 */ addiu $v0, $zero, 1 -/* D8380 80141C80 AE70000C */ sw $s0, 0xc($s3) -/* D8384 80141C84 0805087D */ j .L801421F4 -/* D8388 80141C88 AE700004 */ sw $s0, 4($s3) -.L80141C8C_D838C: -/* D838C 80141C8C 8E110000 */ lw $s1, ($s0) -/* D8390 80141C90 26100004 */ addiu $s0, $s0, 4 -/* D8394 80141C94 8E120000 */ lw $s2, ($s0) -/* D8398 80141C98 26100004 */ addiu $s0, $s0, 4 -/* D839C 80141C9C 0C00A67F */ jal rand_int -/* D83A0 80141CA0 0220202D */ daddu $a0, $s1, $zero -/* D83A4 80141CA4 0052102A */ slt $v0, $v0, $s2 -/* D83A8 80141CA8 50400102 */ beql $v0, $zero, .L801420B4 -/* D83AC 80141CAC AE700004 */ sw $s0, 4($s3) -/* D83B0 80141CB0 8E62000C */ lw $v0, 0xc($s3) -/* D83B4 80141CB4 0805082D */ j .L801420B4 -/* D83B8 80141CB8 AE620004 */ sw $v0, 4($s3) -.L80141CBC_D83BC: -/* D83BC 80141CBC 92040003 */ lbu $a0, 3($s0) -/* D83C0 80141CC0 26100004 */ addiu $s0, $s0, 4 -/* D83C4 80141CC4 24030400 */ addiu $v1, $zero, 0x400 -/* D83C8 80141CC8 AE630034 */ sw $v1, 0x34($s3) -/* D83CC 80141CCC AE630038 */ sw $v1, 0x38($s3) -/* D83D0 80141CD0 8E630000 */ lw $v1, ($s3) -/* D83D4 80141CD4 24020001 */ addiu $v0, $zero, 1 -/* D83D8 80141CD8 AE700004 */ sw $s0, 4($s3) -/* D83DC 80141CDC A2640045 */ sb $a0, 0x45($s3) -/* D83E0 80141CE0 A2640046 */ sb $a0, 0x46($s3) -/* D83E4 80141CE4 2404FEFF */ addiu $a0, $zero, -0x101 -/* D83E8 80141CE8 00641824 */ and $v1, $v1, $a0 -/* D83EC 80141CEC 2404F7FF */ addiu $a0, $zero, -0x801 -.L80141CF0: -/* D83F0 80141CF0 00641824 */ and $v1, $v1, $a0 -/* D83F4 80141CF4 0805087D */ j .L801421F4 -/* D83F8 80141CF8 AE630000 */ sw $v1, ($s3) -.L80141CFC_D83FC: -/* D83FC 80141CFC 8E050000 */ lw $a1, ($s0) -/* D8400 80141D00 26100004 */ addiu $s0, $s0, 4 -/* D8404 80141D04 8E060000 */ lw $a2, ($s0) -/* D8408 80141D08 26100004 */ addiu $s0, $s0, 4 -/* D840C 80141D0C 24020001 */ addiu $v0, $zero, 1 -/* D8410 80141D10 3C013F80 */ lui $at, 0x3f80 -/* D8414 80141D14 44813000 */ mtc1 $at, $f6 -/* D8418 80141D18 3C048015 */ lui $a0, %hi(gHudElementSizes) -/* D841C 80141D1C 2484EFCC */ addiu $a0, $a0, %lo(gHudElementSizes) -/* D8420 80141D20 AE700004 */ sw $s0, 4($s3) -/* D8424 80141D24 00451804 */ sllv $v1, $a1, $v0 -/* D8428 80141D28 00651821 */ addu $v1, $v1, $a1 -/* D842C 80141D2C 00431804 */ sllv $v1, $v1, $v0 -/* D8430 80141D30 00641821 */ addu $v1, $v1, $a0 -/* D8434 80141D34 A2650046 */ sb $a1, 0x46($s3) -/* D8438 80141D38 A2660045 */ sb $a2, 0x45($s3) -/* D843C 80141D3C 84670000 */ lh $a3, ($v1) -/* D8440 80141D40 84680002 */ lh $t0, 2($v1) -/* D8444 80141D44 00461804 */ sllv $v1, $a2, $v0 -/* D8448 80141D48 00661821 */ addu $v1, $v1, $a2 -/* D844C 80141D4C 00431804 */ sllv $v1, $v1, $v0 -/* D8450 80141D50 00641821 */ addu $v1, $v1, $a0 -/* D8454 80141D54 84640000 */ lh $a0, ($v1) -/* D8458 80141D58 84650002 */ lh $a1, 2($v1) -/* D845C 80141D5C 8E630000 */ lw $v1, ($s3) -/* D8460 80141D60 44841000 */ mtc1 $a0, $f2 -/* D8464 80141D64 00000000 */ nop -/* D8468 80141D68 468010A0 */ cvt.s.w $f2, $f2 -/* D846C 80141D6C 44870000 */ mtc1 $a3, $f0 -/* D8470 80141D70 00000000 */ nop -/* D8474 80141D74 46800020 */ cvt.s.w $f0, $f0 -/* D8478 80141D78 46001203 */ div.s $f8, $f2, $f0 -/* D847C 80141D7C 46083203 */ div.s $f8, $f6, $f8 -/* D8480 80141D80 3C014480 */ lui $at, 0x4480 -/* D8484 80141D84 44811000 */ mtc1 $at, $f2 -/* D8488 80141D88 44852000 */ mtc1 $a1, $f4 -/* D848C 80141D8C 00000000 */ nop -/* D8490 80141D90 46802120 */ cvt.s.w $f4, $f4 -/* D8494 80141D94 46024202 */ mul.s $f8, $f8, $f2 -/* D8498 80141D98 00000000 */ nop -/* D849C 80141D9C 44880000 */ mtc1 $t0, $f0 -/* D84A0 80141DA0 00000000 */ nop -/* D84A4 80141DA4 46800020 */ cvt.s.w $f0, $f0 -/* D84A8 80141DA8 46002283 */ div.s $f10, $f4, $f0 -/* D84AC 80141DAC 460A3283 */ div.s $f10, $f6, $f10 -/* D84B0 80141DB0 2404FEFF */ addiu $a0, $zero, -0x101 -/* D84B4 80141DB4 46025082 */ mul.s $f2, $f10, $f2 -/* D84B8 80141DB8 00000000 */ nop -/* D84BC 80141DBC 00641824 */ and $v1, $v1, $a0 -/* D84C0 80141DC0 34630800 */ ori $v1, $v1, 0x800 -/* D84C4 80141DC4 AE630000 */ sw $v1, ($s3) -/* D84C8 80141DC8 4600430D */ trunc.w.s $f12, $f8 -/* D84CC 80141DCC E66C0034 */ swc1 $f12, 0x34($s3) -/* D84D0 80141DD0 4600130D */ trunc.w.s $f12, $f2 -/* D84D4 80141DD4 0805087D */ j .L801421F4 -/* D84D8 80141DD8 E66C0038 */ swc1 $f12, 0x38($s3) -.L80141DDC_D84DC: -/* D84DC 80141DDC 8E050000 */ lw $a1, ($s0) -/* D84E0 80141DE0 26100004 */ addiu $s0, $s0, 4 -/* D84E4 80141DE4 8E060000 */ lw $a2, ($s0) -/* D84E8 80141DE8 26100004 */ addiu $s0, $s0, 4 -/* D84EC 80141DEC 24020001 */ addiu $v0, $zero, 1 -/* D84F0 80141DF0 8E630000 */ lw $v1, ($s3) -/* D84F4 80141DF4 24040400 */ addiu $a0, $zero, 0x400 -/* D84F8 80141DF8 AE640034 */ sw $a0, 0x34($s3) -/* D84FC 80141DFC AE640038 */ sw $a0, 0x38($s3) -/* D8500 80141E00 2404F7FF */ addiu $a0, $zero, -0x801 -/* D8504 80141E04 AE700004 */ sw $s0, 4($s3) -/* D8508 80141E08 34630100 */ ori $v1, $v1, 0x100 -/* D850C 80141E0C 00641824 */ and $v1, $v1, $a0 -/* D8510 80141E10 2404FDFF */ addiu $a0, $zero, -0x201 -/* D8514 80141E14 00641824 */ and $v1, $v1, $a0 -/* D8518 80141E18 A2650046 */ sb $a1, 0x46($s3) -/* D851C 80141E1C A2660045 */ sb $a2, 0x45($s3) -/* D8520 80141E20 0805087D */ j .L801421F4 -/* D8524 80141E24 AE630000 */ sw $v1, ($s3) -.L80141E28_D8528: -/* D8528 80141E28 8E110000 */ lw $s1, ($s0) -/* D852C 80141E2C 26100004 */ addiu $s0, $s0, 4 -/* D8530 80141E30 92630040 */ lbu $v1, 0x40($s3) -/* D8534 80141E34 24020001 */ addiu $v0, $zero, 1 -/* D8538 80141E38 AE700004 */ sw $s0, 4($s3) -/* D853C 80141E3C 00711821 */ addu $v1, $v1, $s1 -/* D8540 80141E40 0805087D */ j .L801421F4 -/* D8544 80141E44 A2630040 */ sb $v1, 0x40($s3) -.L80141E48_D8548: -/* D8548 80141E48 8E120000 */ lw $s2, ($s0) -/* D854C 80141E4C 8E620000 */ lw $v0, ($s3) -/* D8550 80141E50 30422000 */ andi $v0, $v0, 0x2000 -/* D8554 80141E54 14400004 */ bnez $v0, .L80141E68 -/* D8558 80141E58 26100004 */ addiu $s0, $s0, 4 -/* D855C 80141E5C 92620041 */ lbu $v0, 0x41($s3) -/* D8560 80141E60 080507A8 */ j .L80141EA0 -/* D8564 80141E64 00521021 */ addu $v0, $v0, $s2 -.L80141E68: -/* D8568 80141E68 92620041 */ lbu $v0, 0x41($s3) -/* D856C 80141E6C 080507A8 */ j .L80141EA0 -/* D8570 80141E70 00521023 */ subu $v0, $v0, $s2 -.L80141E74_D8574: -/* D8574 80141E74 8E110000 */ lw $s1, ($s0) -/* D8578 80141E78 26100004 */ addiu $s0, $s0, 4 -/* D857C 80141E7C 8E120000 */ lw $s2, ($s0) -/* D8580 80141E80 8E620000 */ lw $v0, ($s3) -/* D8584 80141E84 26100004 */ addiu $s0, $s0, 4 -/* D8588 80141E88 30422000 */ andi $v0, $v0, 0x2000 -/* D858C 80141E8C 14400003 */ bnez $v0, .L80141E9C -/* D8590 80141E90 A2710040 */ sb $s1, 0x40($s3) -/* D8594 80141E94 0805082C */ j .L801420B0 -/* D8598 80141E98 A2720041 */ sb $s2, 0x41($s3) -.L80141E9C: -/* D859C 80141E9C 00121023 */ negu $v0, $s2 -.L80141EA0: -/* D85A0 80141EA0 0805082C */ j .L801420B0 -/* D85A4 80141EA4 A2620041 */ sb $v0, 0x41($s3) -.L80141EA8_D85A8: -/* D85A8 80141EA8 3C013780 */ lui $at, 0x3780 -/* D85AC 80141EAC 44810000 */ mtc1 $at, $f0 -/* D85B0 80141EB0 C6040000 */ lwc1 $f4, ($s0) -/* D85B4 80141EB4 46802120 */ cvt.s.w $f4, $f4 -/* D85B8 80141EB8 46002102 */ mul.s $f4, $f4, $f0 -/* D85BC 80141EBC 00000000 */ nop -/* D85C0 80141EC0 26100004 */ addiu $s0, $s0, 4 -/* D85C4 80141EC4 8E620000 */ lw $v0, ($s3) -/* D85C8 80141EC8 3C030010 */ lui $v1, 0x10 -/* D85CC 80141ECC 00431024 */ and $v0, $v0, $v1 -/* D85D0 80141ED0 14400012 */ bnez $v0, .L80141F1C -/* D85D4 80141ED4 E6640030 */ swc1 $f4, 0x30($s3) -/* D85D8 80141ED8 82630046 */ lb $v1, 0x46($s3) -/* D85DC 80141EDC 3C048015 */ lui $a0, %hi(gHudElementSizes) -/* D85E0 80141EE0 2484EFCC */ addiu $a0, $a0, %lo(gHudElementSizes) -/* D85E4 80141EE4 00031040 */ sll $v0, $v1, 1 -/* D85E8 80141EE8 00431021 */ addu $v0, $v0, $v1 -/* D85EC 80141EEC 00021040 */ sll $v0, $v0, 1 -/* D85F0 80141EF0 00441021 */ addu $v0, $v0, $a0 -/* D85F4 80141EF4 84470000 */ lh $a3, ($v0) -/* D85F8 80141EF8 82630045 */ lb $v1, 0x45($s3) -/* D85FC 80141EFC 84480002 */ lh $t0, 2($v0) -/* D8600 80141F00 00031040 */ sll $v0, $v1, 1 -/* D8604 80141F04 00431021 */ addu $v0, $v0, $v1 -/* D8608 80141F08 00021040 */ sll $v0, $v0, 1 -/* D860C 80141F0C 00441021 */ addu $v0, $v0, $a0 -/* D8610 80141F10 84440000 */ lh $a0, ($v0) -/* D8614 80141F14 080507CB */ j .L80141F2C -/* D8618 80141F18 84450002 */ lh $a1, 2($v0) -.L80141F1C: -/* D861C 80141F1C 9267004E */ lbu $a3, 0x4e($s3) -/* D8620 80141F20 9268004F */ lbu $t0, 0x4f($s3) -/* D8624 80141F24 92640050 */ lbu $a0, 0x50($s3) -/* D8628 80141F28 92650051 */ lbu $a1, 0x51($s3) -.L80141F2C: -/* D862C 80141F2C 44840000 */ mtc1 $a0, $f0 -/* D8630 80141F30 00000000 */ nop -/* D8634 80141F34 46800020 */ cvt.s.w $f0, $f0 -/* D8638 80141F38 46040002 */ mul.s $f0, $f0, $f4 -/* D863C 80141F3C 00000000 */ nop -/* D8640 80141F40 3C014F00 */ lui $at, 0x4f00 -/* D8644 80141F44 44811000 */ mtc1 $at, $f2 -/* D8648 80141F48 00000000 */ nop -/* D864C 80141F4C 4600103E */ c.le.s $f2, $f0 -/* D8650 80141F50 00000000 */ nop -/* D8654 80141F54 45010005 */ bc1t .L80141F6C -/* D8658 80141F58 26660048 */ addiu $a2, $s3, 0x48 -/* D865C 80141F5C 4600030D */ trunc.w.s $f12, $f0 -/* D8660 80141F60 44036000 */ mfc1 $v1, $f12 -/* D8664 80141F64 080507E1 */ j .L80141F84 -/* D8668 80141F68 00000000 */ nop -.L80141F6C: -/* D866C 80141F6C 46020001 */ sub.s $f0, $f0, $f2 -/* D8670 80141F70 3C028000 */ lui $v0, 0x8000 -/* D8674 80141F74 4600030D */ trunc.w.s $f12, $f0 -/* D8678 80141F78 44036000 */ mfc1 $v1, $f12 -/* D867C 80141F7C 00000000 */ nop -/* D8680 80141F80 00621825 */ or $v1, $v1, $v0 -.L80141F84: -/* D8684 80141F84 44850000 */ mtc1 $a1, $f0 -/* D8688 80141F88 00000000 */ nop -/* D868C 80141F8C 46800020 */ cvt.s.w $f0, $f0 -/* D8690 80141F90 46040002 */ mul.s $f0, $f0, $f4 -/* D8694 80141F94 00000000 */ nop -/* D8698 80141F98 3C014F00 */ lui $at, 0x4f00 -/* D869C 80141F9C 44811000 */ mtc1 $at, $f2 -/* D86A0 80141FA0 A0C30000 */ sb $v1, ($a2) -/* D86A4 80141FA4 4600103E */ c.le.s $f2, $f0 -/* D86A8 80141FA8 00000000 */ nop -/* D86AC 80141FAC 45010005 */ bc1t .L80141FC4 -/* D86B0 80141FB0 26660049 */ addiu $a2, $s3, 0x49 -/* D86B4 80141FB4 4600030D */ trunc.w.s $f12, $f0 -/* D86B8 80141FB8 44036000 */ mfc1 $v1, $f12 -/* D86BC 80141FBC 080507F7 */ j .L80141FDC -/* D86C0 80141FC0 00000000 */ nop -.L80141FC4: -/* D86C4 80141FC4 46020001 */ sub.s $f0, $f0, $f2 -/* D86C8 80141FC8 3C028000 */ lui $v0, 0x8000 -/* D86CC 80141FCC 4600030D */ trunc.w.s $f12, $f0 -/* D86D0 80141FD0 44036000 */ mfc1 $v1, $f12 -/* D86D4 80141FD4 00000000 */ nop -/* D86D8 80141FD8 00621825 */ or $v1, $v1, $v0 -.L80141FDC: -/* D86DC 80141FDC 44840000 */ mtc1 $a0, $f0 -/* D86E0 80141FE0 00000000 */ nop -/* D86E4 80141FE4 46800020 */ cvt.s.w $f0, $f0 -/* D86E8 80141FE8 44871000 */ mtc1 $a3, $f2 -/* D86EC 80141FEC 00000000 */ nop -/* D86F0 80141FF0 468010A0 */ cvt.s.w $f2, $f2 -/* D86F4 80141FF4 46020003 */ div.s $f0, $f0, $f2 -/* D86F8 80141FF8 46040202 */ mul.s $f8, $f0, $f4 -/* D86FC 80141FFC 00000000 */ nop -/* D8700 80142000 44850000 */ mtc1 $a1, $f0 -/* D8704 80142004 00000000 */ nop -/* D8708 80142008 46800020 */ cvt.s.w $f0, $f0 -/* D870C 8014200C 44881000 */ mtc1 $t0, $f2 -/* D8710 80142010 00000000 */ nop -/* D8714 80142014 468010A0 */ cvt.s.w $f2, $f2 -/* D8718 80142018 46020003 */ div.s $f0, $f0, $f2 -/* D871C 8014201C 3C013F80 */ lui $at, 0x3f80 -/* D8720 80142020 44811000 */ mtc1 $at, $f2 -/* D8724 80142024 46040282 */ mul.s $f10, $f0, $f4 -/* D8728 80142028 00000000 */ nop -/* D872C 8014202C 3C014480 */ lui $at, 0x4480 -/* D8730 80142030 44810000 */ mtc1 $at, $f0 -/* D8734 80142034 A0C30000 */ sb $v1, ($a2) -/* D8738 80142038 46081203 */ div.s $f8, $f2, $f8 -/* D873C 8014203C 46004102 */ mul.s $f4, $f8, $f0 -/* D8740 80142040 00000000 */ nop -/* D8744 80142044 8E630000 */ lw $v1, ($s3) -/* D8748 80142048 2404FEFF */ addiu $a0, $zero, -0x101 -/* D874C 8014204C AE700004 */ sw $s0, 4($s3) -/* D8750 80142050 460A1283 */ div.s $f10, $f2, $f10 -/* D8754 80142054 46005002 */ mul.s $f0, $f10, $f0 -/* D8758 80142058 00000000 */ nop -/* D875C 8014205C 00641824 */ and $v1, $v1, $a0 -/* D8760 80142060 34630810 */ ori $v1, $v1, 0x810 -/* D8764 80142064 AE630000 */ sw $v1, ($s3) -/* D8768 80142068 4600230D */ trunc.w.s $f12, $f4 -/* D876C 8014206C E66C0034 */ swc1 $f12, 0x34($s3) -/* D8770 80142070 4600030D */ trunc.w.s $f12, $f0 -/* D8774 80142074 E66C0038 */ swc1 $f12, 0x38($s3) -/* D8778 80142078 0805087D */ j .L801421F4 -/* D877C 8014207C 24020001 */ addiu $v0, $zero, 1 -.L80142080_D8780: -/* D8780 80142080 8E110000 */ lw $s1, ($s0) -/* D8784 80142084 8E620000 */ lw $v0, ($s3) -/* D8788 80142088 26100004 */ addiu $s0, $s0, 4 -/* D878C 8014208C 34440020 */ ori $a0, $v0, 0x20 -/* D8790 80142090 A271004A */ sb $s1, 0x4a($s3) -/* D8794 80142094 322300FF */ andi $v1, $s1, 0xff -/* D8798 80142098 240200FF */ addiu $v0, $zero, 0xff -/* D879C 8014209C 14620004 */ bne $v1, $v0, .L801420B0 -/* D87A0 801420A0 AE640000 */ sw $a0, ($s3) -/* D87A4 801420A4 2402FFDF */ addiu $v0, $zero, -0x21 -/* D87A8 801420A8 00821024 */ and $v0, $a0, $v0 -/* D87AC 801420AC AE620000 */ sw $v0, ($s3) -.L801420B0: -/* D87B0 801420B0 AE700004 */ sw $s0, 4($s3) -.L801420B4: -/* D87B4 801420B4 0805087D */ j .L801421F4 -/* D87B8 801420B8 24020001 */ addiu $v0, $zero, 1 -.L801420BC_D87BC: -/* D87BC 801420BC 8E110000 */ lw $s1, ($s0) -/* D87C0 801420C0 26100004 */ addiu $s0, $s0, 4 -/* D87C4 801420C4 8E120000 */ lw $s2, ($s0) -/* D87C8 801420C8 26100004 */ addiu $s0, $s0, 4 -/* D87CC 801420CC 0C00A67F */ jal rand_int -/* D87D0 801420D0 02512023 */ subu $a0, $s2, $s1 -/* D87D4 801420D4 00511021 */ addu $v0, $v0, $s1 -/* D87D8 801420D8 A2620047 */ sb $v0, 0x47($s3) -/* D87DC 801420DC 0805087C */ j .L801421F0_D88F0 -/* D87E0 801420E0 AE700004 */ sw $s0, 4($s3) -.L801420E4_D87E4: -/* D87E4 801420E4 92030003 */ lbu $v1, 3($s0) -/* D87E8 801420E8 26100004 */ addiu $s0, $s0, 4 -/* D87EC 801420EC 24020001 */ addiu $v0, $zero, 1 -/* D87F0 801420F0 2404FEFF */ addiu $a0, $zero, -0x101 -/* D87F4 801420F4 A263004E */ sb $v1, 0x4e($s3) -/* D87F8 801420F8 A2630050 */ sb $v1, 0x50($s3) -/* D87FC 801420FC 92050003 */ lbu $a1, 3($s0) -/* D8800 80142100 24030400 */ addiu $v1, $zero, 0x400 -/* D8804 80142104 AE630034 */ sw $v1, 0x34($s3) -/* D8808 80142108 AE630038 */ sw $v1, 0x38($s3) -/* D880C 8014210C 8E630000 */ lw $v1, ($s3) -/* D8810 80142110 26100004 */ addiu $s0, $s0, 4 -/* D8814 80142114 AE700004 */ sw $s0, 4($s3) -/* D8818 80142118 A2600045 */ sb $zero, 0x45($s3) -/* D881C 8014211C A2600046 */ sb $zero, 0x46($s3) -/* D8820 80142120 00641824 */ and $v1, $v1, $a0 -/* D8824 80142124 2404F7FF */ addiu $a0, $zero, -0x801 -/* D8828 80142128 00641824 */ and $v1, $v1, $a0 -/* D882C 8014212C 3C040010 */ lui $a0, 0x10 -/* D8830 80142130 00641825 */ or $v1, $v1, $a0 -/* D8834 80142134 AE630000 */ sw $v1, ($s3) -/* D8838 80142138 A265004F */ sb $a1, 0x4f($s3) -/* D883C 8014213C 0805087D */ j .L801421F4 -/* D8840 80142140 A2650051 */ sb $a1, 0x51($s3) -.L80142144_D8844: -/* D8844 80142144 8E110000 */ lw $s1, ($s0) -/* D8848 80142148 26100004 */ addiu $s0, $s0, 4 -/* D884C 8014214C 3C03F0FF */ lui $v1, 0xf0ff -/* D8850 80142150 3463FFFF */ ori $v1, $v1, 0xffff -/* D8854 80142154 8E640000 */ lw $a0, ($s3) -/* D8858 80142158 24020001 */ addiu $v0, $zero, 1 -/* D885C 8014215C AE700004 */ sw $s0, 4($s3) -/* D8860 80142160 00832024 */ and $a0, $a0, $v1 -/* D8864 80142164 00111E00 */ sll $v1, $s1, 0x18 -/* D8868 80142168 00832025 */ or $a0, $a0, $v1 -/* D886C 8014216C 0805087D */ j .L801421F4 -/* D8870 80142170 AE640000 */ sw $a0, ($s3) -.L80142174_D8874: -/* D8874 80142174 8E110000 */ lw $s1, ($s0) -/* D8878 80142178 26100004 */ addiu $s0, $s0, 4 -/* D887C 8014217C 0C00A67F */ jal rand_int -/* D8880 80142180 2624FFFF */ addiu $a0, $s1, -1 -/* D8884 80142184 00021080 */ sll $v0, $v0, 2 -/* D8888 80142188 00501021 */ addu $v0, $v0, $s0 -/* D888C 8014218C 8C450000 */ lw $a1, ($v0) -/* D8890 80142190 0260202D */ daddu $a0, $s3, $zero -/* D8894 80142194 0C04FCD4 */ jal load_hud_element -/* D8898 80142198 AC850004 */ sw $a1, 4($a0) -/* D889C 8014219C 0805087D */ j .L801421F4 -/* D88A0 801421A0 24020001 */ addiu $v0, $zero, 1 -.L801421A4_D88A4: -/* D88A4 801421A4 8E060000 */ lw $a2, ($s0) -/* D88A8 801421A8 26100004 */ addiu $s0, $s0, 4 -/* D88AC 801421AC 0C05272D */ jal sfx_play_sound -/* D88B0 801421B0 00C0202D */ daddu $a0, $a2, $zero -/* D88B4 801421B4 24020001 */ addiu $v0, $zero, 1 -/* D88B8 801421B8 0805087D */ j .L801421F4 -/* D88BC 801421BC AE700004 */ sw $s0, 4($s3) -.L801421C0_D88C0: -/* D88C0 801421C0 8E050000 */ lw $a1, ($s0) -/* D88C4 801421C4 26100004 */ addiu $s0, $s0, 4 -/* D88C8 801421C8 8E060000 */ lw $a2, ($s0) -/* D88CC 801421CC 26100004 */ addiu $s0, $s0, 4 -/* D88D0 801421D0 8E620000 */ lw $v0, ($s3) -/* D88D4 801421D4 3C030001 */ lui $v1, 1 -/* D88D8 801421D8 00431024 */ and $v0, $v0, $v1 -/* D88DC 801421DC 1040FFB5 */ beqz $v0, .L801420B4 -/* D88E0 801421E0 AE700004 */ sw $s0, 4($s3) -/* D88E4 801421E4 A4850028 */ sh $a1, 0x28($a0) -/* D88E8 801421E8 0805082D */ j .L801420B4 -/* D88EC 801421EC A486002A */ sh $a2, 0x2a($a0) -.L801421F0_D88F0: -/* D88F0 801421F0 0000102D */ daddu $v0, $zero, $zero -.L801421F4: -/* D88F4 801421F4 8FBF0020 */ lw $ra, 0x20($sp) -/* D88F8 801421F8 8FB3001C */ lw $s3, 0x1c($sp) -/* D88FC 801421FC 8FB20018 */ lw $s2, 0x18($sp) -/* D8900 80142200 8FB10014 */ lw $s1, 0x14($sp) -/* D8904 80142204 8FB00010 */ lw $s0, 0x10($sp) -/* D8908 80142208 03E00008 */ jr $ra -/* D890C 8014220C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/hud_element/load_hud_element.s b/ver/us/asm/nonmatchings/hud_element/load_hud_element.s deleted file mode 100644 index 0cfc58bc0d..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/load_hud_element.s +++ /dev/null @@ -1,283 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_80151140 -.word .L8013F6DC_D5DDC, .L8013F418_D5B18, .L8013F3B4_D5AB4, .L8013F38C_D5A8C, .L8013F38C_D5A8C, .L8013F3BC_D5ABC, .L8013F3C8_D5AC8, .L8013F3C8_D5AC8, .L8013F38C_D5A8C, .L8013F38C_D5A8C, .L8013F410_D5B10, .L8013F410_D5B10, .L8013F418_D5B18, .L8013F430_D5B30, .L8013F410_D5B10, .L8013F410_D5B10, .L8013F418_D5B18, .L8013F38C_D5A8C, .L8013F38C_D5A8C, .L8013F3DC_D5ADC, .L8013F418_D5B18, .L8013F410_D5B10, .L8013F38C_D5A8C, .L8013F410_D5B10, .L8013F410_D5B10, .L8013F410_D5B10, .L8013F410_D5B10, .L8013F418_D5B18 - -.section .text - -glabel load_hud_element -/* D5A50 8013F350 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* D5A54 8013F354 AFB50024 */ sw $s5, 0x24($sp) -/* D5A58 8013F358 0080A82D */ daddu $s5, $a0, $zero -/* D5A5C 8013F35C AFB00010 */ sw $s0, 0x10($sp) -/* D5A60 8013F360 00A0802D */ daddu $s0, $a1, $zero -/* D5A64 8013F364 AFBF002C */ sw $ra, 0x2c($sp) -/* D5A68 8013F368 AFB60028 */ sw $s6, 0x28($sp) -/* D5A6C 8013F36C AFB40020 */ sw $s4, 0x20($sp) -/* D5A70 8013F370 AFB3001C */ sw $s3, 0x1c($sp) -/* D5A74 8013F374 AFB20018 */ sw $s2, 0x18($sp) -/* D5A78 8013F378 120000D8 */ beqz $s0, .L8013F6DC_D5DDC -/* D5A7C 8013F37C AFB10014 */ sw $s1, 0x14($sp) -/* D5A80 8013F380 0000982D */ daddu $s3, $zero, $zero -/* D5A84 8013F384 3C168015 */ lui $s6, %hi(gHudElementSizes) -/* D5A88 8013F388 26D6EFCC */ addiu $s6, $s6, %lo(gHudElementSizes) -.L8013F38C_D5A8C: -/* D5A8C 8013F38C 8E030000 */ lw $v1, ($s0) -/* D5A90 8013F390 2C62001C */ sltiu $v0, $v1, 0x1c -/* D5A94 8013F394 1040FFFD */ beqz $v0, .L8013F38C_D5A8C -/* D5A98 8013F398 26100004 */ addiu $s0, $s0, 4 -/* D5A9C 8013F39C 00031080 */ sll $v0, $v1, 2 -/* D5AA0 8013F3A0 3C018015 */ lui $at, %hi(jtbl_80151140) -/* D5AA4 8013F3A4 00220821 */ addu $at, $at, $v0 -/* D5AA8 8013F3A8 8C221140 */ lw $v0, %lo(jtbl_80151140)($at) -/* D5AAC 8013F3AC 00400008 */ jr $v0 -/* D5AB0 8013F3B0 00000000 */ nop -.L8013F3B4_D5AB4: -/* D5AB4 8013F3B4 0804FCE3 */ j .L8013F38C_D5A8C -/* D5AB8 8013F3B8 2610000C */ addiu $s0, $s0, 0xc -.L8013F3BC_D5ABC: -/* D5ABC 8013F3BC 8E130000 */ lw $s3, ($s0) -/* D5AC0 8013F3C0 0804FCF4 */ j .L8013F3D0 -/* D5AC4 8013F3C4 26100004 */ addiu $s0, $s0, 4 -.L8013F3C8_D5AC8: -/* D5AC8 8013F3C8 8E130000 */ lw $s3, ($s0) -/* D5ACC 8013F3CC 26100008 */ addiu $s0, $s0, 8 -.L8013F3D0: -/* D5AD0 8013F3D0 A2B30046 */ sb $s3, 0x46($s5) -/* D5AD4 8013F3D4 0804FCE3 */ j .L8013F38C_D5A8C -/* D5AD8 8013F3D8 A2B30045 */ sb $s3, 0x45($s5) -.L8013F3DC_D5ADC: -/* D5ADC 8013F3DC 92020003 */ lbu $v0, 3($s0) -/* D5AE0 8013F3E0 26100004 */ addiu $s0, $s0, 4 -/* D5AE4 8013F3E4 3C030010 */ lui $v1, 0x10 -/* D5AE8 8013F3E8 A2A2004E */ sb $v0, 0x4e($s5) -/* D5AEC 8013F3EC A2A20050 */ sb $v0, 0x50($s5) -/* D5AF0 8013F3F0 92040003 */ lbu $a0, 3($s0) -/* D5AF4 8013F3F4 8EA20000 */ lw $v0, ($s5) -/* D5AF8 8013F3F8 26100004 */ addiu $s0, $s0, 4 -/* D5AFC 8013F3FC 00431025 */ or $v0, $v0, $v1 -/* D5B00 8013F400 AEA20000 */ sw $v0, ($s5) -/* D5B04 8013F404 A2A4004F */ sb $a0, 0x4f($s5) -/* D5B08 8013F408 0804FCE3 */ j .L8013F38C_D5A8C -/* D5B0C 8013F40C A2A40051 */ sb $a0, 0x51($s5) -.L8013F410_D5B10: -/* D5B10 8013F410 0804FCE3 */ j .L8013F38C_D5A8C -/* D5B14 8013F414 26100004 */ addiu $s0, $s0, 4 -.L8013F418_D5B18: -/* D5B18 8013F418 0804FCE3 */ j .L8013F38C_D5A8C -/* D5B1C 8013F41C 26100008 */ addiu $s0, $s0, 8 -.L8013F420: -/* D5B20 8013F420 0804FD62 */ j .L8013F588 -/* D5B24 8013F424 AE110000 */ sw $s1, ($s0) -.L8013F428: -/* D5B28 8013F428 0804FDB2 */ j .L8013F6C8 -/* D5B2C 8013F42C AE110000 */ sw $s1, ($s0) -.L8013F430_D5B30: -/* D5B30 8013F430 26100004 */ addiu $s0, $s0, 4 -/* D5B34 8013F434 8E070000 */ lw $a3, ($s0) -/* D5B38 8013F438 26100004 */ addiu $s0, $s0, 4 -/* D5B3C 8013F43C 8E140000 */ lw $s4, ($s0) -/* D5B40 8013F440 26100004 */ addiu $s0, $s0, 4 -/* D5B44 8013F444 0000882D */ daddu $s1, $zero, $zero -/* D5B48 8013F448 00131040 */ sll $v0, $s3, 1 -/* D5B4C 8013F44C 00531021 */ addu $v0, $v0, $s3 -/* D5B50 8013F450 00021040 */ sll $v0, $v0, 1 -/* D5B54 8013F454 3C048015 */ lui $a0, %hi(D_801512C8) -/* D5B58 8013F458 8C8412C8 */ lw $a0, %lo(D_801512C8)($a0) -/* D5B5C 8013F45C 00569021 */ addu $s2, $v0, $s6 -/* D5B60 8013F460 24850004 */ addiu $a1, $a0, 4 -.L8013F464: -/* D5B64 8013F464 8C830000 */ lw $v1, ($a0) -/* D5B68 8013F468 2402FFFF */ addiu $v0, $zero, -1 -/* D5B6C 8013F46C 14620038 */ bne $v1, $v0, .L8013F550 -/* D5B70 8013F470 00000000 */ nop -/* D5B74 8013F474 3C038015 */ lui $v1, %hi(D_8015133C) -/* D5B78 8013F478 8C63133C */ lw $v1, %lo(D_8015133C)($v1) -/* D5B7C 8013F47C 3C028015 */ lui $v0, %hi(D_80151314) -/* D5B80 8013F480 8C421314 */ lw $v0, %lo(D_80151314)($v0) -/* D5B84 8013F484 AC870000 */ sw $a3, ($a0) -/* D5B88 8013F488 8C630000 */ lw $v1, ($v1) -/* D5B8C 8013F48C 3C048007 */ lui $a0, %hi(gGameStatusPtr) -/* D5B90 8013F490 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) -/* D5B94 8013F494 00431021 */ addu $v0, $v0, $v1 -/* D5B98 8013F498 ACA20000 */ sw $v0, ($a1) -/* D5B9C 8013F49C 80820070 */ lb $v0, 0x70($a0) -/* D5BA0 8013F4A0 14400004 */ bnez $v0, .L8013F4B4 -/* D5BA4 8013F4A4 00000000 */ nop -/* D5BA8 8013F4A8 3C048015 */ lui $a0, %hi(D_8014EFC4) -/* D5BAC 8013F4AC 0804FD32 */ j .L8013F4C8 -/* D5BB0 8013F4B0 8C84EFC4 */ lw $a0, %lo(D_8014EFC4)($a0) -.L8013F4B4: -/* D5BB4 8013F4B4 3C028015 */ lui $v0, %hi(D_8014EFC4) -/* D5BB8 8013F4B8 8C42EFC4 */ lw $v0, %lo(D_8014EFC4)($v0) -/* D5BBC 8013F4BC 00021FC2 */ srl $v1, $v0, 0x1f -/* D5BC0 8013F4C0 00431021 */ addu $v0, $v0, $v1 -/* D5BC4 8013F4C4 00022043 */ sra $a0, $v0, 1 -.L8013F4C8: -/* D5BC8 8013F4C8 3C028015 */ lui $v0, %hi(D_8015133C) -/* D5BCC 8013F4CC 8C42133C */ lw $v0, %lo(D_8015133C)($v0) -/* D5BD0 8013F4D0 86430004 */ lh $v1, 4($s2) -/* D5BD4 8013F4D4 8C420000 */ lw $v0, ($v0) -/* D5BD8 8013F4D8 00431021 */ addu $v0, $v0, $v1 -/* D5BDC 8013F4DC 0044102A */ slt $v0, $v0, $a0 -/* D5BE0 8013F4E0 14400003 */ bnez $v0, .L8013F4F0 -/* D5BE4 8013F4E4 00000000 */ nop -.L8013F4E8: -/* D5BE8 8013F4E8 0804FD3A */ j .L8013F4E8 -/* D5BEC 8013F4EC 00000000 */ nop -.L8013F4F0: -/* D5BF0 8013F4F0 3C04001D */ lui $a0, 0x1d -/* D5BF4 8013F4F4 2484C310 */ addiu $a0, $a0, -0x3cf0 -/* D5BF8 8013F4F8 8CA50000 */ lw $a1, ($a1) -/* D5BFC 8013F4FC 86460004 */ lh $a2, 4($s2) -/* D5C00 8013F500 0C017D24 */ jal nuPiReadRom -/* D5C04 8013F504 00E42021 */ addu $a0, $a3, $a0 -/* D5C08 8013F508 3C038015 */ lui $v1, %hi(D_8015133C) -/* D5C0C 8013F50C 8C63133C */ lw $v1, %lo(D_8015133C)($v1) -/* D5C10 8013F510 86440004 */ lh $a0, 4($s2) -/* D5C14 8013F514 8C620000 */ lw $v0, ($v1) -/* D5C18 8013F518 00441021 */ addu $v0, $v0, $a0 -/* D5C1C 8013F51C AC620000 */ sw $v0, ($v1) -/* D5C20 8013F520 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* D5C24 8013F524 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* D5C28 8013F528 80420070 */ lb $v0, 0x70($v0) -/* D5C2C 8013F52C 14400003 */ bnez $v0, .L8013F53C -/* D5C30 8013F530 00111C00 */ sll $v1, $s1, 0x10 -/* D5C34 8013F534 0804FD52 */ j .L8013F548 -/* D5C38 8013F538 AE110000 */ sw $s1, ($s0) -.L8013F53C: -/* D5C3C 8013F53C 96020002 */ lhu $v0, 2($s0) -/* D5C40 8013F540 00431025 */ or $v0, $v0, $v1 -/* D5C44 8013F544 AE020000 */ sw $v0, ($s0) -.L8013F548: -/* D5C48 8013F548 0804FD62 */ j .L8013F588 -/* D5C4C 8013F54C 26310001 */ addiu $s1, $s1, 1 -.L8013F550: -/* D5C50 8013F550 5467000A */ bnel $v1, $a3, .L8013F57C -/* D5C54 8013F554 24A50008 */ addiu $a1, $a1, 8 -/* D5C58 8013F558 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* D5C5C 8013F55C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* D5C60 8013F560 80420070 */ lb $v0, 0x70($v0) -/* D5C64 8013F564 1040FFAE */ beqz $v0, .L8013F420 -/* D5C68 8013F568 00111C00 */ sll $v1, $s1, 0x10 -/* D5C6C 8013F56C 96020002 */ lhu $v0, 2($s0) -/* D5C70 8013F570 00431025 */ or $v0, $v0, $v1 -/* D5C74 8013F574 0804FD62 */ j .L8013F588 -/* D5C78 8013F578 AE020000 */ sw $v0, ($s0) -.L8013F57C: -/* D5C7C 8013F57C 24840008 */ addiu $a0, $a0, 8 -/* D5C80 8013F580 0804FD19 */ j .L8013F464 -/* D5C84 8013F584 26310001 */ addiu $s1, $s1, 1 -.L8013F588: -/* D5C88 8013F588 2A2200C0 */ slti $v0, $s1, 0xc0 -/* D5C8C 8013F58C 14400003 */ bnez $v0, .L8013F59C -/* D5C90 8013F590 26100004 */ addiu $s0, $s0, 4 -.L8013F594: -/* D5C94 8013F594 0804FD65 */ j .L8013F594 -/* D5C98 8013F598 00000000 */ nop -.L8013F59C: -/* D5C9C 8013F59C 3C048015 */ lui $a0, %hi(D_801512D0) -/* D5CA0 8013F5A0 8C8412D0 */ lw $a0, %lo(D_801512D0)($a0) -/* D5CA4 8013F5A4 0000882D */ daddu $s1, $zero, $zero -/* D5CA8 8013F5A8 24850004 */ addiu $a1, $a0, 4 -.L8013F5AC: -/* D5CAC 8013F5AC 8C830000 */ lw $v1, ($a0) -/* D5CB0 8013F5B0 2402FFFF */ addiu $v0, $zero, -1 -/* D5CB4 8013F5B4 14620036 */ bne $v1, $v0, .L8013F690 -/* D5CB8 8013F5B8 00000000 */ nop -/* D5CBC 8013F5BC 3C038015 */ lui $v1, %hi(D_8015133C) -/* D5CC0 8013F5C0 8C63133C */ lw $v1, %lo(D_8015133C)($v1) -/* D5CC4 8013F5C4 3C028015 */ lui $v0, %hi(D_80151314) -/* D5CC8 8013F5C8 8C421314 */ lw $v0, %lo(D_80151314)($v0) -/* D5CCC 8013F5CC AC940000 */ sw $s4, ($a0) -/* D5CD0 8013F5D0 8C630000 */ lw $v1, ($v1) -/* D5CD4 8013F5D4 3C048007 */ lui $a0, %hi(gGameStatusPtr) -/* D5CD8 8013F5D8 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) -/* D5CDC 8013F5DC 00431021 */ addu $v0, $v0, $v1 -/* D5CE0 8013F5E0 ACA20000 */ sw $v0, ($a1) -/* D5CE4 8013F5E4 80820070 */ lb $v0, 0x70($a0) -/* D5CE8 8013F5E8 14400004 */ bnez $v0, .L8013F5FC -/* D5CEC 8013F5EC 00000000 */ nop -/* D5CF0 8013F5F0 3C048015 */ lui $a0, %hi(D_8014EFC4) -/* D5CF4 8013F5F4 0804FD84 */ j .L8013F610 -/* D5CF8 8013F5F8 8C84EFC4 */ lw $a0, %lo(D_8014EFC4)($a0) -.L8013F5FC: -/* D5CFC 8013F5FC 3C028015 */ lui $v0, %hi(D_8014EFC4) -/* D5D00 8013F600 8C42EFC4 */ lw $v0, %lo(D_8014EFC4)($v0) -/* D5D04 8013F604 00021FC2 */ srl $v1, $v0, 0x1f -/* D5D08 8013F608 00431021 */ addu $v0, $v0, $v1 -/* D5D0C 8013F60C 00022043 */ sra $a0, $v0, 1 -.L8013F610: -/* D5D10 8013F610 3C028015 */ lui $v0, %hi(D_8015133C) -/* D5D14 8013F614 8C42133C */ lw $v0, %lo(D_8015133C)($v0) -/* D5D18 8013F618 8C420000 */ lw $v0, ($v0) -/* D5D1C 8013F61C 24420020 */ addiu $v0, $v0, 0x20 -/* D5D20 8013F620 0044102A */ slt $v0, $v0, $a0 -/* D5D24 8013F624 14400003 */ bnez $v0, .L8013F634 -/* D5D28 8013F628 00000000 */ nop -.L8013F62C: -/* D5D2C 8013F62C 0804FD8B */ j .L8013F62C -/* D5D30 8013F630 00000000 */ nop -.L8013F634: -/* D5D34 8013F634 3C04001D */ lui $a0, 0x1d -/* D5D38 8013F638 2484C310 */ addiu $a0, $a0, -0x3cf0 -/* D5D3C 8013F63C 02842021 */ addu $a0, $s4, $a0 -/* D5D40 8013F640 8CA50000 */ lw $a1, ($a1) -/* D5D44 8013F644 0C017D24 */ jal nuPiReadRom -/* D5D48 8013F648 24060020 */ addiu $a2, $zero, 0x20 -/* D5D4C 8013F64C 3C038015 */ lui $v1, %hi(D_8015133C) -/* D5D50 8013F650 8C63133C */ lw $v1, %lo(D_8015133C)($v1) -/* D5D54 8013F654 8C620000 */ lw $v0, ($v1) -/* D5D58 8013F658 24420020 */ addiu $v0, $v0, 0x20 -/* D5D5C 8013F65C AC620000 */ sw $v0, ($v1) -/* D5D60 8013F660 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* D5D64 8013F664 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* D5D68 8013F668 80420070 */ lb $v0, 0x70($v0) -/* D5D6C 8013F66C 14400003 */ bnez $v0, .L8013F67C -/* D5D70 8013F670 00111C00 */ sll $v1, $s1, 0x10 -/* D5D74 8013F674 0804FDA2 */ j .L8013F688 -/* D5D78 8013F678 AE110000 */ sw $s1, ($s0) -.L8013F67C: -/* D5D7C 8013F67C 96020002 */ lhu $v0, 2($s0) -/* D5D80 8013F680 00431025 */ or $v0, $v0, $v1 -/* D5D84 8013F684 AE020000 */ sw $v0, ($s0) -.L8013F688: -/* D5D88 8013F688 0804FDB2 */ j .L8013F6C8 -/* D5D8C 8013F68C 26310001 */ addiu $s1, $s1, 1 -.L8013F690: -/* D5D90 8013F690 5474000A */ bnel $v1, $s4, .L8013F6BC -/* D5D94 8013F694 24A50008 */ addiu $a1, $a1, 8 -/* D5D98 8013F698 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* D5D9C 8013F69C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* D5DA0 8013F6A0 80420070 */ lb $v0, 0x70($v0) -/* D5DA4 8013F6A4 1040FF60 */ beqz $v0, .L8013F428 -/* D5DA8 8013F6A8 00111C00 */ sll $v1, $s1, 0x10 -/* D5DAC 8013F6AC 96020002 */ lhu $v0, 2($s0) -/* D5DB0 8013F6B0 00431025 */ or $v0, $v0, $v1 -/* D5DB4 8013F6B4 0804FDB2 */ j .L8013F6C8 -/* D5DB8 8013F6B8 AE020000 */ sw $v0, ($s0) -.L8013F6BC: -/* D5DBC 8013F6BC 24840008 */ addiu $a0, $a0, 8 -/* D5DC0 8013F6C0 0804FD6B */ j .L8013F5AC -/* D5DC4 8013F6C4 26310001 */ addiu $s1, $s1, 1 -.L8013F6C8: -/* D5DC8 8013F6C8 2A2200C0 */ slti $v0, $s1, 0xc0 -/* D5DCC 8013F6CC 1440FF2F */ bnez $v0, .L8013F38C_D5A8C -/* D5DD0 8013F6D0 26100004 */ addiu $s0, $s0, 4 -.L8013F6D4: -/* D5DD4 8013F6D4 0804FDB5 */ j .L8013F6D4 -/* D5DD8 8013F6D8 00000000 */ nop -.L8013F6DC_D5DDC: -/* D5DDC 8013F6DC 8FBF002C */ lw $ra, 0x2c($sp) -/* D5DE0 8013F6E0 8FB60028 */ lw $s6, 0x28($sp) -/* D5DE4 8013F6E4 8FB50024 */ lw $s5, 0x24($sp) -/* D5DE8 8013F6E8 8FB40020 */ lw $s4, 0x20($sp) -/* D5DEC 8013F6EC 8FB3001C */ lw $s3, 0x1c($sp) -/* D5DF0 8013F6F0 8FB20018 */ lw $s2, 0x18($sp) -/* D5DF4 8013F6F4 8FB10014 */ lw $s1, 0x14($sp) -/* D5DF8 8013F6F8 8FB00010 */ lw $s0, 0x10($sp) -/* D5DFC 8013F6FC 03E00008 */ jr $ra -/* D5E00 8013F700 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/hud_element/render_hud_elements_backUI.s b/ver/us/asm/nonmatchings/hud_element/render_hud_elements_backUI.s deleted file mode 100644 index 43e0df258d..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/render_hud_elements_backUI.s +++ /dev/null @@ -1,350 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel render_hud_elements_backUI -/* D8910 80142210 27BDFAB0 */ addiu $sp, $sp, -0x550 -/* D8914 80142214 3C038016 */ lui $v1, %hi(D_80159180) -/* D8918 80142218 24639180 */ addiu $v1, $v1, %lo(D_80159180) -/* D891C 8014221C AFBF054C */ sw $ra, 0x54c($sp) -/* D8920 80142220 AFBE0548 */ sw $fp, 0x548($sp) -/* D8924 80142224 AFB70544 */ sw $s7, 0x544($sp) -/* D8928 80142228 AFB60540 */ sw $s6, 0x540($sp) -/* D892C 8014222C AFB5053C */ sw $s5, 0x53c($sp) -/* D8930 80142230 AFB40538 */ sw $s4, 0x538($sp) -/* D8934 80142234 AFB30534 */ sw $s3, 0x534($sp) -/* D8938 80142238 AFB20530 */ sw $s2, 0x530($sp) -/* D893C 8014223C AFB1052C */ sw $s1, 0x52c($sp) -/* D8940 80142240 AFB00528 */ sw $s0, 0x528($sp) -/* D8944 80142244 8C620000 */ lw $v0, ($v1) -/* D8948 80142248 24420001 */ addiu $v0, $v0, 1 -/* D894C 8014224C AC620000 */ sw $v0, ($v1) -/* D8950 80142250 28420003 */ slti $v0, $v0, 3 -/* D8954 80142254 50400001 */ beql $v0, $zero, .L8014225C -/* D8958 80142258 AC600000 */ sw $zero, ($v1) -.L8014225C: -/* D895C 8014225C 0000F02D */ daddu $fp, $zero, $zero -/* D8960 80142260 03C0B82D */ daddu $s7, $fp, $zero -/* D8964 80142264 3C075021 */ lui $a3, 0x5021 -/* D8968 80142268 34E70080 */ ori $a3, $a3, 0x80 -/* D896C 8014226C 27A60028 */ addiu $a2, $sp, 0x28 -/* D8970 80142270 3C03800A */ lui $v1, %hi(gMasterGfxPos) -/* D8974 80142274 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos) -/* D8978 80142278 8C620000 */ lw $v0, ($v1) -/* D897C 8014227C 3C058015 */ lui $a1, %hi(gHudElements) -/* D8980 80142280 8CA57960 */ lw $a1, %lo(gHudElements)($a1) -/* D8984 80142284 0040202D */ daddu $a0, $v0, $zero -/* D8988 80142288 24420008 */ addiu $v0, $v0, 8 -/* D898C 8014228C AC620000 */ sw $v0, ($v1) -/* D8990 80142290 3C02DE00 */ lui $v0, 0xde00 -/* D8994 80142294 AC820000 */ sw $v0, ($a0) -/* D8998 80142298 3C020015 */ lui $v0, 0x15 -/* D899C 8014229C 2442F078 */ addiu $v0, $v0, -0xf88 -/* D89A0 801422A0 AC820004 */ sw $v0, 4($a0) -.L801422A4: -/* D89A4 801422A4 8CB00000 */ lw $s0, ($a1) -/* D89A8 801422A8 52000014 */ beql $s0, $zero, .L801422FC -/* D89AC 801422AC 26F70001 */ addiu $s7, $s7, 1 -/* D89B0 801422B0 8E030000 */ lw $v1, ($s0) -/* D89B4 801422B4 50600011 */ beql $v1, $zero, .L801422FC -/* D89B8 801422B8 26F70001 */ addiu $s7, $s7, 1 -/* D89BC 801422BC 30620002 */ andi $v0, $v1, 2 -/* D89C0 801422C0 5440000E */ bnel $v0, $zero, .L801422FC -/* D89C4 801422C4 26F70001 */ addiu $s7, $s7, 1 -/* D89C8 801422C8 00671024 */ and $v0, $v1, $a3 -/* D89CC 801422CC 5440000B */ bnel $v0, $zero, .L801422FC -/* D89D0 801422D0 26F70001 */ addiu $s7, $s7, 1 -/* D89D4 801422D4 30620040 */ andi $v0, $v1, 0x40 -/* D89D8 801422D8 54400008 */ bnel $v0, $zero, .L801422FC -/* D89DC 801422DC 26F70001 */ addiu $s7, $s7, 1 -/* D89E0 801422E0 82020045 */ lb $v0, 0x45($s0) -/* D89E4 801422E4 04420005 */ bltzl $v0, .L801422FC -/* D89E8 801422E8 26F70001 */ addiu $s7, $s7, 1 -/* D89EC 801422EC ACD70000 */ sw $s7, ($a2) -/* D89F0 801422F0 24C60004 */ addiu $a2, $a2, 4 -/* D89F4 801422F4 27DE0001 */ addiu $fp, $fp, 1 -/* D89F8 801422F8 26F70001 */ addiu $s7, $s7, 1 -.L801422FC: -/* D89FC 801422FC 2AE20140 */ slti $v0, $s7, 0x140 -/* D8A00 80142300 1440FFE8 */ bnez $v0, .L801422A4 -/* D8A04 80142304 24A50004 */ addiu $a1, $a1, 4 -/* D8A08 80142308 27C2FFFF */ addiu $v0, $fp, -1 -/* D8A0C 8014230C 18400024 */ blez $v0, .L801423A0 -/* D8A10 80142310 0000B82D */ daddu $s7, $zero, $zero -/* D8A14 80142314 3C0D8015 */ lui $t5, %hi(gHudElements) -/* D8A18 80142318 25AD7960 */ addiu $t5, $t5, %lo(gHudElements) -/* D8A1C 8014231C 27AC0028 */ addiu $t4, $sp, 0x28 -/* D8A20 80142320 0180582D */ daddu $t3, $t4, $zero -.L80142324: -/* D8A24 80142324 26E80001 */ addiu $t0, $s7, 1 -/* D8A28 80142328 011E102A */ slt $v0, $t0, $fp -/* D8A2C 8014232C 50400018 */ beql $v0, $zero, .L80142390 -/* D8A30 80142330 26F70001 */ addiu $s7, $s7, 1 -/* D8A34 80142334 0160502D */ daddu $t2, $t3, $zero -/* D8A38 80142338 8DA90000 */ lw $t1, ($t5) -/* D8A3C 8014233C 00081080 */ sll $v0, $t0, 2 -/* D8A40 80142340 004C3021 */ addu $a2, $v0, $t4 -.L80142344: -/* D8A44 80142344 8D470000 */ lw $a3, ($t2) -/* D8A48 80142348 8CC50000 */ lw $a1, ($a2) -/* D8A4C 8014234C 00071880 */ sll $v1, $a3, 2 -/* D8A50 80142350 00691821 */ addu $v1, $v1, $t1 -/* D8A54 80142354 00051080 */ sll $v0, $a1, 2 -/* D8A58 80142358 00491021 */ addu $v0, $v0, $t1 -/* D8A5C 8014235C 8C630000 */ lw $v1, ($v1) -/* D8A60 80142360 8C440000 */ lw $a0, ($v0) -/* D8A64 80142364 80620044 */ lb $v0, 0x44($v1) -/* D8A68 80142368 80830044 */ lb $v1, 0x44($a0) -/* D8A6C 8014236C 0043102A */ slt $v0, $v0, $v1 -/* D8A70 80142370 10400003 */ beqz $v0, .L80142380 -/* D8A74 80142374 25080001 */ addiu $t0, $t0, 1 -/* D8A78 80142378 AD450000 */ sw $a1, ($t2) -/* D8A7C 8014237C ACC70000 */ sw $a3, ($a2) -.L80142380: -/* D8A80 80142380 011E102A */ slt $v0, $t0, $fp -/* D8A84 80142384 1440FFEF */ bnez $v0, .L80142344 -/* D8A88 80142388 24C60004 */ addiu $a2, $a2, 4 -/* D8A8C 8014238C 26F70001 */ addiu $s7, $s7, 1 -.L80142390: -/* D8A90 80142390 27C2FFFF */ addiu $v0, $fp, -1 -/* D8A94 80142394 02E2102A */ slt $v0, $s7, $v0 -/* D8A98 80142398 1440FFE2 */ bnez $v0, .L80142324 -/* D8A9C 8014239C 256B0004 */ addiu $t3, $t3, 4 -.L801423A0: -/* D8AA0 801423A0 1BC000D2 */ blez $fp, .L801426EC -/* D8AA4 801423A4 0000B82D */ daddu $s7, $zero, $zero -/* D8AA8 801423A8 00171080 */ sll $v0, $s7, 2 -.L801423AC: -/* D8AAC 801423AC 03A21021 */ addu $v0, $sp, $v0 -/* D8AB0 801423B0 8C420028 */ lw $v0, 0x28($v0) -/* D8AB4 801423B4 3C038015 */ lui $v1, %hi(gHudElements) -/* D8AB8 801423B8 8C637960 */ lw $v1, %lo(gHudElements)($v1) -/* D8ABC 801423BC 00021080 */ sll $v0, $v0, 2 -/* D8AC0 801423C0 00431021 */ addu $v0, $v0, $v1 -/* D8AC4 801423C4 8C500000 */ lw $s0, ($v0) -/* D8AC8 801423C8 8E020004 */ lw $v0, 4($s0) -/* D8ACC 801423CC 104000C7 */ beqz $v0, .L801426EC -/* D8AD0 801423D0 00000000 */ nop -/* D8AD4 801423D4 8E030000 */ lw $v1, ($s0) -/* D8AD8 801423D8 30620100 */ andi $v0, $v1, 0x100 -/* D8ADC 801423DC 1440005B */ bnez $v0, .L8014254C -/* D8AE0 801423E0 3C0E0010 */ lui $t6, 0x10 -/* D8AE4 801423E4 006E1024 */ and $v0, $v1, $t6 -/* D8AE8 801423E8 1440000B */ bnez $v0, .L80142418 -/* D8AEC 801423EC 00000000 */ nop -/* D8AF0 801423F0 82030046 */ lb $v1, 0x46($s0) -/* D8AF4 801423F4 3C0E8015 */ lui $t6, %hi(gHudElementSizes) -/* D8AF8 801423F8 25CEEFCC */ addiu $t6, $t6, %lo(gHudElementSizes) -/* D8AFC 801423FC 00031040 */ sll $v0, $v1, 1 -/* D8B00 80142400 00431021 */ addu $v0, $v0, $v1 -/* D8B04 80142404 00021040 */ sll $v0, $v0, 1 -/* D8B08 80142408 004E1021 */ addu $v0, $v0, $t6 -/* D8B0C 8014240C 84560000 */ lh $s6, ($v0) -/* D8B10 80142410 08050908 */ j .L80142420 -/* D8B14 80142414 84550002 */ lh $s5, 2($v0) -.L80142418: -/* D8B18 80142418 9216004E */ lbu $s6, 0x4e($s0) -/* D8B1C 8014241C 9215004F */ lbu $s5, 0x4f($s0) -.L80142420: -/* D8B20 80142420 8E030000 */ lw $v1, ($s0) -/* D8B24 80142424 30620010 */ andi $v0, $v1, 0x10 -/* D8B28 80142428 14400013 */ bnez $v0, .L80142478 -/* D8B2C 8014242C 3C0E0010 */ lui $t6, 0x10 -/* D8B30 80142430 006E1024 */ and $v0, $v1, $t6 -/* D8B34 80142434 1440000C */ bnez $v0, .L80142468 -/* D8B38 80142438 00000000 */ nop -/* D8B3C 8014243C 82030045 */ lb $v1, 0x45($s0) -/* D8B40 80142440 3C0E8015 */ lui $t6, %hi(gHudElementSizes) -/* D8B44 80142444 25CEEFCC */ addiu $t6, $t6, %lo(gHudElementSizes) -/* D8B48 80142448 00031040 */ sll $v0, $v1, 1 -/* D8B4C 8014244C 00431021 */ addu $v0, $v0, $v1 -/* D8B50 80142450 00021040 */ sll $v0, $v0, 1 -/* D8B54 80142454 004E1021 */ addu $v0, $v0, $t6 -/* D8B58 80142458 84510000 */ lh $s1, ($v0) -/* D8B5C 8014245C 84520002 */ lh $s2, 2($v0) -/* D8B60 80142460 08050921 */ j .L80142484 -/* D8B64 80142464 00111023 */ negu $v0, $s1 -.L80142468: -/* D8B68 80142468 92110050 */ lbu $s1, 0x50($s0) -/* D8B6C 8014246C 92120051 */ lbu $s2, 0x51($s0) -/* D8B70 80142470 08050921 */ j .L80142484 -/* D8B74 80142474 00111023 */ negu $v0, $s1 -.L80142478: -/* D8B78 80142478 92110048 */ lbu $s1, 0x48($s0) -/* D8B7C 8014247C 92120049 */ lbu $s2, 0x49($s0) -/* D8B80 80142480 00111023 */ negu $v0, $s1 -.L80142484: -/* D8B84 80142484 00021FC2 */ srl $v1, $v0, 0x1f -/* D8B88 80142488 00431021 */ addu $v0, $v0, $v1 -/* D8B8C 8014248C 00029843 */ sra $s3, $v0, 1 -/* D8B90 80142490 00121023 */ negu $v0, $s2 -/* D8B94 80142494 00021FC2 */ srl $v1, $v0, 0x1f -/* D8B98 80142498 00431021 */ addu $v0, $v0, $v1 -/* D8B9C 8014249C 0002A043 */ sra $s4, $v0, 1 -/* D8BA0 801424A0 8E030000 */ lw $v1, ($s0) -/* D8BA4 801424A4 30620800 */ andi $v0, $v1, 0x800 -/* D8BA8 801424A8 14400026 */ bnez $v0, .L80142544 -/* D8BAC 801424AC 3C0E2000 */ lui $t6, 0x2000 -/* D8BB0 801424B0 006E1024 */ and $v0, $v1, $t6 -/* D8BB4 801424B4 10400012 */ beqz $v0, .L80142500 -/* D8BB8 801424B8 0200202D */ daddu $a0, $s0, $zero -/* D8BBC 801424BC 02C0282D */ daddu $a1, $s6, $zero -/* D8BC0 801424C0 02A0302D */ daddu $a2, $s5, $zero -/* D8BC4 801424C4 00113C00 */ sll $a3, $s1, 0x10 -/* D8BC8 801424C8 00073C03 */ sra $a3, $a3, 0x10 -/* D8BCC 801424CC 00121400 */ sll $v0, $s2, 0x10 -/* D8BD0 801424D0 00021403 */ sra $v0, $v0, 0x10 -/* D8BD4 801424D4 AFA20010 */ sw $v0, 0x10($sp) -/* D8BD8 801424D8 00131400 */ sll $v0, $s3, 0x10 -/* D8BDC 801424DC 00021403 */ sra $v0, $v0, 0x10 -/* D8BE0 801424E0 AFA20014 */ sw $v0, 0x14($sp) -/* D8BE4 801424E4 00141400 */ sll $v0, $s4, 0x10 -/* D8BE8 801424E8 00021403 */ sra $v0, $v0, 0x10 -/* D8BEC 801424EC 240E0001 */ addiu $t6, $zero, 1 -/* D8BF0 801424F0 AFA20018 */ sw $v0, 0x18($sp) -/* D8BF4 801424F4 AFAE001C */ sw $t6, 0x1c($sp) -/* D8BF8 801424F8 0C04FDC1 */ jal draw_rect_hud_element -/* D8BFC 801424FC AFAE0020 */ sw $t6, 0x20($sp) -.L80142500: -/* D8C00 80142500 0200202D */ daddu $a0, $s0, $zero -/* D8C04 80142504 02C0282D */ daddu $a1, $s6, $zero -/* D8C08 80142508 02A0302D */ daddu $a2, $s5, $zero -/* D8C0C 8014250C 00113C00 */ sll $a3, $s1, 0x10 -/* D8C10 80142510 00073C03 */ sra $a3, $a3, 0x10 -/* D8C14 80142514 00121400 */ sll $v0, $s2, 0x10 -/* D8C18 80142518 00021403 */ sra $v0, $v0, 0x10 -/* D8C1C 8014251C AFA20010 */ sw $v0, 0x10($sp) -/* D8C20 80142520 00131400 */ sll $v0, $s3, 0x10 -/* D8C24 80142524 00021403 */ sra $v0, $v0, 0x10 -/* D8C28 80142528 AFA20014 */ sw $v0, 0x14($sp) -/* D8C2C 8014252C 00141400 */ sll $v0, $s4, 0x10 -/* D8C30 80142530 00021403 */ sra $v0, $v0, 0x10 -/* D8C34 80142534 240E0001 */ addiu $t6, $zero, 1 -/* D8C38 80142538 AFA20018 */ sw $v0, 0x18($sp) -/* D8C3C 8014253C 080509B5 */ j .L801426D4 -/* D8C40 80142540 AFAE001C */ sw $t6, 0x1c($sp) -.L80142544: -/* D8C44 80142544 08050993 */ j .L8014264C -/* D8C48 80142548 006E1024 */ and $v0, $v1, $t6 -.L8014254C: -/* D8C4C 8014254C 006E1024 */ and $v0, $v1, $t6 -/* D8C50 80142550 1440000B */ bnez $v0, .L80142580 -/* D8C54 80142554 00000000 */ nop -/* D8C58 80142558 82030046 */ lb $v1, 0x46($s0) -/* D8C5C 8014255C 3C0E8015 */ lui $t6, %hi(gHudElementSizes) -/* D8C60 80142560 25CEEFCC */ addiu $t6, $t6, %lo(gHudElementSizes) -/* D8C64 80142564 00031040 */ sll $v0, $v1, 1 -/* D8C68 80142568 00431021 */ addu $v0, $v0, $v1 -/* D8C6C 8014256C 00021040 */ sll $v0, $v0, 1 -/* D8C70 80142570 004E1021 */ addu $v0, $v0, $t6 -/* D8C74 80142574 84560000 */ lh $s6, ($v0) -/* D8C78 80142578 08050962 */ j .L80142588 -/* D8C7C 8014257C 84550002 */ lh $s5, 2($v0) -.L80142580: -/* D8C80 80142580 9216004E */ lbu $s6, 0x4e($s0) -/* D8C84 80142584 9215004F */ lbu $s5, 0x4f($s0) -.L80142588: -/* D8C88 80142588 C6000028 */ lwc1 $f0, 0x28($s0) -/* D8C8C 8014258C C606002C */ lwc1 $f6, 0x2c($s0) -/* D8C90 80142590 3C013F00 */ lui $at, 0x3f00 -/* D8C94 80142594 44811000 */ mtc1 $at, $f2 -/* D8C98 80142598 46000307 */ neg.s $f12, $f0 -/* D8C9C 8014259C 46026302 */ mul.s $f12, $f12, $f2 -/* D8CA0 801425A0 00000000 */ nop -/* D8CA4 801425A4 3C013F80 */ lui $at, 0x3f80 -/* D8CA8 801425A8 44814000 */ mtc1 $at, $f8 -/* D8CAC 801425AC 3C014480 */ lui $at, 0x4480 -/* D8CB0 801425B0 44815000 */ mtc1 $at, $f10 -/* D8CB4 801425B4 4600038D */ trunc.w.s $f14, $f0 -/* D8CB8 801425B8 44117000 */ mfc1 $s1, $f14 -/* D8CBC 801425BC 4600338D */ trunc.w.s $f14, $f6 -/* D8CC0 801425C0 44127000 */ mfc1 $s2, $f14 -/* D8CC4 801425C4 46003187 */ neg.s $f6, $f6 -/* D8CC8 801425C8 46023182 */ mul.s $f6, $f6, $f2 -/* D8CCC 801425CC 00000000 */ nop -/* D8CD0 801425D0 44912000 */ mtc1 $s1, $f4 -/* D8CD4 801425D4 00000000 */ nop -/* D8CD8 801425D8 46802120 */ cvt.s.w $f4, $f4 -/* D8CDC 801425DC 44960000 */ mtc1 $s6, $f0 -/* D8CE0 801425E0 00000000 */ nop -/* D8CE4 801425E4 46800020 */ cvt.s.w $f0, $f0 -/* D8CE8 801425E8 46002103 */ div.s $f4, $f4, $f0 -/* D8CEC 801425EC 46044103 */ div.s $f4, $f8, $f4 -/* D8CF0 801425F0 460A2102 */ mul.s $f4, $f4, $f10 -/* D8CF4 801425F4 00000000 */ nop -/* D8CF8 801425F8 44921000 */ mtc1 $s2, $f2 -/* D8CFC 801425FC 00000000 */ nop -/* D8D00 80142600 468010A0 */ cvt.s.w $f2, $f2 -/* D8D04 80142604 44950000 */ mtc1 $s5, $f0 -/* D8D08 80142608 00000000 */ nop -/* D8D0C 8014260C 46800020 */ cvt.s.w $f0, $f0 -/* D8D10 80142610 46001083 */ div.s $f2, $f2, $f0 -/* D8D14 80142614 46024083 */ div.s $f2, $f8, $f2 -/* D8D18 80142618 460A1082 */ mul.s $f2, $f2, $f10 -/* D8D1C 8014261C 00000000 */ nop -/* D8D20 80142620 8E020000 */ lw $v0, ($s0) -/* D8D24 80142624 4600638D */ trunc.w.s $f14, $f12 -/* D8D28 80142628 44137000 */ mfc1 $s3, $f14 -/* D8D2C 8014262C 4600338D */ trunc.w.s $f14, $f6 -/* D8D30 80142630 44147000 */ mfc1 $s4, $f14 -/* D8D34 80142634 4600238D */ trunc.w.s $f14, $f4 -/* D8D38 80142638 E60E0034 */ swc1 $f14, 0x34($s0) -/* D8D3C 8014263C 4600138D */ trunc.w.s $f14, $f2 -/* D8D40 80142640 E60E0038 */ swc1 $f14, 0x38($s0) -/* D8D44 80142644 3C0E2000 */ lui $t6, 0x2000 -/* D8D48 80142648 004E1024 */ and $v0, $v0, $t6 -.L8014264C: -/* D8D4C 8014264C 10400012 */ beqz $v0, .L80142698 -/* D8D50 80142650 0200202D */ daddu $a0, $s0, $zero -/* D8D54 80142654 02C0282D */ daddu $a1, $s6, $zero -/* D8D58 80142658 02A0302D */ daddu $a2, $s5, $zero -/* D8D5C 8014265C 00113C00 */ sll $a3, $s1, 0x10 -/* D8D60 80142660 00073C03 */ sra $a3, $a3, 0x10 -/* D8D64 80142664 00121400 */ sll $v0, $s2, 0x10 -/* D8D68 80142668 00021403 */ sra $v0, $v0, 0x10 -/* D8D6C 8014266C AFA20010 */ sw $v0, 0x10($sp) -/* D8D70 80142670 00131400 */ sll $v0, $s3, 0x10 -/* D8D74 80142674 00021403 */ sra $v0, $v0, 0x10 -/* D8D78 80142678 AFA20014 */ sw $v0, 0x14($sp) -/* D8D7C 8014267C 00141400 */ sll $v0, $s4, 0x10 -/* D8D80 80142680 00021403 */ sra $v0, $v0, 0x10 -/* D8D84 80142684 240E0001 */ addiu $t6, $zero, 1 -/* D8D88 80142688 AFA20018 */ sw $v0, 0x18($sp) -/* D8D8C 8014268C AFA0001C */ sw $zero, 0x1c($sp) -/* D8D90 80142690 0C04FDC1 */ jal draw_rect_hud_element -/* D8D94 80142694 AFAE0020 */ sw $t6, 0x20($sp) -.L80142698: -/* D8D98 80142698 0200202D */ daddu $a0, $s0, $zero -/* D8D9C 8014269C 02C0282D */ daddu $a1, $s6, $zero -/* D8DA0 801426A0 02A0302D */ daddu $a2, $s5, $zero -/* D8DA4 801426A4 00113C00 */ sll $a3, $s1, 0x10 -/* D8DA8 801426A8 00073C03 */ sra $a3, $a3, 0x10 -/* D8DAC 801426AC 00121400 */ sll $v0, $s2, 0x10 -/* D8DB0 801426B0 00021403 */ sra $v0, $v0, 0x10 -/* D8DB4 801426B4 AFA20010 */ sw $v0, 0x10($sp) -/* D8DB8 801426B8 00131400 */ sll $v0, $s3, 0x10 -/* D8DBC 801426BC 00021403 */ sra $v0, $v0, 0x10 -/* D8DC0 801426C0 AFA20014 */ sw $v0, 0x14($sp) -/* D8DC4 801426C4 00141400 */ sll $v0, $s4, 0x10 -/* D8DC8 801426C8 00021403 */ sra $v0, $v0, 0x10 -/* D8DCC 801426CC AFA20018 */ sw $v0, 0x18($sp) -/* D8DD0 801426D0 AFA0001C */ sw $zero, 0x1c($sp) -.L801426D4: -/* D8DD4 801426D4 0C04FDC1 */ jal draw_rect_hud_element -/* D8DD8 801426D8 AFA00020 */ sw $zero, 0x20($sp) -/* D8DDC 801426DC 26F70001 */ addiu $s7, $s7, 1 -/* D8DE0 801426E0 02FE102A */ slt $v0, $s7, $fp -/* D8DE4 801426E4 1440FF31 */ bnez $v0, .L801423AC -/* D8DE8 801426E8 00171080 */ sll $v0, $s7, 2 -.L801426EC: -/* D8DEC 801426EC 8FBF054C */ lw $ra, 0x54c($sp) -/* D8DF0 801426F0 8FBE0548 */ lw $fp, 0x548($sp) -/* D8DF4 801426F4 8FB70544 */ lw $s7, 0x544($sp) -/* D8DF8 801426F8 8FB60540 */ lw $s6, 0x540($sp) -/* D8DFC 801426FC 8FB5053C */ lw $s5, 0x53c($sp) -/* D8E00 80142700 8FB40538 */ lw $s4, 0x538($sp) -/* D8E04 80142704 8FB30534 */ lw $s3, 0x534($sp) -/* D8E08 80142708 8FB20530 */ lw $s2, 0x530($sp) -/* D8E0C 8014270C 8FB1052C */ lw $s1, 0x52c($sp) -/* D8E10 80142710 8FB00528 */ lw $s0, 0x528($sp) -/* D8E14 80142714 03E00008 */ jr $ra -/* D8E18 80142718 27BD0550 */ addiu $sp, $sp, 0x550 diff --git a/ver/us/asm/nonmatchings/hud_element/render_hud_elements_frontUI.s b/ver/us/asm/nonmatchings/hud_element/render_hud_elements_frontUI.s deleted file mode 100644 index 0466568782..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/render_hud_elements_frontUI.s +++ /dev/null @@ -1,338 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel render_hud_elements_frontUI -/* D8E1C 8014271C 27BDFAB0 */ addiu $sp, $sp, -0x550 -/* D8E20 80142720 AFBE0548 */ sw $fp, 0x548($sp) -/* D8E24 80142724 0000F02D */ daddu $fp, $zero, $zero -/* D8E28 80142728 AFB70544 */ sw $s7, 0x544($sp) -/* D8E2C 8014272C 03C0B82D */ daddu $s7, $fp, $zero -/* D8E30 80142730 3C071021 */ lui $a3, 0x1021 -/* D8E34 80142734 34E70080 */ ori $a3, $a3, 0x80 -/* D8E38 80142738 27A60028 */ addiu $a2, $sp, 0x28 -/* D8E3C 8014273C 3C03800A */ lui $v1, %hi(gMasterGfxPos) -/* D8E40 80142740 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos) -/* D8E44 80142744 AFBF054C */ sw $ra, 0x54c($sp) -/* D8E48 80142748 AFB60540 */ sw $s6, 0x540($sp) -/* D8E4C 8014274C AFB5053C */ sw $s5, 0x53c($sp) -/* D8E50 80142750 AFB40538 */ sw $s4, 0x538($sp) -/* D8E54 80142754 AFB30534 */ sw $s3, 0x534($sp) -/* D8E58 80142758 AFB20530 */ sw $s2, 0x530($sp) -/* D8E5C 8014275C AFB1052C */ sw $s1, 0x52c($sp) -/* D8E60 80142760 AFB00528 */ sw $s0, 0x528($sp) -/* D8E64 80142764 8C620000 */ lw $v0, ($v1) -/* D8E68 80142768 3C058015 */ lui $a1, %hi(gHudElements) -/* D8E6C 8014276C 8CA57960 */ lw $a1, %lo(gHudElements)($a1) -/* D8E70 80142770 0040202D */ daddu $a0, $v0, $zero -/* D8E74 80142774 24420008 */ addiu $v0, $v0, 8 -/* D8E78 80142778 AC620000 */ sw $v0, ($v1) -/* D8E7C 8014277C 3C02DE00 */ lui $v0, 0xde00 -/* D8E80 80142780 AC820000 */ sw $v0, ($a0) -/* D8E84 80142784 3C020015 */ lui $v0, 0x15 -/* D8E88 80142788 2442F0A0 */ addiu $v0, $v0, -0xf60 -/* D8E8C 8014278C AC820004 */ sw $v0, 4($a0) -.L80142790: -/* D8E90 80142790 8CB00000 */ lw $s0, ($a1) -/* D8E94 80142794 52000014 */ beql $s0, $zero, .L801427E8 -/* D8E98 80142798 26F70001 */ addiu $s7, $s7, 1 -/* D8E9C 8014279C 8E030000 */ lw $v1, ($s0) -/* D8EA0 801427A0 50600011 */ beql $v1, $zero, .L801427E8 -/* D8EA4 801427A4 26F70001 */ addiu $s7, $s7, 1 -/* D8EA8 801427A8 30620002 */ andi $v0, $v1, 2 -/* D8EAC 801427AC 5440000E */ bnel $v0, $zero, .L801427E8 -/* D8EB0 801427B0 26F70001 */ addiu $s7, $s7, 1 -/* D8EB4 801427B4 00671024 */ and $v0, $v1, $a3 -/* D8EB8 801427B8 5440000B */ bnel $v0, $zero, .L801427E8 -/* D8EBC 801427BC 26F70001 */ addiu $s7, $s7, 1 -/* D8EC0 801427C0 30620040 */ andi $v0, $v1, 0x40 -/* D8EC4 801427C4 50400008 */ beql $v0, $zero, .L801427E8 -/* D8EC8 801427C8 26F70001 */ addiu $s7, $s7, 1 -/* D8ECC 801427CC 82020045 */ lb $v0, 0x45($s0) -/* D8ED0 801427D0 04420005 */ bltzl $v0, .L801427E8 -/* D8ED4 801427D4 26F70001 */ addiu $s7, $s7, 1 -/* D8ED8 801427D8 ACD70000 */ sw $s7, ($a2) -/* D8EDC 801427DC 24C60004 */ addiu $a2, $a2, 4 -/* D8EE0 801427E0 27DE0001 */ addiu $fp, $fp, 1 -/* D8EE4 801427E4 26F70001 */ addiu $s7, $s7, 1 -.L801427E8: -/* D8EE8 801427E8 2AE20140 */ slti $v0, $s7, 0x140 -/* D8EEC 801427EC 1440FFE8 */ bnez $v0, .L80142790 -/* D8EF0 801427F0 24A50004 */ addiu $a1, $a1, 4 -/* D8EF4 801427F4 27C2FFFF */ addiu $v0, $fp, -1 -/* D8EF8 801427F8 18400024 */ blez $v0, .L8014288C -/* D8EFC 801427FC 0000B82D */ daddu $s7, $zero, $zero -/* D8F00 80142800 3C0D8015 */ lui $t5, %hi(gHudElements) -/* D8F04 80142804 25AD7960 */ addiu $t5, $t5, %lo(gHudElements) -/* D8F08 80142808 27AC0028 */ addiu $t4, $sp, 0x28 -/* D8F0C 8014280C 0180582D */ daddu $t3, $t4, $zero -.L80142810: -/* D8F10 80142810 26E80001 */ addiu $t0, $s7, 1 -/* D8F14 80142814 011E102A */ slt $v0, $t0, $fp -/* D8F18 80142818 50400018 */ beql $v0, $zero, .L8014287C -/* D8F1C 8014281C 26F70001 */ addiu $s7, $s7, 1 -/* D8F20 80142820 0160502D */ daddu $t2, $t3, $zero -/* D8F24 80142824 8DA90000 */ lw $t1, ($t5) -/* D8F28 80142828 00081080 */ sll $v0, $t0, 2 -/* D8F2C 8014282C 004C3021 */ addu $a2, $v0, $t4 -.L80142830: -/* D8F30 80142830 8D470000 */ lw $a3, ($t2) -/* D8F34 80142834 8CC50000 */ lw $a1, ($a2) -/* D8F38 80142838 00071880 */ sll $v1, $a3, 2 -/* D8F3C 8014283C 00691821 */ addu $v1, $v1, $t1 -/* D8F40 80142840 00051080 */ sll $v0, $a1, 2 -/* D8F44 80142844 00491021 */ addu $v0, $v0, $t1 -/* D8F48 80142848 8C630000 */ lw $v1, ($v1) -/* D8F4C 8014284C 8C440000 */ lw $a0, ($v0) -/* D8F50 80142850 80620044 */ lb $v0, 0x44($v1) -/* D8F54 80142854 80830044 */ lb $v1, 0x44($a0) -/* D8F58 80142858 0043102A */ slt $v0, $v0, $v1 -/* D8F5C 8014285C 10400003 */ beqz $v0, .L8014286C -/* D8F60 80142860 25080001 */ addiu $t0, $t0, 1 -/* D8F64 80142864 AD450000 */ sw $a1, ($t2) -/* D8F68 80142868 ACC70000 */ sw $a3, ($a2) -.L8014286C: -/* D8F6C 8014286C 011E102A */ slt $v0, $t0, $fp -/* D8F70 80142870 1440FFEF */ bnez $v0, .L80142830 -/* D8F74 80142874 24C60004 */ addiu $a2, $a2, 4 -/* D8F78 80142878 26F70001 */ addiu $s7, $s7, 1 -.L8014287C: -/* D8F7C 8014287C 27C2FFFF */ addiu $v0, $fp, -1 -/* D8F80 80142880 02E2102A */ slt $v0, $s7, $v0 -/* D8F84 80142884 1440FFE2 */ bnez $v0, .L80142810 -/* D8F88 80142888 256B0004 */ addiu $t3, $t3, 4 -.L8014288C: -/* D8F8C 8014288C 1BC000CF */ blez $fp, .L80142BCC -/* D8F90 80142890 0000B82D */ daddu $s7, $zero, $zero -/* D8F94 80142894 00171080 */ sll $v0, $s7, 2 -.L80142898: -/* D8F98 80142898 03A21021 */ addu $v0, $sp, $v0 -/* D8F9C 8014289C 8C420028 */ lw $v0, 0x28($v0) -/* D8FA0 801428A0 3C038015 */ lui $v1, %hi(gHudElements) -/* D8FA4 801428A4 8C637960 */ lw $v1, %lo(gHudElements)($v1) -/* D8FA8 801428A8 00021080 */ sll $v0, $v0, 2 -/* D8FAC 801428AC 00431021 */ addu $v0, $v0, $v1 -/* D8FB0 801428B0 8C500000 */ lw $s0, ($v0) -/* D8FB4 801428B4 8E030000 */ lw $v1, ($s0) -/* D8FB8 801428B8 30620100 */ andi $v0, $v1, 0x100 -/* D8FBC 801428BC 1440005B */ bnez $v0, .L80142A2C -/* D8FC0 801428C0 3C0E0010 */ lui $t6, 0x10 -/* D8FC4 801428C4 006E1024 */ and $v0, $v1, $t6 -/* D8FC8 801428C8 1440000B */ bnez $v0, .L801428F8 -/* D8FCC 801428CC 00000000 */ nop -/* D8FD0 801428D0 82030046 */ lb $v1, 0x46($s0) -/* D8FD4 801428D4 3C0E8015 */ lui $t6, %hi(gHudElementSizes) -/* D8FD8 801428D8 25CEEFCC */ addiu $t6, $t6, %lo(gHudElementSizes) -/* D8FDC 801428DC 00031040 */ sll $v0, $v1, 1 -/* D8FE0 801428E0 00431021 */ addu $v0, $v0, $v1 -/* D8FE4 801428E4 00021040 */ sll $v0, $v0, 1 -/* D8FE8 801428E8 004E1021 */ addu $v0, $v0, $t6 -/* D8FEC 801428EC 84560000 */ lh $s6, ($v0) -/* D8FF0 801428F0 08050A40 */ j .L80142900 -/* D8FF4 801428F4 84550002 */ lh $s5, 2($v0) -.L801428F8: -/* D8FF8 801428F8 9216004E */ lbu $s6, 0x4e($s0) -/* D8FFC 801428FC 9215004F */ lbu $s5, 0x4f($s0) -.L80142900: -/* D9000 80142900 8E030000 */ lw $v1, ($s0) -/* D9004 80142904 30620010 */ andi $v0, $v1, 0x10 -/* D9008 80142908 14400013 */ bnez $v0, .L80142958 -/* D900C 8014290C 3C0E0010 */ lui $t6, 0x10 -/* D9010 80142910 006E1024 */ and $v0, $v1, $t6 -/* D9014 80142914 1440000C */ bnez $v0, .L80142948 -/* D9018 80142918 00000000 */ nop -/* D901C 8014291C 82030045 */ lb $v1, 0x45($s0) -/* D9020 80142920 3C0E8015 */ lui $t6, %hi(gHudElementSizes) -/* D9024 80142924 25CEEFCC */ addiu $t6, $t6, %lo(gHudElementSizes) -/* D9028 80142928 00031040 */ sll $v0, $v1, 1 -/* D902C 8014292C 00431021 */ addu $v0, $v0, $v1 -/* D9030 80142930 00021040 */ sll $v0, $v0, 1 -/* D9034 80142934 004E1021 */ addu $v0, $v0, $t6 -/* D9038 80142938 84510000 */ lh $s1, ($v0) -/* D903C 8014293C 84520002 */ lh $s2, 2($v0) -/* D9040 80142940 08050A59 */ j .L80142964 -/* D9044 80142944 00111023 */ negu $v0, $s1 -.L80142948: -/* D9048 80142948 92110050 */ lbu $s1, 0x50($s0) -/* D904C 8014294C 92120051 */ lbu $s2, 0x51($s0) -/* D9050 80142950 08050A59 */ j .L80142964 -/* D9054 80142954 00111023 */ negu $v0, $s1 -.L80142958: -/* D9058 80142958 92110048 */ lbu $s1, 0x48($s0) -/* D905C 8014295C 92120049 */ lbu $s2, 0x49($s0) -/* D9060 80142960 00111023 */ negu $v0, $s1 -.L80142964: -/* D9064 80142964 00021FC2 */ srl $v1, $v0, 0x1f -/* D9068 80142968 00431021 */ addu $v0, $v0, $v1 -/* D906C 8014296C 00029843 */ sra $s3, $v0, 1 -/* D9070 80142970 00121023 */ negu $v0, $s2 -/* D9074 80142974 00021FC2 */ srl $v1, $v0, 0x1f -/* D9078 80142978 00431021 */ addu $v0, $v0, $v1 -/* D907C 8014297C 0002A043 */ sra $s4, $v0, 1 -/* D9080 80142980 8E030000 */ lw $v1, ($s0) -/* D9084 80142984 30620800 */ andi $v0, $v1, 0x800 -/* D9088 80142988 14400026 */ bnez $v0, .L80142A24 -/* D908C 8014298C 3C0E2000 */ lui $t6, 0x2000 -/* D9090 80142990 006E1024 */ and $v0, $v1, $t6 -/* D9094 80142994 10400012 */ beqz $v0, .L801429E0 -/* D9098 80142998 0200202D */ daddu $a0, $s0, $zero -/* D909C 8014299C 02C0282D */ daddu $a1, $s6, $zero -/* D90A0 801429A0 02A0302D */ daddu $a2, $s5, $zero -/* D90A4 801429A4 00113C00 */ sll $a3, $s1, 0x10 -/* D90A8 801429A8 00073C03 */ sra $a3, $a3, 0x10 -/* D90AC 801429AC 00121400 */ sll $v0, $s2, 0x10 -/* D90B0 801429B0 00021403 */ sra $v0, $v0, 0x10 -/* D90B4 801429B4 AFA20010 */ sw $v0, 0x10($sp) -/* D90B8 801429B8 00131400 */ sll $v0, $s3, 0x10 -/* D90BC 801429BC 00021403 */ sra $v0, $v0, 0x10 -/* D90C0 801429C0 AFA20014 */ sw $v0, 0x14($sp) -/* D90C4 801429C4 00141400 */ sll $v0, $s4, 0x10 -/* D90C8 801429C8 00021403 */ sra $v0, $v0, 0x10 -/* D90CC 801429CC 240E0001 */ addiu $t6, $zero, 1 -/* D90D0 801429D0 AFA20018 */ sw $v0, 0x18($sp) -/* D90D4 801429D4 AFAE001C */ sw $t6, 0x1c($sp) -/* D90D8 801429D8 0C04FDC1 */ jal draw_rect_hud_element -/* D90DC 801429DC AFAE0020 */ sw $t6, 0x20($sp) -.L801429E0: -/* D90E0 801429E0 0200202D */ daddu $a0, $s0, $zero -/* D90E4 801429E4 02C0282D */ daddu $a1, $s6, $zero -/* D90E8 801429E8 02A0302D */ daddu $a2, $s5, $zero -/* D90EC 801429EC 00113C00 */ sll $a3, $s1, 0x10 -/* D90F0 801429F0 00073C03 */ sra $a3, $a3, 0x10 -/* D90F4 801429F4 00121400 */ sll $v0, $s2, 0x10 -/* D90F8 801429F8 00021403 */ sra $v0, $v0, 0x10 -/* D90FC 801429FC AFA20010 */ sw $v0, 0x10($sp) -/* D9100 80142A00 00131400 */ sll $v0, $s3, 0x10 -/* D9104 80142A04 00021403 */ sra $v0, $v0, 0x10 -/* D9108 80142A08 AFA20014 */ sw $v0, 0x14($sp) -/* D910C 80142A0C 00141400 */ sll $v0, $s4, 0x10 -/* D9110 80142A10 00021403 */ sra $v0, $v0, 0x10 -/* D9114 80142A14 240E0001 */ addiu $t6, $zero, 1 -/* D9118 80142A18 AFA20018 */ sw $v0, 0x18($sp) -/* D911C 80142A1C 08050AED */ j .L80142BB4 -/* D9120 80142A20 AFAE001C */ sw $t6, 0x1c($sp) -.L80142A24: -/* D9124 80142A24 08050ACB */ j .L80142B2C -/* D9128 80142A28 006E1024 */ and $v0, $v1, $t6 -.L80142A2C: -/* D912C 80142A2C 006E1024 */ and $v0, $v1, $t6 -/* D9130 80142A30 1440000B */ bnez $v0, .L80142A60 -/* D9134 80142A34 00000000 */ nop -/* D9138 80142A38 82030045 */ lb $v1, 0x45($s0) -/* D913C 80142A3C 3C0E8015 */ lui $t6, %hi(gHudElementSizes) -/* D9140 80142A40 25CEEFCC */ addiu $t6, $t6, %lo(gHudElementSizes) -/* D9144 80142A44 00031040 */ sll $v0, $v1, 1 -/* D9148 80142A48 00431021 */ addu $v0, $v0, $v1 -/* D914C 80142A4C 00021040 */ sll $v0, $v0, 1 -/* D9150 80142A50 004E1021 */ addu $v0, $v0, $t6 -/* D9154 80142A54 84560000 */ lh $s6, ($v0) -/* D9158 80142A58 08050A9A */ j .L80142A68 -/* D915C 80142A5C 84550002 */ lh $s5, 2($v0) -.L80142A60: -/* D9160 80142A60 9216004E */ lbu $s6, 0x4e($s0) -/* D9164 80142A64 9215004F */ lbu $s5, 0x4f($s0) -.L80142A68: -/* D9168 80142A68 C6000028 */ lwc1 $f0, 0x28($s0) -/* D916C 80142A6C C606002C */ lwc1 $f6, 0x2c($s0) -/* D9170 80142A70 3C013F00 */ lui $at, 0x3f00 -/* D9174 80142A74 44811000 */ mtc1 $at, $f2 -/* D9178 80142A78 46000307 */ neg.s $f12, $f0 -/* D917C 80142A7C 46026302 */ mul.s $f12, $f12, $f2 -/* D9180 80142A80 00000000 */ nop -/* D9184 80142A84 3C013F80 */ lui $at, 0x3f80 -/* D9188 80142A88 44814000 */ mtc1 $at, $f8 -/* D918C 80142A8C 3C014480 */ lui $at, 0x4480 -/* D9190 80142A90 44815000 */ mtc1 $at, $f10 -/* D9194 80142A94 4600038D */ trunc.w.s $f14, $f0 -/* D9198 80142A98 44117000 */ mfc1 $s1, $f14 -/* D919C 80142A9C 4600338D */ trunc.w.s $f14, $f6 -/* D91A0 80142AA0 44127000 */ mfc1 $s2, $f14 -/* D91A4 80142AA4 46003187 */ neg.s $f6, $f6 -/* D91A8 80142AA8 46023182 */ mul.s $f6, $f6, $f2 -/* D91AC 80142AAC 00000000 */ nop -/* D91B0 80142AB0 44912000 */ mtc1 $s1, $f4 -/* D91B4 80142AB4 00000000 */ nop -/* D91B8 80142AB8 46802120 */ cvt.s.w $f4, $f4 -/* D91BC 80142ABC 44960000 */ mtc1 $s6, $f0 -/* D91C0 80142AC0 00000000 */ nop -/* D91C4 80142AC4 46800020 */ cvt.s.w $f0, $f0 -/* D91C8 80142AC8 46002103 */ div.s $f4, $f4, $f0 -/* D91CC 80142ACC 46044103 */ div.s $f4, $f8, $f4 -/* D91D0 80142AD0 460A2102 */ mul.s $f4, $f4, $f10 -/* D91D4 80142AD4 00000000 */ nop -/* D91D8 80142AD8 44921000 */ mtc1 $s2, $f2 -/* D91DC 80142ADC 00000000 */ nop -/* D91E0 80142AE0 468010A0 */ cvt.s.w $f2, $f2 -/* D91E4 80142AE4 44950000 */ mtc1 $s5, $f0 -/* D91E8 80142AE8 00000000 */ nop -/* D91EC 80142AEC 46800020 */ cvt.s.w $f0, $f0 -/* D91F0 80142AF0 46001083 */ div.s $f2, $f2, $f0 -/* D91F4 80142AF4 46024083 */ div.s $f2, $f8, $f2 -/* D91F8 80142AF8 460A1082 */ mul.s $f2, $f2, $f10 -/* D91FC 80142AFC 00000000 */ nop -/* D9200 80142B00 8E020000 */ lw $v0, ($s0) -/* D9204 80142B04 4600638D */ trunc.w.s $f14, $f12 -/* D9208 80142B08 44137000 */ mfc1 $s3, $f14 -/* D920C 80142B0C 4600338D */ trunc.w.s $f14, $f6 -/* D9210 80142B10 44147000 */ mfc1 $s4, $f14 -/* D9214 80142B14 4600238D */ trunc.w.s $f14, $f4 -/* D9218 80142B18 E60E0034 */ swc1 $f14, 0x34($s0) -/* D921C 80142B1C 4600138D */ trunc.w.s $f14, $f2 -/* D9220 80142B20 E60E0038 */ swc1 $f14, 0x38($s0) -/* D9224 80142B24 3C0E2000 */ lui $t6, 0x2000 -/* D9228 80142B28 004E1024 */ and $v0, $v0, $t6 -.L80142B2C: -/* D922C 80142B2C 10400012 */ beqz $v0, .L80142B78 -/* D9230 80142B30 0200202D */ daddu $a0, $s0, $zero -/* D9234 80142B34 02C0282D */ daddu $a1, $s6, $zero -/* D9238 80142B38 02A0302D */ daddu $a2, $s5, $zero -/* D923C 80142B3C 00113C00 */ sll $a3, $s1, 0x10 -/* D9240 80142B40 00073C03 */ sra $a3, $a3, 0x10 -/* D9244 80142B44 00121400 */ sll $v0, $s2, 0x10 -/* D9248 80142B48 00021403 */ sra $v0, $v0, 0x10 -/* D924C 80142B4C AFA20010 */ sw $v0, 0x10($sp) -/* D9250 80142B50 00131400 */ sll $v0, $s3, 0x10 -/* D9254 80142B54 00021403 */ sra $v0, $v0, 0x10 -/* D9258 80142B58 AFA20014 */ sw $v0, 0x14($sp) -/* D925C 80142B5C 00141400 */ sll $v0, $s4, 0x10 -/* D9260 80142B60 00021403 */ sra $v0, $v0, 0x10 -/* D9264 80142B64 240E0001 */ addiu $t6, $zero, 1 -/* D9268 80142B68 AFA20018 */ sw $v0, 0x18($sp) -/* D926C 80142B6C AFA0001C */ sw $zero, 0x1c($sp) -/* D9270 80142B70 0C04FDC1 */ jal draw_rect_hud_element -/* D9274 80142B74 AFAE0020 */ sw $t6, 0x20($sp) -.L80142B78: -/* D9278 80142B78 0200202D */ daddu $a0, $s0, $zero -/* D927C 80142B7C 02C0282D */ daddu $a1, $s6, $zero -/* D9280 80142B80 02A0302D */ daddu $a2, $s5, $zero -/* D9284 80142B84 00113C00 */ sll $a3, $s1, 0x10 -/* D9288 80142B88 00073C03 */ sra $a3, $a3, 0x10 -/* D928C 80142B8C 00121400 */ sll $v0, $s2, 0x10 -/* D9290 80142B90 00021403 */ sra $v0, $v0, 0x10 -/* D9294 80142B94 AFA20010 */ sw $v0, 0x10($sp) -/* D9298 80142B98 00131400 */ sll $v0, $s3, 0x10 -/* D929C 80142B9C 00021403 */ sra $v0, $v0, 0x10 -/* D92A0 80142BA0 AFA20014 */ sw $v0, 0x14($sp) -/* D92A4 80142BA4 00141400 */ sll $v0, $s4, 0x10 -/* D92A8 80142BA8 00021403 */ sra $v0, $v0, 0x10 -/* D92AC 80142BAC AFA20018 */ sw $v0, 0x18($sp) -/* D92B0 80142BB0 AFA0001C */ sw $zero, 0x1c($sp) -.L80142BB4: -/* D92B4 80142BB4 0C04FDC1 */ jal draw_rect_hud_element -/* D92B8 80142BB8 AFA00020 */ sw $zero, 0x20($sp) -/* D92BC 80142BBC 26F70001 */ addiu $s7, $s7, 1 -/* D92C0 80142BC0 02FE102A */ slt $v0, $s7, $fp -/* D92C4 80142BC4 1440FF34 */ bnez $v0, .L80142898 -/* D92C8 80142BC8 00171080 */ sll $v0, $s7, 2 -.L80142BCC: -/* D92CC 80142BCC 8FBF054C */ lw $ra, 0x54c($sp) -/* D92D0 80142BD0 8FBE0548 */ lw $fp, 0x548($sp) -/* D92D4 80142BD4 8FB70544 */ lw $s7, 0x544($sp) -/* D92D8 80142BD8 8FB60540 */ lw $s6, 0x540($sp) -/* D92DC 80142BDC 8FB5053C */ lw $s5, 0x53c($sp) -/* D92E0 80142BE0 8FB40538 */ lw $s4, 0x538($sp) -/* D92E4 80142BE4 8FB30534 */ lw $s3, 0x534($sp) -/* D92E8 80142BE8 8FB20530 */ lw $s2, 0x530($sp) -/* D92EC 80142BEC 8FB1052C */ lw $s1, 0x52c($sp) -/* D92F0 80142BF0 8FB00528 */ lw $s0, 0x528($sp) -/* D92F4 80142BF4 03E00008 */ jr $ra -/* D92F8 80142BF8 27BD0550 */ addiu $sp, $sp, 0x550 diff --git a/ver/us/asm/nonmatchings/hud_element/render_hud_elements_world.s b/ver/us/asm/nonmatchings/hud_element/render_hud_elements_world.s deleted file mode 100644 index c182c05dca..0000000000 --- a/ver/us/asm/nonmatchings/hud_element/render_hud_elements_world.s +++ /dev/null @@ -1,380 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel render_hud_elements_world -/* D9DB4 801436B4 27BDFAE0 */ addiu $sp, $sp, -0x520 -/* D9DB8 801436B8 AFBF051C */ sw $ra, 0x51c($sp) -/* D9DBC 801436BC AFB20518 */ sw $s2, 0x518($sp) -/* D9DC0 801436C0 AFB10514 */ sw $s1, 0x514($sp) -/* D9DC4 801436C4 AFB00510 */ sw $s0, 0x510($sp) -/* D9DC8 801436C8 3C03800A */ lui $v1, %hi(gCurrentCamID) -/* D9DCC 801436CC 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) -/* D9DD0 801436D0 24020003 */ addiu $v0, $zero, 3 -/* D9DD4 801436D4 146200AB */ bne $v1, $v0, .L80143984 -/* D9DD8 801436D8 0000902D */ daddu $s2, $zero, $zero -/* D9DDC 801436DC 0240882D */ daddu $s1, $s2, $zero -/* D9DE0 801436E0 3C091020 */ lui $t1, 0x1020 -/* D9DE4 801436E4 3C080001 */ lui $t0, 1 -/* D9DE8 801436E8 3C074000 */ lui $a3, 0x4000 -/* D9DEC 801436EC 3C068015 */ lui $a2, %hi(gHudElements) -/* D9DF0 801436F0 8CC67960 */ lw $a2, %lo(gHudElements)($a2) -/* D9DF4 801436F4 27A50010 */ addiu $a1, $sp, 0x10 -.L801436F8: -/* D9DF8 801436F8 8CC40000 */ lw $a0, ($a2) -/* D9DFC 801436FC 5080001D */ beql $a0, $zero, .L80143774 -/* D9E00 80143700 26310001 */ addiu $s1, $s1, 1 -/* D9E04 80143704 8C830000 */ lw $v1, ($a0) -/* D9E08 80143708 5060001A */ beql $v1, $zero, .L80143774 -/* D9E0C 8014370C 26310001 */ addiu $s1, $s1, 1 -/* D9E10 80143710 30620002 */ andi $v0, $v1, 2 -/* D9E14 80143714 54400017 */ bnel $v0, $zero, .L80143774 -/* D9E18 80143718 26310001 */ addiu $s1, $s1, 1 -/* D9E1C 8014371C 00691024 */ and $v0, $v1, $t1 -/* D9E20 80143720 54400014 */ bnel $v0, $zero, .L80143774 -/* D9E24 80143724 26310001 */ addiu $s1, $s1, 1 -/* D9E28 80143728 00681024 */ and $v0, $v1, $t0 -/* D9E2C 8014372C 50400011 */ beql $v0, $zero, .L80143774 -/* D9E30 80143730 26310001 */ addiu $s1, $s1, 1 -/* D9E34 80143734 00671024 */ and $v0, $v1, $a3 -/* D9E38 80143738 5440000E */ bnel $v0, $zero, .L80143774 -/* D9E3C 8014373C 26310001 */ addiu $s1, $s1, 1 -/* D9E40 80143740 30620040 */ andi $v0, $v1, 0x40 -/* D9E44 80143744 5440000B */ bnel $v0, $zero, .L80143774 -/* D9E48 80143748 26310001 */ addiu $s1, $s1, 1 -/* D9E4C 8014374C 80820045 */ lb $v0, 0x45($a0) -/* D9E50 80143750 04420008 */ bltzl $v0, .L80143774 -/* D9E54 80143754 26310001 */ addiu $s1, $s1, 1 -/* D9E58 80143758 30620080 */ andi $v0, $v1, 0x80 -/* D9E5C 8014375C 54400005 */ bnel $v0, $zero, .L80143774 -/* D9E60 80143760 26310001 */ addiu $s1, $s1, 1 -/* D9E64 80143764 ACB10000 */ sw $s1, ($a1) -/* D9E68 80143768 24A50004 */ addiu $a1, $a1, 4 -/* D9E6C 8014376C 26520001 */ addiu $s2, $s2, 1 -/* D9E70 80143770 26310001 */ addiu $s1, $s1, 1 -.L80143774: -/* D9E74 80143774 2A220140 */ slti $v0, $s1, 0x140 -/* D9E78 80143778 1440FFDF */ bnez $v0, .L801436F8 -/* D9E7C 8014377C 24C60004 */ addiu $a2, $a2, 4 -/* D9E80 80143780 1240007E */ beqz $s2, .L8014397C -/* D9E84 80143784 2642FFFF */ addiu $v0, $s2, -1 -/* D9E88 80143788 18400024 */ blez $v0, .L8014381C -/* D9E8C 8014378C 0000882D */ daddu $s1, $zero, $zero -/* D9E90 80143790 3C0C8015 */ lui $t4, %hi(gHudElements) -/* D9E94 80143794 258C7960 */ addiu $t4, $t4, %lo(gHudElements) -/* D9E98 80143798 27AB0010 */ addiu $t3, $sp, 0x10 -/* D9E9C 8014379C 0160502D */ daddu $t2, $t3, $zero -.L801437A0: -/* D9EA0 801437A0 26240001 */ addiu $a0, $s1, 1 -/* D9EA4 801437A4 0092102A */ slt $v0, $a0, $s2 -/* D9EA8 801437A8 50400018 */ beql $v0, $zero, .L8014380C -/* D9EAC 801437AC 26310001 */ addiu $s1, $s1, 1 -/* D9EB0 801437B0 0140482D */ daddu $t1, $t2, $zero -/* D9EB4 801437B4 8D880000 */ lw $t0, ($t4) -/* D9EB8 801437B8 00041080 */ sll $v0, $a0, 2 -/* D9EBC 801437BC 004B2821 */ addu $a1, $v0, $t3 -.L801437C0: -/* D9EC0 801437C0 8D270000 */ lw $a3, ($t1) -/* D9EC4 801437C4 8CA60000 */ lw $a2, ($a1) -/* D9EC8 801437C8 00071080 */ sll $v0, $a3, 2 -/* D9ECC 801437CC 00481021 */ addu $v0, $v0, $t0 -/* D9ED0 801437D0 8C430000 */ lw $v1, ($v0) -/* D9ED4 801437D4 00061080 */ sll $v0, $a2, 2 -/* D9ED8 801437D8 00481021 */ addu $v0, $v0, $t0 -/* D9EDC 801437DC 8C420000 */ lw $v0, ($v0) -/* D9EE0 801437E0 80630044 */ lb $v1, 0x44($v1) -/* D9EE4 801437E4 80420044 */ lb $v0, 0x44($v0) -/* D9EE8 801437E8 0062182A */ slt $v1, $v1, $v0 -/* D9EEC 801437EC 10600003 */ beqz $v1, .L801437FC -/* D9EF0 801437F0 24840001 */ addiu $a0, $a0, 1 -/* D9EF4 801437F4 AD260000 */ sw $a2, ($t1) -/* D9EF8 801437F8 ACA70000 */ sw $a3, ($a1) -.L801437FC: -/* D9EFC 801437FC 0092102A */ slt $v0, $a0, $s2 -/* D9F00 80143800 1440FFEF */ bnez $v0, .L801437C0 -/* D9F04 80143804 24A50004 */ addiu $a1, $a1, 4 -/* D9F08 80143808 26310001 */ addiu $s1, $s1, 1 -.L8014380C: -/* D9F0C 8014380C 2642FFFF */ addiu $v0, $s2, -1 -/* D9F10 80143810 0222102A */ slt $v0, $s1, $v0 -/* D9F14 80143814 1440FFE2 */ bnez $v0, .L801437A0 -/* D9F18 80143818 254A0004 */ addiu $t2, $t2, 4 -.L8014381C: -/* D9F1C 8014381C 3C06ED03 */ lui $a2, 0xed03 -/* D9F20 80143820 34C60050 */ ori $a2, $a2, 0x50 -/* D9F24 80143824 3C04004D */ lui $a0, 0x4d -/* D9F28 80143828 34840370 */ ori $a0, $a0, 0x370 -/* D9F2C 8014382C 3C07D9C0 */ lui $a3, 0xd9c0 -/* D9F30 80143830 34E7F9FA */ ori $a3, $a3, 0xf9fa -/* D9F34 80143834 3C09D9FF */ lui $t1, 0xd9ff -/* D9F38 80143838 3529FFFF */ ori $t1, $t1, 0xffff -/* D9F3C 8014383C 3C080022 */ lui $t0, 0x22 -/* D9F40 80143840 35080005 */ ori $t0, $t0, 5 -/* D9F44 80143844 3C0ADC08 */ lui $t2, 0xdc08 -/* D9F48 80143848 354A060A */ ori $t2, $t2, 0x60a -/* D9F4C 8014384C 3C0BDC08 */ lui $t3, 0xdc08 -/* D9F50 80143850 356B090A */ ori $t3, $t3, 0x90a -/* D9F54 80143854 3C0CD700 */ lui $t4, 0xd700 -/* D9F58 80143858 358C0002 */ ori $t4, $t4, 2 -/* D9F5C 8014385C 3C0DE200 */ lui $t5, 0xe200 -/* D9F60 80143860 35AD1E01 */ ori $t5, $t5, 0x1e01 -/* D9F64 80143864 3C0FE300 */ lui $t7, 0xe300 -/* D9F68 80143868 35EF0A11 */ ori $t7, $t7, 0xa11 -/* D9F6C 8014386C 3C0E0008 */ lui $t6, 8 -/* D9F70 80143870 35CE2CF0 */ ori $t6, $t6, 0x2cf0 -/* D9F74 80143874 3C05800A */ lui $a1, %hi(gMasterGfxPos) -/* D9F78 80143878 24A5A66C */ addiu $a1, $a1, %lo(gMasterGfxPos) -/* D9F7C 8014387C 8CA20000 */ lw $v0, ($a1) -/* D9F80 80143880 0000882D */ daddu $s1, $zero, $zero -/* D9F84 80143884 0040182D */ daddu $v1, $v0, $zero -/* D9F88 80143888 24420008 */ addiu $v0, $v0, 8 -/* D9F8C 8014388C ACA20000 */ sw $v0, ($a1) -/* D9F90 80143890 AC660000 */ sw $a2, ($v1) -/* D9F94 80143894 AC640004 */ sw $a0, 4($v1) -/* D9F98 80143898 24430008 */ addiu $v1, $v0, 8 -/* D9F9C 8014389C ACA30000 */ sw $v1, ($a1) -/* D9FA0 801438A0 3C03E700 */ lui $v1, 0xe700 -/* D9FA4 801438A4 AC430000 */ sw $v1, ($v0) -/* D9FA8 801438A8 24430010 */ addiu $v1, $v0, 0x10 -/* D9FAC 801438AC AC400004 */ sw $zero, 4($v0) -/* D9FB0 801438B0 ACA30000 */ sw $v1, ($a1) -/* D9FB4 801438B4 24430018 */ addiu $v1, $v0, 0x18 -/* D9FB8 801438B8 AC470008 */ sw $a3, 8($v0) -/* D9FBC 801438BC AC40000C */ sw $zero, 0xc($v0) -/* D9FC0 801438C0 ACA30000 */ sw $v1, ($a1) -/* D9FC4 801438C4 24430020 */ addiu $v1, $v0, 0x20 -/* D9FC8 801438C8 AC490010 */ sw $t1, 0x10($v0) -/* D9FCC 801438CC AC480014 */ sw $t0, 0x14($v0) -/* D9FD0 801438D0 ACA30000 */ sw $v1, ($a1) -/* D9FD4 801438D4 3C03DB02 */ lui $v1, 0xdb02 -/* D9FD8 801438D8 AC430018 */ sw $v1, 0x18($v0) -/* D9FDC 801438DC 24030018 */ addiu $v1, $zero, 0x18 -/* D9FE0 801438E0 AC43001C */ sw $v1, 0x1c($v0) -/* D9FE4 801438E4 24430028 */ addiu $v1, $v0, 0x28 -/* D9FE8 801438E8 3C048015 */ lui $a0, %hi(D_8014F108 + 8) -/* D9FEC 801438EC 2484F110 */ addiu $a0, $a0, %lo(D_8014F108 + 8) -/* D9FF0 801438F0 ACA30000 */ sw $v1, ($a1) -/* D9FF4 801438F4 24430030 */ addiu $v1, $v0, 0x30 -/* D9FF8 801438F8 AC440024 */ sw $a0, 0x24($v0) -/* D9FFC 801438FC 2484FFF8 */ addiu $a0, $a0, -8 -/* DA000 80143900 AC4A0020 */ sw $t2, 0x20($v0) -/* DA004 80143904 ACA30000 */ sw $v1, ($a1) -/* DA008 80143908 24430038 */ addiu $v1, $v0, 0x38 -/* DA00C 8014390C AC4B0028 */ sw $t3, 0x28($v0) -/* DA010 80143910 AC44002C */ sw $a0, 0x2c($v0) -/* DA014 80143914 ACA30000 */ sw $v1, ($a1) -/* DA018 80143918 2403FFFF */ addiu $v1, $zero, -1 -/* DA01C 8014391C AC430034 */ sw $v1, 0x34($v0) -/* DA020 80143920 24430040 */ addiu $v1, $v0, 0x40 -/* DA024 80143924 AC4C0030 */ sw $t4, 0x30($v0) -/* DA028 80143928 ACA30000 */ sw $v1, ($a1) -/* DA02C 8014392C 24430048 */ addiu $v1, $v0, 0x48 -/* DA030 80143930 AC4D0038 */ sw $t5, 0x38($v0) -/* DA034 80143934 AC40003C */ sw $zero, 0x3c($v0) -/* DA038 80143938 ACA30000 */ sw $v1, ($a1) -/* DA03C 8014393C AC4F0040 */ sw $t7, 0x40($v0) -/* DA040 80143940 1A40000E */ blez $s2, .L8014397C -/* DA044 80143944 AC4E0044 */ sw $t6, 0x44($v0) -/* DA048 80143948 27B00010 */ addiu $s0, $sp, 0x10 -.L8014394C: -/* DA04C 8014394C 8E020000 */ lw $v0, ($s0) -/* DA050 80143950 26100004 */ addiu $s0, $s0, 4 -/* DA054 80143954 3C038015 */ lui $v1, %hi(gHudElements) -/* DA058 80143958 8C637960 */ lw $v1, %lo(gHudElements)($v1) -/* DA05C 8014395C 00021080 */ sll $v0, $v0, 2 -/* DA060 80143960 00431021 */ addu $v0, $v0, $v1 -/* DA064 80143964 8C440000 */ lw $a0, ($v0) -/* DA068 80143968 0C050AFF */ jal render_hud_element -/* DA06C 8014396C 26310001 */ addiu $s1, $s1, 1 -/* DA070 80143970 0232102A */ slt $v0, $s1, $s2 -/* DA074 80143974 1440FFF5 */ bnez $v0, .L8014394C -/* DA078 80143978 00000000 */ nop -.L8014397C: -/* DA07C 8014397C 3C03800A */ lui $v1, %hi(gCurrentCamID) -/* DA080 80143980 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) -.L80143984: -/* DA084 80143984 24020001 */ addiu $v0, $zero, 1 -/* DA088 80143988 146200A9 */ bne $v1, $v0, .L80143C30 -/* DA08C 8014398C 0000902D */ daddu $s2, $zero, $zero -/* DA090 80143990 0240882D */ daddu $s1, $s2, $zero -/* DA094 80143994 3C091020 */ lui $t1, 0x1020 -/* DA098 80143998 3C080001 */ lui $t0, 1 -/* DA09C 8014399C 3C074000 */ lui $a3, 0x4000 -/* DA0A0 801439A0 3C068015 */ lui $a2, %hi(gHudElements) -/* DA0A4 801439A4 8CC67960 */ lw $a2, %lo(gHudElements)($a2) -/* DA0A8 801439A8 27A50010 */ addiu $a1, $sp, 0x10 -.L801439AC: -/* DA0AC 801439AC 8CC40000 */ lw $a0, ($a2) -/* DA0B0 801439B0 5080001D */ beql $a0, $zero, .L80143A28 -/* DA0B4 801439B4 26310001 */ addiu $s1, $s1, 1 -/* DA0B8 801439B8 8C830000 */ lw $v1, ($a0) -/* DA0BC 801439BC 5060001A */ beql $v1, $zero, .L80143A28 -/* DA0C0 801439C0 26310001 */ addiu $s1, $s1, 1 -/* DA0C4 801439C4 30620002 */ andi $v0, $v1, 2 -/* DA0C8 801439C8 54400017 */ bnel $v0, $zero, .L80143A28 -/* DA0CC 801439CC 26310001 */ addiu $s1, $s1, 1 -/* DA0D0 801439D0 00691024 */ and $v0, $v1, $t1 -/* DA0D4 801439D4 54400014 */ bnel $v0, $zero, .L80143A28 -/* DA0D8 801439D8 26310001 */ addiu $s1, $s1, 1 -/* DA0DC 801439DC 00681024 */ and $v0, $v1, $t0 -/* DA0E0 801439E0 50400011 */ beql $v0, $zero, .L80143A28 -/* DA0E4 801439E4 26310001 */ addiu $s1, $s1, 1 -/* DA0E8 801439E8 00671024 */ and $v0, $v1, $a3 -/* DA0EC 801439EC 5040000E */ beql $v0, $zero, .L80143A28 -/* DA0F0 801439F0 26310001 */ addiu $s1, $s1, 1 -/* DA0F4 801439F4 30620040 */ andi $v0, $v1, 0x40 -/* DA0F8 801439F8 5440000B */ bnel $v0, $zero, .L80143A28 -/* DA0FC 801439FC 26310001 */ addiu $s1, $s1, 1 -/* DA100 80143A00 80820045 */ lb $v0, 0x45($a0) -/* DA104 80143A04 04420008 */ bltzl $v0, .L80143A28 -/* DA108 80143A08 26310001 */ addiu $s1, $s1, 1 -/* DA10C 80143A0C 30620080 */ andi $v0, $v1, 0x80 -/* DA110 80143A10 54400005 */ bnel $v0, $zero, .L80143A28 -/* DA114 80143A14 26310001 */ addiu $s1, $s1, 1 -/* DA118 80143A18 ACB10000 */ sw $s1, ($a1) -/* DA11C 80143A1C 24A50004 */ addiu $a1, $a1, 4 -/* DA120 80143A20 26520001 */ addiu $s2, $s2, 1 -/* DA124 80143A24 26310001 */ addiu $s1, $s1, 1 -.L80143A28: -/* DA128 80143A28 2A220140 */ slti $v0, $s1, 0x140 -/* DA12C 80143A2C 1440FFDF */ bnez $v0, .L801439AC -/* DA130 80143A30 24C60004 */ addiu $a2, $a2, 4 -/* DA134 80143A34 1240007E */ beqz $s2, .L80143C30 -/* DA138 80143A38 2642FFFF */ addiu $v0, $s2, -1 -/* DA13C 80143A3C 18400024 */ blez $v0, .L80143AD0 -/* DA140 80143A40 0000882D */ daddu $s1, $zero, $zero -/* DA144 80143A44 3C0C8015 */ lui $t4, %hi(gHudElements) -/* DA148 80143A48 258C7960 */ addiu $t4, $t4, %lo(gHudElements) -/* DA14C 80143A4C 27AB0010 */ addiu $t3, $sp, 0x10 -/* DA150 80143A50 0160502D */ daddu $t2, $t3, $zero -.L80143A54: -/* DA154 80143A54 26240001 */ addiu $a0, $s1, 1 -/* DA158 80143A58 0092102A */ slt $v0, $a0, $s2 -/* DA15C 80143A5C 50400018 */ beql $v0, $zero, .L80143AC0 -/* DA160 80143A60 26310001 */ addiu $s1, $s1, 1 -/* DA164 80143A64 0140482D */ daddu $t1, $t2, $zero -/* DA168 80143A68 8D880000 */ lw $t0, ($t4) -/* DA16C 80143A6C 00041080 */ sll $v0, $a0, 2 -/* DA170 80143A70 004B2821 */ addu $a1, $v0, $t3 -.L80143A74: -/* DA174 80143A74 8D270000 */ lw $a3, ($t1) -/* DA178 80143A78 8CA60000 */ lw $a2, ($a1) -/* DA17C 80143A7C 00071080 */ sll $v0, $a3, 2 -/* DA180 80143A80 00481021 */ addu $v0, $v0, $t0 -/* DA184 80143A84 8C430000 */ lw $v1, ($v0) -/* DA188 80143A88 00061080 */ sll $v0, $a2, 2 -/* DA18C 80143A8C 00481021 */ addu $v0, $v0, $t0 -/* DA190 80143A90 8C420000 */ lw $v0, ($v0) -/* DA194 80143A94 80630044 */ lb $v1, 0x44($v1) -/* DA198 80143A98 80420044 */ lb $v0, 0x44($v0) -/* DA19C 80143A9C 0062182A */ slt $v1, $v1, $v0 -/* DA1A0 80143AA0 10600003 */ beqz $v1, .L80143AB0 -/* DA1A4 80143AA4 24840001 */ addiu $a0, $a0, 1 -/* DA1A8 80143AA8 AD260000 */ sw $a2, ($t1) -/* DA1AC 80143AAC ACA70000 */ sw $a3, ($a1) -.L80143AB0: -/* DA1B0 80143AB0 0092102A */ slt $v0, $a0, $s2 -/* DA1B4 80143AB4 1440FFEF */ bnez $v0, .L80143A74 -/* DA1B8 80143AB8 24A50004 */ addiu $a1, $a1, 4 -/* DA1BC 80143ABC 26310001 */ addiu $s1, $s1, 1 -.L80143AC0: -/* DA1C0 80143AC0 2642FFFF */ addiu $v0, $s2, -1 -/* DA1C4 80143AC4 0222102A */ slt $v0, $s1, $v0 -/* DA1C8 80143AC8 1440FFE2 */ bnez $v0, .L80143A54 -/* DA1CC 80143ACC 254A0004 */ addiu $t2, $t2, 4 -.L80143AD0: -/* DA1D0 80143AD0 3C06ED03 */ lui $a2, 0xed03 -/* DA1D4 80143AD4 34C60050 */ ori $a2, $a2, 0x50 -/* DA1D8 80143AD8 3C04004D */ lui $a0, 0x4d -/* DA1DC 80143ADC 34840370 */ ori $a0, $a0, 0x370 -/* DA1E0 80143AE0 3C07D9C0 */ lui $a3, 0xd9c0 -/* DA1E4 80143AE4 34E7F9FA */ ori $a3, $a3, 0xf9fa -/* DA1E8 80143AE8 3C09D9FF */ lui $t1, 0xd9ff -/* DA1EC 80143AEC 3529FFFF */ ori $t1, $t1, 0xffff -/* DA1F0 80143AF0 3C080022 */ lui $t0, 0x22 -/* DA1F4 80143AF4 35080005 */ ori $t0, $t0, 5 -/* DA1F8 80143AF8 3C0ADC08 */ lui $t2, 0xdc08 -/* DA1FC 80143AFC 354A060A */ ori $t2, $t2, 0x60a -/* DA200 80143B00 3C0BDC08 */ lui $t3, 0xdc08 -/* DA204 80143B04 356B090A */ ori $t3, $t3, 0x90a -/* DA208 80143B08 3C0CD700 */ lui $t4, 0xd700 -/* DA20C 80143B0C 358C0002 */ ori $t4, $t4, 2 -/* DA210 80143B10 3C0DE200 */ lui $t5, 0xe200 -/* DA214 80143B14 35AD1E01 */ ori $t5, $t5, 0x1e01 -/* DA218 80143B18 3C0FE300 */ lui $t7, 0xe300 -/* DA21C 80143B1C 35EF0A11 */ ori $t7, $t7, 0xa11 -/* DA220 80143B20 3C0E0008 */ lui $t6, 8 -/* DA224 80143B24 35CE2CF0 */ ori $t6, $t6, 0x2cf0 -/* DA228 80143B28 3C05800A */ lui $a1, %hi(gMasterGfxPos) -/* DA22C 80143B2C 24A5A66C */ addiu $a1, $a1, %lo(gMasterGfxPos) -/* DA230 80143B30 8CA20000 */ lw $v0, ($a1) -/* DA234 80143B34 0000882D */ daddu $s1, $zero, $zero -/* DA238 80143B38 0040182D */ daddu $v1, $v0, $zero -/* DA23C 80143B3C 24420008 */ addiu $v0, $v0, 8 -/* DA240 80143B40 ACA20000 */ sw $v0, ($a1) -/* DA244 80143B44 AC660000 */ sw $a2, ($v1) -/* DA248 80143B48 AC640004 */ sw $a0, 4($v1) -/* DA24C 80143B4C 24430008 */ addiu $v1, $v0, 8 -/* DA250 80143B50 ACA30000 */ sw $v1, ($a1) -/* DA254 80143B54 3C03E700 */ lui $v1, 0xe700 -/* DA258 80143B58 AC430000 */ sw $v1, ($v0) -/* DA25C 80143B5C 24430010 */ addiu $v1, $v0, 0x10 -/* DA260 80143B60 AC400004 */ sw $zero, 4($v0) -/* DA264 80143B64 ACA30000 */ sw $v1, ($a1) -/* DA268 80143B68 24430018 */ addiu $v1, $v0, 0x18 -/* DA26C 80143B6C AC470008 */ sw $a3, 8($v0) -/* DA270 80143B70 AC40000C */ sw $zero, 0xc($v0) -/* DA274 80143B74 ACA30000 */ sw $v1, ($a1) -/* DA278 80143B78 24430020 */ addiu $v1, $v0, 0x20 -/* DA27C 80143B7C AC490010 */ sw $t1, 0x10($v0) -/* DA280 80143B80 AC480014 */ sw $t0, 0x14($v0) -/* DA284 80143B84 ACA30000 */ sw $v1, ($a1) -/* DA288 80143B88 3C03DB02 */ lui $v1, 0xdb02 -/* DA28C 80143B8C AC430018 */ sw $v1, 0x18($v0) -/* DA290 80143B90 24030018 */ addiu $v1, $zero, 0x18 -/* DA294 80143B94 AC43001C */ sw $v1, 0x1c($v0) -/* DA298 80143B98 24430028 */ addiu $v1, $v0, 0x28 -/* DA29C 80143B9C 3C048015 */ lui $a0, %hi(D_8014F108 + 8) -/* DA2A0 80143BA0 2484F110 */ addiu $a0, $a0, %lo(D_8014F108 + 8) -/* DA2A4 80143BA4 ACA30000 */ sw $v1, ($a1) -/* DA2A8 80143BA8 24430030 */ addiu $v1, $v0, 0x30 -/* DA2AC 80143BAC AC440024 */ sw $a0, 0x24($v0) -/* DA2B0 80143BB0 2484FFF8 */ addiu $a0, $a0, -8 -/* DA2B4 80143BB4 AC4A0020 */ sw $t2, 0x20($v0) -/* DA2B8 80143BB8 ACA30000 */ sw $v1, ($a1) -/* DA2BC 80143BBC 24430038 */ addiu $v1, $v0, 0x38 -/* DA2C0 80143BC0 AC4B0028 */ sw $t3, 0x28($v0) -/* DA2C4 80143BC4 AC44002C */ sw $a0, 0x2c($v0) -/* DA2C8 80143BC8 ACA30000 */ sw $v1, ($a1) -/* DA2CC 80143BCC 2403FFFF */ addiu $v1, $zero, -1 -/* DA2D0 80143BD0 AC430034 */ sw $v1, 0x34($v0) -/* DA2D4 80143BD4 24430040 */ addiu $v1, $v0, 0x40 -/* DA2D8 80143BD8 AC4C0030 */ sw $t4, 0x30($v0) -/* DA2DC 80143BDC ACA30000 */ sw $v1, ($a1) -/* DA2E0 80143BE0 24430048 */ addiu $v1, $v0, 0x48 -/* DA2E4 80143BE4 AC4D0038 */ sw $t5, 0x38($v0) -/* DA2E8 80143BE8 AC40003C */ sw $zero, 0x3c($v0) -/* DA2EC 80143BEC ACA30000 */ sw $v1, ($a1) -/* DA2F0 80143BF0 AC4F0040 */ sw $t7, 0x40($v0) -/* DA2F4 80143BF4 1A40000E */ blez $s2, .L80143C30 -/* DA2F8 80143BF8 AC4E0044 */ sw $t6, 0x44($v0) -/* DA2FC 80143BFC 27B00010 */ addiu $s0, $sp, 0x10 -.L80143C00: -/* DA300 80143C00 8E020000 */ lw $v0, ($s0) -/* DA304 80143C04 26100004 */ addiu $s0, $s0, 4 -/* DA308 80143C08 3C038015 */ lui $v1, %hi(gHudElements) -/* DA30C 80143C0C 8C637960 */ lw $v1, %lo(gHudElements)($v1) -/* DA310 80143C10 00021080 */ sll $v0, $v0, 2 -/* DA314 80143C14 00431021 */ addu $v0, $v0, $v1 -/* DA318 80143C18 8C440000 */ lw $a0, ($v0) -/* DA31C 80143C1C 0C050AFF */ jal render_hud_element -/* DA320 80143C20 26310001 */ addiu $s1, $s1, 1 -/* DA324 80143C24 0232102A */ slt $v0, $s1, $s2 -/* DA328 80143C28 1440FFF5 */ bnez $v0, .L80143C00 -/* DA32C 80143C2C 00000000 */ nop -.L80143C30: -/* DA330 80143C30 8FBF051C */ lw $ra, 0x51c($sp) -/* DA334 80143C34 8FB20518 */ lw $s2, 0x518($sp) -/* DA338 80143C38 8FB10514 */ lw $s1, 0x514($sp) -/* DA33C 80143C3C 8FB00510 */ lw $s0, 0x510($sp) -/* DA340 80143C40 03E00008 */ jr $ra -/* DA344 80143C44 27BD0520 */ addiu $sp, $sp, 0x520 diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index 8c511a1d84..41f468ecce 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -2882,7 +2882,7 @@ set_hud_element_flags = 0x80144A00; // type:func rom:0xDB100 clear_hud_element_flags = 0x80144A2C; // type:func rom:0xDB12C ALT_clear_hud_element_cache = 0x80144A5C; // type:func rom:0xDB15C set_hud_element_scale = 0x80144C20; // type:func rom:0xDB320 -set_hud_element_size = 0x80144DF4; // type:func rom:0xDB4F4 +set_hud_element_size_preset = 0x80144DF4; // type:func rom:0xDB4F4 func_80144E4C = 0x80144E4C; // type:func rom:0xDB54C func_80144E74 = 0x80144E74; // type:func rom:0xDB574 set_hud_element_alpha = 0x80144EB0; // type:func rom:0xDB5B0 @@ -3135,8 +3135,8 @@ D_8014EE60 = 0x8014EE60; // type:data rom:0xE5560 D_8014EE68 = 0x8014EE68; // type:data rom:0xE5568 D_8014EE98 = 0x8014EE98; // type:data rom:0xE5598 fold_groupOffsets = 0x8014EF64; // type:data rom:0xE5664 -D_8014EFC0 = 0x8014EFC0; // type:data rom:0xE56C0 -D_8014EFC4 = 0x8014EFC4; // type:data rom:0xE56C4 +gHudElementCacheNonWorld = 0x8014EFC0; // type:data rom:0xE56C0 +gHudElementCacheCapacity = 0x8014EFC4; // type:data rom:0xE56C4 hud_element_defaultAnim = 0x8014EFC8; // type:data rom:0xE56C8 gHudElementSizes = 0x8014EFCC; // type:data rom:0xE56CC D_8014F062 = 0x8014F068; // type:data rom:0xE5768 @@ -3299,14 +3299,14 @@ D_80151278 = 0x80151278; // type:data rom:0xE7978 D_80151280 = 0x80151280; // type:data rom:0xE7980 D_80151288 = 0x80151288; // type:data rom:0xE7988 sort_scripts = 0x802C3000; // type:func rom:0xE79B0 -D_801512B4 = 0x801512B4; // type:data rom:0xE79B4 +gHudElementsNumber = 0x801512B4; // type:data rom:0xE79B4 gCurrentCustomModelGfxBuildersPtr = 0x801512B8; // type:data rom:0xE79B8 D_801512BC = 0x801512BC; // type:data rom:0xE79BC D_801512C0 = 0x801512C0; // type:data rom:0xE79C0 gEntityHeapBase = 0x801512C4; // type:data rom:0xE79C4 -D_801512C8 = 0x801512C8; // type:data rom:0xE79C8 +gHudElementCacheTableRaster = 0x801512C8; // type:data rom:0xE79C8 gCurrentModels = 0x801512CC; // rom:0xE79CC -D_801512D0 = 0x801512D0; // type:data rom:0xE79D0 +gHudElementCacheTablePalette = 0x801512D0; // type:data rom:0xE79D0 gAnimCount = 0x801512D4; // type:data rom:0xE79D4 gMsgBGScrollAmtX = 0x801512D8; // type:data rom:0xE79D8 D_801512DA = 0x801512DA; // type:data rom:0xE79DA @@ -3325,7 +3325,7 @@ D_80151308 = 0x80151308; // type:data rom:0xE7A08 gMsgBGScrollAmtY = 0x8015130C; // type:data rom:0xE7A0C D_8015130E = 0x8015130E; // type:data rom:0xE7A0E D_80151310 = 0x80151310; // type:data rom:0xE7A10 -D_80151314 = 0x80151314; // type:data rom:0xE7A14 +gHudElementCacheBuffer = 0x80151314; // type:data rom:0xE7A14 gEntityModelCount = 0x80151318; // rom:0xE7A18 D_8015131C = 0x8015131C; // type:data rom:0xE7A1C D_80151320 = 0x80151320; // type:data rom:0xE7A20 @@ -3335,7 +3335,7 @@ D_8015132C = 0x8015132C; // type:data rom:0xE7A2C D_80151330 = 0x80151330; // type:data rom:0xE7A30 gTriggerCount = 0x80151334; // rom:0xE7A34 D_80151338 = 0x80151338; // type:data rom:0xE7A38 -D_8015133C = 0x8015133C; // type:data rom:0xE7A3C +gHudElementCacheSize = 0x8015133C; // type:data rom:0xE7A3C gCurrentDoorSoundsSet = 0x80151340; // rom:0xE7A40 D_80151344 = 0x80151344; // type:data rom:0xE7A44 D_80151348 = 0x80151348; // type:data rom:0xE7A48 @@ -3645,7 +3645,7 @@ evt_goto_end_loop = 0x802C8AE4; // type:func rom:0xED494 TranslateModel = 0x802C8B60; // type:func rom:0xED510 RotateModel = 0x802C8C64; // type:func rom:0xED614 fold_gfxDataCache = 0x80156F20; // type:data rom:0xED620 -D_80156F60 = 0x80156F60; // type:data rom:0xED660 +gHudElementsWorld = 0x80156F60; // type:data rom:0xED660 ScaleModel = 0x802C8D88; // type:func rom:0xED738 GetModelIndex = 0x802C8E8C; // type:func rom:0xED83C InvalidateModelTransform = 0x802C8EE4; // type:func rom:0xED894 @@ -3655,7 +3655,7 @@ SetTexPanner = 0x802C9000; // type:func rom:0xED9B0 SetCustomGfxEnabled = 0x802C907C; // type:func rom:0xEDA2C SetModelCustomGfx = 0x802C90FC; // type:func rom:0xEDAAC SetModelTexVariant = 0x802C91A4; // type:func rom:0xEDB54 -D_80157460 = 0x80157460; // type:data rom:0xEDB60 +gHudElementsBattle = 0x80157460; // type:data rom:0xEDB60 EnableTexPanning = 0x802C9208; // type:func rom:0xEDBB8 EnableModel = 0x802C9288; // type:func rom:0xEDC38 SetGroupEnabled = 0x802C9308; // type:func rom:0xEDCB8 @@ -3665,10 +3665,10 @@ SetCustomGfxBuilders = 0x802C94A0; // type:func rom:0xEDE50 SetModelFlags = 0x802C9518; // type:func rom:0xEDEC8 apply_transform_to_children = 0x802C95A0; // type:func rom:0xEDF50 gHudElements = 0x80157960; // type:data rom:0xEE060 -D_80157964 = 0x80157964; // type:data rom:0xEE064 -D_80157968 = 0x80157968; // type:data rom:0xEE068 +gHudElementCacheBufferWorld = 0x80157964; // type:data rom:0xEE064 +gHudElementCacheSizeWorld = 0x80157968; // type:data rom:0xEE068 D_8015796C = 0x8015796C; // type:data rom:0xEE06C -D_80157970 = 0x80157970; // type:data rom:0xEE070 +gHudElementCacheTableRasterWorld = 0x80157970; // type:data rom:0xEE070 MakeTransformGroup = 0x802C971C; // type:func rom:0xEE0CC SetTransformGroupEnabled = 0x802C9748; // type:func rom:0xEE0F8 TranslateGroup = 0x802C97B4; // type:func rom:0xEE164 @@ -3677,7 +3677,7 @@ ScaleGroup = 0x802C9A1C; // type:func rom:0xEE3CC GetTransformGroup = 0x802C9B40; // type:func rom:0xEE4F0 EnableGroup = 0x802C9B98; // type:func rom:0xEE548 MakeLocalVertexCopy = 0x802C9C70; // type:func rom:0xEE620 -D_80157F70 = 0x80157F70; // type:data rom:0xEE670 +gHudElementCacheTablePaletteWorld = 0x80157F70; // type:data rom:0xEE670 modify_collider_family_flags = 0x802C9CE8; // type:func rom:0xEE698 ModifyColliderFlags = 0x802C9DCC; // type:func rom:0xEE77C ResetFromLava = 0x802C9ED8; // type:func rom:0xEE888 @@ -3687,10 +3687,10 @@ ParentColliderToModel = 0x802CA114; // type:func rom:0xEEAC4 UpdateColliderTransform = 0x802CA188; // type:func rom:0xEEB38 set_zone_enabled = 0x802CA1B8; // type:func rom:0xEEB68 SetZoneEnabled = 0x802CA254; // type:func rom:0xEEC04 -D_80158570 = 0x80158570; // type:data rom:0xEEC70 -D_80158574 = 0x80158574; // type:data rom:0xEEC74 +gHudElementCacheBufferBattle = 0x80158570; // type:data rom:0xEEC70 +gHudElementCacheSizeBattle = 0x80158574; // type:data rom:0xEEC74 D_80158578 = 0x80158578; // type:data rom:0xEEC78 -D_80158580 = 0x80158580; // type:data rom:0xEEC80 +gHudElementCacheTableRasterBattle = 0x80158580; // type:data rom:0xEEC80 goto_map = 0x802CA304; // type:func rom:0xEECB4 GotoMap = 0x802CA400; // type:func rom:0xEEDB0 GotoMapSpecial = 0x802CA420; // type:func rom:0xEEDD0 @@ -3704,7 +3704,7 @@ PlaySoundAtCollider = 0x802CA614; // type:func rom:0xEEFC4 SetCamEnabled = 0x802CA6C0; // type:func rom:0xEF070 SetCamFlag80 = 0x802CA774; // type:func rom:0xEF124 SetCamPerspective = 0x802CA828; // type:func rom:0xEF1D8 -D_80158B80 = 0x80158B80; // type:data rom:0xEF280 +gHudElementCacheTablePaletteBattle = 0x80158B80; // type:data rom:0xEF280 func_802CA90C = 0x802CA90C; // type:func rom:0xEF2BC func_802CA988 = 0x802CA988; // type:func rom:0xEF338 SetCamViewport = 0x802CAB18; // type:func rom:0xEF4C8