Merge remote-tracking branch 'upstream/miami' into miami

This commit is contained in:
Nikolay Korolev 2020-05-22 23:35:19 +03:00
commit 6e51ed3c53
25 changed files with 992 additions and 1335 deletions

View File

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

View File

@ -29,7 +29,7 @@ bool PrintDebugCode = false;
int16 DebugCamMode; int16 DebugCamMode;
#ifdef FREE_CAM #ifdef FREE_CAM
bool CCamera::bFreeCam = true; bool CCamera::bFreeCam;
int nPreviousMode = -1; int nPreviousMode = -1;
#endif #endif
@ -3630,7 +3630,7 @@ CCam::Process_Fixed(const CVector &CameraTarget, float, float, float)
if(TheCamera.m_bUseSpecialFovTrain) if(TheCamera.m_bUseSpecialFovTrain)
FOV = TheCamera.m_fFovForTrain; FOV = TheCamera.m_fFovForTrain;
if(CMenuManager::m_ControlMethod == 0 && Using3rdPersonMouseCam()){ if(FrontEndMenuManager.m_ControlMethod == 0 && Using3rdPersonMouseCam()){
CPed *player = FindPlayerPed(); CPed *player = FindPlayerPed();
if(player && player->CanStrafeOrMouseControl()){ if(player && player->CanStrafeOrMouseControl()){
float Heading = Front.Heading(); float Heading = Front.Heading();

View File

@ -3037,33 +3037,25 @@ CCamera::SetNearClipScript(float clip)
void void
CCamera::ProcessFade(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_bFading){
if(m_iFadingDirection == FADE_IN){ if(m_iFadingDirection == FADE_IN){
if(m_fTimeToFadeOut != 0.0f){ if(m_fTimeToFadeOut != 0.0f){
m_fFLOATingFade = 255.0f - 255.0f*fade/m_fTimeToFadeOut; m_fFLOATingFade -= CTimer::GetTimeStepInSeconds() * 255.0f / m_fTimeToFadeOut;
if(m_fFLOATingFade <= 0.0f){ }else{
m_bFading = false;
CDraw::FadeValue = 0;
m_fFLOATingFade = 0.0f; m_fFLOATingFade = 0.0f;
} }
}else{ if (m_fFLOATingFade <= 0.0f) {
m_bFading = false; m_bFading = false;
CDraw::FadeValue = 0;
m_fFLOATingFade = 0.0f; m_fFLOATingFade = 0.0f;
} }
}else if(m_iFadingDirection == FADE_OUT){ }else if(m_iFadingDirection == FADE_OUT){
if(m_fTimeToFadeOut != 0.0f){ if(m_fTimeToFadeOut != 0.0f){
m_fFLOATingFade = 255.0f*fade/m_fTimeToFadeOut; m_fFLOATingFade += CTimer::GetTimeStepInSeconds() * 255.0f / m_fTimeToFadeOut;
if(m_fFLOATingFade >= 255.0f){ }else{
m_bFading = false;
CDraw::FadeValue = 255;
m_fFLOATingFade = 255.0f; m_fFLOATingFade = 255.0f;
} }
}else{ if (m_fFLOATingFade >= 255.0f) {
m_bFading = false; m_bFading = false;
CDraw::FadeValue = 255;
m_fFLOATingFade = 255.0f; m_fFLOATingFade = 255.0f;
} }
} }

View File

@ -769,7 +769,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_ThirdPersonOnl
if (button == GetControllerKeyAssociatedWithAction(PED_SPRINT, type)) if (button == GetControllerKeyAssociatedWithAction(PED_SPRINT, type))
state.Cross = 255; state.Cross = 255;
if (CMenuManager::m_ControlMethod == CONTROL_CLASSIC) if (FrontEndMenuManager.m_ControlMethod == CONTROL_CLASSIC)
{ {
if (button == GetControllerKeyAssociatedWithAction(PED_CYCLE_TARGET_LEFT, type)) if (button == GetControllerKeyAssociatedWithAction(PED_CYCLE_TARGET_LEFT, type))
state.LeftShoulder2 = 255; state.LeftShoulder2 = 255;
@ -835,7 +835,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_FirstAndThirdP
state.RightStickX = 128; state.RightStickX = 128;
} }
if (CMenuManager::m_ControlMethod == CONTROL_CLASSIC) if (FrontEndMenuManager.m_ControlMethod == CONTROL_CLASSIC)
{ {
if (button == GetControllerKeyAssociatedWithAction(PED_1RST_PERSON_LOOK_UP, type)) if (button == GetControllerKeyAssociatedWithAction(PED_1RST_PERSON_LOOK_UP, type))
{ {
@ -1617,7 +1617,7 @@ void CControllerConfigManager::DeleteMatching3rdPersonControls(e_ControllerActio
if (key == GetControllerKeyAssociatedWithAction(PED_SPRINT, type)) if (key == GetControllerKeyAssociatedWithAction(PED_SPRINT, type))
ClearSettingsAssociatedWithAction(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)) if (key == GetControllerKeyAssociatedWithAction(PED_CYCLE_TARGET_LEFT, type))
ClearSettingsAssociatedWithAction(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)) if (key == GetControllerKeyAssociatedWithAction(GO_BACK, type))
ClearSettingsAssociatedWithAction(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)) if (key == GetControllerKeyAssociatedWithAction(PED_1RST_PERSON_LOOK_LEFT, type))
ClearSettingsAssociatedWithAction(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 #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 enum eMenuSprites
{ {
MENUSPRITE_BACKGROUND, MENUSPRITE_BACKGROUND,
@ -177,22 +141,6 @@ enum eSaveSlot
SAVESLOT_LABEL = 36 SAVESLOT_LABEL = 36
}; };
#ifdef MENU_MAP
enum MapSprites
{
MAPMID1,
MAPMID2,
MAPMID3,
MAPBOT1,
MAPBOT2,
MAPBOT3,
MAPTOP1,
MAPTOP2,
MAPTOP3,
NUM_MAP_SPRITES
};
#endif
enum eMenuScreen enum eMenuScreen
{ {
MENUPAGE_DISABLED = -1, MENUPAGE_DISABLED = -1,
@ -380,7 +328,10 @@ enum eMenuAction
MENUACTION_LANG_JAP, MENUACTION_LANG_JAP,
#endif #endif
#ifdef IMPROVED_VIDEOMODE #ifdef IMPROVED_VIDEOMODE
MENUACTION_SCREENMODE MENUACTION_SCREENMODE,
#endif
#ifdef FREE_CAM
MENUACTION_FREECAM
#endif #endif
}; };
@ -480,70 +431,162 @@ struct CMenuScreen
} m_aEntries[NUM_MENUROWS]; } 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 class CMenuManager
{ {
public: public:
int32 m_nPrefsVideoMode; int8 m_StatsScrollDirection;
int32 m_nDisplayVideoMode; 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; int8 m_nPrefsAudio3DProviderIndex;
bool m_bKeyChangeNotProcessed; int8 m_PrefsSpeakers;
char m_aSkinName[256]; int8 m_PrefsDMA;
int32 m_nHelperTextMsgId; uint8 m_PrefsSfxVolume;
bool m_bLanguageLoaded; 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_bMenuActive;
bool m_bMenuStateChanged;
bool m_bWaitingForNewKeyBind;
bool m_bWantToRestart; bool m_bWantToRestart;
bool m_bFirstTime; bool m_bFirstTime;
bool m_bGameNotLoaded; bool m_bActivateSaveMenu;
int32 m_nMousePosX; bool m_bWantToLoad;
int32 m_nMousePosY; 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_nMouseTempPosX;
int32 m_nMouseTempPosY; 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; 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_pSkinListHead;
tSkinInfo *m_pSelectedSkin; tSkinInfo *m_pSelectedSkin;
int32 m_nFirstVisibleRowOnList; int32 m_nFirstVisibleRowOnList;
float m_nScrollbarTopMargin; float m_nScrollbarTopMargin;
int32 m_nTotalListRow; int32 m_nTotalListRow;
int32 m_nSkinsTotal; int32 m_nSkinsTotal;
char _unk0[4]; uint8 field_67C[4];
int32 m_nSelectedListRow; int32 m_nSelectedListRow;
bool m_bSkinsEnumerated; 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 #ifdef IMPROVED_VIDEOMODE
int32 m_nPrefsWidth; int32 m_nPrefsWidth;
@ -554,107 +597,63 @@ public:
int32 m_nSelectedScreenMode; int32 m_nSelectedScreenMode;
#endif #endif
public:
bool GetIsMenuActive() {return !!m_bMenuActive;} 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 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 #ifndef MASTER
static bool m_PrefsMarketing; static bool m_PrefsMarketing;
static bool m_PrefsDisableTutorials; static bool m_PrefsDisableTutorials;
#endif // !MASTER #endif // !MASTER
#ifdef MENU_MAP CMenuManager(void);
static bool bMenuMapActive; ~CMenuManager(void) { UnloadTextures(); }
static bool bMapMouseShownOnce;
static bool bMapLoaded;
static float fMapSize;
static float fMapCenterY;
static float fMapCenterX;
static CSprite2d m_aMapSprites[NUM_MAP_SPRITES];
void PrintMap();
#endif
public: void Initialise();
void PrintMap();
void SetFrontEndRenderStates();
static void BuildStatLine(Const char *text, void *stat, bool itsFloat, void *stat2); static void BuildStatLine(Const char *text, void *stat, bool itsFloat, void *stat2);
static void CentreMousePointer(); static void CentreMousePointer();
void CheckCodesForControls(int); void CheckCodesForControls(int);
bool CheckHover(int x1, int x2, int y1, int y2); bool CheckHover(int x1, int x2, int y1, int y2);
void CheckSliderMovement(int); void CheckSliderMovement(int);
int CostructStatLine(int);
void DisplayHelperText(); void DisplayHelperText();
int DisplaySlider(float, float, float, float, float, float); int DisplaySlider(float, float, float, float, float, float);
void DoSettingsBeforeStartingAGame(); void DoSettingsBeforeStartingAGame();
void Draw(); void DrawStandardMenus();
void DrawControllerBound(int32, int32, int32, int8); void DrawControllerBound(int32, int32, int32, int8);
void DrawControllerScreenExtraText(int, int, int); void DrawControllerScreenExtraText(int, int, int);
void DrawControllerSetupScreen(); void DrawControllerSetupScreen();
void DrawFrontEnd(); void DrawFrontEnd();
void DrawFrontEndNormal(); void DrawBackground();
#ifdef PS2_SAVE_DIALOG
void DrawFrontEndSaveZone();
#endif
void DrawPlayerSetupScreen(); void DrawPlayerSetupScreen();
int FadeIn(int alpha); int FadeIn(int alpha);
void FilterOutColorMarkersFromString(wchar*, CRGBA &); void FilterOutColorMarkersFromString(wchar*, CRGBA &);
int GetStartOptionsCntrlConfigScreens(); int GetStartOptionsCntrlConfigScreens();
static void InitialiseChangedLanguageSettings(); void InitialiseChangedLanguageSettings();
void LoadAllTextures(); void LoadAllTextures();
void LoadSettings(); void LoadSettings();
void MessageScreen(const char *); void MessageScreen(const char *);
// TODO(MIAMI): implement the second argument // TODO(MIAMI): implement the second argument
void MessageScreen(const char *str, bool) { MessageScreen(str); } void MessageScreen(const char *str, bool) { MessageScreen(str); }
void PickNewPlayerColour();
void PrintBriefs(); void PrintBriefs();
static void PrintErrorMessage(); static void PrintErrorMessage();
void PrintStats(); void PrintStats();
void Process(); void Process();
void ProcessButtonPresses(); void ProcessButtonPresses();
void ProcessFileActions();
void ProcessOnOffMenuOptions(); void ProcessOnOffMenuOptions();
static void RequestFrontEndShutDown(); void RequestFrontEndShutDown();
static void RequestFrontEndStartUp(); void RequestFrontEndStartUp();
void ResetHelperText(); void ResetHelperText();
void SaveLoadFileError_SetUpErrorScreen(); void SaveLoadFileError_SetUpErrorScreen();
void SaveSettings(); void SaveSettings();
void SetHelperText(int text); void SetHelperText(int text);
void ShutdownJustMenu();
float StretchX(float); float StretchX(float);
float StretchY(float); float StretchY(float);
void SwitchMenuOnAndOff(); void SwitchMenuOnAndOff();
void UnloadTextures(); void UnloadTextures();
void WaitForUserCD(); void WaitForUserCD();
void PrintController();
int GetNumOptionsCntrlConfigScreens(); int GetNumOptionsCntrlConfigScreens();
int ConstructStatLine(int); int ConstructStatLine(int);
@ -669,7 +668,7 @@ public:
}; };
#ifndef IMPROVED_VIDEOMODE #ifndef IMPROVED_VIDEOMODE
VALIDATE_SIZE(CMenuManager, 0x564); VALIDATE_SIZE(CMenuManager, 0x688);
#endif #endif
extern CMenuManager FrontEndMenuManager; extern CMenuManager FrontEndMenuManager;

View File

@ -221,20 +221,20 @@ bool CGame::InitialiseOnceAfterRW(void)
if ( FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -99 || FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -2 ) if ( FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -99 || FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -2 )
{ {
CMenuManager::m_PrefsSpeakers = 0; FrontEndMenuManager.m_PrefsSpeakers = 0;
int8 provider = DMAudio.AutoDetect3DProviders(); int8 provider = DMAudio.AutoDetect3DProviders();
if ( provider != -1 ) if ( provider != -1 )
FrontEndMenuManager.m_nPrefsAudio3DProviderIndex = provider; FrontEndMenuManager.m_nPrefsAudio3DProviderIndex = provider;
} }
DMAudio.SetCurrent3DProvider(FrontEndMenuManager.m_nPrefsAudio3DProviderIndex); DMAudio.SetCurrent3DProvider(FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
DMAudio.SetSpeakerConfig(CMenuManager::m_PrefsSpeakers); DMAudio.SetSpeakerConfig(FrontEndMenuManager.m_PrefsSpeakers);
DMAudio.SetDynamicAcousticModelingStatus(CMenuManager::m_PrefsDMA); DMAudio.SetDynamicAcousticModelingStatus(FrontEndMenuManager.m_PrefsDMA);
DMAudio.SetMusicMasterVolume(CMenuManager::m_PrefsMusicVolume); DMAudio.SetMusicMasterVolume(FrontEndMenuManager.m_PrefsMusicVolume);
DMAudio.SetEffectsMasterVolume(CMenuManager::m_PrefsSfxVolume); DMAudio.SetEffectsMasterVolume(FrontEndMenuManager.m_PrefsSfxVolume);
DMAudio.SetEffectsFadeVol(127); DMAudio.SetEffectsFadeVol(127);
DMAudio.SetMusicFadeVol(127); DMAudio.SetMusicFadeVol(127);
CWorld::Players[0].SetPlayerSkin(CMenuManager::m_PrefsSkinFile); CWorld::Players[0].SetPlayerSkin(FrontEndMenuManager.m_PrefsSkinFile);
return true; return true;
} }
@ -664,6 +664,22 @@ void CGame::Process(void)
} }
} }
void
CGame::InitAfterFocusLoss()
{
/*
byte_869656 = byte_86969D;
result = cDMAudio::SetCurrent3DProvider(byte_86969D);
if ( !bGameStarted && !bMenuVisible )
byte_869642 = 1;
*/
//cDMAudio::SetCurrent3DProvider( ? ? ? );
if (!FrontEndMenuManager.m_bGameNotLoaded && !FrontEndMenuManager.m_bMenuActive)
FrontEndMenuManager.m_bStartUpFrontEndRequested = true;
}
bool bool
CGame::CanSeeOutSideFromCurrArea(void) CGame::CanSeeOutSideFromCurrArea(void)
{ {

View File

@ -59,6 +59,8 @@ public:
static void InitialiseWhenRestarting(void); static void InitialiseWhenRestarting(void);
static void Process(void); static void Process(void);
static void InitAfterFocusLoss(void);
static bool IsInInterior(void) { return currArea != AREA_MAIN_MAP; } static bool IsInInterior(void) { return currArea != AREA_MAIN_MAP; }
static bool CanSeeOutSideFromCurrArea(void); static bool CanSeeOutSideFromCurrArea(void);

View File

@ -206,20 +206,12 @@ const CMenuScreen aScreens[] = {
MENUACTION_MEMCARDSAVECONFIRM, "JAILB_U", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_MEMCARDSAVECONFIRM, "JAILB_U", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// Unused in PC but anyway
// MENUPAGE_SAVE = 24 // 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, { "FET_SG", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_LABEL, "FES_SCG", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FES_SCG", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_POPULATESLOTS_CHANGEMENU, "GMSAVE", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT, MENUACTION_POPULATESLOTS_CHANGEMENU, "GMSAVE", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT,
MENUACTION_RESUME_FROM_SAVEZONE, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_RESUME_FROM_SAVEZONE, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
#endif
// MENUPAGE_NO_MEMORY_CARD_2 = 25 // MENUPAGE_NO_MEMORY_CARD_2 = 25
{ "FES_NOC", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FES_NOC", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
@ -284,6 +276,9 @@ const CMenuScreen aScreens[] = {
// MENUPAGE_CONTROLLER_PC = 35 // MENUPAGE_CONTROLLER_PC = 35
{ "FET_CTL", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 0, 0, { "FET_CTL", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 0, 0,
MENUACTION_CTRLMETHOD, "FET_CME", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, MENUACTION_CTRLMETHOD, "FET_CME", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
#ifdef FREE_CAM
MENUACTION_FREECAM, "FREECAM", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
#endif
MENUACTION_CHANGEMENU, "FET_RDK", SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS, MENUACTION_CHANGEMENU, "FET_RDK", SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS,
MENUACTION_CHANGEMENU, "FET_AMS", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS, MENUACTION_CHANGEMENU, "FET_AMS", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS,
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,

View File

@ -49,7 +49,7 @@ CKeyboardState CPad::OldKeyState;
CKeyboardState CPad::NewKeyState; CKeyboardState CPad::NewKeyState;
CKeyboardState CPad::TempKeyState; CKeyboardState CPad::TempKeyState;
char CPad::KeyBoardCheatString[20]; char CPad::KeyBoardCheatString[30];
CMouseControllerState CPad::OldMouseControllerState; CMouseControllerState CPad::OldMouseControllerState;
CMouseControllerState CPad::NewMouseControllerState; CMouseControllerState CPad::NewMouseControllerState;
@ -108,31 +108,31 @@ void HealthCheat()
} }
} }
void TankCheat() void VehicleCheat(bool something, int model)
{ {
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true); CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
CStreaming::RequestModel(MI_RHINO, 0); CStreaming::RequestModel(model, 0);
CStreaming::LoadAllRequestedModels(false); CStreaming::LoadAllRequestedModels(something);
if (CStreaming::ms_aInfoForModel[MI_RHINO].m_loadState == STREAMSTATE_LOADED) { if (CStreaming::ms_aInfoForModel[model].m_loadState == STREAMSTATE_LOADED) {
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true); CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
int32 node = ThePaths.FindNodeClosestToCoors(FindPlayerCoors(), PATH_CAR, 100.0f); int32 node = ThePaths.FindNodeClosestToCoors(FindPlayerCoors(), PATH_CAR, 100.0f);
if (node < 0) return; if (node < 0) return;
#ifdef FIX_BUGS #ifdef FIX_BUGS
CAutomobile* tank = new CAutomobile(MI_RHINO, RANDOM_VEHICLE); CAutomobile* vehicle = new CAutomobile(model, RANDOM_VEHICLE);
#else #else
CAutomobile *tank = new CAutomobile(MI_RHINO, MISSION_VEHICLE); CAutomobile* vehicle = new CAutomobile(MI_RHINO, MISSION_VEHICLE);
#endif #endif
if (tank != nil) { if (vehicle != nil) {
CVector pos = ThePaths.m_pathNodes[node].GetPosition(); CVector pos = ThePaths.m_pathNodes[node].GetPosition();
pos.z += 4.0f; pos.z += 4.0f;
tank->SetPosition(pos); vehicle->SetPosition(pos);
tank->SetOrientation(0.0f, 0.0f, DEGTORAD(200.0f)); vehicle->SetOrientation(0.0f, 0.0f, DEGTORAD(200.0f));
tank->SetStatus(STATUS_ABANDONED); vehicle->SetStatus(STATUS_ABANDONED);
tank->m_nDoorLock = CARLOCK_UNLOCKED; vehicle->m_nDoorLock = CARLOCK_UNLOCKED;
CWorld::Add(tank); CWorld::Add(vehicle);
} }
} }
} }
@ -701,7 +701,7 @@ CControllerState CPad::ReconcileTwoControllersInput(CControllerState const &Stat
void CPad::StartShake(int16 nDur, uint8 nFreq) void CPad::StartShake(int16 nDur, uint8 nFreq)
{ {
if ( !CMenuManager::m_PrefsUseVibration ) if ( !FrontEndMenuManager.m_PrefsUseVibration )
return; return;
if ( CCutsceneMgr::IsRunning() || CGame::playingIntro ) 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) void CPad::StartShake_Distance(int16 nDur, uint8 nFreq, float fX, float fY, float fZ)
{ {
if ( !CMenuManager::m_PrefsUseVibration ) if ( !FrontEndMenuManager.m_PrefsUseVibration )
return; return;
if ( CCutsceneMgr::IsRunning() || CGame::playingIntro ) 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) void CPad::StartShake_Train(float fX, float fY)
{ {
if ( !CMenuManager::m_PrefsUseVibration ) if ( !FrontEndMenuManager.m_PrefsUseVibration )
return; return;
if ( CCutsceneMgr::IsRunning() || CGame::playingIntro ) if ( CCutsceneMgr::IsRunning() || CGame::playingIntro )
@ -824,7 +824,7 @@ void CPad::AddToCheatString(char c)
// "CCCCCC321TCT" - CIRCLE CIRCLE CIRCLE CIRCLE CIRCLE CIRCLE R1 L2 L1 TRIANGLE CIRCLE TRIANGLE // "CCCCCC321TCT" - CIRCLE CIRCLE CIRCLE CIRCLE CIRCLE CIRCLE R1 L2 L1 TRIANGLE CIRCLE TRIANGLE
else if ( !_CHEATCMP("TCT123CCCCCC") ) else if ( !_CHEATCMP("TCT123CCCCCC") )
TankCheat(); VehicleCheat(true, MI_RHINO);
// "CCCSSSSS1TCT" - CIRCLE CIRCLE CIRCLE SQUARE SQUARE SQUARE SQUARE SQUARE L1 TRIANGLE CIRCLE TRIANGLE // "CCCSSSSS1TCT" - CIRCLE CIRCLE CIRCLE SQUARE SQUARE SQUARE SQUARE SQUARE L1 TRIANGLE CIRCLE TRIANGLE
else if ( !_CHEATCMP("TCT1SSSSSCCC") ) else if ( !_CHEATCMP("TCT1SSSSSCCC") )
@ -906,9 +906,45 @@ void CPad::AddToPCCheatString(char c)
if ( !_CHEATCMP("ESAELPECILOPON") ) if ( !_CHEATCMP("ESAELPECILOPON") )
WantedLevelDownCheat(); WantedLevelDownCheat();
// "GIVEUSATANK" // "PANZER"
if ( !_CHEATCMP("KNATASUEVIG") ) if ( !_CHEATCMP("REZNAP") )
TankCheat(); VehicleCheat(true, MI_RHINO);
// "TRAVELINSTYLE"
if ( !_CHEATCMP("ELYTSNILEVART") )
VehicleCheat(true, MI_BLOODRA);
// "GETTHEREQUICKLY"
if ( !_CHEATCMP("YLKCIUQEREHTTEG") )
VehicleCheat(true, MI_BLOODRB);
// "GETTHEREFAST"
if ( !_CHEATCMP("TSAFEREHTTEG") )
VehicleCheat(true, MI_SABRETUR);
// "GETTHEREVERYFASTINDEED"
if ( !_CHEATCMP("DEEDNITSAFYREVEREHTTEG") )
VehicleCheat(true, MI_HOTRINA);
// "GETTHEREAMAZINGLYFAST"
if ( !_CHEATCMP("TSAFYLGNIZAMAEREHTTEG") )
VehicleCheat(true, MI_HOTRINB);
// "THELASTRIDE"
if ( !_CHEATCMP("EDIRTSALEHT") )
VehicleCheat(true, MI_ROMERO);
// "ROCKANDROLLCAR"
if ( !_CHEATCMP("RACLLORDNAKCOR") )
VehicleCheat(true, MI_LOVEFIST);
// "RUBBISHCAR"
if ( !_CHEATCMP("RACHSIBBUR") )
VehicleCheat(true, MI_TRASH);
// "BETTERTHANWALKING"
if ( !_CHEATCMP("GNIKLAWNAHTRETTEB") )
VehicleCheat(true, MI_CADDY);
// "BANGBANGBANG" // "BANGBANGBANG"
if ( !_CHEATCMP("GNABGNABGNAB") ) if ( !_CHEATCMP("GNABGNABGNAB") )

View File

@ -176,7 +176,7 @@ public:
static CKeyboardState OldKeyState; static CKeyboardState OldKeyState;
static CKeyboardState NewKeyState; static CKeyboardState NewKeyState;
static CKeyboardState TempKeyState; static CKeyboardState TempKeyState;
static char KeyBoardCheatString[20]; static char KeyBoardCheatString[30];
static CMouseControllerState OldMouseControllerState; static CMouseControllerState OldMouseControllerState;
static CMouseControllerState NewMouseControllerState; static CMouseControllerState NewMouseControllerState;
static CMouseControllerState PCTempMouseControllerState; static CMouseControllerState PCTempMouseControllerState;

View File

@ -264,7 +264,7 @@ int LineRadarBoxCollision(CVector2D &out, const CVector2D &p1, const CVector2D &
uint8 CRadar::CalculateBlipAlpha(float dist) uint8 CRadar::CalculateBlipAlpha(float dist)
{ {
#ifdef MENU_MAP #ifdef MENU_MAP
if (CMenuManager::bMenuMapActive) if (FrontEndMenuManager.m_bMenuMapActive)
return 255; return 255;
#endif #endif
if (dist <= 1.0f) if (dist <= 1.0f)
@ -431,7 +431,7 @@ void CRadar::Draw3dMarkers()
if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) { if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) {
CVector pos = entity->GetPosition(); CVector pos = entity->GetPosition();
pos.z += 1.2f * CModelInfo::GetModelInfo(entity->GetModelIndex())->GetColModel()->boundingBox.max.z + 2.5f; pos.z += 1.2f * CModelInfo::GetModelInfo(entity->GetModelIndex())->GetColModel()->boundingBox.max.z + 2.5f;
C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 2.5f, 0, 128, 255, 255, 1024, 0.2f, 5); C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 2.5f, CARBLIP_MARKER_COLOR_R, CARBLIP_MARKER_COLOR_G, CARBLIP_MARKER_COLOR_B, CARBLIP_MARKER_COLOR_A, 1024, 0.2f, 5);
} }
break; break;
} }
@ -445,7 +445,7 @@ void CRadar::Draw3dMarkers()
if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) { if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) {
CVector pos = entity->GetPosition(); CVector pos = entity->GetPosition();
pos.z += 3.0f; pos.z += 3.0f;
C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 1.5f, 0, 128, 255, 255, 1024, 0.2f, 5); C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 1.5f, CHARBLIP_MARKER_COLOR_R, CHARBLIP_MARKER_COLOR_G, CHARBLIP_MARKER_COLOR_B, CHARBLIP_MARKER_COLOR_A, 1024, 0.2f, 5);
} }
break; break;
} }
@ -455,7 +455,7 @@ void CRadar::Draw3dMarkers()
if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) { if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) {
CVector pos = entity->GetPosition(); CVector pos = entity->GetPosition();
pos.z += CModelInfo::GetModelInfo(entity->GetModelIndex())->GetColModel()->boundingBox.max.z + 1.0f + 1.0f; pos.z += CModelInfo::GetModelInfo(entity->GetModelIndex())->GetColModel()->boundingBox.max.z + 1.0f + 1.0f;
C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 1.0f, 0, 128, 255, 255, 1024, 0.2f, 5); C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 1.0f, OBJECTBLIP_MARKER_COLOR_R, OBJECTBLIP_MARKER_COLOR_G, OBJECTBLIP_MARKER_COLOR_B, OBJECTBLIP_MARKER_COLOR_A, 1024, 0.2f, 5);
} }
break; break;
} }
@ -464,7 +464,7 @@ void CRadar::Draw3dMarkers()
case BLIP_CONTACT_POINT: case BLIP_CONTACT_POINT:
if (!CTheScripts::IsPlayerOnAMission()) { if (!CTheScripts::IsPlayerOnAMission()) {
if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY)
C3dMarkers::PlaceMarkerSet(i | (ms_RadarTrace[i].m_BlipIndex << 16), 4, ms_RadarTrace[i].m_vecPos, 2.0f, 0, 128, 255, 128, 2048, 0.2f, 0); C3dMarkers::PlaceMarkerSet(i | (ms_RadarTrace[i].m_BlipIndex << 16), 4, ms_RadarTrace[i].m_vecPos, 2.0f, COORDBLIP_MARKER_COLOR_R, COORDBLIP_MARKER_COLOR_G, COORDBLIP_MARKER_COLOR_B, COORDBLIP_MARKER_COLOR_A, 2048, 0.2f, 0);
} }
break; break;
} }
@ -487,7 +487,7 @@ void CRadar::DrawBlips()
TransformRadarPointToScreenSpace(out, in); TransformRadarPointToScreenSpace(out, in);
#ifdef MENU_MAP #ifdef MENU_MAP
if (!CMenuManager::bMenuMapActive) { if (!FrontEndMenuManager.m_bMenuMapActive) {
#endif #endif
float angle; float angle;
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN) if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN)
@ -555,7 +555,7 @@ void CRadar::DrawBlips()
TransformRealWorldPointToRadarSpace(in, blipEntity->GetPosition()); TransformRealWorldPointToRadarSpace(in, blipEntity->GetPosition());
float dist = LimitRadarPoint(in); float dist = LimitRadarPoint(in);
TransformRadarPointToScreenSpace(out, 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) { if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE) {
DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist)); 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); TransformRealWorldPointToRadarSpace(in, ms_RadarTrace[blipId].m_vec2DPos);
float dist = LimitRadarPoint(in); float dist = LimitRadarPoint(in);
TransformRadarPointToScreenSpace(out, 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) { if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE) {
DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist)); DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
} }
@ -666,7 +666,7 @@ void CRadar::DrawBlips()
TransformRealWorldPointToRadarSpace(in, blipEntity->GetPosition()); TransformRealWorldPointToRadarSpace(in, blipEntity->GetPosition());
float dist = LimitRadarPoint(in); float dist = LimitRadarPoint(in);
TransformRadarPointToScreenSpace(out, 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) if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE)
DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist)); DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
else else
@ -717,7 +717,7 @@ void CRadar::DrawBlips()
TransformRealWorldPointToRadarSpace(in, ms_RadarTrace[blipId].m_vec2DPos); TransformRealWorldPointToRadarSpace(in, ms_RadarTrace[blipId].m_vec2DPos);
float dist = LimitRadarPoint(in); float dist = LimitRadarPoint(in);
TransformRadarPointToScreenSpace(out, 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) if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE)
DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist)); DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
else else
@ -744,7 +744,7 @@ void CRadar::DrawBlips()
} }
} }
#ifdef MENU_MAP #ifdef MENU_MAP
if (CMenuManager::bMenuMapActive) { if (FrontEndMenuManager.m_bMenuMapActive) {
CVector2D in, out; CVector2D in, out;
TransformRealWorldPointToRadarSpace(in, FindPlayerCentreOfWorld_NoSniperShift()); TransformRealWorldPointToRadarSpace(in, FindPlayerCentreOfWorld_NoSniperShift());
TransformRadarPointToScreenSpace(out, in); 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)); 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 #ifdef MENU_MAP
if (CMenuManager::bMenuMapActive) { if (FrontEndMenuManager.m_bMenuMapActive) {
bool alreadyThere = false; bool alreadyThere = false;
for (int i = 0; i < NUM_MAP_LEGENDS; i++) { for (int i = 0; i < NUM_MAP_LEGENDS; i++) {
if (MapLegendList[i] == sprite) if (MapLegendList[i] == sprite)
@ -1047,7 +1047,7 @@ float CRadar::LimitRadarPoint(CVector2D &point)
dist = point.Magnitude(); dist = point.Magnitude();
#ifdef MENU_MAP #ifdef MENU_MAP
if (CMenuManager::bMenuMapActive) if (FrontEndMenuManager.m_bMenuMapActive)
return dist; return dist;
#endif #endif
if (dist > 1.0f) { if (dist > 1.0f) {
@ -1278,7 +1278,7 @@ void CRadar::ShowRadarTraceWithHeight(float x, float y, uint32 size, uint8 red,
} }
#ifdef MENU_MAP #ifdef MENU_MAP
// VC uses -1 for coords and -2 for entities but meh, I don't want to edit DrawBlips // 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; bool alreadyThere = false;
for (int i = 0; i < NUM_MAP_LEGENDS; i++) { for (int i = 0; i < NUM_MAP_LEGENDS; i++) {
if (MapLegendList[i] == -1) if (MapLegendList[i] == -1)
@ -1403,9 +1403,9 @@ void CRadar::TransformRadarPointToRealWorldSpace(CVector2D &out, const CVector2D
void CRadar::TransformRadarPointToScreenSpace(CVector2D &out, const CVector2D &in) void CRadar::TransformRadarPointToScreenSpace(CVector2D &out, const CVector2D &in)
{ {
#ifdef MENU_MAP #ifdef MENU_MAP
if (CMenuManager::bMenuMapActive) { if (FrontEndMenuManager.m_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.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 = (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; 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 } else
#endif #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 if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN || TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOP_DOWN_PED
#ifdef MENU_MAP #ifdef MENU_MAP
|| CMenuManager::bMenuMapActive || FrontEndMenuManager.m_bMenuMapActive
#endif #endif
) { ) {
cachedSin = 0.0f; cachedSin = 0.0f;

View File

@ -1,6 +1,26 @@
#pragma once #pragma once
#include "Sprite2d.h" #include "Sprite2d.h"
#define CARBLIP_MARKER_COLOR_R 252
#define CARBLIP_MARKER_COLOR_G 138
#define CARBLIP_MARKER_COLOR_B 242
#define CARBLIP_MARKER_COLOR_A 255
#define CHARBLIP_MARKER_COLOR_R 252
#define CHARBLIP_MARKER_COLOR_G 138
#define CHARBLIP_MARKER_COLOR_B 242
#define CHARBLIP_MARKER_COLOR_A 255
#define OBJECTBLIP_MARKER_COLOR_R 252
#define OBJECTBLIP_MARKER_COLOR_G 138
#define OBJECTBLIP_MARKER_COLOR_B 242
#define OBJECTBLIP_MARKER_COLOR_A 255
#define COORDBLIP_MARKER_COLOR_R 252
#define COORDBLIP_MARKER_COLOR_G 138
#define COORDBLIP_MARKER_COLOR_B 242
#define COORDBLIP_MARKER_COLOR_A 255
#define MENU_MAP_LENGTH_UNIT 1190.0f // in game unit #define MENU_MAP_LENGTH_UNIT 1190.0f // in game unit
#define MENU_MAP_WIDTH_SCALE 1.112f // in game unit (originally 1.112494151260504f) #define MENU_MAP_WIDTH_SCALE 1.112f // in game unit (originally 1.112494151260504f)
#define MENU_MAP_HEIGHT_SCALE 1.119f // in game unit (originally 1.118714268907563f) #define MENU_MAP_HEIGHT_SCALE 1.119f // in game unit (originally 1.118714268907563f)

View File

@ -204,6 +204,9 @@ enum Config {
#else #else
#define AUDIO_OAL #define AUDIO_OAL
#endif #endif
#ifdef DEBUGMENU
#define RELOADABLES // some debug menu options to reload TXD files
#endif
// Particle // Particle
//#define PC_PARTICLE //#define PC_PARTICLE
@ -222,7 +225,6 @@ enum Config {
// Hud, frontend and radar // Hud, frontend and radar
#define ASPECT_RATIO_SCALE // Not just makes everything scale with aspect ratio, also adds support for all aspect ratios #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 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 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 MENU_MAP // VC-like menu map. Make sure you have new menu.txd
#define SCROLLABLE_STATS_PAGE // only draggable by mouse atm #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); CSprite2d *splash = LoadSplash(nil);
CRGBA fadeColor; CRGBA fadeColor;
CRect rect; CRect rect;
int fadeValue = CDraw::FadeValue; int fadeValue = CDraw::FadeValue;
float brightness = Min(CMenuManager::m_PrefsBrightness, 256); float brightness = Min(FrontEndMenuManager.m_PrefsBrightness, 256);
if(brightness <= 50) if(brightness <= 50)
brightness = 50; brightness = 50;
if(FrontEndMenuManager.m_bMenuActive) if(FrontEndMenuManager.m_bMenuActive)
@ -689,11 +689,13 @@ DisplayGameDebugText()
{ {
static bool bDisplayPosn = false; static bool bDisplayPosn = false;
static bool bDisplayRate = false; static bool bDisplayRate = false;
static bool bDisplayCheatStr = false;
{ {
SETTWEAKPATH("GameDebugText"); SETTWEAKPATH("GameDebugText");
TWEAKBOOL(bDisplayPosn); TWEAKBOOL(bDisplayPosn);
TWEAKBOOL(bDisplayRate); TWEAKBOOL(bDisplayRate);
TWEAKBOOL(bDisplayCheatStr);
} }
@ -781,6 +783,26 @@ DisplayGameDebugText()
CFont::SetColor(CRGBA(255, 108, 0, 255)); CFont::SetColor(CRGBA(255, 108, 0, 255));
CFont::PrintString(40.0f, 40.0f, ustr); CFont::PrintString(40.0f, 40.0f, ustr);
} }
if (bDisplayCheatStr)
{
sprintf(str, "%s", CPad::KeyBoardCheatString);
AsciiToUnicode(str, ustr);
CFont::SetPropOff();
CFont::SetBackgroundOff();
CFont::SetScale(0.7f, 1.5f);
CFont::SetCentreOn();
CFont::SetBackGroundOnlyTextOff();
CFont::SetWrapx(640.0f);
CFont::SetFontStyle(FONT_HEADING);
CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.5f)+2.f, SCREEN_SCALE_FROM_BOTTOM(20.0f)+2.f, ustr);
CFont::SetColor(CRGBA(255, 150, 225, 255));
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.5f), SCREEN_SCALE_FROM_BOTTOM(20.0f), ustr);
}
} }
#endif #endif
@ -944,35 +966,6 @@ Idle(void *arg)
CSprite2d::InitPerFrame(); CSprite2d::InitPerFrame();
CFont::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(); CPointLights::InitPerFrame();
#ifdef TIMEBARS #ifdef TIMEBARS
tbStartTimer(0, "CGame::Process"); tbStartTimer(0, "CGame::Process");
@ -987,7 +980,6 @@ Idle(void *arg)
#ifdef TIMEBARS #ifdef TIMEBARS
tbEndTimer("DMAudio.Service"); tbEndTimer("DMAudio.Service");
#endif
#endif #endif
if(CGame::bDemoMode && CTimer::GetTimeInMilliseconds() > (3*60 + 30)*1000 && !CCutsceneMgr::IsCutsceneProcessing()){ if(CGame::bDemoMode && CTimer::GetTimeInMilliseconds() > (3*60 + 30)*1000 && !CCutsceneMgr::IsCutsceneProcessing()){
@ -1004,17 +996,16 @@ Idle(void *arg)
if(arg == nil) if(arg == nil)
return; 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) TheCamera.GetScreenFadeStatus() != FADE_2)
{ {
#ifdef GTA_PC #ifdef GTA_PC
if (!FrontEndMenuManager.m_bRenderGameInMenu) {
// This is from SA, but it's nice for windowed mode // This is from SA, but it's nice for windowed mode
RwV2d pos; RwV2d pos;
pos.x = SCREEN_WIDTH / 2.0f; pos.x = SCREEN_WIDTH / 2.0f;
pos.y = SCREEN_HEIGHT / 2.0f; pos.y = SCREEN_HEIGHT / 2.0f;
RsMouseSetPos(&pos); RsMouseSetPos(&pos);
}
#endif #endif
#ifdef TIMEBARS #ifdef TIMEBARS
tbStartTimer(0, "CnstrRenderList"); tbStartTimer(0, "CnstrRenderList");
@ -1082,10 +1073,6 @@ Idle(void *arg)
return; return;
} }
#ifdef PS2_SAVE_DIALOG
if (FrontEndMenuManager.m_bMenuActive)
DefinedState();
#endif
#ifdef TIMEBARS #ifdef TIMEBARS
tbStartTimer(0, "RenderMenus"); tbStartTimer(0, "RenderMenus");
#endif #endif
@ -1217,11 +1204,7 @@ AppEventHandler(RsEvent event, void *param)
case rsFRONTENDIDLE: case rsFRONTENDIDLE:
{ {
#ifdef PS2_SAVE_DIALOG
Idle((void*)1);
#else
FrontendIdle(); FrontendIdle();
#endif
return rsEVENTPROCESSED; return rsEVENTPROCESSED;
} }
@ -1307,9 +1290,9 @@ void TheGame(void)
strcpy(TheMemoryCard.LoadFileName, TheMemoryCard.field37); strcpy(TheMemoryCard.LoadFileName, TheMemoryCard.field37);
TheMemoryCard.b_FoundRecentSavedGameWantToLoad = true; 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.Unload();
TheText.Load(); TheText.Load();
} }
@ -1383,7 +1366,8 @@ void TheGame(void)
gMainHeap.PushMemId(_TODOCONST(15)); gMainHeap.PushMemId(_TODOCONST(15));
#endif #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 #ifdef GTA_PS2
gMainHeap.PushMemId(_TODOCONST(11)); gMainHeap.PushMemId(_TODOCONST(11));
@ -1590,30 +1574,30 @@ void SystemInit()
CGame::frenchGame = false; CGame::frenchGame = false;
CGame::germanGame = false; CGame::germanGame = false;
CGame::nastyGame = true; CGame::nastyGame = true;
CMenuManager::m_PrefsAllowNastyGame = true; FrontEndMenuManager.m_PrefsAllowNastyGame = true;
#ifdef GTA_PS2 #ifdef GTA_PS2
int32 lang = sceScfGetLanguage(); int32 lang = sceScfGetLanguage();
if ( lang == SCE_ITALIAN_LANGUAGE ) if ( lang == SCE_ITALIAN_LANGUAGE )
CMenuManager::m_PrefsLanguage = LANGUAGE_ITALIAN; FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_ITALIAN;
else if ( lang == SCE_SPANISH_LANGUAGE ) else if ( lang == SCE_SPANISH_LANGUAGE )
CMenuManager::m_PrefsLanguage = LANGUAGE_SPANISH; FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_SPANISH;
else if ( lang == SCE_GERMAN_LANGUAGE ) else if ( lang == SCE_GERMAN_LANGUAGE )
{ {
CGame::germanGame = true; CGame::germanGame = true;
CGame::nastyGame = false; CGame::nastyGame = false;
CMenuManager::m_PrefsAllowNastyGame = false; FrontEndMenuManager.m_PrefsAllowNastyGame = false;
CMenuManager::m_PrefsLanguage = LANGUAGE_GERMAN; FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_GERMAN;
} }
else if ( lang == SCE_FRENCH_LANGUAGE ) else if ( lang == SCE_FRENCH_LANGUAGE )
{ {
CGame::frenchGame = true; CGame::frenchGame = true;
CGame::nastyGame = false; CGame::nastyGame = false;
CMenuManager::m_PrefsAllowNastyGame = false; FrontEndMenuManager.m_PrefsAllowNastyGame = false;
CMenuManager::m_PrefsLanguage = LANGUAGE_FRENCH; FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_FRENCH;
} }
else else
CMenuManager::m_PrefsLanguage = LANGUAGE_AMERICAN; FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_AMERICAN;
FrontEndMenuManager.InitialiseMenuContentsAfterLoadingGame(); FrontEndMenuManager.InitialiseMenuContentsAfterLoadingGame();
#else #else

View File

@ -69,7 +69,7 @@ mysrand(unsigned int seed)
#ifdef DEBUGMENU #ifdef DEBUGMENU
void WeaponCheat(); void WeaponCheat();
void HealthCheat(); void HealthCheat();
void TankCheat(); void VehicleCheat(bool something, int model);
void BlowUpCarsCheat(); void BlowUpCarsCheat();
void ChangePlayerCheat(); void ChangePlayerCheat();
void MayhemCheat(); void MayhemCheat();
@ -293,7 +293,7 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Cheats", "Health", HealthCheat); DebugMenuAddCmd("Cheats", "Health", HealthCheat);
DebugMenuAddCmd("Cheats", "Wanted level up", WantedLevelUpCheat); DebugMenuAddCmd("Cheats", "Wanted level up", WantedLevelUpCheat);
DebugMenuAddCmd("Cheats", "Wanted level down", WantedLevelDownCheat); DebugMenuAddCmd("Cheats", "Wanted level down", WantedLevelDownCheat);
DebugMenuAddCmd("Cheats", "Tank", TankCheat); DebugMenuAddCmd("Cheats", "Tank", []() { VehicleCheat(true, MI_TAXI); });
DebugMenuAddCmd("Cheats", "Blow up cars", BlowUpCarsCheat); DebugMenuAddCmd("Cheats", "Blow up cars", BlowUpCarsCheat);
DebugMenuAddCmd("Cheats", "Change player", ChangePlayerCheat); DebugMenuAddCmd("Cheats", "Change player", ChangePlayerCheat);
DebugMenuAddCmd("Cheats", "Mayhem", MayhemCheat); DebugMenuAddCmd("Cheats", "Mayhem", MayhemCheat);
@ -385,6 +385,13 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start); DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop); DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);
#ifdef RELOADABLES
DebugMenuAddCmd("Reload", "HUD.TXD", CHud::ReloadTXD);
DebugMenuAddCmd("Reload", "FONTS.TXD", NULL);
DebugMenuAddCmd("Reload", "FRONTEN1.TXD", NULL);
DebugMenuAddCmd("Reload", "FRONTEN2.TXD", NULL);
#endif
extern bool PrintDebugCode; extern bool PrintDebugCode;
extern int16 DebugCamMode; extern int16 DebugCamMode;
DebugMenuAddVarBool8("Cam", "Use mouse Cam", &CCamera::m_bUseMouse3rdPerson, nil); DebugMenuAddVarBool8("Cam", "Use mouse Cam", &CCamera::m_bUseMouse3rdPerson, nil);

View File

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

View File

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

View File

@ -38,7 +38,7 @@ CRGBA COUNTER_COLOR(97, 194, 247, 255);
CRGBA PAGER_COLOR(32, 162, 66, 205); CRGBA PAGER_COLOR(32, 162, 66, 205);
CRGBA RADARDISC_COLOR(255, 255, 255, 255); CRGBA RADARDISC_COLOR(255, 255, 255, 255);
CRGBA BIGMESSAGE_COLOR(85, 119, 133, 255); CRGBA BIGMESSAGE_COLOR(85, 119, 133, 255);
CRGBA WASTEDBUSTED_COLOR(170, 123, 87, 255); CRGBA WASTEDBUSTED_COLOR(255, 150, 225, 255);
CRGBA ODDJOB_COLOR(89, 115, 150, 255); CRGBA ODDJOB_COLOR(89, 115, 150, 255);
CRGBA ODDJOB2_COLOR(156, 91, 40, 255); CRGBA ODDJOB2_COLOR(156, 91, 40, 255);
CRGBA MISSIONTITLE_COLOR(220, 172, 2, 255); CRGBA MISSIONTITLE_COLOR(220, 172, 2, 255);
@ -102,6 +102,7 @@ uint32 CHud::m_WeaponState;
uint32 CHud::m_WeaponTimer; uint32 CHud::m_WeaponTimer;
uint32 CHud::m_LastDisplayScore; uint32 CHud::m_LastDisplayScore;
uint32 CHud::m_LastWanted;
CSprite2d CHud::Sprites[NUM_HUD_SPRITES]; CSprite2d CHud::Sprites[NUM_HUD_SPRITES];
@ -483,6 +484,14 @@ void CHud::Draw()
/* /*
DrawWantedLevel DrawWantedLevel
*/ */
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;
}
if (m_WantedState != FADED_OUT) {
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y)); CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y));
CFont::SetJustifyOff(); CFont::SetJustifyOff();
@ -491,6 +500,7 @@ void CHud::Draw()
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetFontStyle(FONT_HEADING); CFont::SetFontStyle(FONT_HEADING);
CFont::SetDropShadowPosition(2); // TODO(Miami): Remove that, VC keeps that open above 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); AsciiToUnicode("]", sPrintIcon);
@ -499,17 +509,21 @@ void CHud::Draw()
&& (CTimer::GetTimeInMilliseconds() > playerPed->m_pWanted->m_nLastWantedLevelChange && (CTimer::GetTimeInMilliseconds() > playerPed->m_pWanted->m_nLastWantedLevelChange
+ 2000 || CTimer::GetFrameCounter() & 4)) { + 2000 || CTimer::GetFrameCounter() & 4)) {
WANTED_COLOR.a = alpha;
CFont::SetColor(WANTED_COLOR); CFont::SetColor(WANTED_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon); 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 // TODO(Miami): There is one more condition in here
}else if (playerPed->m_pWanted->m_nWantedLevel <= i) { }
else if (playerPed->m_pWanted->m_nWantedLevel <= i) {
NOTWANTED_COLOR.a = alpha;
CFont::SetColor(NOTWANTED_COLOR); CFont::SetColor(NOTWANTED_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon); 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 CFont::SetDropShadowPosition(0); // TODO(Miami): Remove that, VC keeps that open
}
/* /*
DrawZoneName DrawZoneName
@ -909,7 +923,17 @@ void CHud::Draw()
#else #else
rect.Translate(RADAR_LEFT, SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT)); rect.Translate(RADAR_LEFT, SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
#endif #endif
rect.Grow(4.0f);
// shadow, might not be exactly accurate numbers
rect.Translate(0.f, 4.f);
rect.Grow(6.0f);
rect.top += 2.f;
rect.bottom -= 2.f;
Sprites[HUD_RADARDISC].Draw(rect, CRGBA(0, 0, 0, 255));
rect.Translate(0.f, -4.f);
rect.top -= 2.f;
rect.bottom += 2.f;
Sprites[HUD_RADARDISC].Draw(rect, RADARDISC_COLOR); Sprites[HUD_RADARDISC].Draw(rect, RADARDISC_COLOR);
CRadar::DrawBlips(); CRadar::DrawBlips();
} }
@ -1466,6 +1490,30 @@ void CHud::GetRidOfAllHudMessages()
} }
} }
#ifdef RELOADABLES
void CHud::ReloadTXD()
{
for (int i = 0; i < NUM_HUD_SPRITES; ++i) {
Sprites[i].Delete();
}
int HudTXD = CTxdStore::FindTxdSlot("hud");
CTxdStore::RemoveTxdSlot(HudTXD);
debug("Reloading HUD.TXD...\n");
HudTXD = CTxdStore::AddTxdSlot("hud");
CTxdStore::LoadTxd(HudTXD, "MODELS/HUD.TXD");
CTxdStore::AddRef(HudTXD);
CTxdStore::PopCurrentTxd();
CTxdStore::SetCurrentTxd(HudTXD);
for (int i = 0; i < NUM_HUD_SPRITES; i++) {
Sprites[i].SetTexture(WeaponFilenames[i].name, WeaponFilenames[i].mask);
}
}
#endif
void CHud::Initialise() void CHud::Initialise()
{ {
m_Wants_To_Draw_Hud = true; m_Wants_To_Draw_Hud = true;
@ -1503,20 +1551,28 @@ void CHud::Initialise()
PagerSoundPlayed = 0; PagerSoundPlayed = 0;
PagerXOffset = 150.0f; 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_WantedState = FADE_DISABLED;
m_DisplayScoreState = FADE_DISABLED;
m_WeaponState = FADE_DISABLED;
#endif
m_WantedFadeTimer = 0;
m_WantedTimer = 0; m_WantedTimer = 0;
m_EnergyLostFadeTimer = 0; m_EnergyLostFadeTimer = 0;
m_EnergyLostState = FADE_DISABLED;
m_EnergyLostTimer = 0; m_EnergyLostTimer = 0;
m_DisplayScoreFadeTimer = 0; m_DisplayScoreFadeTimer = 0;
m_DisplayScoreState = FADE_DISABLED;
m_DisplayScoreTimer = 0; m_DisplayScoreTimer = 0;
m_WeaponFadeTimer = 0; m_WeaponFadeTimer = 0;
m_WeaponState = FADE_DISABLED;
m_WeaponTimer = 0; m_WeaponTimer = 0;
m_LastDisplayScore = CWorld::Players[CWorld::PlayerInFocus].m_nVisibleMoney; m_LastDisplayScore = CWorld::Players[CWorld::PlayerInFocus].m_nVisibleMoney;
m_LastWanted = 0;
CTxdStore::PopCurrentTxd(); CTxdStore::PopCurrentTxd();
} }
@ -1542,20 +1598,28 @@ void CHud::ReInitialise() {
PagerSoundPlayed = 0; PagerSoundPlayed = 0;
PagerXOffset = 150.0f; 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_WantedState = FADE_DISABLED;
m_DisplayScoreState = FADE_DISABLED;
m_WeaponState = FADE_DISABLED;
#endif
m_WantedFadeTimer = 0;
m_WantedTimer = 0; m_WantedTimer = 0;
m_EnergyLostFadeTimer = 0; m_EnergyLostFadeTimer = 0;
m_EnergyLostState = FADE_DISABLED;
m_EnergyLostTimer = 0; m_EnergyLostTimer = 0;
m_DisplayScoreFadeTimer = 0; m_DisplayScoreFadeTimer = 0;
m_DisplayScoreState = FADE_DISABLED;
m_DisplayScoreTimer = 0; m_DisplayScoreTimer = 0;
m_WeaponFadeTimer = 0; m_WeaponFadeTimer = 0;
m_WeaponState = FADE_DISABLED;
m_WeaponTimer = 0; m_WeaponTimer = 0;
m_LastDisplayScore = CWorld::Players[CWorld::PlayerInFocus].m_nVisibleMoney; m_LastDisplayScore = CWorld::Players[CWorld::PlayerInFocus].m_nVisibleMoney;
m_LastWanted = 0;
} }
wchar LastBigMessage[6][128]; wchar LastBigMessage[6][128];

View File

@ -119,11 +119,15 @@ public:
static uint32 m_WeaponTimer; static uint32 m_WeaponTimer;
static uint32 m_LastDisplayScore; static uint32 m_LastDisplayScore;
static uint32 m_LastWanted;
public: public:
static void Draw(); static void Draw();
static void DrawAfterFade(); static void DrawAfterFade();
static void GetRidOfAllHudMessages(); static void GetRidOfAllHudMessages();
#ifdef RELOADABLES
static void ReloadTXD();
#endif
static void Initialise(); static void Initialise();
static void ReInitialise(); static void ReInitialise();
static void SetBigMessage(wchar *message, int16 style); static void SetBigMessage(wchar *message, int16 style);

View File

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

View File

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

View File

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

View File

@ -221,7 +221,7 @@ psCameraBeginUpdate(RwCamera *camera)
void void
psCameraShowRaster(RwCamera *camera) psCameraShowRaster(RwCamera *camera)
{ {
if (CMenuManager::m_PrefsVsync) if (FrontEndMenuManager.m_PrefsVsync)
RwCameraShowRaster(camera, PSGLOBAL(window), rwRASTERFLIPWAITVSYNC); RwCameraShowRaster(camera, PSGLOBAL(window), rwRASTERFLIPWAITVSYNC);
else else
RwCameraShowRaster(camera, PSGLOBAL(window), rwRASTERFLIPDONTWAIT); RwCameraShowRaster(camera, PSGLOBAL(window), rwRASTERFLIPDONTWAIT);
@ -1222,6 +1222,16 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
break; break;
} }
#ifdef FIX_BUGS // game turns on menu when focus is re-gained rather than lost
case WM_KILLFOCUS:
#else
case WM_SETFOCUS:
#endif
{
CGame::InitAfterFocusLoss();
break;
}
} }
/* /*
@ -1654,7 +1664,7 @@ void InitialiseLanguage()
|| primLayout == LANG_GERMAN ) || primLayout == LANG_GERMAN )
{ {
CGame::nastyGame = false; CGame::nastyGame = false;
CMenuManager::m_PrefsAllowNastyGame = false; FrontEndMenuManager.m_PrefsAllowNastyGame = false;
CGame::germanGame = true; CGame::germanGame = true;
} }
@ -1663,7 +1673,7 @@ void InitialiseLanguage()
|| primLayout == LANG_FRENCH ) || primLayout == LANG_FRENCH )
{ {
CGame::nastyGame = false; CGame::nastyGame = false;
CMenuManager::m_PrefsAllowNastyGame = false; FrontEndMenuManager.m_PrefsAllowNastyGame = false;
CGame::frenchGame = true; CGame::frenchGame = true;
} }
@ -1674,7 +1684,7 @@ void InitialiseLanguage()
#ifdef NASTY_GAME #ifdef NASTY_GAME
CGame::nastyGame = true; CGame::nastyGame = true;
CMenuManager::m_PrefsAllowNastyGame = true; FrontEndMenuManager.m_PrefsAllowNastyGame = true;
CGame::noProstitutes = false; CGame::noProstitutes = false;
#endif #endif
@ -1709,33 +1719,33 @@ void InitialiseLanguage()
} }
} }
CMenuManager::OS_Language = primUserLCID; FrontEndMenuManager.OS_Language = primUserLCID;
switch ( lang ) switch ( lang )
{ {
case LANG_GERMAN: case LANG_GERMAN:
{ {
CMenuManager::m_PrefsLanguage = LANGUAGE_GERMAN; FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_GERMAN;
break; break;
} }
case LANG_SPANISH: case LANG_SPANISH:
{ {
CMenuManager::m_PrefsLanguage = LANGUAGE_SPANISH; FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_SPANISH;
break; break;
} }
case LANG_FRENCH: case LANG_FRENCH:
{ {
CMenuManager::m_PrefsLanguage = LANGUAGE_FRENCH; FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_FRENCH;
break; break;
} }
case LANG_ITALIAN: case LANG_ITALIAN:
{ {
CMenuManager::m_PrefsLanguage = LANGUAGE_ITALIAN; FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_ITALIAN;
break; break;
} }
default: default:
{ {
CMenuManager::m_PrefsLanguage = LANGUAGE_AMERICAN; FrontEndMenuManager.m_PrefsLanguage = LANGUAGE_AMERICAN;
break; break;
} }
} }
@ -2128,7 +2138,7 @@ WinMain(HINSTANCE instance,
CoUninitialize(); 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"); PlayMovieInWindow(cmdShow, "movies\\GTAtitlesGER.mpg");
else else
PlayMovieInWindow(cmdShow, "movies\\GTAtitles.mpg"); PlayMovieInWindow(cmdShow, "movies\\GTAtitles.mpg");
@ -2179,7 +2189,7 @@ WinMain(HINSTANCE instance,
FrontEndMenuManager.m_bGameNotLoaded = true; FrontEndMenuManager.m_bGameNotLoaded = true;
CMenuManager::m_bStartUpFrontEndRequested = true; FrontEndMenuManager.m_bStartUpFrontEndRequested = true;
if ( defaultFullscreenRes ) if ( defaultFullscreenRes )
{ {
@ -2230,7 +2240,7 @@ WinMain(HINSTANCE instance,
float ms = (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond(); float ms = (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond();
if ( RwInitialised ) 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); RsEventHandler(rsIDLE, (void *)TRUE);
} }
break; break;
@ -2241,7 +2251,7 @@ WinMain(HINSTANCE instance,
float ms = (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond(); float ms = (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond();
if (RwInitialised) 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); RsEventHandler(rsANIMVIEWER, (void*)TRUE);
} }
break; break;

View File

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