From 4086bbaf9c983961b0bad9f0cb6a1629a48e701e Mon Sep 17 00:00:00 2001 From: Ilya Shurumov Date: Fri, 4 Feb 2022 10:43:11 +0300 Subject: [PATCH] - fix "Out of Tape" height, align DEMO text --- src_rebuild/Game/C/main.c | 2 +- src_rebuild/Game/C/mdraw.c | 2 +- src_rebuild/Game/C/overlay.c | 42 ++++++++++++++++++------------------ 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src_rebuild/Game/C/main.c b/src_rebuild/Game/C/main.c index 8427d8cd..e0d0f9d8 100644 --- a/src_rebuild/Game/C/main.c +++ b/src_rebuild/Game/C/main.c @@ -2318,7 +2318,7 @@ void RenderGame2(int view) colour = 32 - colour; SetTextColour((colour & 0x1f) << 3, 0, 0); - PrintString(G_LTXT(GTXT_DEMO), 32, 15); + PrintString(G_LTXT(GTXT_DEMO), gOverlayXPos, 15); } for (i = 0; i < 2; i++) diff --git a/src_rebuild/Game/C/mdraw.c b/src_rebuild/Game/C/mdraw.c index b34a910c..a234ca38 100644 --- a/src_rebuild/Game/C/mdraw.c +++ b/src_rebuild/Game/C/mdraw.c @@ -131,7 +131,7 @@ void DrawMission(void) if (gOutOfTape) { SetTextColour(128, 128, 64); - PrintString(G_LTXT(GTXT_OutOfTape), gOverlayXPos, 236); + PrintString(G_LTXT(GTXT_OutOfTape), gOverlayXPos, SCREEN_H - 20); } } } diff --git a/src_rebuild/Game/C/overlay.c b/src_rebuild/Game/C/overlay.c index 1e13e20a..ea17f043 100644 --- a/src_rebuild/Game/C/overlay.c +++ b/src_rebuild/Game/C/overlay.c @@ -675,6 +675,27 @@ void DisplayOverlays(void) { short* felony; +#ifndef PSX + if (gWidescreenOverlayAlign) + { + // align to PSX-mapped screen coordinates + RECT16 emuViewport; + PsyX_GetPSXWidescreenMappedViewport(&emuViewport); + + // recalc pos + gOverlayXPos = 16 + emuViewport.x; + gOverlayXOppPos = emuViewport.w - 16 - PERCENTAGE_BAR_WIDTH; + gMapXOffset = emuViewport.w - 16 - MAP_SIZE_W; + + // set up + PlayerDamageBar.xpos = gOverlayXPos; + Player2DamageBar.xpos = gOverlayXPos; + FelonyBar.xpos = gOverlayXPos; + DamageBar.xpos = gOverlayXOppPos; + ProxyBar.xpos = gOverlayXPos; + } +#endif + if (NoPlayerControl || gInGameCutsceneActive || gInGameCutsceneDelay) return; @@ -695,27 +716,6 @@ void DisplayOverlays(void) if (!gDoOverlays) return; -#ifndef PSX - if (gWidescreenOverlayAlign) - { - // align to PSX-mapped screen coordinates - RECT16 emuViewport; - PsyX_GetPSXWidescreenMappedViewport(&emuViewport); - - // recalc pos - gOverlayXPos = 16 + emuViewport.x; - gOverlayXOppPos = emuViewport.w - 16 - PERCENTAGE_BAR_WIDTH; - gMapXOffset = emuViewport.w - 16 - MAP_SIZE_W; - - // set up - PlayerDamageBar.xpos = gOverlayXPos; - Player2DamageBar.xpos = gOverlayXPos; - FelonyBar.xpos = gOverlayXPos; - DamageBar.xpos = gOverlayXOppPos; - ProxyBar.xpos = gOverlayXPos; - } -#endif - if(!gInvincibleCar || ActiveCheats.cheat3) { DrawPercentageBar(&PlayerDamageBar);