Skip to content

Commit e02e9e4

Browse files
PurpleHatojamieklassen
authored andcommitted
ADD: No HUD Heart animation (HarbourMasters#3348)
* ADD: No HUD Heart Animation I've seen this requested multiple times for modding purposes for the case of using "lifebars" instead of hearts * TWEAK: Move it under the the mods * REM: Whitespace * REM: Whitespace2 * Tweak: Cvar Oppsie
1 parent 612da02 commit e02e9e4

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

soh/soh/SohMenuBar.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,8 @@ void DrawEnhancementsMenu() {
920920
UIWidgets::Tooltip("Disables grottos rotating with the camera. To be used in conjunction with mods that want to replace grottos with 3D objects.");
921921
UIWidgets::PaddedEnhancementCheckbox("Invisible Bunny Hood", "gHideBunnyHood", true, false);
922922
UIWidgets::Tooltip("Turns Bunny Hood invisible while still maintaining its effects.");
923+
UIWidgets::PaddedEnhancementCheckbox("Disable HUD Heart animations", "gNoHUDHeartAnimation", true, false);
924+
UIWidgets::Tooltip("Disables the beating animation of the hearts on the HUD.");
923925

924926
ImGui::EndMenu();
925927
}

soh/src/code/z_lifemeter.c

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -601,13 +601,24 @@ void HealthMeter_Draw(PlayState* play) {
601601

602602
{
603603
Mtx* matrix = Graph_Alloc(gfxCtx, sizeof(Mtx));
604-
Matrix_SetTranslateScaleMtx2(matrix,
605-
HeartsScale+(HeartsScale/3) - ((HeartsScale/3) * sp144),
606-
HeartsScale+(HeartsScale/3) - ((HeartsScale/3) * sp144),
607-
HeartsScale+(HeartsScale/3) - ((HeartsScale/3) * sp144),
608-
-130+offsetX, //Pos X
609-
(-94+offsetY) *-1, //Pos Y
610-
0.0f);
604+
605+
if (CVarGetInteger("gNoHUDHeartAnimation", 0)) {
606+
Matrix_SetTranslateScaleMtx2(matrix,
607+
HeartsScale, // Scale X
608+
HeartsScale, // Scale Y
609+
HeartsScale, // Scale Z
610+
-130 + offsetX, // Pos X
611+
(-94 + offsetY) * -1, // Pos Y
612+
0.0f);
613+
} else {
614+
Matrix_SetTranslateScaleMtx2(matrix, HeartsScale + (HeartsScale / 3) - ((HeartsScale / 3) * sp144),
615+
HeartsScale + (HeartsScale / 3) - ((HeartsScale / 3) * sp144),
616+
HeartsScale + (HeartsScale / 3) - ((HeartsScale / 3) * sp144),
617+
-130 + offsetX, // Pos X
618+
(-94 + offsetY) * -1, // Pos Y
619+
0.0f);
620+
}
621+
611622
gSPMatrix(OVERLAY_DISP++, matrix, G_MTX_MODELVIEW | G_MTX_LOAD);
612623
gSPVertex(OVERLAY_DISP++, sp154, 4, 0);
613624
gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0);

0 commit comments

Comments
 (0)