1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-05 08:35:54 +00:00

Merge pull request #577 from erorcun/miami

VC CMenuManager struct, ctor etc.
This commit is contained in:
erorcun 2020-05-22 15:24:08 +03:00 committed by GitHub
commit 4fd1771f71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 788 additions and 1304 deletions

View file

@ -8627,13 +8627,13 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
case COMMAND_ACTIVATE_SAVE_MENU:
{
CStats::SafeHouseVisits++;
FrontEndMenuManager.m_bSaveMenuActive = true;
FrontEndMenuManager.m_bActivateSaveMenu = true;
FindPlayerPed()->SetMoveSpeed(0.0f, 0.0f, 0.0f);
FindPlayerPed()->SetTurnSpeed(0.0f, 0.0f, 0.0f);
return 0;
}
case COMMAND_HAS_SAVE_GAME_FINISHED:
UpdateCompareFlag(!FrontEndMenuManager.m_bMenuActive && !FrontEndMenuManager.m_bSaveMenuActive);
UpdateCompareFlag(!FrontEndMenuManager.m_bMenuActive && !FrontEndMenuManager.m_bActivateSaveMenu);
return 0;
case COMMAND_NO_SPECIAL_CAMERA_FOR_THIS_GARAGE:
CollectParameters(&m_nIp, 1);

View file

