summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKiritoDv <kiritodev01@gmail.com>2024-11-17 23:54:32 -0600
committerKiritoDv <kiritodev01@gmail.com>2024-11-17 23:54:32 -0600
commitda42f90cd301968a37d280a5f89caa197ca1b30d (patch)
treed775bad7dc9f6d42c7f9aa069e33a923ffd2bb2b /src
parentda090a866039544cf7582bc0ae8a6e55532262c9 (diff)
Fixed ub on gauge bar
Diffstat (limited to 'src')
-rw-r--r--src/engine/fox_hud.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c
index 32c8633c..ff8d1fdb 100644
--- a/src/engine/fox_hud.c
+++ b/src/engine/fox_hud.c
@@ -267,7 +267,7 @@ void HUD_ShieldGaugeFrame_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) {
}
void HUD_ShieldGaugeBars_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale, f32 arg4) {
- TextureRect_CI8_2(&gMasterDisp, aShieldGaugeTex, aShieldGaugeTLUT, 48, 12, xPos, yPos, xScale, yScale, 48.0f * arg4,
+ TextureRect_CI8_2(&gMasterDisp, aShieldGaugeTex, aShieldGaugeTLUT, 48, 8, xPos, yPos, xScale, yScale, 48.0f * arg4,
8.0f);
}
@@ -312,6 +312,7 @@ void HUD_GoldRings_Draw(void) {
f32 x;
f32 y;
s32 goldRingFrameIdx;
+ s16 newX = OTRGetRectDimensionFromLeftEdge(0);
sGoldRingsFwork[6] += 0.7f;
if (sGoldRingsFwork[6] >= 12.0f) {
@@ -366,8 +367,8 @@ void HUD_GoldRings_Draw(void) {
y += 7.00f;
scale += 0.06f;
}
-
- Matrix_Translate(gGfxMatrix, x, y, -100.0f, MTXF_NEW);
+
+ Matrix_Translate(gGfxMatrix, newX + x, y, -100.0f, MTXF_NEW);
Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gDPSetPrimColor(gMasterDisp++, 0, 0, 180, 180, 0, 50);