From d5ce8b1ea3359ad5518e724e32a76ba32be1586b Mon Sep 17 00:00:00 2001 From: withmorten Date: Thu, 14 Jan 2021 23:16:42 +0100 Subject: add the bad crack "features" behind SECUROM define --- src/core/Frontend.cpp | 16 +++++++++++----- src/core/Game.cpp | 13 ++++++++++++- src/core/Radar.cpp | 4 ++++ 3 files changed, 27 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index d14f15d4..98344b6d 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -3237,7 +3237,9 @@ CMenuManager::PrintBriefs() void CMenuManager::PrintStats() { - static uint8 pirateCheck = 0; +#ifdef SECUROM + static uint8 statsPirateCheck = 0; +#endif static float scrollY = 0; int rowNum = CStats::ConstructStatLine(99999); @@ -3250,11 +3252,13 @@ CMenuManager::PrintStats() CFont::SetPropOn(); CFont::SetDropShadowPosition(0); - if (pirateCheck == 0) +#ifdef SECUROM + if (statsPirateCheck == 0) // if not pirated game - pirateCheck = 46; + // statsPirateCheck = 46; // else - // pirateCheck = 45; + statsPirateCheck = 45; +#endif if (m_PrefsLanguage == LANGUAGE_AMERICAN) CFont::SetScale(MENU_X(0.43f), MENU_Y(0.75f)); @@ -3274,8 +3278,10 @@ CMenuManager::PrintStats() lastCheck = CTimer::GetTimeInMillisecondsPauseMode(); } - if (pirateCheck == 45) +#ifdef SECUROM + if (statsPirateCheck == 45) return; +#endif float nextYChange, y, alpha; diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 4cf99465..ece19446 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -121,6 +121,10 @@ bool8 CGame::VarUpdatePlayerCoords; int gameTxdSlot; +#ifdef SECUROM +uint8 gameProcessPirateCheck = 0; +#endif + // --MIAMI: File done bool DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha); @@ -845,7 +849,14 @@ void CGame::Process(void) FrontEndMenuManager.Process(); CTheZones::Update(); - // DRM call in here +#ifdef SECUROM + if (CTimer::GetTimeInMilliseconds() >= (35 * 60 * 1000) && gameProcessPirateCheck == 0){ + // if game not pirated + // gameProcessPirateCheck = 1; + // else + gameProcessPirateCheck = 2; + } +#endif uint32 startTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond(); CStreaming::Update(); uint32 processTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond() - startTime; diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index 8fe900ae..6fbc2280 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -476,6 +476,10 @@ void CRadar::Draw3dMarkers() void CRadar::DrawBlips() { if (!TheCamera.m_WideScreenOn && CHud::m_Wants_To_Draw_Hud) { +#ifdef SECUROM + extern uint8 roadBlocksPirateCheck; + if (roadBlocksPirateCheck == 2) return; +#endif RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); -- cgit v1.2.3 From 913a001375771a0e837e25d148d173abafdf3290 Mon Sep 17 00:00:00 2001 From: aap Date: Sun, 17 Jan 2021 10:00:41 +0100 Subject: vehicle fixes --- src/core/Pad.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index feda19c6..23c2f896 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -151,7 +151,7 @@ void PickUpChicksCheat() if ( FindPlayerVehicle() && (FindPlayerVehicle()->IsCar() || FindPlayerVehicle()->IsBike()) ) { CVehicle *vehicle = FindPlayerVehicle(); - if ( FindPlayerVehicle()->m_vehType == 5 ) + if ( FindPlayerVehicle()->IsBike() ) { if ( vehicle->pPassengers[0] ) vehicle->pPassengers[0]->SetObjective(OBJECTIVE_LEAVE_CAR, vehicle); -- cgit v1.2.3 From df4e22e3d010b3dd70e0f6add5764b7265370a12 Mon Sep 17 00:00:00 2001 From: withmorten Date: Mon, 18 Jan 2021 17:25:31 +0100 Subject: some free cam fixes for controller --- src/core/Cam.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/core') diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp index d8c66279..ed82b68e 100644 --- a/src/core/Cam.cpp +++ b/src/core/Cam.cpp @@ -5062,6 +5062,13 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, float stickX = -(pad->GetCarGunLeftRight()); float stickY = pad->GetCarGunUpDown(); + // In SA this checks for m_bUseMouse3rdPerson so num2 / num8 do not move camera + // when Keyboard & Mouse controls are used. To make it work better with III/VC, check for actual pad state instead + if (!CPad::IsAffectedByController && !isCar) + stickY = 0.0f; + else if (CPad::bInvertLook4Pad) + stickY = -stickY; + if (CCamera::m_bUseMouse3rdPerson) stickY = 0.0f; -- cgit v1.2.3 From 20dabf0b490c79362a5a8d11aadf8bda691c72cc Mon Sep 17 00:00:00 2001 From: withmorten Date: Mon, 18 Jan 2021 17:30:18 +0100 Subject: fix --- src/core/Cam.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/core') diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp index ed82b68e..70d7c899 100644 --- a/src/core/Cam.cpp +++ b/src/core/Cam.cpp @@ -5069,9 +5069,6 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, else if (CPad::bInvertLook4Pad) stickY = -stickY; - if (CCamera::m_bUseMouse3rdPerson) - stickY = 0.0f; - float xMovement = Abs(stickX) * (FOV / 80.0f * 5.f / 70.f) * stickX * 0.007f * 0.007f; float yMovement = Abs(stickY) * (FOV / 80.0f * 3.f / 70.f) * stickY * 0.007f * 0.007f; -- cgit v1.2.3