@ -3630,7 +3630,7 @@ CCam::Process_Fixed(const CVector &CameraTarget, float, float, float)
if(TheCamera.m_bUseSpecialFovTrain)
FOV = TheCamera.m_fFovForTrain;
if(CMenuManager::m_ControlMethod == 0 && Using3rdPersonMouseCam()){
if(FrontEndMenuManager.m_ControlMethod == 0 && Using3rdPersonMouseCam()){
CPed *player = FindPlayerPed();
if(player && player->CanStrafeOrMouseControl()){
float Heading = Front.Heading();

View file

@ -3037,33 +3037,25 @@ CCamera::SetNearClipScript(float clip)
void
CCamera::ProcessFade(void)
{
float fade = (CTimer::GetTimeInMilliseconds() - m_uiFadeTimeStarted)/1000.0f;
// Why even set CDraw::FadeValue if m_fFLOATingFade sets it anyway?
if(m_bFading){
if(m_iFadingDirection == FADE_IN){
if(m_fTimeToFadeOut != 0.0f){
m_fFLOATingFade = 255.0f - 255.0f*fade/m_fTimeToFadeOut;
if(m_fFLOATingFade <= 0.0f){
m_bFading = false;
CDraw::FadeValue = 0;
m_fFLOATingFade = 0.0f;
}
m_fFLOATingFade -= CTimer::GetTimeStepInSeconds() * 255.0f / m_fTimeToFadeOut;
}else{
m_fFLOATingFade = 0.0f;
}
if (m_fFLOATingFade <= 0.0f) {
m_bFading = false;
CDraw::FadeValue = 0;
m_fFLOATingFade = 0.0f;
}
}else if(m_iFadingDirection == FADE_OUT){
if(m_fTimeToFadeOut != 0.0f){
m_fFLOATingFade = 255.0f*fade/m_fTimeToFadeOut;
if(m_fFLOATingFade >= 255.0f){
m_bFading = false;
CDraw::FadeValue = 255;
m_fFLOATingFade = 255.0f;
}
m_fFLOATingFade += CTimer::GetTimeStepInSeconds() * 255.0f / m_fTimeToFadeOut;
}else{
m_fFLOATingFade = 255.0f;
}
if (m_fFLOATingFade >= 255.0f) {
m_bFading = false;
CDraw::FadeValue = 255;
m_fFLOATingFade = 255.0f;
}
}

View file

@ -769,7 +769,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_ThirdPersonOnl
if (button == GetControllerKeyAssociatedWithAction(PED_SPRINT, type))
state.Cross = 255;
if (CMenuManager::m_ControlMethod == CONTROL_CLASSIC)
if (FrontEndMenuManager.m_ControlMethod == CONTROL_CLASSIC)
{
if (button == GetControllerKeyAssociatedWithAction(PED_CYCLE_TARGET_LEFT, type))
state.LeftShoulder2 = 255;
@ -835,7 +835,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_FirstAndThirdP
state.RightStickX = 128;
}
if (CMenuManager::m_ControlMethod == CONTROL_CLASSIC)
if (FrontEndMenuManager.m_ControlMethod == CONTROL_CLASSIC)
{
if (button == GetControllerKeyAssociatedWithAction(PED_1RST_PERSON_LOOK_UP, type))
{
@ -1617,7 +1617,7 @@ void CControllerConfigManager::DeleteMatching3rdPersonControls(e_ControllerActio
if (key == GetControllerKeyAssociatedWithAction(PED_SPRINT, type))
ClearSettingsAssociatedWithAction(PED_SPRINT, type);
if (CMenuManager::m_ControlMethod == CONTROL_CLASSIC)
if (FrontEndMenuManager.m_ControlMethod == CONTROL_CLASSIC)
{
if (key == GetControllerKeyAssociatedWithAction(PED_CYCLE_TARGET_LEFT, type))
ClearSettingsAssociatedWithAction(PED_CYCLE_TARGET_LEFT, type);
@ -1640,7 +1640,7 @@ void CControllerConfigManager::DeleteMatching1rst3rdPersonControls(e_ControllerA
if (key == GetControllerKeyAssociatedWithAction(GO_BACK, type))
ClearSettingsAssociatedWithAction(GO_BACK, type);
if (CMenuManager::m_ControlMethod == CONTROL_CLASSIC)
if (FrontEndMenuManager.m_ControlMethod == CONTROL_CLASSIC)
{
if (key == GetControllerKeyAssociatedWithAction(PED_1RST_PERSON_LOOK_LEFT, type))
ClearSettingsAssociatedWithAction(PED_1RST_PERSON_LOOK_LEFT, type);

File diff suppressed because it is too large Load diff

View file

@ -95,42 +95,6 @@ enum eLanguages
#endif
};
/*
enum eFrontendSprites
{
FE2_MAINPANEL_UL,
FE2_MAINPANEL_UR,
FE2_MAINPANEL_DL,
FE2_MAINPANEL_DR,
FE2_MAINPANEL_DR2,
FE2_TABACTIVE,
FE_ICONBRIEF,
FE_ICONSTATS,
FE_ICONCONTROLS,
FE_ICONSAVE,
FE_ICONAUDIO,
FE_ICONDISPLAY,
FE_ICONLANGUAGE,
FE_CONTROLLER,
FE_CONTROLLERSH,
FE_ARROWS1,
FE_ARROWS2,
FE_ARROWS3,
FE_ARROWS4,
FE_RADIO1,
FE_RADIO2,
FE_RADIO3,
FE_RADIO4,
FE_RADIO5,
FE_RADIO6,
FE_RADIO7,
FE_RADIO8,
FE_RADIO9,
NUM_FE_SPRITES
};
*/
enum eMenuSprites
{
MENUSPRITE_BACKGROUND,
@ -177,22 +141,6 @@ enum eSaveSlot
SAVESLOT_LABEL = 36
};
#ifdef MENU_MAP
enum MapSprites
{
MAPMID1,
MAPMID2,
MAPMID3,
MAPBOT1,
MAPBOT2,
MAPBOT3,
MAPTOP1,
MAPTOP2,
MAPTOP3,
NUM_MAP_SPRITES
};
#endif
enum eMenuScreen
{
MENUPAGE_DISABLED = -1,
@ -480,70 +428,162 @@ struct CMenuScreen
} m_aEntries[NUM_MENUROWS];
};
struct MenuTrapezoid
{
float topRight_x;
float topRight_y;
float topLeft_x;
float topLeft_y;
float bottomLeft_x;
float bottomLeft_y;
float bottomRight_x;
float bottomRight_y;
float old_topRight_x;
float old_topRight_y;
float old_topLeft_x;
float old_topLeft_y;
float old_bottomLeft_x;
float old_bottomLeft_y;
float old_bottomRight_x;
float old_bottomRight_y;
float mult_topRight_x;
float mult_topRight_y;
float mult_topLeft_x;
float mult_topLeft_y;
float mult_bottomLeft_x;
float mult_bottomLeft_y;
float mult_bottomRight_x;
float mult_bottomRight_y;
MenuTrapezoid(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) {
topRight_x = x1;
topRight_y = y1;
topLeft_x = x2;
topLeft_y = y2;
bottomLeft_x = x3;
bottomLeft_y = y3;
bottomRight_x = x4;
bottomRight_y = y4;
};
};
class CMenuManager
{
public:
int32 m_nPrefsVideoMode;
int32 m_nDisplayVideoMode;
int8 m_StatsScrollDirection;
float m_StatsScrollSpeed;
uint8 field_8;
bool m_PrefsUseVibration;
bool m_PrefsShowHud;
int32 m_PrefsRadarMode;
uint8 field_10;
bool m_bShutDownFrontEndRequested;
bool m_bStartUpFrontEndRequested;
int32 m_KeyPressedCode;
int32 m_PrefsBrightness;
float m_PrefsLOD;
int8 m_PrefsShowSubtitles;
int8 m_PrefsShowLegends;
int8 m_PrefsUseWideScreen;
int8 m_PrefsVsync; // TODO(Miami): Are we sure?
int8 m_PrefsVsyncDisp;
int8 m_PrefsFrameLimiter;
int8 m_nPrefsAudio3DProviderIndex;
bool m_bKeyChangeNotProcessed;
char m_aSkinName[256];
int32 m_nHelperTextMsgId;
bool m_bLanguageLoaded;
int8 m_PrefsSpeakers;
int8 m_PrefsDMA;
uint8 m_PrefsSfxVolume;
uint8 m_PrefsMusicVolume;
uint8 m_PrefsRadioStation;
uint8 field_2C;
int32 m_nCurrOption;
bool m_bQuitGameNoCD;
bool m_bMenuMapActive;
bool m_AllowNavigation;
uint8 field_37;
bool m_bMenuActive;
bool m_bMenuStateChanged;
bool m_bWaitingForNewKeyBind;
bool m_bWantToRestart;
bool m_bFirstTime;
bool m_bGameNotLoaded;
int32 m_nMousePosX;
int32 m_nMousePosY;
bool m_bActivateSaveMenu;
bool m_bWantToLoad;
float m_fMapSize;
float m_fMapCenterX;
float m_fMapCenterY;
uint32 OS_Language;
int32 m_PrefsLanguage;
int32 field_54;
int8 m_bLanguageLoaded;
uint8 m_PrefsAllowNastyGame;
uint8 m_PrefsMP3BoostVolume;
uint8 m_ControlMethod;
int32 m_nPrefsVideoMode;
int32 m_nDisplayVideoMode;
int32 m_nMouseTempPosX;
int32 m_nMouseTempPosY;
bool m_bGameNotLoaded;
int8 m_3DProviderOnLastSaveLoad;
bool m_bFrontEnd_ReloadObrTxtGxt;
int32 *pEditString;
uint8 field_74[4];
int32 *pControlEdit;
bool m_OnlySaveMenu;
int32 m_menuTransitionProgress;
CSprite2d m_aFrontEndSprites[NUM_MENU_SPRITES];
bool m_bSpritesLoaded;
int32 field_F0;
int32 m_LastRadioScrollDir;
int32 m_nCurrScreen;
int32 m_nPrevScreen;
int32 m_nCurrSaveSlot;
int32 m_LastScreenSwitch;
uint32 m_nMenuFadeAlpha;
int32 bOptionHighlightTransitionBlend;
bool bMenuChangeOngoing;
int32 MouseButtonJustClicked;
int32 JoyButtonJustClicked;
bool DisplayComboButtonErrMsg;
bool m_NoEmptyBinding;
bool m_ShowEmptyBindingError;
int32 m_nHelperTextAlpha;
bool m_bPressedPgUpOnList;
bool m_bPressedPgDnOnList;
bool m_bPressedUpOnList;
bool m_bPressedDownOnList;
bool m_bPressedScrollButton;
uint8 field_129;
uint8 field_12A;
uint8 field_12B;
int32 m_nMousePosX;
int32 m_nMousePosY;
int32 m_nMouseOldPosX;
int32 m_nMouseOldPosY;
int32 m_nHoverOption;
bool m_bShowMouse;
int32 m_nPrevOption;
bool m_bStartWaitingForKeyBind;
bool m_bWaitingForNewKeyBind;
bool m_bKeyChangeNotProcessed;
int32 m_CurrCntrlAction;
uint8 field_150;
uint8 field_151;
uint8 field_152;
uint8 field_153;
int32 m_nSelectedContSetupColumn;
bool m_bKeyIsOK;
bool field_159;
uint8 m_nCurrExLayer;
char m_PrefsSkinFile[256];
char m_aSkinName[256];
uint8 field_35B;
int32 m_nHelperTextMsgId;
tSkinInfo m_pSkinListHead;
tSkinInfo *m_pSelectedSkin;
int32 m_nFirstVisibleRowOnList;
float m_nScrollbarTopMargin;
int32 m_nTotalListRow;
int32 m_nSkinsTotal;
char _unk0[4];
uint8 field_67C[4];
int32 m_nSelectedListRow;
bool m_bSkinsEnumerated;
bool m_bQuitGameNoCD;
bool m_bRenderGameInMenu;
bool m_bSaveMenuActive;
bool m_bWantToLoad;
char field_455;
bool m_bStartWaitingForKeyBind;
bool m_bSpritesLoaded;
//CSprite2d m_aFrontEndSprites[NUM_FE_SPRITES];
//CSprite2d m_aMenuSprites[NUM_MENU_SPRITES];
CSprite2d m_aFrontEndSprites[NUM_MENU_SPRITES];
int32 field_518;
int32 m_nMenuFadeAlpha;
bool m_bPressedPgUpOnList;
bool m_bPressedPgDnOnList;
bool m_bPressedUpOnList;
bool m_bPressedDownOnList;
bool m_bPressedScrollButton;
int32 m_CurrCntrlAction;
char _unk1[4];
int32 m_nSelectedContSetupColumn;
bool m_bKeyIsOK;
bool field_535;
int8 m_nCurrExLayer;
int32 m_nHelperTextAlpha;
int32 m_nMouseOldPosX;
int32 m_nMouseOldPosY;
int32 m_nHoverOption;
int32 m_nCurrScreen;
int32 m_nCurrOption;
int32 m_nPrevOption;
int32 m_nPrevScreen;
uint32 field_558;
int32 m_nCurrSaveSlot;
int32 m_nScreenChangeDelayTimer;
#ifdef IMPROVED_VIDEOMODE
int32 m_nPrefsWidth;
@ -554,107 +594,63 @@ public:
int32 m_nSelectedScreenMode;
#endif
public:
bool GetIsMenuActive() {return !!m_bMenuActive;}
public:
static int32 OS_Language;
static int8 m_PrefsUseVibration;
static int8 m_DisplayControllerOnFoot;
static int8 m_PrefsUseWideScreen;
static int8 m_PrefsRadioStation;
static int8 m_PrefsVsync;
static int8 m_PrefsVsyncDisp;
static int8 m_PrefsFrameLimiter;
static int8 m_PrefsShowSubtitles;
static int8 m_PrefsSpeakers;
static int32 m_ControlMethod;
static int8 m_PrefsDMA;
static int32 m_PrefsLanguage;
static int32 m_PrefsBrightness;
static float m_PrefsLOD;
static int8 m_bFrontEnd_ReloadObrTxtGxt;
static int32 m_PrefsMusicVolume;
static int32 m_PrefsSfxVolume;
static char m_PrefsSkinFile[256];
static int32 m_KeyPressedCode;
static bool m_bStartUpFrontEndRequested;
static bool m_bShutDownFrontEndRequested;
static bool m_PrefsAllowNastyGame;
static uint8 m_PrefsStereoMono;
static int32 m_SelectedMap;
static int32 m_SelectedGameType;
static uint8 m_PrefsPlayerRed;
static uint8 m_PrefsPlayerGreen;
static uint8 m_PrefsPlayerBlue;
#ifndef MASTER
static bool m_PrefsMarketing;
static bool m_PrefsDisableTutorials;
#endif // !MASTER
#ifdef MENU_MAP
static bool bMenuMapActive;
static bool bMapMouseShownOnce;
static bool bMapLoaded;
static float fMapSize;
static float fMapCenterY;
static float fMapCenterX;
static CSprite2d m_aMapSprites[NUM_MAP_SPRITES];
CMenuManager(void);
~CMenuManager(void) { UnloadTextures(); }
void Initialise();
void PrintMap();
#endif
public:
void SetFrontEndRenderStates();
static void BuildStatLine(Const char *text, void *stat, bool itsFloat, void *stat2);
static void CentreMousePointer();
void CheckCodesForControls(int);
bool CheckHover(int x1, int x2, int y1, int y2);
void CheckSliderMovement(int);
int CostructStatLine(int);
void DisplayHelperText();
int DisplaySlider(float, float, float, float, float, float);
void DoSettingsBeforeStartingAGame();
void Draw();
void DrawStandardMenus();
void DrawControllerBound(int32, int32, int32, int8);
void DrawControllerScreenExtraText(int, int, int);
void DrawControllerSetupScreen();
void DrawFrontEnd();
void DrawFrontEndNormal();
#ifdef PS2_SAVE_DIALOG
void DrawFrontEndSaveZone();
#endif
void DrawBackground();
void DrawPlayerSetupScreen();
int FadeIn(int alpha);
void FilterOutColorMarkersFromString(wchar*, CRGBA &);
int GetStartOptionsCntrlConfigScreens();
static void InitialiseChangedLanguageSettings();
void InitialiseChangedLanguageSettings();
void LoadAllTextures();
void LoadSettings();
void MessageScreen(const char *);
// TODO(MIAMI): implement the second argument
void MessageScreen(const char *str, bool) { MessageScreen(str); }
void PickNewPlayerColour();
void PrintBriefs();
static void PrintErrorMessage();
void PrintStats();
void Process();
void ProcessButtonPresses();
void ProcessFileActions();
void ProcessOnOffMenuOptions();
static void RequestFrontEndShutDown();
static void RequestFrontEndStartUp();
void RequestFrontEndShutDown();
void RequestFrontEndStartUp();
void ResetHelperText();
void SaveLoadFileError_SetUpErrorScreen();
void SaveSettings();
void SetHelperText(int text);
void ShutdownJustMenu();
float StretchX(float);
float StretchY(float);
void SwitchMenuOnAndOff();
void UnloadTextures();
void WaitForUserCD();
void PrintController();
int GetNumOptionsCntrlConfigScreens();
int ConstructStatLine(int);
@ -669,7 +665,7 @@ public:
};
#ifndef IMPROVED_VIDEOMODE
VALIDATE_SIZE(CMenuManager, 0x564);
VALIDATE_SIZE(CMenuManager, 0x688);
#endif
extern CMenuManager FrontEndMenuManager;

View file

@ -221,20 +221,20 @@ bool CGame::InitialiseOnceAfterRW(void)
if ( FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -99 || FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -2 )
{
CMenuManager::m_PrefsSpeakers = 0;
FrontEndMenuManager.m_PrefsSpeakers = 0;
int8 provider = DMAudio.AutoDetect3DProviders();
if ( provider != -1 )
FrontEndMenuManager.m_nPrefsAudio3DProviderIndex = provider;
}
DMAudio.SetCurrent3DProvider(FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
DMAudio.SetSpeakerConfig(CMenuManager::m_PrefsSpeakers);
DMAudio.SetDynamicAcousticModelingStatus(CMenuManager::m_PrefsDMA);
DMAudio.SetMusicMasterVolume(CMenuManager::m_PrefsMusicVolume);
DMAudio.SetEffectsMasterVolume(CMenuManager::m_PrefsSfxVolume);
DMAudio.SetSpeakerConfig(FrontEndMenuManager.m_PrefsSpeakers);
DMAudio.SetDynamicAcousticModelingStatus(FrontEndMenuManager.m_PrefsDMA);
DMAudio.SetMusicMasterVolume(FrontEndMenuManager.m_PrefsMusicVolume);
DMAudio.SetEffectsMasterVolume(FrontEndMenuManager.m_PrefsSfxVolume);
DMAudio.SetEffectsFadeVol(127);
DMAudio.SetMusicFadeVol(127);
CWorld::Players[0].SetPlayerSkin(CMenuManager::m_PrefsSkinFile);
CWorld::Players[0].SetPlayerSkin(FrontEndMenuManager.m_PrefsSkinFile);
return true;
}

View file

@ -206,20 +206,12 @@ const CMenuScreen aScreens[] = {
MENUACTION_MEMCARDSAVECONFIRM, "JAILB_U", SAVESLOT_NONE, MENUPAGE_NONE,
},
// Unused in PC but anyway
// MENUPAGE_SAVE = 24
#ifdef PS2_SAVE_DIALOG
{ "FET_SG", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_CHANGEMENU, "FESZ_SA", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT,
MENUACTION_RESUME_FROM_SAVEZONE, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE,
},
#else
{ "FET_SG", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_LABEL, "FES_SCG", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_POPULATESLOTS_CHANGEMENU, "GMSAVE", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT,
MENUACTION_RESUME_FROM_SAVEZONE, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE,
},
#endif
// MENUPAGE_NO_MEMORY_CARD_2 = 25
{ "FES_NOC", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,

View file

@ -701,7 +701,7 @@ CControllerState CPad::ReconcileTwoControllersInput(CControllerState const &Stat
void CPad::StartShake(int16 nDur, uint8 nFreq)
{
if ( !CMenuManager::m_PrefsUseVibration )
if ( !FrontEndMenuManager.m_PrefsUseVibration )
return;
if ( CCutsceneMgr::IsRunning() || CGame::playingIntro )
@ -723,7 +723,7 @@ void CPad::StartShake(int16 nDur, uint8 nFreq)
void CPad::StartShake_Distance(int16 nDur, uint8 nFreq, float fX, float fY, float fZ)
{
if ( !CMenuManager::m_PrefsUseVibration )
if ( !FrontEndMenuManager.m_PrefsUseVibration )
return;
if ( CCutsceneMgr::IsRunning() || CGame::playingIntro )
@ -750,7 +750,7 @@ void CPad::StartShake_Distance(int16 nDur, uint8 nFreq, float fX, float fY, floa
void CPad::StartShake_Train(float fX, float fY)
{
if ( !CMenuManager::m_PrefsUseVibration )
if ( !FrontEndMenuManager.m_PrefsUseVibration )
return;
if ( CCutsceneMgr::IsRunning() || CGame::playingIntro )

View file

@ -264,7 +264,7 @@ int LineRadarBoxCollision(CVector2D &out, const CVector2D &p1, const CVector2D &
uint8 CRadar::CalculateBlipAlpha(float dist)
{
#ifdef MENU_MAP
if (CMenuManager::bMenuMapActive)
if (FrontEndMenuManager.m_bMenuMapActive)
return 255;
#endif
if (dist <= 1.0f)
@ -487,7 +487,7 @@ void CRadar::DrawBlips()
TransformRadarPointToScreenSpace(out, in);
#ifdef MENU_MAP
if (!CMenuManager::bMenuMapActive) {
if (!FrontEndMenuManager.m_bMenuMapActive) {
#endif
float angle;
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN)
@ -555,7 +555,7 @@ void CRadar::DrawBlips()
TransformRealWorldPointToRadarSpace(in, blipEntity->GetPosition());
float dist = LimitRadarPoint(in);
TransformRadarPointToScreenSpace(out, in);
if (!ms_RadarTrace[blipId].m_bShortRange || dist <= 1.0f || CMenuManager::bMenuMapActive) {
if (!ms_RadarTrace[blipId].m_bShortRange || dist <= 1.0f || FrontEndMenuManager.m_bMenuMapActive) {
if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE) {
DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
}
@ -597,7 +597,7 @@ void CRadar::DrawBlips()
TransformRealWorldPointToRadarSpace(in, ms_RadarTrace[blipId].m_vec2DPos);
float dist = LimitRadarPoint(in);
TransformRadarPointToScreenSpace(out, in);
if (!ms_RadarTrace[blipId].m_bShortRange || dist <= 1.0f || CMenuManager::bMenuMapActive) {
if (!ms_RadarTrace[blipId].m_bShortRange || dist <= 1.0f || FrontEndMenuManager.m_bMenuMapActive) {
if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE) {
DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
}
@ -666,7 +666,7 @@ void CRadar::DrawBlips()
TransformRealWorldPointToRadarSpace(in, blipEntity->GetPosition());
float dist = LimitRadarPoint(in);
TransformRadarPointToScreenSpace(out, in);
if (!ms_RadarTrace[blipId].m_bShortRange || dist <= 1.0f || CMenuManager::bMenuMapActive) {
if (!ms_RadarTrace[blipId].m_bShortRange || dist <= 1.0f || FrontEndMenuManager.m_bMenuMapActive) {
if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE)
DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
else
@ -717,7 +717,7 @@ void CRadar::DrawBlips()
TransformRealWorldPointToRadarSpace(in, ms_RadarTrace[blipId].m_vec2DPos);
float dist = LimitRadarPoint(in);
TransformRadarPointToScreenSpace(out, in);
if (!ms_RadarTrace[blipId].m_bShortRange || dist <= 1.0f || CMenuManager::bMenuMapActive) {
if (!ms_RadarTrace[blipId].m_bShortRange || dist <= 1.0f || FrontEndMenuManager.m_bMenuMapActive) {
if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE)
DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
else
@ -744,7 +744,7 @@ void CRadar::DrawBlips()
}
}
#ifdef MENU_MAP
if (CMenuManager::bMenuMapActive) {
if (FrontEndMenuManager.m_bMenuMapActive) {
CVector2D in, out;
TransformRealWorldPointToRadarSpace(in, FindPlayerCentreOfWorld_NoSniperShift());
TransformRadarPointToScreenSpace(out, in);
@ -899,7 +899,7 @@ void CRadar::DrawRadarSprite(uint16 sprite, float x, float y, uint8 alpha)
{
RadarSprites[sprite]->Draw(CRect(x - SCREEN_SCALE_X(8.0f), y - SCREEN_SCALE_Y(8.0f), x + SCREEN_SCALE_X(8.0f), y + SCREEN_SCALE_Y(8.0f)), CRGBA(255, 255, 255, alpha));
#ifdef MENU_MAP
if (CMenuManager::bMenuMapActive) {
if (FrontEndMenuManager.m_bMenuMapActive) {
bool alreadyThere = false;
for (int i = 0; i < NUM_MAP_LEGENDS; i++) {
if (MapLegendList[i] == sprite)
@ -1047,7 +1047,7 @@ float CRadar::LimitRadarPoint(CVector2D &point)
dist = point.Magnitude();
#ifdef MENU_MAP
if (CMenuManager::bMenuMapActive)
if (FrontEndMenuManager.m_bMenuMapActive)
return dist;
#endif
if (dist > 1.0f) {
@ -1278,7 +1278,7 @@ void CRadar::ShowRadarTraceWithHeight(float x, float y, uint32 size, uint8 red,
}
#ifdef MENU_MAP
// VC uses -1 for coords and -2 for entities but meh, I don't want to edit DrawBlips
if (CMenuManager::bMenuMapActive) {
if (FrontEndMenuManager.m_bMenuMapActive) {
bool alreadyThere = false;
for (int i = 0; i < NUM_MAP_LEGENDS; i++) {
if (MapLegendList[i] == -1)
@ -1403,9 +1403,9 @@ void CRadar::TransformRadarPointToRealWorldSpace(CVector2D &out, const CVector2D
void CRadar::TransformRadarPointToScreenSpace(CVector2D &out, const CVector2D &in)
{
#ifdef MENU_MAP
if (CMenuManager::bMenuMapActive) {
out.x = (CMenuManager::fMapCenterX - CMenuManager::fMapSize) + (MENU_MAP_LENGTH / 2 + MENU_MAP_LEFT_OFFSET + in.x) * CMenuManager::fMapSize * MENU_MAP_WIDTH_SCALE * 2.0f / MENU_MAP_LENGTH;
out.y = (CMenuManager::fMapCenterY - CMenuManager::fMapSize) + (MENU_MAP_LENGTH / 2 - MENU_MAP_TOP_OFFSET - in.y) * CMenuManager::fMapSize * MENU_MAP_HEIGHT_SCALE * 2.0f / MENU_MAP_LENGTH;
if (FrontEndMenuManager.m_bMenuMapActive) {
out.x = (FrontEndMenuManager.m_fMapCenterX - FrontEndMenuManager.m_fMapSize) + (MENU_MAP_LENGTH / 2 + MENU_MAP_LEFT_OFFSET + in.x) * FrontEndMenuManager.m_fMapSize * MENU_MAP_WIDTH_SCALE * 2.0f / MENU_MAP_LENGTH;
out.y = (FrontEndMenuManager.m_fMapCenterY - FrontEndMenuManager.m_fMapSize) + (MENU_MAP_LENGTH / 2 - MENU_MAP_TOP_OFFSET - in.y) * FrontEndMenuManager.m_fMapSize * MENU_MAP_HEIGHT_SCALE * 2.0f / MENU_MAP_LENGTH;
} else
#endif
{
@ -1463,7 +1463,7 @@ CRadar::CalculateCachedSinCos()
{
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN || TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOP_DOWN_PED
#ifdef MENU_MAP
|| CMenuManager::bMenuMapActive
|| FrontEndMenuManager.m_bMenuMapActive
#endif
) {
cachedSin = 0.0f;

View file

@ -222,7 +222,6 @@ enum Config {
// Hud, frontend and radar
#define ASPECT_RATIO_SCALE // Not just makes everything scale with aspect ratio, also adds support for all aspect ratios
#define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC
#define PS2_SAVE_DIALOG // PS2 style save dialog with transparent black box
// #define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc.
#define MENU_MAP // VC-like menu map. Make sure you have new menu.txd
#define SCROLLABLE_STATS_PAGE // only draggable by mouse atm

View file

@ -199,13 +199,13 @@ DoFade(void)
}
}
if(CDraw::FadeValue != 0 || CMenuManager::m_PrefsBrightness < 256){
if(CDraw::FadeValue != 0 || FrontEndMenuManager.m_PrefsBrightness < 256){
CSprite2d *splash = LoadSplash(nil);
CRGBA fadeColor;
CRect rect;
int fadeValue = CDraw::FadeValue;
float brightness = Min(CMenuManager::m_PrefsBrightness, 256);
float brightness = Min(FrontEndMenuManager.m_PrefsBrightness, 256);
if(brightness <= 50)
brightness = 50;
if(FrontEndMenuManager.m_bMenuActive)
@ -944,35 +944,6 @@ Idle(void *arg)
CSprite2d::InitPerFrame();
CFont::InitPerFrame();
// We're basically merging FrontendIdle and Idle (just like TheGame on PS2)
#ifdef PS2_SAVE_DIALOG
// Only exists on PC FrontendIdle, probably some PS2 bug fix
if (FrontEndMenuManager.m_bMenuActive)
CSprite2d::SetRecipNearClip();
if (FrontEndMenuManager.m_bGameNotLoaded) {
CPad::UpdatePads();
FrontEndMenuManager.Process();
} else {
CPointLights::InitPerFrame();
#ifdef TIMEBARS
tbStartTimer(0, "CGame::Process");
#endif
CGame::Process();
#ifdef TIMEBARS
tbEndTimer("CGame::Process");
tbStartTimer(0, "DMAudio.Service");
#endif
DMAudio.Service();
#ifdef TIMEBARS
tbEndTimer("DMAudio.Service");
#endif
}
if (RsGlobal.quit)
return;
#else
CPointLights::InitPerFrame();
#ifdef TIMEBARS
tbStartTimer(0, "CGame::Process");
@ -987,7 +958,6 @@ Idle(void *arg)
#ifdef TIMEBARS
tbEndTimer("DMAudio.Service");
#endif
#endif
if(CGame::bDemoMode && CTimer::GetTimeInMilliseconds() > (3*60 + 30)*1000 && !CCutsceneMgr::IsCutsceneProcessing()){
@ -1004,17 +974,16 @@ Idle(void *arg)
if(arg == nil)
return;
if((!FrontEndMenuManager.m_bMenuActive || FrontEndMenuManager.m_bRenderGameInMenu) &&
// m_bRenderGameInMenu is there in III PS2 but I don't know about VC PS2.
if((!FrontEndMenuManager.m_bMenuActive/* || FrontEndMenuManager.m_bRenderGameInMenu*/) &&
TheCamera.GetScreenFadeStatus() != FADE_2)
{
#ifdef GTA_PC
if (!FrontEndMenuManager.m_bRenderGameInMenu) {
// This is from SA, but it's nice for windowed mode
RwV2d pos;
pos.x = SCREEN_WIDTH / 2.0f;
pos.y = SCREEN_HEIGHT / 2.0f;
RsMouseSetPos(&pos);
}
#endif
#ifdef TIMEBARS
tbStartTimer(0, "CnstrRenderList");
@ -1082,10 +1051,6 @@ Idle(void *arg)
return;
}
#ifdef PS2_SAVE_DIALOG
if (FrontEndMenuManager.m_bMenuActive)
DefinedState();
#endif
#ifdef TIMEBARS
tbStartTimer(0, "RenderMenus");
#endif
@ -1217,11 +1182,7 @@ AppEventHandler(RsEvent event, void *param)
case rsFRONTENDIDLE:
{
#ifdef PS2_SAVE_DIALOG
Idle((void*)1);
#else
FrontendIdle();
#endif
return rsEVENTPROCESSED;
}
@ -1307,9 +1268,9 @@ void TheGame(void)
strcpy(TheMemoryCard.LoadFileName, TheMemoryCard.field37);
TheMemoryCard.b_FoundRecentSavedGameWantToLoad = true;
if (CMenuManager::m_PrefsLanguage != TheMemoryCard.GetLanguageToLoad())
if (FrontEndMenuManager.m_PrefsLanguage != TheMemoryCard.GetLanguageToLoad())
{
CMenuManager::m_PrefsLanguage = TheMemoryCard.GetLanguageToLoad();
FrontEndMenuManager.m_PrefsLanguage = TheMemoryCard.GetLanguageToLoad();
TheText.Unload();
TheText.Load();
}
@ -1383,7 +1344,8 @@ void TheGame(void)
gMainHeap.PushMemId(_TODOCONST(15));
#endif
if (!FrontEndMenuManager.m_bMenuActive || FrontEndMenuManager.m_bRenderGameInMenu == true && TheCamera.GetScreenFadeStatus() != FADE_2 )
// m_bRenderGameInMenu is there in III PS2 but I don't know about VC PS2.
if (!FrontEndMenuManager.m_bMenuActive || /*FrontEndMenuManager.m_bRenderGameInMenu == true && */TheCamera.GetScreenFadeStatus() != FADE_2 )
{
#ifdef GTA_PS2
gMainHeap.PushMemId(_TODOCONST(11));
@ -1590,30 +1552,30 @@ void SystemInit()
CGame::frenchGame = false;
CGame::germanGame = false;
CGame::nastyGame = true;
CMenuManager::m_PrefsAllowNastyGame = true;
FrontEndMenuManager.m_PrefsAllowNastyGame = true;
#ifdef GTA_PS2
int32 lang = sceScfGetLanguage();
if ( lang == SCE_ITALIAN_LANGUAGE )
CMenuManager::m_PrefsLanguage = LANGUAGE_ITALIAN;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_ITALIAN;
else if ( lang == SCE_SPANISH_LANGUAGE )
CMenuManager::m_PrefsLanguage = LANGUAGE_SPANISH;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_SPANISH;
else if ( lang == SCE_GERMAN_LANGUAGE )
{
CGame::germanGame = true;
CGame::nastyGame = false;
CMenuManager::m_PrefsAllowNastyGame = false;
CMenuManager::m_PrefsLanguage = LANGUAGE_GERMAN;
FrontEndMenuManager.m_PrefsAllowNastyGame = false;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_GERMAN;
}
else if ( lang == SCE_FRENCH_LANGUAGE )
{
CGame::frenchGame = true;
CGame::nastyGame = false;
CMenuManager::m_PrefsAllowNastyGame = false;
CMenuManager::m_PrefsLanguage = LANGUAGE_FRENCH;
FrontEndMenuManager.m_PrefsAllowNastyGame = false;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_FRENCH;
}
else
CMenuManager::m_PrefsLanguage = LANGUAGE_AMERICAN;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_AMERICAN;
FrontEndMenuManager.InitialiseMenuContentsAfterLoadingGame();
#else

View file

@ -128,12 +128,12 @@ CCredits::Render(void)
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED040"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4f, 0.82f, TheText.Get("CRED041"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED042"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED043"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED044"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
@ -176,7 +176,7 @@ CCredits::Render(void)
PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED061"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED062"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
@ -191,7 +191,7 @@ CCredits::Render(void)
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED068"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED069"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED070"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
@ -220,7 +220,7 @@ CCredits::Render(void)
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED262"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED085"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED086"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
@ -265,76 +265,76 @@ CCredits::Render(void)
PrintCreditText(1.0, 1.0, TheText.Get("CRED108"), lineoffset, scrolloffset);
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED109"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED110"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED111"), lineoffset, scrolloffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED112"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED113"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED114"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED115"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED116"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED117"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED118"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED119"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED120"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED121"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED122"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED123"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED124"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED125"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED126"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED127"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED128"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED129"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED130"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED131"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED132"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED133"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED134"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);

View file

@ -382,7 +382,7 @@ void CScrollBar::Update()
m_pMessage = FindTimeMessage();
break;
case 6:
if (CMenuManager::m_PrefsLanguage == LANGUAGE_FRENCH || CMenuManager::m_PrefsLanguage == LANGUAGE_GERMAN)
if (FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_FRENCH || FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_GERMAN)
m_pMessage = FindTimeMessage();
else
m_pMessage = "WWW.GRANDTHEFTAUTO3.COM ";
@ -602,7 +602,7 @@ void CScrollBar::Update()
m_pMessage = "FREE FLUFFY DICE WITH ALL PURCHASES. . .";
break;
case 9:
if (CMenuManager::m_PrefsLanguage == LANGUAGE_FRENCH || CMenuManager::m_PrefsLanguage == LANGUAGE_GERMAN)
if (FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_FRENCH || FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_GERMAN)
m_pMessage = "QUICK, TAKE A LOOK AT OUR CURRENT STOCK )CAUSE THESE AUTOS ARE MOVIN) FAST . . . ";
else
m_pMessage = "HTTP:((ROCKSTARGAMES.COM(GRANDTHEFTAUTO3(CAPITALAUTOS ";

View file

@ -102,6 +102,7 @@ uint32 CHud::m_WeaponState;
uint32 CHud::m_WeaponTimer;
uint32 CHud::m_LastDisplayScore;
uint32 CHud::m_LastWanted;
CSprite2d CHud::Sprites[NUM_HUD_SPRITES];
@ -483,33 +484,46 @@ void CHud::Draw()
/*
DrawWantedLevel
*/
CFont::SetBackgroundOff();
CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y));
CFont::SetJustifyOff();
CFont::SetCentreOff();
CFont::SetRightJustifyOn();
CFont::SetPropOn();
CFont::SetFontStyle(FONT_HEADING);
CFont::SetDropShadowPosition(2); // TODO(Miami): Remove that, VC keeps that open above
AsciiToUnicode("]", sPrintIcon);
for (int i = 0; i < 6; i++) {
if (playerPed->m_pWanted->m_nWantedLevel > i
&& (CTimer::GetTimeInMilliseconds() > playerPed->m_pWanted->m_nLastWantedLevelChange
+ 2000 || CTimer::GetFrameCounter() & 4)) {
CFont::SetColor(WANTED_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon);
// TODO(Miami): There is one more condition in here
}else if (playerPed->m_pWanted->m_nWantedLevel <= i) {
CFont::SetColor(NOTWANTED_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon);
}
if (m_LastWanted == playerPed->m_pWanted->m_nWantedLevel)
alpha = CHud::DrawFadeState(HUD_WANTED_FADING, 0);
else {
alpha = CHud::DrawFadeState(HUD_WANTED_FADING, 1);
m_LastWanted = playerPed->m_pWanted->m_nWantedLevel;
}
CFont::SetDropShadowPosition(0); // TODO(Miami): Remove that, VC keeps that open
if (m_WantedState != FADED_OUT) {
CFont::SetBackgroundOff();
CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y));
CFont::SetJustifyOff();
CFont::SetCentreOff();
CFont::SetRightJustifyOn();
CFont::SetPropOn();
CFont::SetFontStyle(FONT_HEADING);
CFont::SetDropShadowPosition(2); // TODO(Miami): Remove that, VC keeps that open above
CFont::SetDropColor(CRGBA(0,0,0,alpha)); // TODO(Miami): Remove that, VC keeps that open above
AsciiToUnicode("]", sPrintIcon);
for (int i = 0; i < 6; i++) {
if (playerPed->m_pWanted->m_nWantedLevel > i
&& (CTimer::GetTimeInMilliseconds() > playerPed->m_pWanted->m_nLastWantedLevelChange
+ 2000 || CTimer::GetFrameCounter() & 4)) {
WANTED_COLOR.a = alpha;
CFont::SetColor(WANTED_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon);
// TODO(Miami): There is one more condition in here
}
else if (playerPed->m_pWanted->m_nWantedLevel <= i) {
NOTWANTED_COLOR.a = alpha;
CFont::SetColor(NOTWANTED_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon);
}
}
CFont::SetDropShadowPosition(0); // TODO(Miami): Remove that, VC keeps that open
}
/*
DrawZoneName
@ -1503,20 +1517,28 @@ void CHud::Initialise()
PagerSoundPlayed = 0;
PagerXOffset = 150.0f;
m_WantedFadeTimer = 0;
#ifdef HUD_AUTO_FADE
m_EnergyLostState = START_FADE_OUT;
m_WantedState = START_FADE_OUT;
m_DisplayScoreState = START_FADE_OUT;
m_WeaponState = START_FADE_OUT;
#else
m_EnergyLostState = FADE_DISABLED;
m_WantedState = FADE_DISABLED;
m_DisplayScoreState = FADE_DISABLED;
m_WeaponState = FADE_DISABLED;
#endif
m_WantedFadeTimer = 0;
m_WantedTimer = 0;
m_EnergyLostFadeTimer = 0;
m_EnergyLostState = FADE_DISABLED;
m_EnergyLostTimer = 0;
m_DisplayScoreFadeTimer = 0;
m_DisplayScoreState = FADE_DISABLED;
m_DisplayScoreTimer = 0;
m_WeaponFadeTimer = 0;
m_WeaponState = FADE_DISABLED;
m_WeaponTimer = 0;
m_LastDisplayScore = CWorld::Players[CWorld::PlayerInFocus].m_nVisibleMoney;
m_LastWanted = 0;
CTxdStore::PopCurrentTxd();
}
@ -1542,20 +1564,28 @@ void CHud::ReInitialise() {
PagerSoundPlayed = 0;
PagerXOffset = 150.0f;
m_WantedFadeTimer = 0;
#ifdef HUD_AUTO_FADE
m_EnergyLostState = START_FADE_OUT;
m_WantedState = START_FADE_OUT;
m_DisplayScoreState = START_FADE_OUT;
m_WeaponState = START_FADE_OUT;
#else
m_EnergyLostState = FADE_DISABLED;
m_WantedState = FADE_DISABLED;
m_DisplayScoreState = FADE_DISABLED;
m_WeaponState = FADE_DISABLED;
#endif
m_WantedFadeTimer = 0;
m_WantedTimer = 0;
m_EnergyLostFadeTimer = 0;
m_EnergyLostState = FADE_DISABLED;
m_EnergyLostTimer = 0;
m_DisplayScoreFadeTimer = 0;
m_DisplayScoreState = FADE_DISABLED;
m_DisplayScoreTimer = 0;
m_WeaponFadeTimer = 0;
m_WeaponState = FADE_DISABLED;
m_WeaponTimer = 0;
m_LastDisplayScore = CWorld::Players[CWorld::PlayerInFocus].m_nVisibleMoney;
m_LastWanted = 0;
}
wchar LastBigMessage[6][128];

View file

@ -119,6 +119,7 @@ public:
static uint32 m_WeaponTimer;
static uint32 m_LastDisplayScore;
static uint32 m_LastWanted;
public:
static void Draw();

View file

@ -86,9 +86,9 @@ SetLightsWithTimeOfDayColour(RpWorld *)
RwFrameTransform(RpLightGetFrame(pDirect), &mat, rwCOMBINEREPLACE);
}
if(CMenuManager::m_PrefsBrightness > 256){
float f1 = 2.0f * (CMenuManager::m_PrefsBrightness/256.0f - 1.0f) * 0.6f + 1.0f;
float f2 = 3.0f * (CMenuManager::m_PrefsBrightness/256.0f - 1.0f) * 0.6f + 1.0f;
if(FrontEndMenuManager.m_PrefsBrightness > 256){
float f1 = 2.0f * (FrontEndMenuManager.m_PrefsBrightness/256.0f - 1.0f) * 0.6f + 1.0f;
float f2 = 3.0f * (FrontEndMenuManager.m_PrefsBrightness/256.0f - 1.0f) * 0.6f + 1.0f;
AmbientLightColourForFrame.red = Min(1.0f, AmbientLightColourForFrame.red * f2);
AmbientLightColourForFrame.green = Min(1.0f, AmbientLightColourForFrame.green * f2);

View file

@ -341,8 +341,8 @@ GenericLoad()
LoadSaveDataBlock();
ReadDataFromBlock("Loading PedType Stuff \n", CPedType::Load);
DMAudio.SetMusicMasterVolume(CMenuManager::m_PrefsMusicVolume);
DMAudio.SetEffectsMasterVolume(CMenuManager::m_PrefsSfxVolume);
DMAudio.SetMusicMasterVolume(FrontEndMenuManager.m_PrefsMusicVolume);
DMAudio.SetEffectsMasterVolume(FrontEndMenuManager.m_PrefsSfxVolume);
if (!CloseFile(file)) {
PcSaveHelper.nErrorCode = SAVESTATUS_ERR_LOAD_CLOSE;
return false;

View file

@ -176,7 +176,7 @@ psCameraBeginUpdate(RwCamera *camera)
void
psCameraShowRaster(RwCamera *camera)
{
if (CMenuManager::m_PrefsVsync)
if (FrontEndMenuManager.m_PrefsVsync)
RwCameraShowRaster(camera, PSGLOBAL(window), rwRASTERFLIPWAITVSYNC);
else
RwCameraShowRaster(camera, PSGLOBAL(window), rwRASTERFLIPDONTWAIT);
@ -944,7 +944,7 @@ void InitialiseLanguage()
|| primLayout == LANG_GERMAN )
{
CGame::nastyGame = false;
CMenuManager::m_PrefsAllowNastyGame = false;
FrontEndMenuManager.m_PrefsAllowNastyGame = false;
CGame::germanGame = true;
}
@ -953,7 +953,7 @@ void InitialiseLanguage()
|| primLayout == LANG_FRENCH )
{
CGame::nastyGame = false;
CMenuManager::m_PrefsAllowNastyGame = false;
FrontEndMenuManager.m_PrefsAllowNastyGame = false;
CGame::frenchGame = true;
}
@ -964,7 +964,7 @@ void InitialiseLanguage()
#ifdef NASTY_GAME
CGame::nastyGame = true;
CMenuManager::m_PrefsAllowNastyGame = true;
FrontEndMenuManager.m_PrefsAllowNastyGame = true;
CGame::noProstitutes = false;
#endif
@ -999,33 +999,33 @@ void InitialiseLanguage()
}
}
CMenuManager::OS_Language = primUserLCID;
FrontEndMenuManager.OS_Language = primUserLCID;
switch ( lang )
{
case LANG_GERMAN:
{
CMenuManager::m_PrefsLanguage = LANGUAGE_GERMAN;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_GERMAN;
break;
}
case LANG_SPANISH:
{
CMenuManager::m_PrefsLanguage = LANGUAGE_SPANISH;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_SPANISH;
break;
}
case LANG_FRENCH:
{
CMenuManager::m_PrefsLanguage = LANGUAGE_FRENCH;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_FRENCH;
break;
}
case LANG_ITALIAN:
{
CMenuManager::m_PrefsLanguage = LANGUAGE_ITALIAN;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_ITALIAN;
break;
}
default:
{
CMenuManager::m_PrefsLanguage = LANGUAGE_AMERICAN;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_AMERICAN;
break;
}
}
@ -1486,7 +1486,7 @@ main(int argc, char *argv[])
FrontEndMenuManager.m_bGameNotLoaded = true;
CMenuManager::m_bStartUpFrontEndRequested = true;
FrontEndMenuManager.m_bStartUpFrontEndRequested = true;
if ( defaultFullscreenRes )
{
@ -1535,7 +1535,7 @@ main(int argc, char *argv[])
float ms = (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond();
if ( RwInitialised )
{
if (!CMenuManager::m_PrefsFrameLimiter || (1000.0f / (float)RsGlobal.maxFPS) < ms)
if (!FrontEndMenuManager.m_PrefsFrameLimiter || (1000.0f / (float)RsGlobal.maxFPS) < ms)
RsEventHandler(rsIDLE, (void *)TRUE);
}
break;
@ -1546,7 +1546,7 @@ main(int argc, char *argv[])
float ms = (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond();
if (RwInitialised)
{
if (!CMenuManager::m_PrefsFrameLimiter || (1000.0f / (float)RsGlobal.maxFPS) < ms)
if (!FrontEndMenuManager.m_PrefsFrameLimiter || (1000.0f / (float)RsGlobal.maxFPS) < ms)
RsEventHandler(rsANIMVIEWER, (void*)TRUE);
}
break;

View file

@ -221,7 +221,7 @@ psCameraBeginUpdate(RwCamera *camera)
void
psCameraShowRaster(RwCamera *camera)
{
if (CMenuManager::m_PrefsVsync)
if (FrontEndMenuManager.m_PrefsVsync)
RwCameraShowRaster(camera, PSGLOBAL(window), rwRASTERFLIPWAITVSYNC);
else
RwCameraShowRaster(camera, PSGLOBAL(window), rwRASTERFLIPDONTWAIT);
@ -1654,7 +1654,7 @@ void InitialiseLanguage()
|| primLayout == LANG_GERMAN )
{
CGame::nastyGame = false;
CMenuManager::m_PrefsAllowNastyGame = false;
FrontEndMenuManager.m_PrefsAllowNastyGame = false;
CGame::germanGame = true;
}
@ -1663,7 +1663,7 @@ void InitialiseLanguage()
|| primLayout == LANG_FRENCH )
{
CGame::nastyGame = false;
CMenuManager::m_PrefsAllowNastyGame = false;
FrontEndMenuManager.m_PrefsAllowNastyGame = false;
CGame::frenchGame = true;
}
@ -1674,7 +1674,7 @@ void InitialiseLanguage()
#ifdef NASTY_GAME
CGame::nastyGame = true;
CMenuManager::m_PrefsAllowNastyGame = true;
FrontEndMenuManager.m_PrefsAllowNastyGame = true;
CGame::noProstitutes = false;
#endif
@ -1709,33 +1709,33 @@ void InitialiseLanguage()
}
}
CMenuManager::OS_Language = primUserLCID;
FrontEndMenuManager.OS_Language = primUserLCID;
switch ( lang )
{
case LANG_GERMAN:
{
CMenuManager::m_PrefsLanguage = LANGUAGE_GERMAN;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_GERMAN;
break;
}
case LANG_SPANISH:
{
CMenuManager::m_PrefsLanguage = LANGUAGE_SPANISH;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_SPANISH;
break;
}
case LANG_FRENCH:
{
CMenuManager::m_PrefsLanguage = LANGUAGE_FRENCH;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_FRENCH;
break;
}
case LANG_ITALIAN:
{
CMenuManager::m_PrefsLanguage = LANGUAGE_ITALIAN;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_ITALIAN;
break;
}
default:
{
CMenuManager::m_PrefsLanguage = LANGUAGE_AMERICAN;
FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_AMERICAN;
break;
}
}
@ -2128,7 +2128,7 @@ WinMain(HINSTANCE instance,
CoUninitialize();
if ( CMenuManager::OS_Language == LANG_FRENCH || CMenuManager::OS_Language == LANG_GERMAN )
if ( FrontEndMenuManager.OS_Language == LANG_FRENCH || FrontEndMenuManager.OS_Language == LANG_GERMAN )
PlayMovieInWindow(cmdShow, "movies\\GTAtitlesGER.mpg");
else
PlayMovieInWindow(cmdShow, "movies\\GTAtitles.mpg");
@ -2179,7 +2179,7 @@ WinMain(HINSTANCE instance,
FrontEndMenuManager.m_bGameNotLoaded = true;
CMenuManager::m_bStartUpFrontEndRequested = true;
FrontEndMenuManager.m_bStartUpFrontEndRequested = true;
if ( defaultFullscreenRes )
{
@ -2230,7 +2230,7 @@ WinMain(HINSTANCE instance,
float ms = (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond();
if ( RwInitialised )
{
if (!CMenuManager::m_PrefsFrameLimiter || (1000.0f / (float)RsGlobal.maxFPS) < ms)
if (!FrontEndMenuManager.m_PrefsFrameLimiter || (1000.0f / (float)RsGlobal.maxFPS) < ms)
RsEventHandler(rsIDLE, (void *)TRUE);
}
break;
@ -2241,7 +2241,7 @@ WinMain(HINSTANCE instance,
float ms = (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond();
if (RwInitialised)
{
if (!CMenuManager::m_PrefsFrameLimiter || (1000.0f / (float)RsGlobal.maxFPS) < ms)
if (!FrontEndMenuManager.m_PrefsFrameLimiter || (1000.0f / (float)RsGlobal.maxFPS) < ms)
RsEventHandler(rsANIMVIEWER, (void*)TRUE);
}
break;

View file

@ -39,7 +39,7 @@ CText::Load(void)
Unload();
CFileMgr::SetDir("TEXT");
switch(CMenuManager::m_PrefsLanguage){
switch(FrontEndMenuManager.m_PrefsLanguage){
case LANGUAGE_AMERICAN:
sprintf(filename, "AMERICAN.GXT");
break;
@ -241,7 +241,7 @@ CText::LoadMissionText(char *MissionTableName)
}
CFileMgr::SetDir("TEXT");
switch (CMenuManager::m_PrefsLanguage) {
switch (FrontEndMenuManager.m_PrefsLanguage) {
case LANGUAGE_AMERICAN:
sprintf(filename, "AMERICAN.GXT");
break;