summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorPurpleHato <linkvssangoku.jr@gmail.com>2023-11-14 00:13:46 +0100
committerGitHub <noreply@github.com>2023-11-13 18:13:46 -0500
commitdd6271ecae9868c99bdc79324c6143f082fbcc65 (patch)
tree7beec950bea2e39c7b436d871b221fa06ab51c58 /soh/src/code
parent30ab8e9ed75f222ee16289a624a1cab0fd393857 (diff)
ADD: No HUD Heart animation (#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
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_lifemeter.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/soh/src/code/z_lifemeter.c b/soh/src/code/z_lifemeter.c
index 8d5e41a20..69cba24b4 100644
--- a/soh/src/code/z_lifemeter.c
+++ b/soh/src/code/z_lifemeter.c
@@ -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);