1
0
Fork 0
mirror of https://github.com/halpz/re3.git synced 2024-12-24 17:55:29 +00:00

Fix Radio Off text more

This commit is contained in:
erorcun 2021-02-21 18:22:02 +03:00
parent 71cf666bbd
commit 1d336d851d

View file

@ -1265,7 +1265,8 @@ cMusicManager::DisplayRadioStationName()
if (vehicle) if (vehicle)
{ {
#if defined RADIO_SCROLL_TO_PREV_STATION || defined FIX_BUGS // Because m_nFrontendTrack can have NO_TRACK // Prev scroll needs it to be signed, and m_nFrontendTrack can be NO_TRACK thus FIX_BUGS
#if defined RADIO_SCROLL_TO_PREV_STATION || defined FIX_BUGS
int track; int track;
#else #else
uint8 track; uint8 track;
@ -1281,13 +1282,16 @@ cMusicManager::DisplayRadioStationName()
#endif #endif
while (track >= NUM_RADIOS + 1) track -= NUM_RADIOS + 1; while (track >= NUM_RADIOS + 1) track -= NUM_RADIOS + 1;
// We already handle this condition while scrolling back, on key press. No need to change this. // On scrolling back we handle this condition on key press. No need to change this.
if (!DMAudio.IsMP3RadioChannelAvailable() && track == USERTRACK) if (!DMAudio.IsMP3RadioChannelAvailable() && track == USERTRACK)
gNumRetunePresses++; gNumRetunePresses++;
} }
else else
#ifdef RADIO_OFF_TEXT
track = GetCarTuning(); // gStreamedSound or veh->m_nRadioStation would also work, but these don't cover police/taxi radios
#else
track = m_nFrontendTrack; track = m_nFrontendTrack;
#endif
wchar* string = nil; wchar* string = nil;
switch (track) { switch (track) {
case WILDSTYLE: string = TheText.Get("FEA_FM0"); break; case WILDSTYLE: string = TheText.Get("FEA_FM0"); break;
@ -1304,12 +1308,9 @@ cMusicManager::DisplayRadioStationName()
return; return;
string = TheText.Get("FEA_MP3"); break; string = TheText.Get("FEA_MP3"); break;
#ifdef RADIO_OFF_TEXT #ifdef RADIO_OFF_TEXT
case STREAMED_SOUND_RADIO_POLICE: case RADIO_OFF: {
case STREAMED_SOUND_RADIO_TAXI: // Otherwise RADIO OFF will be seen after pausing-resuming game and Mission Complete text
return; if (!m_bRadioStreamReady || !m_bGameplayAllowsRadio)
default: {
// Otherwise pausing-resuming game will show RADIO OFF, since radio isn't set yet
if (m_nPlayingTrack == NO_TRACK && m_nFrontendTrack == NO_TRACK)
return; return;
extern wchar WideErrorString[]; extern wchar WideErrorString[];
@ -1321,9 +1322,8 @@ cMusicManager::DisplayRadioStationName()
} }
break; break;
} }
#else
default: return;
#endif #endif
default: return;
}; };
if (pCurrentStation != string) { if (pCurrentStation != string) {