mirror of
https://github.com/halpz/re3.git
synced 2025-06-30 00:06:20 +00:00
Update HUD stuff, bug and format fixes.
Added environment variables to premake5.lua. Update README.md
This commit is contained in:
@ -16,7 +16,8 @@ int &gRetuneCounter = *(int*)0x650B84;
|
||||
|
||||
//WRAPPER void cMusicManager::DisplayRadioStationName(void) { EAXJMP(0x57E6D0); }
|
||||
|
||||
bool cMusicManager::PlayerInCar() {
|
||||
bool cMusicManager::PlayerInCar()
|
||||
{
|
||||
if (!FindPlayerVehicle())
|
||||
return false;
|
||||
else {
|
||||
@ -25,7 +26,6 @@ bool cMusicManager::PlayerInCar() {
|
||||
if (State == PED_DRAG_FROM_CAR || State == PED_EXIT_CAR || State == PED_ARRESTED)
|
||||
return false;
|
||||
|
||||
int16 Model = FindPlayerVehicle()->m_modelIndex;
|
||||
switch (FindPlayerVehicle()->m_modelIndex) {
|
||||
case MI_FIRETRUCK:
|
||||
case MI_AMBULAN:
|
||||
@ -42,8 +42,9 @@ bool cMusicManager::PlayerInCar() {
|
||||
}
|
||||
}
|
||||
|
||||
void cMusicManager::DisplayRadioStationName() {
|
||||
wchar* RadioName = nullptr;
|
||||
void cMusicManager::DisplayRadioStationName()
|
||||
{
|
||||
wchar *RadioName = nullptr;
|
||||
uint32 RadioStation = gNumRetunePresses + MusicManager.m_nCurrentStreamedSound;
|
||||
|
||||
switch (RadioStation) {
|
||||
@ -84,11 +85,11 @@ void cMusicManager::DisplayRadioStationName() {
|
||||
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetBackgroundOff();
|
||||
CFont::SetScale(SCREEN_STRETCH_X(0.8f), SCREEN_STRETCH_Y(1.35f));
|
||||
CFont::SetScale(HUD_STRETCH_X(0.8f), HUD_STRETCH_Y(1.35f));
|
||||
CFont::SetPropOn();
|
||||
CFont::SetFontStyle(FONT_HEADING);
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetCentreSize(SCREEN_STRETCH_X(640.0f));;
|
||||
CFont::SetCentreSize(HUD_STRETCH_X(640.0f));;
|
||||
|
||||
static int32 nTime = 0;
|
||||
if (!CTimer::GetIsPaused() && !TheCamera.m_WideScreenOn && MusicManager.PlayerInCar()) {
|
||||
@ -105,33 +106,36 @@ void cMusicManager::DisplayRadioStationName() {
|
||||
else {
|
||||
if (RadioStation > HEAD_RADIO) {
|
||||
if (cSampleManager.IsMP3RadioChannelAvailable()) {
|
||||
if (RadioStation > USERTRACK)
|
||||
if (RadioStation > USERTRACK) {
|
||||
RadioStation = RADIO_OFF;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (RadioStation > CHATTERBOX)
|
||||
if (RadioStation > CHATTERBOX) {
|
||||
RadioStation = RADIO_OFF;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
RadioStation = RADIO_OFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (RadioName) {
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, SCREEN_STRETCH_Y(23.0f), RadioName);
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, HUD_STRETCH_Y(23.0f), RadioName);
|
||||
|
||||
if (gNumRetunePresses)
|
||||
CFont::SetColor(CRGBA(102, 133, 143, 255));
|
||||
else
|
||||
CFont::SetColor(CRGBA(147, 196, 211, 255));
|
||||
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, SCREEN_STRETCH_Y(22.0f), RadioName);
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, HUD_STRETCH_Y(22.0f), RadioName);
|
||||
CFont::DrawFonts();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
enum eRadioStation {
|
||||
enum eRadioStation
|
||||
{
|
||||
HEAD_RADIO,
|
||||
DOUBLE_CLEF,
|
||||
JAH_RADIO,
|
||||
@ -15,7 +16,8 @@ enum eRadioStation {
|
||||
RADIO_OFF,
|
||||
};
|
||||
|
||||
enum eStreamedSounds {
|
||||
enum eStreamedSounds
|
||||
{
|
||||
STREAMED_SOUND_RADIO_HEAD = 0,
|
||||
STREAMED_SOUND_RADIO_CLASSIC = 1,
|
||||
STREAMED_SOUND_RADIO_KJAH = 2,
|
||||
@ -216,7 +218,8 @@ enum eStreamedSounds {
|
||||
NO_STREAMED_SOUND = 197,
|
||||
};
|
||||
|
||||
class tMP3Sample {
|
||||
class tMP3Sample
|
||||
{
|
||||
public:
|
||||
uint32 m_nLength;
|
||||
uint32 m_nPosition;
|
||||
|
Reference in New Issue
Block a user