summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-04-02 08:19:33 +0200
committerSergeanur <s.anureev@yandex.ua>2020-04-02 08:20:45 +0200
commit6e6912b6137d6f1fdff6410f0369266cd7d6fb30 (patch)
tree162cfd97c822f7526b5b74e20235fff330b3a440 /src
parentAudioScriptObject finished (diff)
downloadre3-6e6912b6137d6f1fdff6410f0369266cd7d6fb30.tar
re3-6e6912b6137d6f1fdff6410f0369266cd7d6fb30.tar.gz
re3-6e6912b6137d6f1fdff6410f0369266cd7d6fb30.tar.bz2
re3-6e6912b6137d6f1fdff6410f0369266cd7d6fb30.tar.lz
re3-6e6912b6137d6f1fdff6410f0369266cd7d6fb30.tar.xz
re3-6e6912b6137d6f1fdff6410f0369266cd7d6fb30.tar.zst
re3-6e6912b6137d6f1fdff6410f0369266cd7d6fb30.zip
Diffstat (limited to 'src')
-rw-r--r--src/audio/MusicManager.cpp4
-rw-r--r--src/core/Radar.cpp5
-rw-r--r--src/render/Hud.cpp6
3 files changed, 10 insertions, 5 deletions
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index 1f1c343a..d840c57b 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -17,8 +17,6 @@
cMusicManager &MusicManager = *(cMusicManager *)0x8F3964;
int32 &gNumRetunePresses = *(int32 *)0x650B80;
-wchar *pCurrentStation = (wchar *)0x650B9C;
-uint8 &cDisplay = *(uint8 *)0x650BA1;
int32 &gRetuneCounter = *(int32*)0x650B84;
bool& bHasStarted = *(bool*)0x650B7C;
@@ -72,6 +70,8 @@ cMusicManager::DisplayRadioStationName()
int8 pRetune;
int8 gStreamedSound;
int8 gRetuneCounter;
+ static wchar *pCurrentStation = nil;
+ static uint8 cDisplay = 0;
if(!CTimer::GetIsPaused() && !TheCamera.m_WideScreenOn && PlayerInCar() &&
!CReplay::IsPlayingBack()) {
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index 1c634760..f1d8ec96 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -1106,8 +1106,11 @@ void CRadar::TransformRadarPointToRealWorldSpace(CVector2D &out, const CVector2D
// Radar space goes from -1.0 to 1.0 in x and y, top right is (1.0, 1.0)
void CRadar::TransformRadarPointToScreenSpace(CVector2D &out, const CVector2D &in)
{
- // FIX? scale RADAR_LEFT here somehow
+#ifdef FIX_BUGS
+ out.x = (in.x + 1.0f)*0.5f*SCREEN_SCALE_X(RADAR_WIDTH) + SCREEN_SCALE_X(RADAR_LEFT);
+#else
out.x = (in.x + 1.0f)*0.5f*SCREEN_SCALE_X(RADAR_WIDTH) + RADAR_LEFT;
+#endif
out.y = (1.0f - in.y)*0.5f*SCREEN_SCALE_Y(RADAR_HEIGHT) + SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT);
}
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index 2f523e17..c4aca8e4 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -793,8 +793,11 @@ void CHud::Draw()
if (m_ItemToFlash == ITEM_RADAR && CTimer::GetFrameCounter() & 8 || m_ItemToFlash != ITEM_RADAR) {
CRadar::DrawMap();
CRect rect(0.0f, 0.0f, SCREEN_SCALE_X(RADAR_WIDTH), SCREEN_SCALE_Y(RADAR_HEIGHT));
- // FIX? scale RADAR_LEFT here somehow
+#ifdef FIX_BUGS
+ rect.Translate(SCREEN_SCALE_X(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
+#else
rect.Translate(RADAR_LEFT, SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
+#endif
rect.Grow(4.0f);
Sprites[HUD_RADARDISC].Draw(rect, CRGBA(0, 0, 0, 255));
CRadar::DrawBlips();
@@ -1094,7 +1097,6 @@ void CHud::DrawAfterFade()
CFont::SetColor(CRGBA(175, 175, 175, 255));
CFont::PrintString(SCREEN_SCALE_X(26.0f), SCREEN_SCALE_Y(28.0f + (150.0f - PagerXOffset) * 0.6f), CHud::m_HelpMessageToPrint);
CFont::SetAlphaFade(255.0f);
- CFont::DrawFonts();
}
}
else