Skip to content

ADD: No HUD Heart animation #3348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions soh/soh/SohMenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,8 @@ void DrawEnhancementsMenu() {
UIWidgets::Tooltip("Disables grottos rotating with the camera. To be used in conjunction with mods that want to replace grottos with 3D objects.");
UIWidgets::PaddedEnhancementCheckbox("Invisible Bunny Hood", "gHideBunnyHood", true, false);
UIWidgets::Tooltip("Turns Bunny Hood invisible while still maintaining its effects.");
UIWidgets::PaddedEnhancementCheckbox("Disable HUD Heart animations", "gNoHUDHeartAnimation", true, false);
UIWidgets::Tooltip("Disables the beating animation of the hearts on the HUD.");

ImGui::EndMenu();
}
Expand Down
25 changes: 18 additions & 7 deletions soh/src/code/z_lifemeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,13 +601,24 @@ void HealthMeter_Draw(PlayState* play) {

{
Mtx* matrix = Graph_Alloc(gfxCtx, sizeof(Mtx));
Matrix_SetTranslateScaleMtx2(matrix,
HeartsScale+(HeartsScale/3) - ((HeartsScale/3) * sp144),
HeartsScale+(HeartsScale/3) - ((HeartsScale/3) * sp144),
HeartsScale+(HeartsScale/3) - ((HeartsScale/3) * sp144),
-130+offsetX, //Pos X
(-94+offsetY) *-1, //Pos Y
0.0f);

if (CVarGetInteger("gNoHUDHeartAnimation", 0)) {
Matrix_SetTranslateScaleMtx2(matrix,
HeartsScale, // Scale X
HeartsScale, // Scale Y
HeartsScale, // Scale Z
-130 + offsetX, // Pos X
(-94 + offsetY) * -1, // Pos Y
0.0f);
} else {
Matrix_SetTranslateScaleMtx2(matrix, HeartsScale + (HeartsScale / 3) - ((HeartsScale / 3) * sp144),
HeartsScale + (HeartsScale / 3) - ((HeartsScale / 3) * sp144),
HeartsScale + (HeartsScale / 3) - ((HeartsScale / 3) * sp144),
-130 + offsetX, // Pos X
(-94 + offsetY) * -1, // Pos Y
0.0f);
}

gSPMatrix(OVERLAY_DISP++, matrix, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPVertex(OVERLAY_DISP++, sp154, 4, 0);
gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0);
Expand Down