mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-05 17:54:09 +00:00
Merge remote-tracking branch 'upstream/miami' into miami
This commit is contained in:
commit
6e51ed3c53
25 changed files with 992 additions and 1335 deletions
|
@ -29,7 +29,7 @@ bool PrintDebugCode = false;
|
|||
int16 DebugCamMode;
|
||||
|
||||
#ifdef FREE_CAM
|
||||
bool CCamera::bFreeCam = true;
|
||||
bool CCamera::bFreeCam;
|
||||
int nPreviousMode = -1;
|
||||
#endif
|
||||
|
||||
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
@ -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,
|
||||
|
@ -380,7 +328,10 @@ enum eMenuAction
|
|||
MENUACTION_LANG_JAP,
|
||||
#endif
|
||||
#ifdef IMPROVED_VIDEOMODE
|
||||
MENUACTION_SCREENMODE
|
||||
MENUACTION_SCREENMODE,
|
||||
#endif
|
||||
#ifdef FREE_CAM
|
||||
MENUACTION_FREECAM
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -480,70 +431,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 +597,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 +668,7 @@ public:
|
|||
};
|
||||
|
||||
#ifndef IMPROVED_VIDEOMODE
|
||||
VALIDATE_SIZE(CMenuManager, 0x564);
|
||||
VALIDATE_SIZE(CMenuManager, 0x688);
|
||||
#endif
|
||||
|
||||
extern CMenuManager FrontEndMenuManager;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
CGame::CanSeeOutSideFromCurrArea(void)
|
||||
{
|
||||
|
|
|
@ -59,6 +59,8 @@ public:
|
|||
static void InitialiseWhenRestarting(void);
|
||||
static void Process(void);
|
||||
|
||||
static void InitAfterFocusLoss(void);
|
||||
|
||||
static bool IsInInterior(void) { return currArea != AREA_MAIN_MAP; }
|
||||
static bool CanSeeOutSideFromCurrArea(void);
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
@ -284,6 +276,9 @@ const CMenuScreen aScreens[] = {
|
|||
// MENUPAGE_CONTROLLER_PC = 35
|
||||
{ "FET_CTL", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 0, 0,
|
||||
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_AMS", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS,
|
||||
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
|
||||
|
|
|
@ -49,7 +49,7 @@ CKeyboardState CPad::OldKeyState;
|
|||
CKeyboardState CPad::NewKeyState;
|
||||
CKeyboardState CPad::TempKeyState;
|
||||
|
||||
char CPad::KeyBoardCheatString[20];
|
||||
char CPad::KeyBoardCheatString[30];
|
||||
|
||||
CMouseControllerState CPad::OldMouseControllerState;
|
||||
CMouseControllerState CPad::NewMouseControllerState;
|
||||
|
@ -108,31 +108,31 @@ void HealthCheat()
|
|||
}
|
||||
}
|
||||
|
||||
void TankCheat()
|
||||
void VehicleCheat(bool something, int model)
|
||||
{
|
||||
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
|
||||
CStreaming::RequestModel(MI_RHINO, 0);
|
||||
CStreaming::LoadAllRequestedModels(false);
|
||||
if (CStreaming::ms_aInfoForModel[MI_RHINO].m_loadState == STREAMSTATE_LOADED) {
|
||||
CStreaming::RequestModel(model, 0);
|
||||
CStreaming::LoadAllRequestedModels(something);
|
||||
if (CStreaming::ms_aInfoForModel[model].m_loadState == STREAMSTATE_LOADED) {
|
||||
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
|
||||
int32 node = ThePaths.FindNodeClosestToCoors(FindPlayerCoors(), PATH_CAR, 100.0f);
|
||||
|
||||
if (node < 0) return;
|
||||
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
CAutomobile* tank = new CAutomobile(MI_RHINO, RANDOM_VEHICLE);
|
||||
CAutomobile* vehicle = new CAutomobile(model, RANDOM_VEHICLE);
|
||||
#else
|
||||
CAutomobile *tank = new CAutomobile(MI_RHINO, MISSION_VEHICLE);
|
||||
CAutomobile* vehicle = new CAutomobile(MI_RHINO, MISSION_VEHICLE);
|
||||
#endif
|
||||
if (tank != nil) {
|
||||
if (vehicle != nil) {
|
||||
CVector pos = ThePaths.m_pathNodes[node].GetPosition();
|
||||
pos.z += 4.0f;
|
||||
tank->SetPosition(pos);
|
||||
tank->SetOrientation(0.0f, 0.0f, DEGTORAD(200.0f));
|
||||
vehicle->SetPosition(pos);
|
||||
vehicle->SetOrientation(0.0f, 0.0f, DEGTORAD(200.0f));
|
||||
|
||||
tank->SetStatus(STATUS_ABANDONED);
|
||||
tank->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||
CWorld::Add(tank);
|
||||
vehicle->SetStatus(STATUS_ABANDONED);
|
||||
vehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||
CWorld::Add(vehicle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 )
|
||||
|
@ -824,7 +824,7 @@ void CPad::AddToCheatString(char c)
|
|||
|
||||
// "CCCCCC321TCT" - CIRCLE CIRCLE CIRCLE CIRCLE CIRCLE CIRCLE R1 L2 L1 TRIANGLE CIRCLE TRIANGLE
|
||||
else if ( !_CHEATCMP("TCT123CCCCCC") )
|
||||
TankCheat();
|
||||
VehicleCheat(true, MI_RHINO);
|
||||
|
||||
// "CCCSSSSS1TCT" - CIRCLE CIRCLE CIRCLE SQUARE SQUARE SQUARE SQUARE SQUARE L1 TRIANGLE CIRCLE TRIANGLE
|
||||
else if ( !_CHEATCMP("TCT1SSSSSCCC") )
|
||||
|
@ -905,10 +905,46 @@ void CPad::AddToPCCheatString(char c)
|
|||
// "NOPOLICEPLEASE"
|
||||
if ( !_CHEATCMP("ESAELPECILOPON") )
|
||||
WantedLevelDownCheat();
|
||||
|
||||
// "GIVEUSATANK"
|
||||
if ( !_CHEATCMP("KNATASUEVIG") )
|
||||
TankCheat();
|
||||
|
||||
// "PANZER"
|
||||
if ( !_CHEATCMP("REZNAP") )
|
||||
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"
|
||||
if ( !_CHEATCMP("GNABGNABGNAB") )
|
||||
|
|
|
@ -176,7 +176,7 @@ public:
|
|||
static CKeyboardState OldKeyState;
|
||||
static CKeyboardState NewKeyState;
|
||||
static CKeyboardState TempKeyState;
|
||||
static char KeyBoardCheatString[20];
|
||||
static char KeyBoardCheatString[30];
|
||||
static CMouseControllerState OldMouseControllerState;
|
||||
static CMouseControllerState NewMouseControllerState;
|
||||
static CMouseControllerState PCTempMouseControllerState;
|
||||
|
|
|
@ -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)
|
||||
|
@ -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) {
|
||||
CVector pos = entity->GetPosition();
|
||||
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;
|
||||
}
|
||||
|
@ -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) {
|
||||
CVector pos = entity->GetPosition();
|
||||
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;
|
||||
}
|
||||
|
@ -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) {
|
||||
CVector pos = entity->GetPosition();
|
||||
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;
|
||||
}
|
||||
|
@ -464,7 +464,7 @@ void CRadar::Draw3dMarkers()
|
|||
case BLIP_CONTACT_POINT:
|
||||
if (!CTheScripts::IsPlayerOnAMission()) {
|
||||
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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
|
|
@ -1,6 +1,26 @@
|
|||
#pragma once
|
||||
#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_WIDTH_SCALE 1.112f // in game unit (originally 1.112494151260504f)
|
||||
#define MENU_MAP_HEIGHT_SCALE 1.119f // in game unit (originally 1.118714268907563f)
|
||||
|
|
|
@ -204,6 +204,9 @@ enum Config {
|
|||
#else
|
||||
#define AUDIO_OAL
|
||||
#endif
|
||||
#ifdef DEBUGMENU
|
||||
#define RELOADABLES // some debug menu options to reload TXD files
|
||||
#endif
|
||||
|
||||
// Particle
|
||||
//#define PC_PARTICLE
|
||||
|
@ -222,7 +225,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
|
||||
|
|
|
@ -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)
|
||||
|
@ -689,11 +689,13 @@ DisplayGameDebugText()
|
|||
{
|
||||
static bool bDisplayPosn = false;
|
||||
static bool bDisplayRate = false;
|
||||
static bool bDisplayCheatStr = false;
|
||||
|
||||
{
|
||||
SETTWEAKPATH("GameDebugText");
|
||||
TWEAKBOOL(bDisplayPosn);
|
||||
TWEAKBOOL(bDisplayRate);
|
||||
TWEAKBOOL(bDisplayCheatStr);
|
||||
}
|
||||
|
||||
|
||||
|
@ -781,6 +783,26 @@ DisplayGameDebugText()
|
|||
CFont::SetColor(CRGBA(255, 108, 0, 255));
|
||||
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
|
||||
|
||||
|
@ -944,35 +966,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 +980,6 @@ Idle(void *arg)
|
|||
|
||||
#ifdef TIMEBARS
|
||||
tbEndTimer("DMAudio.Service");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if(CGame::bDemoMode && CTimer::GetTimeInMilliseconds() > (3*60 + 30)*1000 && !CCutsceneMgr::IsCutsceneProcessing()){
|
||||
|
@ -1004,17 +996,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 +1073,6 @@ Idle(void *arg)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef PS2_SAVE_DIALOG
|
||||
if (FrontEndMenuManager.m_bMenuActive)
|
||||
DefinedState();
|
||||
#endif
|
||||
#ifdef TIMEBARS
|
||||
tbStartTimer(0, "RenderMenus");
|
||||
#endif
|
||||
|
@ -1217,11 +1204,7 @@ AppEventHandler(RsEvent event, void *param)
|
|||
|
||||
case rsFRONTENDIDLE:
|
||||
{
|
||||
#ifdef PS2_SAVE_DIALOG
|
||||
Idle((void*)1);
|
||||
#else
|
||||
FrontendIdle();
|
||||
#endif
|
||||
|
||||
return rsEVENTPROCESSED;
|
||||
}
|
||||
|
@ -1307,9 +1290,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 +1366,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 +1574,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
|
||||
|
|
|
@ -69,7 +69,7 @@ mysrand(unsigned int seed)
|
|||
#ifdef DEBUGMENU
|
||||
void WeaponCheat();
|
||||
void HealthCheat();
|
||||
void TankCheat();
|
||||
void VehicleCheat(bool something, int model);
|
||||
void BlowUpCarsCheat();
|
||||
void ChangePlayerCheat();
|
||||
void MayhemCheat();
|
||||
|
@ -293,7 +293,7 @@ DebugMenuPopulate(void)
|
|||
DebugMenuAddCmd("Cheats", "Health", HealthCheat);
|
||||
DebugMenuAddCmd("Cheats", "Wanted level up", WantedLevelUpCheat);
|
||||
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", "Change player", ChangePlayerCheat);
|
||||
DebugMenuAddCmd("Cheats", "Mayhem", MayhemCheat);
|
||||
|
@ -385,6 +385,13 @@ DebugMenuPopulate(void)
|
|||
DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
|
||||
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 int16 DebugCamMode;
|
||||
DebugMenuAddVarBool8("Cam", "Use mouse Cam", &CCamera::m_bUseMouse3rdPerson, nil);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue