summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Accident.cpp12
-rw-r--r--src/core/AnimViewer.cpp2
-rw-r--r--src/core/Cam.cpp54
-rw-r--r--src/core/Camera.cpp57
-rw-r--r--src/core/CdStream.cpp23
-rw-r--r--src/core/Clock.cpp13
-rw-r--r--src/core/Collision.cpp69
-rw-r--r--src/core/ControllerConfig.cpp56
-rw-r--r--src/core/Directory.cpp9
-rw-r--r--src/core/EventList.cpp13
-rw-r--r--src/core/FileLoader.cpp42
-rw-r--r--src/core/FileMgr.cpp18
-rw-r--r--src/core/Fire.cpp20
-rw-r--r--src/core/Frontend.cpp20
-rw-r--r--src/core/Game.cpp19
-rw-r--r--src/core/IniFile.cpp2
-rw-r--r--src/core/Pad.cpp120
-rw-r--r--src/core/Placeable.cpp20
-rw-r--r--src/core/PlayerInfo.cpp19
-rw-r--r--src/core/Pools.cpp18
-rw-r--r--src/core/Radar.cpp50
-rw-r--r--src/core/References.cpp8
-rw-r--r--src/core/Stats.cpp10
-rw-r--r--src/core/Streaming.cpp81
-rw-r--r--src/core/SurfaceTable.cpp9
-rw-r--r--src/core/TempColModels.cpp6
-rw-r--r--src/core/Timer.cpp17
-rw-r--r--src/core/User.cpp15
-rw-r--r--src/core/Wanted.cpp24
-rw-r--r--src/core/World.cpp57
-rw-r--r--src/core/World.h26
-rw-r--r--src/core/ZoneCull.cpp16
-rw-r--r--src/core/Zones.cpp35
-rw-r--r--src/core/main.cpp27
-rw-r--r--src/core/re3.cpp44
35 files changed, 66 insertions, 965 deletions
diff --git a/src/core/Accident.cpp b/src/core/Accident.cpp
index 3c39b11d..1fd6c123 100644
--- a/src/core/Accident.cpp
+++ b/src/core/Accident.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "Accident.h"
#include "Ped.h"
@@ -122,13 +122,3 @@ CAccidentManager::UnattendedAccidents()
}
return false;
}
-
-STARTPATCHES
- InjectHook(0x4565A0, &CAccidentManager::GetNextFreeAccident, PATCH_JUMP);
- InjectHook(0x4565D0, &CAccidentManager::ReportAccident, PATCH_JUMP);
- InjectHook(0x456710, &CAccidentManager::Update, PATCH_JUMP);
- InjectHook(0x456760, &CAccidentManager::FindNearestAccident, PATCH_JUMP);
- InjectHook(0x456880, &CAccidentManager::CountActiveAccidents, PATCH_JUMP);
- InjectHook(0x4568A0, &CAccidentManager::WorkToDoForMedics, PATCH_JUMP);
- InjectHook(0x4568D0, &CAccidentManager::UnattendedAccidents, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/AnimViewer.cpp b/src/core/AnimViewer.cpp
index 1086db20..20e94bf4 100644
--- a/src/core/AnimViewer.cpp
+++ b/src/core/AnimViewer.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "Font.h"
#include "Pad.h"
#include "Text.h"
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index 4d954ccd..07dc2051 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "main.h"
#include "Draw.h"
#include "World.h"
@@ -5236,55 +5236,3 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
}
}
#endif
-
-STARTPATCHES
- InjectHook(0x456F40, WellBufferMe, PATCH_JUMP);
- InjectHook(0x458410, &CCam::Init, PATCH_JUMP);
- InjectHook(0x4582F0, &CCam::GetVectorsReadyForRW, PATCH_JUMP);
- InjectHook(0x457710, &CCam::DoAverageOnVector, PATCH_JUMP);
- InjectHook(0x458060, &CCam::GetPedBetaAngleForClearView, PATCH_JUMP);
- InjectHook(0x457210, &CCam::Cam_On_A_String_Unobscured, PATCH_JUMP);
- InjectHook(0x457A80, &CCam::FixCamWhenObscuredByVehicle, PATCH_JUMP);
- InjectHook(0x457B90, &CCam::FixCamIfObscured, PATCH_JUMP);
- InjectHook(0x465DA0, &CCam::RotCamIfInFrontCar, PATCH_JUMP);
- InjectHook(0x4662D0, &CCam::WorkOutCamHeightWeeCar, PATCH_JUMP);
- InjectHook(0x466650, &CCam::WorkOutCamHeight, PATCH_JUMP);
- InjectHook(0x458600, &CCam::LookBehind, PATCH_JUMP);
- InjectHook(0x458C40, &CCam::LookLeft, PATCH_JUMP);
- InjectHook(0x458FB0, &CCam::LookRight, PATCH_JUMP);
- InjectHook(0x4574C0, &CCam::ClipIfPedInFrontOfPlayer, PATCH_JUMP);
- InjectHook(0x459300, &CCam::KeepTrackOfTheSpeed, PATCH_JUMP);
- InjectHook(0x458580, &CCam::IsTargetInWater, PATCH_JUMP);
- InjectHook(0x4570C0, &CCam::AvoidWallsTopDownPed, PATCH_JUMP);
- InjectHook(0x4595B0, &CCam::PrintMode, PATCH_JUMP);
-
- InjectHook(0x467400, &CCam::ProcessSpecialHeightRoutines, PATCH_JUMP);
- InjectHook(0x4596A0, &CCam::Process, PATCH_JUMP);
- InjectHook(0x45E3A0, &CCam::Process_FollowPed, PATCH_JUMP);
- InjectHook(0x45FF70, &CCam::Process_FollowPedWithMouse, PATCH_JUMP);
- InjectHook(0x45BE60, &CCam::Process_BehindCar, PATCH_JUMP);
- InjectHook(0x45C090, &CCam::Process_Cam_On_A_String, PATCH_JUMP);
- InjectHook(0x463EB0, &CCam::Process_TopDown, PATCH_JUMP);
- InjectHook(0x464390, &CCam::Process_TopDownPed, PATCH_JUMP);
- InjectHook(0x461AF0, &CCam::Process_Rocket, PATCH_JUMP);
- InjectHook(0x460E00, &CCam::Process_M16_1stPerson, PATCH_JUMP);
- InjectHook(0x459FA0, &CCam::Process_1stPerson, PATCH_JUMP);
- InjectHook(0x462420, &CCam::Process_Sniper, PATCH_JUMP);
- InjectHook(0x463130, &CCam::Process_Syphon, PATCH_JUMP);
- InjectHook(0x463A70, &CCam::Process_Syphon_Crim_In_Front, PATCH_JUMP);
- InjectHook(0x45B470, &CCam::Process_BehindBoat, PATCH_JUMP);
- InjectHook(0x45D2F0, &CCam::Process_Fight_Cam, PATCH_JUMP);
- InjectHook(0x45DC20, &CCam::Process_FlyBy, PATCH_JUMP);
- InjectHook(0x464D10, &CCam::Process_WheelCam, PATCH_JUMP);
- InjectHook(0x45DA20, &CCam::Process_Fixed, PATCH_JUMP);
- InjectHook(0x461940, &CCam::Process_Player_Fallen_Water, PATCH_JUMP);
- InjectHook(0x45C400, &CCam::Process_Circle, PATCH_JUMP);
- InjectHook(0x462FC0, &CCam::Process_SpecialFixedForSyphon, PATCH_JUMP);
- InjectHook(0x45CCC0, &CCam::Process_Debug, PATCH_JUMP);
- InjectHook(0x4656C0, &CCam::ProcessPedsDeadBaby, PATCH_JUMP);
- InjectHook(0x465000, &CCam::ProcessArrestCamOne, PATCH_JUMP);
- InjectHook(0x4653C0, &CCam::ProcessArrestCamTwo, PATCH_JUMP);
-
- InjectHook(0x456CE0, &FindSplinePathPositionFloat, PATCH_JUMP);
- InjectHook(0x4569A0, &FindSplinePathPositionVector, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index a1f36d93..f1445d2e 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "main.h"
#include "Draw.h"
#include "World.h"
@@ -3386,58 +3386,3 @@ CCamPathSplines::CCamPathSplines(void)
for(i = 0; i < MAXPATHLENGTH; i++)
m_arr_PathData[i] = 0.0f;
}
-
-
-STARTPATCHES
- InjectHook(0x42C760, (bool (CCamera::*)(const CVector &center, float radius, const CMatrix *mat))&CCamera::IsSphereVisible, PATCH_JUMP);
- InjectHook(0x46FD00, &CCamera::SetFadeColour, PATCH_JUMP);
-
- InjectHook(0x46FD40, &CCamera::SetMotionBlur, PATCH_JUMP);
- InjectHook(0x46FD80, &CCamera::SetMotionBlurAlpha, PATCH_JUMP);
- InjectHook(0x46F940, &CCamera::RenderMotionBlur, PATCH_JUMP);
-
- InjectHook(0x46FC90, &CCamera::SetCameraDirectlyInFrontForFollowPed_CamOnAString, PATCH_JUMP);
-
- InjectHook(0x46FF00, &CCamera::SetWideScreenOn, PATCH_JUMP);
- InjectHook(0x46FF10, &CCamera::SetWideScreenOff, PATCH_JUMP);
-
- InjectHook(0x46FCC0, &CCamera::SetCamPositionForFixedMode, PATCH_JUMP);
- InjectHook(0x46FEC0, &CCamera::SetRwCamera, PATCH_JUMP);
- InjectHook(0x46B920, &CCamera::GetCutSceneFinishTime, PATCH_JUMP);
- InjectHook(0x46B560, &CCamera::FinishCutscene, PATCH_JUMP);
- InjectHook(0x46FF30, &CCamera::SetZoomValueFollowPedScript, PATCH_JUMP);
- InjectHook(0x46FF90, &CCamera::SetZoomValueCamStringScript, PATCH_JUMP);
-
-
- InjectHook(0x46F8E0, &CCamera::ProcessWideScreenOn, PATCH_JUMP);
- InjectHook(0x46FDE0, &CCamera::SetParametersForScriptInterpolation, PATCH_JUMP);
- InjectHook(0x46BA20, &CCamera::GetLookingLRBFirstPerson, PATCH_JUMP);
- InjectHook(0x470D80, &CCamera::StartTransitionWhenNotFinishedInter, PATCH_JUMP);
- InjectHook(0x46FFF0, &CCamera::StartTransition, PATCH_JUMP);
- InjectHook(0x46BEB0, &CCamera::InitialiseCameraForDebugMode, PATCH_JUMP);
- InjectHook(0x471500, &CCamera::TakeControl, PATCH_JUMP);
- InjectHook(0x4715B0, &CCamera::TakeControlNoEntity, PATCH_JUMP);
- InjectHook(0x46B3A0, &CCamera::Fade, PATCH_JUMP);
- InjectHook(0x46FE20, &CCamera::SetPercentAlongCutScene, PATCH_JUMP);
- InjectHook(0x46B100, &CamShakeNoPos, PATCH_JUMP);
- InjectHook(0x46B200, &CCamera::CamShake, PATCH_JUMP);
- InjectHook(0x46F520, &CCamera::ProcessObbeCinemaCameraPed, PATCH_JUMP);
- InjectHook(0x46F3E0, &CCamera::ProcessObbeCinemaCameraCar, PATCH_JUMP);
- InjectHook(0x470DA0, &CCamera::StoreValuesDuringInterPol, PATCH_JUMP);
- InjectHook(0x46B430, &CCamera::DrawBordersForWideScreen, PATCH_JUMP);
- InjectHook(0x46F990, &CCamera::Restore, PATCH_JUMP);
- InjectHook(0x46FAE0, &CCamera::RestoreWithJumpCut, PATCH_JUMP);
- InjectHook(0x46F080, &CCamera::ProcessFade, PATCH_JUMP);
- InjectHook(0x46EEA0, &CCamera::CalculateDerivedValues, PATCH_JUMP);
- InjectHook(0x46F1E0, &CCamera::ProcessMusicFade, PATCH_JUMP);
- InjectHook(0x46D1D0, &CCamera::LoadPathSplines, PATCH_JUMP);
- InjectHook(0x4712A0, &CCamera::UpdateTargetEntity, PATCH_JUMP);
- InjectHook(0x46B580, &CCamera::Find3rdPersonCamTargetVector, PATCH_JUMP);
- InjectHook(0x46BAD0, &CCamera::Init, PATCH_JUMP);
- InjectHook(0x46C9E0, &CCamera::LoadTrainCamNodes, PATCH_JUMP);
- InjectHook(0x46F600, &CCamera::Process_Train_Camera_Control, PATCH_JUMP);
- InjectHook(0x470EA0, &CCamera::UpdateSoundDistances, PATCH_JUMP);
- InjectHook(0x46BF10, &CCamera::IsItTimeForNewcam, PATCH_JUMP);
- InjectHook(0x471650, &CCamera::TryToStartNewCamMode, PATCH_JUMP);
-// InjectHook(0x46D3F0, &CCamera::Process, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/CdStream.cpp b/src/core/CdStream.cpp
index a400c039..1ab1c8b0 100644
--- a/src/core/CdStream.cpp
+++ b/src/core/CdStream.cpp
@@ -1,6 +1,6 @@
#include <windows.h>
#include "common.h"
-#include "patcher.h"
+
#include "CdStream.h"
#include "rwcore.h"
#include "RwHelper.h"
@@ -507,24 +507,3 @@ CdStreamGetNumImages(void)
{
return gNumImages;
}
-
-
-STARTPATCHES
- InjectHook(0x405B50, CdStreamInitThread, PATCH_JUMP);
- InjectHook(0x405C80, CdStreamInit, PATCH_JUMP);
- //InjectHook(0x405DB0, debug, PATCH_JUMP);
- InjectHook(0x405DC0, GetGTA3ImgSize, PATCH_JUMP);
- InjectHook(0x405DD0, CdStreamShutdown, PATCH_JUMP);
- InjectHook(0x405E40, CdStreamRead, PATCH_JUMP);
- InjectHook(0x405F90, CdStreamGetStatus, PATCH_JUMP);
- InjectHook(0x406000, CdStreamGetLastPosn, PATCH_JUMP);
- InjectHook(0x406010, CdStreamSync, PATCH_JUMP);
- InjectHook(0x4060B0, AddToQueue, PATCH_JUMP);
- InjectHook(0x4060F0, GetFirstInQueue, PATCH_JUMP);
- InjectHook(0x406110, RemoveFirstInQueue, PATCH_JUMP);
- InjectHook(0x406140, CdStreamThread, PATCH_JUMP);
- InjectHook(0x406270, CdStreamAddImage, PATCH_JUMP);
- InjectHook(0x4062E0, CdStreamGetImageName, PATCH_JUMP);
- InjectHook(0x406300, CdStreamRemoveImages, PATCH_JUMP);
- InjectHook(0x406370, CdStreamGetNumImages, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
diff --git a/src/core/Clock.cpp b/src/core/Clock.cpp
index 69fdd682..e4b908e0 100644
--- a/src/core/Clock.cpp
+++ b/src/core/Clock.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "Timer.h"
#include "Pad.h"
#include "Clock.h"
@@ -115,14 +115,3 @@ CClock::RestoreClock(void)
ms_nGameClockMinutes = ms_Stored_nGameClockMinutes;
ms_nGameClockSeconds = ms_Stored_nGameClockSeconds;
}
-
-
-STARTPATCHES
- InjectHook(0x473370, CClock::Initialise, PATCH_JUMP);
- InjectHook(0x473460, CClock::Update, PATCH_JUMP);
- InjectHook(0x4733C0, CClock::SetGameClock, PATCH_JUMP);
- InjectHook(0x4733F0, CClock::GetGameClockMinutesUntil, PATCH_JUMP);
- InjectHook(0x473420, CClock::GetIsTimeInRange, PATCH_JUMP);
- InjectHook(0x473540, CClock::StoreClock, PATCH_JUMP);
- InjectHook(0x473570, CClock::RestoreClock, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/Collision.cpp b/src/core/Collision.cpp
index 85145e86..5bdb32dc 100644
--- a/src/core/Collision.cpp
+++ b/src/core/Collision.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "main.h"
#include "Lists.h"
#include "Game.h"
@@ -2140,70 +2140,3 @@ CColModel::operator=(const CColModel &other)
}
return *this;
}
-
-#include <new>
-struct CColLine_ : public CColLine
-{
- CColLine *ctor(CVector *p0, CVector *p1) { return ::new (this) CColLine(*p0, *p1); }
-};
-
-struct CColModel_ : public CColModel
-{
- CColModel *ctor(void) { return ::new (this) CColModel(); }
- void dtor(void) { this->CColModel::~CColModel(); }
-};
-
-
-STARTPATCHES
- InjectHook(0x4B9C30, (CMatrix& (*)(const CMatrix &src, CMatrix &dst))Invert, PATCH_JUMP);
-
- InjectHook(0x40B380, CCollision::Init, PATCH_JUMP);
- InjectHook(0x40B3A0, CCollision::Shutdown, PATCH_JUMP);
- InjectHook(0x40B3B0, CCollision::Update, PATCH_JUMP);
- InjectHook(0x40B5B0, CCollision::LoadCollisionWhenINeedIt, PATCH_JUMP);
- InjectHook(0x40B900, CCollision::SortOutCollisionAfterLoad, PATCH_JUMP);
-
- InjectHook(0x40BB70, CCollision::TestSphereBox, PATCH_JUMP);
- InjectHook(0x40E130, CCollision::TestLineBox, PATCH_JUMP);
- InjectHook(0x40E5C0, CCollision::TestVerticalLineBox, PATCH_JUMP);
- InjectHook(0x40EC10, CCollision::TestLineTriangle, PATCH_JUMP);
- InjectHook(0x40DAA0, CCollision::TestLineSphere, PATCH_JUMP);
- InjectHook(0x40C580, CCollision::TestSphereTriangle, PATCH_JUMP);
- InjectHook(0x40F720, CCollision::TestLineOfSight, PATCH_JUMP);
-
- InjectHook(0x40B9F0, CCollision::ProcessSphereSphere, PATCH_JUMP);
- InjectHook(0x40BC00, CCollision::ProcessSphereBox, PATCH_JUMP);
- InjectHook(0x40E670, CCollision::ProcessLineBox, PATCH_JUMP);
- InjectHook(0x40DE80, CCollision::ProcessLineSphere, PATCH_JUMP);
- InjectHook(0x40FB50, CCollision::ProcessVerticalLineTriangle, PATCH_JUMP);
- InjectHook(0x40F140, CCollision::ProcessLineTriangle, PATCH_JUMP);
- InjectHook(0x40CE30, CCollision::ProcessSphereTriangle, PATCH_JUMP);
-
- InjectHook(0x40F910, CCollision::ProcessLineOfSight, PATCH_JUMP);
- InjectHook(0x410120, CCollision::ProcessVerticalLine, PATCH_JUMP);
- InjectHook(0x410BE0, CCollision::ProcessColModels, PATCH_JUMP);
-
- InjectHook(0x40B960, CCollision::CalculateTrianglePlanes, PATCH_JUMP);
- InjectHook(0x411640, &CLink<CColModel*>::Remove, PATCH_JUMP);
- InjectHook(0x411620, &CLink<CColModel*>::Insert, PATCH_JUMP);
- InjectHook(0x4115C0, &CLinkList<CColModel*>::Insert, PATCH_JUMP);
- InjectHook(0x411600, &CLinkList<CColModel*>::Remove, PATCH_JUMP);
-// InjectHook(0x411530, &CLinkList<CColModel*>::Init, PATCH_JUMP);
-
- InjectHook(0x411E40, (void (CColSphere::*)(float, const CVector&, uint8, uint8))&CColSphere::Set, PATCH_JUMP);
- InjectHook(0x40B2A0, &CColBox::Set, PATCH_JUMP);
- InjectHook(0x40B320, &CColLine_::ctor, PATCH_JUMP);
- InjectHook(0x40B350, &CColLine::Set, PATCH_JUMP);
- InjectHook(0x411E70, &CColTriangle::Set, PATCH_JUMP);
-
- InjectHook(0x411EA0, &CColTrianglePlane::Set, PATCH_JUMP);
- InjectHook(0x412140, &CColTrianglePlane::GetNormal, PATCH_JUMP);
-
- InjectHook(0x411680, &CColModel_::ctor, PATCH_JUMP);
- InjectHook(0x4116E0, &CColModel_::dtor, PATCH_JUMP);
- InjectHook(0x411D80, &CColModel::RemoveCollisionVolumes, PATCH_JUMP);
- InjectHook(0x411CB0, &CColModel::CalculateTrianglePlanes, PATCH_JUMP);
- InjectHook(0x411D10, &CColModel::RemoveTrianglePlanes, PATCH_JUMP);
- InjectHook(0x411D40, &CColModel::SetLinkPtr, PATCH_JUMP);
- InjectHook(0x411D60, &CColModel::GetLinkPtr, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp
index ce8674d7..a2382c12 100644
--- a/src/core/ControllerConfig.cpp
+++ b/src/core/ControllerConfig.cpp
@@ -1,7 +1,7 @@
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include "common.h"
-#include "patcher.h"
+
#include "ControllerConfig.h"
#include "Pad.h"
#include "FileMgr.h"
@@ -2362,57 +2362,3 @@ void CControllerConfigManager::ResetSettingOrder(e_ControllerAction action)
}
}
}
-
-
-STARTPATCHES
- InjectHook(0x58B7A0, &CControllerConfigManager::MakeControllerActionsBlank, PATCH_JUMP);
- InjectHook(0x58B7D0, &CControllerConfigManager::GetJoyButtonJustDown, PATCH_JUMP);
- InjectHook(0x58B800, &CControllerConfigManager::SaveSettings, PATCH_JUMP);
- InjectHook(0x58B870, &CControllerConfigManager::LoadSettings, PATCH_JUMP);
- InjectHook(0x58B930, &CControllerConfigManager::InitDefaultControlConfiguration, PATCH_JUMP);
- InjectHook(0x58BD00, &CControllerConfigManager::InitDefaultControlConfigMouse, PATCH_JUMP);
- InjectHook(0x58BD90, &CControllerConfigManager::InitDefaultControlConfigJoyPad, PATCH_JUMP);
- InjectHook(0x58C060, &CControllerConfigManager::InitialiseControllerActionNameArray, PATCH_JUMP);
- InjectHook(0x58C5E0, &CControllerConfigManager::UpdateJoyInConfigMenus_ButtonDown, PATCH_JUMP);
- InjectHook(0x58C730, &CControllerConfigManager::AffectControllerStateOn_ButtonDown, PATCH_JUMP);
- InjectHook(0x58C880, &CControllerConfigManager::AffectControllerStateOn_ButtonDown_Driving, PATCH_JUMP);
- InjectHook(0x58CAD0, &CControllerConfigManager::AffectControllerStateOn_ButtonDown_FirstPersonOnly, PATCH_JUMP);
- InjectHook(0x58CB10, &CControllerConfigManager::AffectControllerStateOn_ButtonDown_ThirdPersonOnly, PATCH_JUMP);
- InjectHook(0x58CBD0, &CControllerConfigManager::AffectControllerStateOn_ButtonDown_FirstAndThirdPersonOnly, PATCH_JUMP);
- InjectHook(0x58CD70, &CControllerConfigManager::AffectControllerStateOn_ButtonDown_AllStates, PATCH_JUMP);
- InjectHook(0x58CE50, &CControllerConfigManager::AffectControllerStateOn_ButtonDown_VehicleAndThirdPersonOnly, PATCH_JUMP);
- InjectHook(0x58CE80, &CControllerConfigManager::UpdateJoyInConfigMenus_ButtonUp, PATCH_JUMP);
- InjectHook(0x58CFD0, &CControllerConfigManager::AffectControllerStateOn_ButtonUp, PATCH_JUMP);
- InjectHook(0x58D090, &CControllerConfigManager::AffectControllerStateOn_ButtonUp_All_Player_States, PATCH_JUMP);
- InjectHook(0x58D0C0, &CControllerConfigManager::AffectPadFromKeyBoard, PATCH_JUMP);
- InjectHook(0x58D1A0, &CControllerConfigManager::AffectPadFromMouse, PATCH_JUMP);
- InjectHook(0x58D220, &CControllerConfigManager::ClearSimButtonPressCheckers, PATCH_JUMP);
- InjectHook(0x58D2A0, &CControllerConfigManager::GetIsKeyboardKeyDown, PATCH_JUMP);
- InjectHook(0x58D8A0, &CControllerConfigManager::GetIsKeyboardKeyJustDown, PATCH_JUMP);
- InjectHook(0x58E280, &CControllerConfigManager::GetIsMouseButtonDown, PATCH_JUMP);
- InjectHook(0x58E360, &CControllerConfigManager::GetIsMouseButtonUp, PATCH_JUMP);
- InjectHook(0x58E440, &CControllerConfigManager::DeleteMatchingCommonControls, PATCH_JUMP);
- InjectHook(0x58E540, &CControllerConfigManager::DeleteMatching3rdPersonControls, PATCH_JUMP);
- InjectHook(0x58E630, &CControllerConfigManager::DeleteMatching1rst3rdPersonControls, PATCH_JUMP);
- InjectHook(0x58E710, &CControllerConfigManager::DeleteMatchingVehicleControls, PATCH_JUMP);
- InjectHook(0x58E890, &CControllerConfigManager::DeleteMatchingVehicle_3rdPersonControls, PATCH_JUMP);
- InjectHook(0x58E8D0, &CControllerConfigManager::DeleteMatching1rstPersonControls, PATCH_JUMP);
- InjectHook(0x58E920, &CControllerConfigManager::DeleteMatchingActionInitiators, PATCH_JUMP);
- InjectHook(0x58EA70, &CControllerConfigManager::GetIsKeyBlank, PATCH_JUMP);
- InjectHook(0x58EAD0, &CControllerConfigManager::GetActionType, PATCH_JUMP);
- InjectHook(0x58EB40, &CControllerConfigManager::ClearSettingsAssociatedWithAction, PATCH_JUMP);
- InjectHook(0x58EBF0, &CControllerConfigManager::GetControllerSettingTextWithOrderNumber, PATCH_JUMP);
- InjectHook(0x58EC50, &CControllerConfigManager::GetControllerSettingTextKeyBoard, PATCH_JUMP);
- InjectHook(0x58F320, &CControllerConfigManager::GetControllerSettingTextMouse, PATCH_JUMP);
- InjectHook(0x58F3D0, &CControllerConfigManager::GetControllerSettingTextJoystick, PATCH_JUMP);
- InjectHook(0x58F420, &CControllerConfigManager::GetNumOfSettingsForAction, PATCH_JUMP);
- InjectHook(0x58F460, &CControllerConfigManager::GetWideStringOfCommandKeys, PATCH_JUMP);
- InjectHook(0x58F590, &CControllerConfigManager::GetControllerKeyAssociatedWithAction, PATCH_JUMP);
- InjectHook(0x58F5B0, &CControllerConfigManager::UpdateJoyButtonState, PATCH_JUMP);
- InjectHook(0x58F660, &CControllerConfigManager::GetIsActionAButtonCombo, PATCH_JUMP);
- InjectHook(0x58F690, &CControllerConfigManager::GetButtonComboText, PATCH_JUMP);
- InjectHook(0x58F700, &CControllerConfigManager::SetControllerKeyAssociatedWithAction, PATCH_JUMP);
- InjectHook(0x58F740, &CControllerConfigManager::GetMouseButtonAssociatedWithAction, PATCH_JUMP);
- InjectHook(0x58F760, &CControllerConfigManager::SetMouseButtonAssociatedWithAction, PATCH_JUMP);
- InjectHook(0x58F790, &CControllerConfigManager::ResetSettingOrder, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/Directory.cpp b/src/core/Directory.cpp
index d4b4279d..27539824 100644
--- a/src/core/Directory.cpp
+++ b/src/core/Directory.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "General.h"
#include "FileMgr.h"
#include "Directory.h"
@@ -57,10 +57,3 @@ CDirectory::FindItem(const char *name, uint32 &offset, uint32 &size)
}
return false;
}
-
-STARTPATCHES
- InjectHook(0x473630, &CDirectory::ReadDirFile, PATCH_JUMP);
- InjectHook(0x473690, &CDirectory::WriteDirFile, PATCH_JUMP);
- InjectHook(0x473600, &CDirectory::AddItem, PATCH_JUMP);
- InjectHook(0x4736E0, &CDirectory::FindItem, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/EventList.cpp b/src/core/EventList.cpp
index 5ca4cdb0..675040ea 100644
--- a/src/core/EventList.cpp
+++ b/src/core/EventList.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "Pools.h"
#include "ModelIndices.h"
#include "World.h"
@@ -227,14 +227,3 @@ CEventList::ReportCrimeForEvent(eEventType type, int32 crimeId, bool copsDontCar
FindPlayerPed()->SetWantedLevelNoDrop(2);
}
-
-STARTPATCHES
- InjectHook(0x475B60, CEventList::Initialise, PATCH_JUMP);
- InjectHook(0x475BE0, CEventList::Update, PATCH_JUMP);
- InjectHook(0x475C50, (void (*)(eEventType,eEventEntity,CEntity *,CPed *,int32))CEventList::RegisterEvent, PATCH_JUMP);
- InjectHook(0x475E10, (void (*)(eEventType,CVector,int32))CEventList::RegisterEvent, PATCH_JUMP);
- InjectHook(0x475F40, CEventList::GetEvent, PATCH_JUMP);
- InjectHook(0x475F70, CEventList::ClearEvent, PATCH_JUMP);
- InjectHook(0x475F90, CEventList::FindClosestEvent, PATCH_JUMP);
- InjectHook(0x476070, CEventList::ReportCrimeForEvent, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp
index e0a0fafc..b7d82089 100644
--- a/src/core/FileLoader.cpp
+++ b/src/core/FileLoader.cpp
@@ -1,6 +1,6 @@
#include "common.h"
#include "main.h"
-#include "patcher.h"
+
#include "Quaternion.h"
#include "ModelInfo.h"
#include "ModelIndices.h"
@@ -1355,43 +1355,3 @@ CFileLoader::ReLoadScene(const char *filename)
}
CFileMgr::CloseFile(fd);
}
-
-STARTPATCHES
- InjectHook(0x476290, CFileLoader::LoadLevel, PATCH_JUMP);
-
- InjectHook(0x476520, CFileLoader::LoadCollisionFromDatFile, PATCH_JUMP);
- InjectHook(0x4761D0, CFileLoader::LoadLine, PATCH_JUMP);
- InjectHook(0x4765B0, CFileLoader::LoadTexDictionary, PATCH_JUMP);
- InjectHook(0x478B20, CFileLoader::LoadCollisionFile, PATCH_JUMP);
- InjectHook(0x478C20, CFileLoader::LoadCollisionModel, PATCH_JUMP);
- InjectHook(0x476750, CFileLoader::LoadModelFile, PATCH_JUMP);
- InjectHook(0x476810, (void (*)(const char*))CFileLoader::LoadClumpFile, PATCH_JUMP);
- InjectHook(0x476990, (bool (*)(RwStream*,uint32))CFileLoader::LoadClumpFile, PATCH_JUMP);
- InjectHook(0x476A20, CFileLoader::StartLoadClumpFile, PATCH_JUMP);
- InjectHook(0x476A70, CFileLoader::FinishLoadClumpFile, PATCH_JUMP);
- InjectHook(0x476930, CFileLoader::LoadAtomicFile, PATCH_JUMP);
- InjectHook(0x4767C0, CFileLoader::LoadAtomicFile2Return, PATCH_JUMP);
- InjectHook(0x476630, CFileLoader::AddTexDictionaries, PATCH_JUMP);
-
- InjectHook(0x476AC0, CFileLoader::LoadObjectTypes, PATCH_JUMP);
- InjectHook(0x477040, CFileLoader::LoadObject, PATCH_JUMP);
- InjectHook(0x4774B0, CFileLoader::LoadTimeObject, PATCH_JUMP);
- InjectHook(0x477920, CFileLoader::LoadClumpObject, PATCH_JUMP);
- InjectHook(0x477990, CFileLoader::LoadVehicleObject, PATCH_JUMP);
- InjectHook(0x477DE0, CFileLoader::LoadPedObject, PATCH_JUMP);
- InjectHook(0x477ED0, CFileLoader::LoadPathHeader, PATCH_JUMP);
- InjectHook(0x477FF0, CFileLoader::LoadCarPathNode, PATCH_JUMP);
- InjectHook(0x477F00, CFileLoader::LoadPedPathNode, PATCH_JUMP);
- InjectHook(0x4780E0, CFileLoader::Load2dEffect, PATCH_JUMP);
-
- InjectHook(0x478370, CFileLoader::LoadScene, PATCH_JUMP);
- InjectHook(0x4786B0, CFileLoader::LoadObjectInstance, PATCH_JUMP);
- InjectHook(0x478A00, CFileLoader::LoadZone, PATCH_JUMP);
- InjectHook(0x478A90, CFileLoader::LoadCullZone, PATCH_JUMP);
-
- InjectHook(0x478550, CFileLoader::LoadMapZones, PATCH_JUMP);
-
- InjectHook(0x476DB0, CFileLoader::ReloadPaths, PATCH_JUMP);
- InjectHook(0x476F30, CFileLoader::ReloadObjectTypes, PATCH_JUMP);
- InjectHook(0x4772B0, CFileLoader::ReloadObject, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/FileMgr.cpp b/src/core/FileMgr.cpp
index 382316bb..46d725cd 100644
--- a/src/core/FileMgr.cpp
+++ b/src/core/FileMgr.cpp
@@ -2,7 +2,7 @@
#include <fcntl.h>
#include <direct.h>
#include "common.h"
-#include "patcher.h"
+
#include "FileMgr.h"
const char *_psGetUserFilesFolder();
@@ -282,19 +282,3 @@ CFileMgr::GetErrorReadWrite(int fd)
{
return myfeof(fd);
}
-
-STARTPATCHES
- InjectHook(0x478F80, CFileMgr::Initialise, PATCH_JUMP);
- InjectHook(0x478FB0, CFileMgr::ChangeDir, PATCH_JUMP);
- InjectHook(0x479020, CFileMgr::SetDir, PATCH_JUMP);
- InjectHook(0x479080, CFileMgr::SetDirMyDocuments, PATCH_JUMP);
- InjectHook(0x479090, CFileMgr::LoadFile, PATCH_JUMP);
- InjectHook(0x479100, CFileMgr::OpenFile, PATCH_JUMP);
- InjectHook(0x479120, CFileMgr::OpenFileForWriting, PATCH_JUMP);
- InjectHook(0x479140, CFileMgr::Read, PATCH_JUMP);
- InjectHook(0x479160, CFileMgr::Write, PATCH_JUMP);
- InjectHook(0x479180, CFileMgr::Seek, PATCH_JUMP);
- InjectHook(0x4791D0, CFileMgr::ReadLine, PATCH_JUMP);
- InjectHook(0x479200, CFileMgr::CloseFile, PATCH_JUMP);
- InjectHook(0x479210, CFileMgr::GetErrorReadWrite, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/Fire.cpp b/src/core/Fire.cpp
index f900091e..65b6deb2 100644
--- a/src/core/Fire.cpp
+++ b/src/core/Fire.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "Vector.h"
#include "PlayerPed.h"
#include "Entity.h"
@@ -438,21 +438,3 @@ CFireManager::SetScriptFireAudio(int16 index, bool state)
{
m_aFires[index].m_bAudioSet = state;
}
-
-STARTPATCHES
- InjectHook(0x4798D0, &CFire::ProcessFire, PATCH_JUMP);
- InjectHook(0x4798B0, &CFire::ReportThisFire, PATCH_JUMP);
- InjectHook(0x479D40, &CFire::Extinguish, PATCH_JUMP);
- InjectHook(0x479500, (void(CFireManager::*)(CVector pos, float size, bool propagation))&CFireManager::StartFire, PATCH_JUMP);
- InjectHook(0x479590, (CFire *(CFireManager::*)(CEntity *, CEntity *, float, bool))&CFireManager::StartFire, PATCH_JUMP);
- InjectHook(0x479310, &CFireManager::Update, PATCH_JUMP);
- InjectHook(0x479430, &CFireManager::FindFurthestFire_NeverMindFireMen, PATCH_JUMP);
- InjectHook(0x479340, &CFireManager::FindNearestFire, PATCH_JUMP);
- InjectHook(0x4792E0, &CFireManager::GetNextFreeFire, PATCH_JUMP);
- InjectHook(0x479DB0, &CFireManager::ExtinguishPoint, PATCH_JUMP);
- InjectHook(0x479E60, &CFireManager::StartScriptFire, PATCH_JUMP);
- InjectHook(0x479FC0, &CFireManager::IsScriptFireExtinguish, PATCH_JUMP);
- InjectHook(0x47A000, &CFireManager::RemoveAllScriptFires, PATCH_JUMP);
- InjectHook(0x479FE0, &CFireManager::RemoveScriptFire, PATCH_JUMP);
- InjectHook(0x47A040, &CFireManager::SetScriptFireAudio, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index b2ecdac5..790de046 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -1,7 +1,7 @@
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include "common.h"
-#include "patcher.h"
+
#include "win.h"
#include "Frontend.h"
#include "Font.h"
@@ -5624,21 +5624,3 @@ uint8 CMenuManager::GetNumberOfMenuOptions()
#undef GetBackJustUp
#undef GetBackJustDown
-
-STARTPATCHES
- for (int i = 1; i < ARRAY_SIZE(aScreens); i++)
- Patch(0x611930 + sizeof(CMenuScreen) * i, aScreens[i]);
- InjectHook(0x4856F0, &CMenuManager::ProcessButtonPresses, PATCH_JUMP);
- InjectHook(0x485100, &CMenuManager::Process, PATCH_JUMP);
- InjectHook(0x47A230, &CMenuManager::LoadAllTextures, PATCH_JUMP);
- InjectHook(0x47A540, &CMenuManager::DrawFrontEnd, PATCH_JUMP);
-
- InjectHook(0x48ABE0, &CMenuManager::StretchX, PATCH_JUMP);
- InjectHook(0x48AC20, &CMenuManager::StretchY, PATCH_JUMP);
- InjectHook(0x488EE0, &CMenuManager::LoadSettings, PATCH_JUMP);
- InjectHook(0x488CC0, &CMenuManager::SaveSettings, PATCH_JUMP);
- InjectHook(0x47A440, &CMenuManager::UnloadTextures, PATCH_JUMP);
- InjectHook(0x48AB40, &CMenuManager::DoSettingsBeforeStartingAGame, PATCH_JUMP);
- InjectHook(0x48AE60, &CMenuManager::ProcessOnOffMenuOptions, PATCH_JUMP);
- InjectHook(0x489710, &CMenuManager::DrawControllerBound, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index f115d52f..7ccf78d0 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -5,7 +5,7 @@
#pragma warning( pop )
#include "common.h"
#include "win.h"
-#include "patcher.h"
+
#include "Game.h"
#include "main.h"
#include "RwHelper.h"
@@ -710,20 +710,3 @@ void CGame::ProcessTidyUpMemory(void)
// meow
#endif
}
-
-STARTPATCHES
- InjectHook(0x48BB80, CGame::InitialiseOnceBeforeRW, PATCH_JUMP);
- InjectHook(0x48BBA0, CGame::InitialiseRenderWare, PATCH_JUMP);
- InjectHook(0x48BCB0, CGame::ShutdownRenderWare, PATCH_JUMP);
- InjectHook(0x48BD50, CGame::InitialiseOnceAfterRW, PATCH_JUMP);
- InjectHook(0x48BEC0, CGame::FinalShutdown, PATCH_JUMP);
- InjectHook(0x48BED0, CGame::Initialise, PATCH_JUMP);
- InjectHook(0x48C3A0, CGame::ShutDown, PATCH_JUMP);
- InjectHook(0x48C4B0, CGame::ReInitGameObjectVariables, PATCH_JUMP);
- InjectHook(0x48C620, CGame::ReloadIPLs, PATCH_JUMP);
- InjectHook(0x48C6B0, CGame::ShutDownForRestart, PATCH_JUMP);
- InjectHook(0x48C740, CGame::InitialiseWhenRestarting, PATCH_JUMP);
- InjectHook(0x48C850, CGame::Process, PATCH_JUMP);
- InjectHook(0x48CA10, CGame::DrasticTidyUpMemory, PATCH_JUMP);
- InjectHook(0x48CA20, CGame::TidyUpMemory, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/IniFile.cpp b/src/core/IniFile.cpp
index d8e91c98..16e35633 100644
--- a/src/core/IniFile.cpp
+++ b/src/core/IniFile.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "IniFile.h"
#include "CarCtrl.h"
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index 2db375b2..86aff05e 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -9,7 +9,7 @@
#include <Xinput.h>
#pragma comment( lib, "Xinput9_1_0.lib" )
#endif
-#include "patcher.h"
+
#include "Pad.h"
#include "ControllerConfig.h"
#include "Timer.h"
@@ -1285,7 +1285,7 @@ bool CPad::GetLookRight(void)
{
if ( ArePlayerControlsDisabled() )
return false;
-
+
return !!(NewState.RightShoulder2 && !NewState.LeftShoulder2);
}
@@ -1294,7 +1294,7 @@ bool CPad::GetLookBehindForCar(void)
{
if ( ArePlayerControlsDisabled() )
return false;
-
+
return !!(NewState.RightShoulder2 && NewState.LeftShoulder2);
}
@@ -1768,7 +1768,7 @@ bool CPad::CycleWeaponRightJustDown(void)
{
if ( ArePlayerControlsDisabled() )
return false;
-
+
return !!(NewState.RightShoulder2 && !OldState.RightShoulder2);
}
@@ -1865,7 +1865,7 @@ bool CPad::ShiftTargetLeftJustDown(void)
{
if ( ArePlayerControlsDisabled() )
return false;
-
+
return !!(NewState.LeftShoulder2 && !OldState.LeftShoulder2);
}
@@ -1873,7 +1873,7 @@ bool CPad::ShiftTargetRightJustDown(void)
{
if ( ArePlayerControlsDisabled() )
return false;
-
+
return !!(NewState.RightShoulder2 && !OldState.RightShoulder2);
}
@@ -2404,111 +2404,3 @@ int32 *CPad::EditCodesForControls(int32 *pRsKeys, int32 nSize)
return pRsKeys;
}
-
-STARTPATCHES
- InjectHook(0x490D90, &WeaponCheat, PATCH_JUMP);
- InjectHook(0x490E70, &HealthCheat, PATCH_JUMP);
- InjectHook(0x490EE0, &TankCheat, PATCH_JUMP);
- InjectHook(0x491040, &BlowUpCarsCheat, PATCH_JUMP);
- InjectHook(0x4910B0, &ChangePlayerCheat, PATCH_JUMP);
- InjectHook(0x4911C0, &MayhemCheat, PATCH_JUMP);
- InjectHook(0x491270, &EverybodyAttacksPlayerCheat, PATCH_JUMP);
- InjectHook(0x491370, &WeaponsForAllCheat, PATCH_JUMP);
- InjectHook(0x4913A0, &FastTimeCheat, PATCH_JUMP);
- InjectHook(0x4913F0, &SlowTimeCheat, PATCH_JUMP);
- InjectHook(0x491430, &MoneyCheat, PATCH_JUMP);
- InjectHook(0x491460, &ArmourCheat, PATCH_JUMP);
- InjectHook(0x491490, &WantedLevelUpCheat, PATCH_JUMP);
- InjectHook(0x4914F0, &WantedLevelDownCheat, PATCH_JUMP);
- InjectHook(0x491520, &SunnyWeatherCheat, PATCH_JUMP);
- InjectHook(0x491550, &CloudyWeatherCheat, PATCH_JUMP);
- InjectHook(0x491580, &RainyWeatherCheat, PATCH_JUMP);
- InjectHook(0x4915B0, &FoggyWeatherCheat, PATCH_JUMP);
- InjectHook(0x4915E0, &FastWeatherCheat, PATCH_JUMP);
- InjectHook(0x491610, &OnlyRenderWheelsCheat, PATCH_JUMP);
- InjectHook(0x491640, &ChittyChittyBangBangCheat, PATCH_JUMP);
- InjectHook(0x491670, &StrongGripCheat, PATCH_JUMP);
- InjectHook(0x4916A0, &NastyLimbsCheat, PATCH_JUMP);
-
- InjectHook(0x4916C0, &CControllerState::Clear, PATCH_JUMP);
- InjectHook(0x491760, &CKeyboardState::Clear, PATCH_JUMP);
- InjectHook(0x491A10, &CPad::Clear, PATCH_JUMP);
- InjectHook(0x491B50, &CPad::ClearMouseHistory, PATCH_JUMP);
- //InjectHook(0x491B80, &CMouseControllerState::CMouseControllerState, PATCH_JUMP);
- InjectHook(0x491BB0, &CMouseControllerState::Clear, PATCH_JUMP);
- InjectHook(0x491BD0, &CMousePointerStateHelper::GetMouseSetUp, PATCH_JUMP);
- InjectHook(0x491CA0, &CPad::UpdateMouse, PATCH_JUMP);
- InjectHook(0x491E60, &CPad::ReconcileTwoControllersInput, PATCH_JUMP);
- InjectHook(0x492230, &CPad::StartShake, PATCH_JUMP);
- InjectHook(0x492290, &CPad::StartShake_Distance, PATCH_JUMP);
- InjectHook(0x492360, &CPad::StartShake_Train, PATCH_JUMP);
- InjectHook(0x492450, &CPad::AddToPCCheatString, PATCH_JUMP);
- InjectHook(0x492720, CPad::UpdatePads, PATCH_JUMP);
- InjectHook(0x492C60, &CPad::ProcessPCSpecificStuff, PATCH_JUMP);
- InjectHook(0x492C70, &CPad::Update, PATCH_JUMP);
-#pragma warning( push )
-#pragma warning( disable : 4573)
- InjectHook(0x492F00, (void (*)())CPad::DoCheats, PATCH_JUMP);
-#pragma warning( pop )
- InjectHook(0x492F20, (void (CPad::*)(int16))&CPad::DoCheats, PATCH_JUMP);
- InjectHook(0x492F30, CPad::StopPadsShaking, PATCH_JUMP);
- InjectHook(0x492F50, &CPad::StopShaking, PATCH_JUMP);
- InjectHook(0x492F60, CPad::GetPad, PATCH_JUMP);
- InjectHook(0x492F70, &CPad::GetSteeringLeftRight, PATCH_JUMP);
- InjectHook(0x492FF0, &CPad::GetSteeringUpDown, PATCH_JUMP);
- InjectHook(0x493070, &CPad::GetCarGunUpDown, PATCH_JUMP);
- InjectHook(0x4930C0, &CPad::GetCarGunLeftRight, PATCH_JUMP);
- InjectHook(0x493110, &CPad::GetPedWalkLeftRight, PATCH_JUMP);
- InjectHook(0x493190, &CPad::GetPedWalkUpDown, PATCH_JUMP);
- InjectHook(0x493210, &CPad::GetAnalogueUpDown, PATCH_JUMP);
- InjectHook(0x493290, &CPad::GetLookLeft, PATCH_JUMP);
- InjectHook(0x4932C0, &CPad::GetLookRight, PATCH_JUMP);
- InjectHook(0x4932F0, &CPad::GetLookBehindForCar, PATCH_JUMP);
- InjectHook(0x493320, &CPad::GetLookBehindForPed, PATCH_JUMP);
- InjectHook(0x493350, &CPad::GetHorn, PATCH_JUMP);
- InjectHook(0x4933F0, &CPad::HornJustDown, PATCH_JUMP);
- InjectHook(0x493490, &CPad::GetCarGunFired, PATCH_JUMP);
- InjectHook(0x4934F0, &CPad::CarGunJustDown, PATCH_JUMP);
- InjectHook(0x493560, &CPad::GetHandBrake, PATCH_JUMP);
- InjectHook(0x4935A0, &CPad::GetBrake, PATCH_JUMP);
- InjectHook(0x4935F0, &CPad::GetExitVehicle, PATCH_JUMP);
- InjectHook(0x493650, &CPad::ExitVehicleJustDown, PATCH_JUMP);
- InjectHook(0x4936C0, &CPad::GetWeapon, PATCH_JUMP);
- InjectHook(0x493700, &CPad::WeaponJustDown, PATCH_JUMP);
- InjectHook(0x493780, &CPad::GetAccelerate, PATCH_JUMP);
- InjectHook(0x4937D0, &CPad::CycleCameraModeUpJustDown, PATCH_JUMP);
- InjectHook(0x493830, &CPad::CycleCameraModeDownJustDown, PATCH_JUMP);
- InjectHook(0x493870, &CPad::ChangeStationJustDown, PATCH_JUMP);
- InjectHook(0x493910, &CPad::CycleWeaponLeftJustDown, PATCH_JUMP);
- InjectHook(0x493940, &CPad::CycleWeaponRightJustDown, PATCH_JUMP);
- InjectHook(0x493970, &CPad::GetTarget, PATCH_JUMP);
- InjectHook(0x4939D0, &CPad::TargetJustDown, PATCH_JUMP);
- InjectHook(0x493A40, &CPad::JumpJustDown, PATCH_JUMP);
- InjectHook(0x493A70, &CPad::GetSprint, PATCH_JUMP);
- InjectHook(0x493AE0, &CPad::ShiftTargetLeftJustDown, PATCH_JUMP);
- InjectHook(0x493B10, &CPad::ShiftTargetRightJustDown, PATCH_JUMP);
- InjectHook(0x493B40, &CPad::GetAnaloguePadUp, PATCH_JUMP);
- InjectHook(0x493BA0, &CPad::GetAnaloguePadDown, PATCH_JUMP);
- InjectHook(0x493C00, &CPad::GetAnaloguePadLeft, PATCH_JUMP);
- InjectHook(0x493C60, &CPad::GetAnaloguePadRight, PATCH_JUMP);
- InjectHook(0x493CC0, &CPad::GetAnaloguePadLeftJustUp, PATCH_JUMP);
- InjectHook(0x493D20, &CPad::GetAnaloguePadRightJustUp, PATCH_JUMP);
- InjectHook(0x493D80, &CPad::ForceCameraBehindPlayer, PATCH_JUMP);
- InjectHook(0x493E00, &CPad::SniperZoomIn, PATCH_JUMP);
- InjectHook(0x493E70, &CPad::SniperZoomOut, PATCH_JUMP);
- InjectHook(0x493EE0, &CPad::SniperModeLookLeftRight, PATCH_JUMP);
- InjectHook(0x493F30, &CPad::SniperModeLookUpDown, PATCH_JUMP);
- InjectHook(0x493F80, &CPad::LookAroundLeftRight, PATCH_JUMP);
- InjectHook(0x494130, &CPad::LookAroundUpDown, PATCH_JUMP);
- InjectHook(0x494290, &CPad::ResetAverageWeapon, PATCH_JUMP);
- InjectHook(0x4942B0, CPad::PrintErrorMessage, PATCH_JUMP);
- InjectHook(0x494420, LittleTest, PATCH_JUMP);
- InjectHook(0x494450, CPad::ResetCheats, PATCH_JUMP);
- InjectHook(0x4944B0, CPad::EditString, PATCH_JUMP);
- InjectHook(0x494690, CPad::EditCodesForControls, PATCH_JUMP);
-
- //InjectHook(0x494E50, `global constructor keyed to'Pad.cpp, PATCH_JUMP);
- //InjectHook(0x494EB0, sub_494EB0, PATCH_JUMP);
- //InjectHook(0x494ED0, &CPad::~CPad, PATCH_JUMP);
- //InjectHook(0x494EE0, &CPad::CPad, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/Placeable.cpp b/src/core/Placeable.cpp
index c882fc27..99ca5659 100644
--- a/src/core/Placeable.cpp
+++ b/src/core/Placeable.cpp
@@ -1,6 +1,6 @@
#include "common.h"
#include "Placeable.h"
-#include "patcher.h"
+
CPlaceable::CPlaceable(void)
{
@@ -62,21 +62,3 @@ CPlaceable::IsWithinArea(float x1, float y1, float z1, float x2, float y2, float
y1 <= GetPosition().y && GetPosition().y <= y2 &&
z1 <= GetPosition().z && GetPosition().z <= z2;
}
-
-#include <new>
-
-class CPlaceable_ : public CPlaceable
-{
-public:
- CPlaceable *ctor(void) { return ::new (this) CPlaceable(); }
- void dtor(void) { CPlaceable::~CPlaceable(); }
-};
-
-STARTPATCHES
- InjectHook(0x49F9A0, &CPlaceable_::ctor, PATCH_JUMP);
- InjectHook(0x49F9E0, &CPlaceable_::dtor, PATCH_JUMP);
-
- InjectHook(0x49FA00, &CPlaceable::SetHeading, PATCH_JUMP);
- InjectHook(0x49FA50, (bool (CPlaceable::*)(float, float, float, float))&CPlaceable::IsWithinArea, PATCH_JUMP);
- InjectHook(0x49FAF0, (bool (CPlaceable::*)(float, float, float, float, float, float))&CPlaceable::IsWithinArea, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp
index 0043c2f4..cfa0cea4 100644
--- a/src/core/PlayerInfo.cpp
+++ b/src/core/PlayerInfo.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "main.h"
#include "PlayerPed.h"
#include "Wanted.h"
@@ -558,20 +558,3 @@ CPlayerInfo::Process(void)
CStats::DistanceTravelledOnFoot += FindPlayerPed()->m_fDistanceTravelled;
}
}
-
-STARTPATCHES
- InjectHook(0x4B5DC0, &CPlayerInfo::dtor, PATCH_JUMP);
- InjectHook(0x4A1700, &CPlayerInfo::LoadPlayerSkin, PATCH_JUMP);
- InjectHook(0x4A1750, &CPlayerInfo::DeletePlayerSkin, PATCH_JUMP);
- InjectHook(0x4A12E0, &CPlayerInfo::KillPlayer, PATCH_JUMP);
- InjectHook(0x4A1330, &CPlayerInfo::ArrestPlayer, PATCH_JUMP);
- InjectHook(0x49FC10, &CPlayerInfo::Clear, PATCH_JUMP);
- InjectHook(0x4A15C0, &CPlayerInfo::BlowUpRCBuggy, PATCH_JUMP);
- InjectHook(0x4A13B0, &CPlayerInfo::CancelPlayerEnteringCars, PATCH_JUMP);
- InjectHook(0x4A1400, &CPlayerInfo::MakePlayerSafe, PATCH_JUMP);
- InjectHook(0x4A0EC0, &CPlayerInfo::EvaluateCarPosition, PATCH_JUMP);
- InjectHook(0x4A15F0, &CPlayerInfo::AwardMoneyForExplosion, PATCH_JUMP);
- InjectHook(0x4A0B20, &CPlayerInfo::LoadPlayerInfo, PATCH_JUMP);
- InjectHook(0x4A0960, &CPlayerInfo::SavePlayerInfo, PATCH_JUMP);
- InjectHook(0x49FD30, &CPlayerInfo::Process, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp
index 65294368..dfc6974a 100644
--- a/src/core/Pools.cpp
+++ b/src/core/Pools.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "Pools.h"
#include "Boat.h"
@@ -425,19 +425,3 @@ INITSAVEBUF
}
VALIDATESAVEBUF(size)
}
-
-STARTPATCHES
- InjectHook(0x4A1770, CPools::Initialise, PATCH_JUMP);
- InjectHook(0x4A1880, CPools::ShutDown, PATCH_JUMP);
- InjectHook(0x4A1A50, CPools::CheckPoolsEmpty, PATCH_JUMP);
- InjectHook(0x4A1A80, CPools::GetPedRef, PATCH_JUMP);
- InjectHook(0x4A1AA0, CPools::GetPed, PATCH_JUMP);
- InjectHook(0x4A1AC0, CPools::GetVehicleRef, PATCH_JUMP);
- InjectHook(0x4A1AE0, CPools::GetVehicle, PATCH_JUMP);
- InjectHook(0x4A1B00, CPools::GetObjectRef, PATCH_JUMP);
- InjectHook(0x4A1B20, CPools::GetObject, PATCH_JUMP);
- InjectHook(0x4A2DB0, CPools::MakeSureSlotInObjectPoolIsEmpty, PATCH_JUMP);
- InjectHook(0x4A1B40, CPools::LoadVehiclePool, PATCH_JUMP);
- InjectHook(0x4A2550, CPools::LoadObjectPool, PATCH_JUMP);
- InjectHook(0x4A2B50, CPools::LoadPedPool, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index 48b97832..2b3e6f1e 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -1,6 +1,6 @@
#include "config.h"
#include "common.h"
-#include "patcher.h"
+
#include "RwHelper.h"
#include "Radar.h"
#include "Camera.h"
@@ -1458,51 +1458,3 @@ CRadar::ToggleTargetMarker(float x, float y)
}
#endif
-STARTPATCHES
- InjectHook(0x4A3EF0, CRadar::Initialise, PATCH_JUMP);
- InjectHook(0x4A3F60, CRadar::Shutdown, PATCH_JUMP);
- InjectHook(0x4A4030, CRadar::LoadTextures, PATCH_JUMP);
- InjectHook(0x4A4180, CRadar::GetNewUniqueBlipIndex, PATCH_JUMP);
- InjectHook(0x4A41C0, CRadar::GetActualBlipArrayIndex, PATCH_JUMP);
- InjectHook(0x4A4200, CRadar::DrawMap, PATCH_JUMP);
- InjectHook(0x4A42F0, CRadar::DrawBlips, PATCH_JUMP);
- InjectHook(0x4A4C70, CRadar::Draw3dMarkers, PATCH_JUMP);
- InjectHook(0x4A4F30, CRadar::LimitRadarPoint, PATCH_JUMP);
- InjectHook(0x4A4F90, CRadar::CalculateBlipAlpha, PATCH_JUMP);
- InjectHook(0x4A5040, CRadar::TransformRadarPointToScreenSpace, PATCH_JUMP);
- InjectHook(0x4A50D0, CRadar::TransformRealWorldPointToRadarSpace, PATCH_JUMP);
- InjectHook(0x4A5300, CRadar::TransformRadarPointToRealWorldSpace, PATCH_JUMP);
- InjectHook(0x4A5530, CRadar::TransformRealWorldToTexCoordSpace, PATCH_JUMP);
- InjectHook(0x4A5590, CRadar::SetCoordBlip, PATCH_JUMP);
- InjectHook(0x4A5640, CRadar::SetEntityBlip, PATCH_JUMP);
- InjectHook(0x4A56C0, CRadar::ClearBlipForEntity, PATCH_JUMP);
- InjectHook(0x4A5720, CRadar::ClearBlip, PATCH_JUMP);
- InjectHook(0x4A5770, CRadar::ChangeBlipColour, PATCH_JUMP);
- InjectHook(0x4A57A0, CRadar::ChangeBlipBrightness, PATCH_JUMP);
- InjectHook(0x4A57E0, CRadar::ChangeBlipScale, PATCH_JUMP);
- InjectHook(0x4A5810, CRadar::ChangeBlipDisplay, PATCH_JUMP);
- InjectHook(0x4A5840, CRadar::SetBlipSprite, PATCH_JUMP);
- InjectHook(0x4A5870, CRadar::ShowRadarTrace, PATCH_JUMP);
- InjectHook(0x4A59C0, CRadar::ShowRadarMarker, PATCH_JUMP);
- InjectHook(0x4A5BB0, CRadar::GetRadarTraceColour, PATCH_JUMP);
- InjectHook(0x4A5C60, CRadar::SetRadarMarkerState, PATCH_JUMP);
- InjectHook(0x4A5D10, CRadar::DrawRotatingRadarSprite, PATCH_JUMP);
- InjectHook(0x4A5EF0, CRadar::DrawRadarSprite, PATCH_JUMP);
- InjectHook(0x4A6020, ClipRadarTileCoords, PATCH_JUMP);
- InjectHook(0x4A6060, RequestMapSection, PATCH_JUMP);
- InjectHook(0x4A60A0, RemoveMapSection, PATCH_JUMP);
- InjectHook(0x4A60E0, CRadar::RemoveRadarSections, PATCH_JUMP);
- InjectHook(0x4A6100, (void (*)(int32, int32))&CRadar::StreamRadarSections, PATCH_JUMP);
- InjectHook(0x4A6160, IsPointInsideRadar, PATCH_JUMP);
- InjectHook(0x4A61C0, GetTextureCorners, PATCH_JUMP);
- InjectHook(0x4A6250, LineRadarBoxCollision, PATCH_JUMP);
- InjectHook(0x4A64A0, CRadar::ClipRadarPoly, PATCH_JUMP);
- InjectHook(0x4A67E0, CRadar::DrawRadarSection, PATCH_JUMP);
- InjectHook(0x4A69C0, CRadar::DrawRadarMask, PATCH_JUMP);
- InjectHook(0x4A6B60, (void (*)(const CVector&))&CRadar::StreamRadarSections, PATCH_JUMP);
- InjectHook(0x4A6C20, CRadar::DrawRadarMap, PATCH_JUMP);
- InjectHook(0x4A6E30, CRadar::SaveAllRadarBlips, PATCH_JUMP);
- InjectHook(0x4A6F30, CRadar::LoadAllRadarBlips, PATCH_JUMP);
- //InjectHook(0x4A7000, `global constructor keyed to'Radar.cpp, PATCH_JUMP);
- //InjectHook(0x4A7260, sRadarTrace::sRadarTrace, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
diff --git a/src/core/References.cpp b/src/core/References.cpp
index 668ea9f1..3eb2eaf3 100644
--- a/src/core/References.cpp
+++ b/src/core/References.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "World.h"
#include "Vehicle.h"
#include "PlayerPed.h"
@@ -57,9 +57,3 @@ CReferences::PruneAllReferencesInWorld(void)
e->PruneReferences();
}
}
-
-STARTPATCHES
- InjectHook(0x4A7350, CReferences::Init, PATCH_JUMP);
- InjectHook(0x4A7570, CReferences::RemoveReferencesToPlayer, PATCH_JUMP);
- InjectHook(0x4A75A0, CReferences::PruneAllReferencesInWorld, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/Stats.cpp b/src/core/Stats.cpp
index 8d7a3048..ef3c0ab6 100644
--- a/src/core/Stats.cpp
+++ b/src/core/Stats.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "Stats.h"
#include "Text.h"
#include "World.h"
@@ -418,11 +418,3 @@ void CStats::LoadStats(uint8 *buf, uint32 size)
assert(buf - buf_start == size);
#undef CopyFromBuf
}
-
-STARTPATCHES
- InjectHook(0x48C5A3, CStats::Init, PATCH_JUMP); // CGame::ReInitGameObjectVariables
- InjectHook(0x4AB3E0, CStats::SaveStats, PATCH_JUMP);
- InjectHook(0x4AB670, CStats::LoadStats, PATCH_JUMP);
- InjectHook(0x4AB090, CStats::FindCriminalRatingString, PATCH_JUMP);
- InjectHook(0x4AB2A0, CStats::FindCriminalRatingNumber, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp
index 56f4a862..039377f4 100644
--- a/src/core/Streaming.cpp
+++ b/src/core/Streaming.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "General.h"
#include "Pad.h"
#include "Hud.h"
@@ -2439,82 +2439,3 @@ CStreaming::UpdateForAnimViewer(void)
CStreaming::RetryLoadFile(CStreaming::ms_channelError);
}
}
-
-STARTPATCHES
- InjectHook(0x406430, CStreaming::Init, PATCH_JUMP);
- InjectHook(0x406C80, CStreaming::Shutdown, PATCH_JUMP);
- InjectHook(0x4076C0, CStreaming::Update, PATCH_JUMP);
- InjectHook(0x406CC0, (void (*)(void))CStreaming::LoadCdDirectory, PATCH_JUMP);
- InjectHook(0x406DA0, (void (*)(const char*, int))CStreaming::LoadCdDirectory, PATCH_JUMP);
- InjectHook(0x409740, CStreaming::ConvertBufferToObject, PATCH_JUMP);
- InjectHook(0x409580, CStreaming::FinishLoadingLargeFile, PATCH_JUMP);
- InjectHook(0x407EA0, CStreaming::RequestModel, PATCH_JUMP);
- InjectHook(0x407FD0, CStreaming::RequestSubway, PATCH_JUMP);
- InjectHook(0x408190, CStreaming::RequestBigBuildings, PATCH_JUMP);
- InjectHook(0x408210, CStreaming::RequestIslands, PATCH_JUMP);
- InjectHook(0x40A890, CStreaming::RequestSpecialModel, PATCH_JUMP);
- InjectHook(0x40ADA0, CStreaming::RequestSpecialChar, PATCH_JUMP);
- InjectHook(0x54A5F0, CStreaming::HasModelLoaded, PATCH_JUMP);
- InjectHook(0x40ADC0, CStreaming::HasSpecialCharLoaded, PATCH_JUMP);
- InjectHook(0x40ADE0, CStreaming::SetMissionDoesntRequireSpecialChar, PATCH_JUMP);
-
- InjectHook(0x408830, CStreaming::RemoveModel, PATCH_JUMP);
- InjectHook(0x4083A0, CStreaming::RemoveUnusedBuildings, PATCH_JUMP);
- InjectHook(0x4083D0, CStreaming::RemoveBuildings, PATCH_JUMP);
- InjectHook(0x408640, CStreaming::RemoveUnusedBigBuildings, PATCH_JUMP);
- InjectHook(0x408680, CStreaming::RemoveBigBuildings, PATCH_JUMP);
- InjectHook(0x408780, CStreaming::RemoveIslandsNotUsed, PATCH_JUMP);
- InjectHook(0x40B180, CStreaming::RemoveLoadedVehicle, PATCH_JUMP);
- InjectHook(0x4089B0, CStreaming::RemoveLeastUsedModel, PATCH_JUMP);
- InjectHook(0x408940, CStreaming::RemoveAllUnusedModels, PATCH_JUMP);
- InjectHook(0x409450, CStreaming::RemoveReferencedTxds, PATCH_JUMP);
-
- InjectHook(0x40B160, CStreaming::GetAvailableVehicleSlot, PATCH_JUMP);
- InjectHook(0x40B060, CStreaming::AddToLoadedVehiclesList, PATCH_JUMP);
- InjectHook(0x4094C0, CStreaming::IsTxdUsedByRequestedModels, PATCH_JUMP);
- InjectHook(0x407E70, CStreaming::IsObjectInCdImage, PATCH_JUMP);
- InjectHook(0x408280, CStreaming::HaveAllBigBuildingsLoaded, PATCH_JUMP);
- InjectHook(0x40A790, CStreaming::SetModelIsDeletable, PATCH_JUMP);
- InjectHook(0x40A800, CStreaming::SetModelTxdIsDeletable, PATCH_JUMP);
- InjectHook(0x40A820, CStreaming::SetMissionDoesntRequireModel, PATCH_JUMP);
-
- InjectHook(0x40AA00, CStreaming::LoadInitialPeds, PATCH_JUMP);
- InjectHook(0x40ADF0, CStreaming::LoadInitialVehicles, PATCH_JUMP);
- InjectHook(0x40AE60, CStreaming::StreamVehiclesAndPeds, PATCH_JUMP);
- InjectHook(0x40AA30, CStreaming::StreamZoneModels, PATCH_JUMP);
- InjectHook(0x40AD00, CStreaming::RemoveCurrentZonesModels, PATCH_JUMP);
-
- InjectHook(0x409BE0, CStreaming::ProcessLoadingChannel, PATCH_JUMP);
- InjectHook(0x40A610, CStreaming::FlushChannels, PATCH_JUMP);
- InjectHook(0x40A680, CStreaming::FlushRequestList, PATCH_JUMP);
- InjectHook(0x409FF0, CStreaming::GetCdImageOffset, PATCH_JUMP);
- InjectHook(0x409E50, CStreaming::GetNextFileOnCd, PATCH_JUMP);
- InjectHook(0x40A060, CStreaming::RequestModelStream, PATCH_JUMP);
- InjectHook(0x4077F0, CStreaming::RetryLoadFile, PATCH_JUMP);
- InjectHook(0x40A390, CStreaming::LoadRequestedModels, PATCH_JUMP);
- InjectHook(0x40A440, CStreaming::LoadAllRequestedModels, PATCH_JUMP);
-
- InjectHook(0x4078F0, CStreaming::AddModelsToRequestList, PATCH_JUMP);
- InjectHook(0x407C50, (void (*)(CPtrList&,float,float,float,float,float,float))CStreaming::ProcessEntitiesInSectorList, PATCH_JUMP);
- InjectHook(0x407DD0, (void (*)(CPtrList&))CStreaming::ProcessEntitiesInSectorList, PATCH_JUMP);
-
- InjectHook(0x407070, CStreaming::DeleteFarAwayRwObjects, PATCH_JUMP);
- InjectHook(0x407390, CStreaming::DeleteAllRwObjects, PATCH_JUMP);
- InjectHook(0x407400, CStreaming::DeleteRwObjectsAfterDeath, PATCH_JUMP);
- InjectHook(0x408A60, CStreaming::DeleteRwObjectsBehindCamera, PATCH_JUMP);
- InjectHook(0x407560, CStreaming::DeleteRwObjectsInSectorList, PATCH_JUMP);
- InjectHook(0x4075A0, CStreaming::DeleteRwObjectsInOverlapSectorList, PATCH_JUMP);
- InjectHook(0x409340, CStreaming::DeleteRwObjectsBehindCameraInSectorList, PATCH_JUMP);
- InjectHook(0x4093C0, CStreaming::DeleteRwObjectsNotInFrustumInSectorList, PATCH_JUMP);
- InjectHook(0x409B70, CStreaming::MakeSpaceFor, PATCH_JUMP);
- InjectHook(0x40A6D0, CStreaming::LoadScene, PATCH_JUMP);
-
- InjectHook(0x40B210, CStreaming::MemoryCardSave, PATCH_JUMP);
- InjectHook(0x40B250, CStreaming::MemoryCardLoad, PATCH_JUMP);
-
- InjectHook(0x4063E0, &CStreamingInfo::GetCdPosnAndSize, PATCH_JUMP);
- InjectHook(0x406410, &CStreamingInfo::SetCdPosnAndSize, PATCH_JUMP);
- InjectHook(0x4063D0, &CStreamingInfo::GetCdSize, PATCH_JUMP);
- InjectHook(0x406380, &CStreamingInfo::AddToList, PATCH_JUMP);
- InjectHook(0x4063A0, &CStreamingInfo::RemoveFromList, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/SurfaceTable.cpp b/src/core/SurfaceTable.cpp
index 85572fbd..7212fc65 100644
--- a/src/core/SurfaceTable.cpp
+++ b/src/core/SurfaceTable.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "main.h"
#include "FileMgr.h"
#include "Weather.h"
@@ -141,10 +141,3 @@ CSurfaceTable::GetAdhesiveLimit(CColPoint &colpoint)
{
return ms_aAdhesiveLimitTable[GetAdhesionGroup(colpoint.surfaceB)][GetAdhesionGroup(colpoint.surfaceA)];
}
-
-STARTPATCHES
- InjectHook(0x4AB8F0, CSurfaceTable::Initialise, PATCH_JUMP);
- InjectHook(0x4ABA60, CSurfaceTable::GetAdhesionGroup, PATCH_JUMP);
- InjectHook(0x4ABAA0, CSurfaceTable::GetWetMultiplier, PATCH_JUMP);
- InjectHook(0x4ABA30, CSurfaceTable::GetAdhesiveLimit, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/TempColModels.cpp b/src/core/TempColModels.cpp
index 05b272ab..79d6252b 100644
--- a/src/core/TempColModels.cpp
+++ b/src/core/TempColModels.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "TempColModels.h"
#include "SurfaceTable.h"
@@ -287,7 +287,3 @@ CTempColModels::Initialise(void)
#undef SET_COLMODEL_SPHERES
}
-
-STARTPATCHES
- InjectHook(0x412160, CTempColModels::Initialise, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/Timer.cpp b/src/core/Timer.cpp
index 68b31e6f..ebd79695 100644
--- a/src/core/Timer.cpp
+++ b/src/core/Timer.cpp
@@ -1,6 +1,6 @@
#include <windows.h>
#include "common.h"
-#include "patcher.h"
+
#include "DMAudio.h"
#include "Record.h"
#include "Timer.h"
@@ -225,18 +225,3 @@ uint32 CTimer::GetCyclesPerFrame()
return 20;
}
-#if 1
-STARTPATCHES
- InjectHook(0x4ACE60, CTimer::Initialise, PATCH_JUMP);
- InjectHook(0x4ACF60, CTimer::Shutdown, PATCH_JUMP);
- InjectHook(0x4ACF70, CTimer::Update, PATCH_JUMP);
- InjectHook(0x4AD310, CTimer::Suspend, PATCH_JUMP);
- InjectHook(0x4AD370, CTimer::Resume, PATCH_JUMP);
- InjectHook(0x4AD3F0, CTimer::GetCyclesPerMillisecond, PATCH_JUMP);
- InjectHook(0x4AD410, CTimer::GetCurrentTimeInCycles, PATCH_JUMP);
- InjectHook(0x4AD450, CTimer::GetIsSlowMotionActive, PATCH_JUMP);
- InjectHook(0x4AD480, CTimer::Stop, PATCH_JUMP);
- InjectHook(0x4AD490, CTimer::StartUserPause, PATCH_JUMP);
- InjectHook(0x4AD4A0, CTimer::EndUserPause, PATCH_JUMP);
-ENDPATCHES
-#endif
diff --git a/src/core/User.cpp b/src/core/User.cpp
index a1a69b2d..36f07cbd 100644
--- a/src/core/User.cpp
+++ b/src/core/User.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "Hud.h"
#include "PlayerPed.h"
@@ -120,16 +120,3 @@ CUserDisplay::Process()
Pager.Process();
CurrentVehicle.Process();
}
-
-STARTPATCHES
- InjectHook(0x4AD4C0, &CPlaceName::Init, PATCH_JUMP);
- InjectHook(0x4AD4E0, &CPlaceName::Process, PATCH_JUMP);
- InjectHook(0x4AD5B0, &CPlaceName::Display, PATCH_JUMP);
-
- InjectHook(0x4AD5F0, &CCurrentVehicle::Init, PATCH_JUMP);
- InjectHook(0x4AD600, &CCurrentVehicle::Process, PATCH_JUMP);
- InjectHook(0x4AD630, &CCurrentVehicle::Display, PATCH_JUMP);
-
- InjectHook(0x4AD660, &CUserDisplay::Init, PATCH_JUMP);
- InjectHook(0x4AD690, &CUserDisplay::Process, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
diff --git a/src/core/Wanted.cpp b/src/core/Wanted.cpp
index 1911ae59..ce7d217e 100644
--- a/src/core/Wanted.cpp
+++ b/src/core/Wanted.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "Pools.h"
#include "ModelIndices.h"
#include "Timer.h"
@@ -456,25 +456,3 @@ CWanted::UpdateCrimesQ(void)
}
}
}
-
-STARTPATCHES
- InjectHook(0x4AD6E0, &CWanted::Initialise, PATCH_JUMP);
- InjectHook(0x4AD790, &CWanted::Reset, PATCH_JUMP);
- InjectHook(0x4AD7B0, &CWanted::Update, PATCH_JUMP);
- InjectHook(0x4AD900, &CWanted::UpdateWantedLevel, PATCH_JUMP);
- InjectHook(0x4AD9F0, &CWanted::RegisterCrime, PATCH_JUMP);
- InjectHook(0x4ADA10, &CWanted::RegisterCrime_Immediately, PATCH_JUMP);
- InjectHook(0x4ADA50, &CWanted::SetWantedLevel, PATCH_JUMP);
- InjectHook(0x4ADAC0, &CWanted::SetWantedLevelNoDrop, PATCH_JUMP);
- InjectHook(0x4ADAE0, &CWanted::SetMaximumWantedLevel, PATCH_JUMP);
- InjectHook(0x4ADBA0, &CWanted::AreSwatRequired, PATCH_JUMP);
- InjectHook(0x4ADBC0, &CWanted::AreFbiRequired, PATCH_JUMP);
- InjectHook(0x4ADBE0, &CWanted::AreArmyRequired, PATCH_JUMP);
- InjectHook(0x4ADC00, &CWanted::NumOfHelisRequired, PATCH_JUMP);
- InjectHook(0x4ADC40, &CWanted::ResetPolicePursuit, PATCH_JUMP);
- InjectHook(0x4ADD00, &CWanted::WorkOutPolicePresence, PATCH_JUMP);
- InjectHook(0x4ADF20, &CWanted::ClearQdCrimes, PATCH_JUMP);
- InjectHook(0x4ADFD0, &CWanted::AddCrimeToQ, PATCH_JUMP);
- InjectHook(0x4AE090, &CWanted::UpdateCrimesQ, PATCH_JUMP);
- InjectHook(0x4AE110, &CWanted::ReportCrimeNow, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/World.cpp b/src/core/World.cpp
index c9e3c11f..eacb3404 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -27,28 +27,28 @@
#include "Vehicle.h"
#include "WaterLevel.h"
#include "common.h"
-#include "patcher.h"
+
#define OBJECT_REPOSITION_OFFSET_Z 2.0f
CColPoint gaTempSphereColPoints[MAX_COLLISION_POINTS];
-CPtrList *CWorld::ms_bigBuildingsList = (CPtrList *)0x6FAB60;
-CPtrList &CWorld::ms_listMovingEntityPtrs = *(CPtrList *)0x8F433C;
-CSector (*CWorld::ms_aSectors)[NUMSECTORS_X] = (CSector(*)[NUMSECTORS_Y])0x665608;
-uint16 &CWorld::ms_nCurrentScanCode = *(uint16 *)0x95CC64;
+CPtrList CWorld::ms_bigBuildingsList[4];// = (CPtrList*)0x6FAB60;
+CPtrList CWorld::ms_listMovingEntityPtrs;// = *(CPtrList*)0x8F433C;
+CSector CWorld::ms_aSectors[NUMSECTORS_Y][NUMSECTORS_X];// = (CSector (*)[NUMSECTORS_Y])0x665608;
+uint16 CWorld::ms_nCurrentScanCode;// = *(uint16*)0x95CC64;
-uint8 &CWorld::PlayerInFocus = *(uint8 *)0x95CD61;
+uint8 CWorld::PlayerInFocus;// = *(uint8 *)0x95CD61;
CPlayerInfo CWorld::Players[NUMPLAYERS];
-bool &CWorld::bNoMoreCollisionTorque = *(bool *)0x95CDCC;
-CEntity *&CWorld::pIgnoreEntity = *(CEntity **)0x8F6494;
-bool &CWorld::bIncludeDeadPeds = *(bool *)0x95CD8F;
-bool &CWorld::bSecondShift = *(bool *)0x95CD54;
-bool &CWorld::bForceProcessControl = *(bool *)0x95CD6C;
-bool &CWorld::bProcessCutsceneOnly = *(bool *)0x95CD8B;
+bool CWorld::bNoMoreCollisionTorque;// = *(bool*)0x95CDCC;
+CEntity *CWorld::pIgnoreEntity;// = *(CEntity**)0x8F6494;
+bool CWorld::bIncludeDeadPeds;// = *(bool*)0x95CD8F;
+bool CWorld::bSecondShift;// = *(bool*)0x95CD54;
+bool CWorld::bForceProcessControl;// = *(bool*)0x95CD6C;
+bool CWorld::bProcessCutsceneOnly;// = *(bool*)0x95CD8B;
-bool &CWorld::bDoingCarCollisions = *(bool *)0x95CD8C;
-bool &CWorld::bIncludeCarTyres = *(bool *)0x95CDAA;
+bool CWorld::bDoingCarCollisions;// = *(bool*)0x95CD8C;
+bool CWorld::bIncludeCarTyres;// = *(bool*)0x95CDAA;
void
CWorld::Initialise()
@@ -2215,32 +2215,3 @@ CWorld::UseDetonator(CEntity *pEntity)
}
}
}
-
-STARTPATCHES
- InjectHook(0x4AE930, CWorld::Add, PATCH_JUMP);
- InjectHook(0x4AE9D0, CWorld::Remove, PATCH_JUMP);
- InjectHook(0x4B1F60, CWorld::ClearScanCodes, PATCH_JUMP);
- InjectHook(0x4AF970, CWorld::ProcessLineOfSight, PATCH_JUMP);
- InjectHook(0x4B0A80, CWorld::ProcessLineOfSightSector, PATCH_JUMP);
- InjectHook(0x4B0C70, CWorld::ProcessLineOfSightSectorList, PATCH_JUMP);
- InjectHook(0x4B0DE0, CWorld::ProcessVerticalLine, PATCH_JUMP);
- InjectHook(0x4B0EF0, CWorld::ProcessVerticalLineSector, PATCH_JUMP);
- InjectHook(0x4B1090, CWorld::ProcessVerticalLineSectorList, PATCH_JUMP);
- InjectHook(0x4AEAA0, CWorld::GetIsLineOfSightClear, PATCH_JUMP);
- InjectHook(0x4B2000, CWorld::GetIsLineOfSightSectorClear, PATCH_JUMP);
- InjectHook(0x4B2160, CWorld::GetIsLineOfSightSectorListClear, PATCH_JUMP);
-
- InjectHook(0x4B2200, CWorld::FindObjectsInRange, PATCH_JUMP);
- InjectHook(0x4B2540, CWorld::FindObjectsInRangeSectorList, PATCH_JUMP);
- InjectHook(0x4B4AC0, CWorld::TestSphereAgainstSectorList, PATCH_JUMP);
- InjectHook(0x4B4710, CWorld::TestSphereAgainstWorld, PATCH_JUMP);
- InjectHook(0x4B3A80, CWorld::FindGroundZForCoord, PATCH_JUMP);
- InjectHook(0x4B3AE0, CWorld::FindGroundZFor3DCoord, PATCH_JUMP);
- InjectHook(0x4B3B50, CWorld::FindRoofZFor3DCoord, PATCH_JUMP);
-
- InjectHook(0x4B5BC0, CWorld::StopAllLawEnforcersInTheirTracks, PATCH_JUMP);
- InjectHook(0x4B53F0, CWorld::SetAllCarsCanBeDamaged, PATCH_JUMP);
- InjectHook(0x4B5460, CWorld::ExtinguishAllCarFiresInArea, PATCH_JUMP);
-
- InjectHook(0x4B1A60, CWorld::Process, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/World.h b/src/core/World.h
index a1e2acfd..25c76531 100644
--- a/src/core/World.h
+++ b/src/core/World.h
@@ -54,22 +54,22 @@ struct CStoredCollPoly;
class CWorld
{
- static CPtrList *ms_bigBuildingsList; // [4];
- static CPtrList &ms_listMovingEntityPtrs;
- static CSector (*ms_aSectors)[NUMSECTORS_X]; // [NUMSECTORS_Y][NUMSECTORS_X];
- static uint16 &ms_nCurrentScanCode;
+ static CPtrList ms_bigBuildingsList[4];
+ static CPtrList ms_listMovingEntityPtrs;
+ static CSector ms_aSectors[NUMSECTORS_Y][NUMSECTORS_X];
+ static uint16 ms_nCurrentScanCode;
public:
- static uint8 &PlayerInFocus;
+ static uint8 PlayerInFocus;
static CPlayerInfo Players[NUMPLAYERS];
- static CEntity *&pIgnoreEntity;
- static bool &bIncludeDeadPeds;
- static bool &bNoMoreCollisionTorque;
- static bool &bSecondShift;
- static bool &bForceProcessControl;
- static bool &bProcessCutsceneOnly;
- static bool &bDoingCarCollisions;
- static bool &bIncludeCarTyres;
+ static CEntity *pIgnoreEntity;
+ static bool bIncludeDeadPeds;
+ static bool bNoMoreCollisionTorque;
+ static bool bSecondShift;
+ static bool bForceProcessControl;
+ static bool bProcessCutsceneOnly;
+ static bool bDoingCarCollisions;
+ static bool bIncludeCarTyres;
static void Remove(CEntity *entity);
static void Add(CEntity *entity);
diff --git a/src/core/ZoneCull.cpp b/src/core/ZoneCull.cpp
index 4cdd283e..d17a33d4 100644
--- a/src/core/ZoneCull.cpp
+++ b/src/core/ZoneCull.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "Building.h"
#include "Treadable.h"
#include "Train.h"
@@ -562,17 +562,3 @@ CCullZones::DoWeHaveMoreThanXOccurencesOfSet(int32 count, uint16 *set)
}
return false;
}
-
-STARTPATCHES
- InjectHook(0x524BC0, &CCullZones::Init, PATCH_JUMP);
- InjectHook(0x524EC0, &CCullZones::ResolveVisibilities, PATCH_JUMP);
- InjectHook(0x524F80, &CCullZones::Update, PATCH_JUMP);
- InjectHook(0x525370, &CCullZones::AddCullZone, PATCH_JUMP);
- InjectHook(0x5250D0, &CCullZones::ForceCullZoneCoors, PATCH_JUMP);
- InjectHook(0x525130, &CCullZones::FindCullZoneForCoors, PATCH_JUMP);
- InjectHook(0x5251C0, &CCullZones::FindAttributesForCoors, PATCH_JUMP);
- InjectHook(0x525290, &CCullZones::FindZoneWithStairsAttributeForPlayer, PATCH_JUMP);
-
- InjectHook(0x525610, &CCullZone::DoStuffLeavingZone, PATCH_JUMP);
- InjectHook(0x525810, &CCullZone::DoStuffEnteringZone, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/Zones.cpp b/src/core/Zones.cpp
index 39d4c3b5..6375de1c 100644
--- a/src/core/Zones.cpp
+++ b/src/core/Zones.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include <ctype.h>
#include "Zones.h"
@@ -840,36 +840,3 @@ CTheZones::LoadAllZones(uint8 *buffer, uint32 length)
TotalNumberOfMapZones = *(uint16*)(buffer);
NumberOfAudioZones = *(uint16*)(buffer+2);
}
-
-
-STARTPATCHES
- InjectHook(0x4B5DD0, &CZone::GetTranslatedName, PATCH_JUMP);
- InjectHook(0x4B5DE0, CTheZones::Init, PATCH_JUMP);
- InjectHook(0x4B61D0, CTheZones::Update, PATCH_JUMP);
- InjectHook(0x4B6210, CTheZones::CreateZone, PATCH_JUMP);
- InjectHook(0x4B6380, CTheZones::CreateMapZone, PATCH_JUMP);
- InjectHook(0x4B64C0, CTheZones::PostZoneCreation, PATCH_JUMP);
- InjectHook(0x4B6500, CTheZones::InsertZoneIntoZoneHierarchy, PATCH_JUMP);
- InjectHook(0x4B6530, CTheZones::InsertZoneIntoZoneHierRecursive, PATCH_JUMP);
- InjectHook(0x4B65F0, CTheZones::ZoneIsEntirelyContainedWithinOtherZone, PATCH_JUMP);
- InjectHook(0x4B6710, CTheZones::PointLiesWithinZone, PATCH_JUMP);
- InjectHook(0x4B6910, CTheZones::GetLevelFromPosition, PATCH_JUMP);
- InjectHook(0x4B69B0, CTheZones::FindSmallestZonePosition, PATCH_JUMP);
- InjectHook(0x4B6790, CTheZones::FindSmallestZonePositionType, PATCH_JUMP);
- InjectHook(0x4B6890, CTheZones::FindSmallestZonePositionILN, PATCH_JUMP);
- InjectHook(0x4B6800, CTheZones::FindZoneByLabelAndReturnIndex, PATCH_JUMP);
- InjectHook(0x4B6FA0, CTheZones::GetZone, PATCH_JUMP);
- InjectHook(0x4B84F0, CTheZones::GetPointerForZoneIndex, PATCH_JUMP);
- InjectHook(0x4B6A10, CTheZones::GetZoneInfo, PATCH_JUMP);
- InjectHook(0x4B6FB0, CTheZones::GetZoneInfoForTimeOfDay, PATCH_JUMP);
- InjectHook(0x4B6A50, CTheZones::SetZoneCarInfo, PATCH_JUMP);
- InjectHook(0x4B6DC0, CTheZones::SetZonePedInfo, PATCH_JUMP);
- InjectHook(0x4B6EB0, CTheZones::SetCarDensity, PATCH_JUMP);
- InjectHook(0x4B6F00, CTheZones::SetPedDensity, PATCH_JUMP);
- InjectHook(0x4B6F50, CTheZones::SetPedGroup, PATCH_JUMP);
- InjectHook(0x4B83E0, CTheZones::FindAudioZone, PATCH_JUMP);
- InjectHook(0x4B8430, CTheZones::FindZoneForPoint, PATCH_JUMP);
- InjectHook(0x4B8340, CTheZones::AddZoneToAudioZoneArray, PATCH_JUMP);
- InjectHook(0x4B8510, CTheZones::SaveAllZones, PATCH_JUMP);
- InjectHook(0x4B8950, CTheZones::LoadAllZones, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/main.cpp b/src/core/main.cpp
index 1b46d453..d5d4065d 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -2,7 +2,7 @@
#include "rpmatfx.h"
#include "rphanim.h"
#include "rpskin.h"
-#include "patcher.h"
+
#include "main.h"
#include "CdStream.h"
#include "General.h"
@@ -1838,28 +1838,3 @@ main(int argc, char *argv[])
return 0;
}
-
-STARTPATCHES
- InjectHook(0x48E480, Idle, PATCH_JUMP);
- InjectHook(0x48E700, FrontendIdle, PATCH_JUMP);
-
- InjectHook(0x48CF10, DoRWStuffStartOfFrame, PATCH_JUMP);
- InjectHook(0x48D040, DoRWStuffStartOfFrame_Horizon, PATCH_JUMP);
- InjectHook(0x48E030, RenderScene, PATCH_JUMP);
- InjectHook(0x48E080, RenderDebugShit, PATCH_JUMP);
- InjectHook(0x48E090, RenderEffects, PATCH_JUMP);
- InjectHook(0x48E0E0, Render2dStuff, PATCH_JUMP);
- InjectHook(0x48E450, RenderMenus, PATCH_JUMP);
- InjectHook(0x48D120, DoFade, PATCH_JUMP);
- InjectHook(0x48E470, Render2dStuffAfterFade, PATCH_JUMP);
-
- InjectHook(0x48D550, LoadSplash, PATCH_JUMP);
- InjectHook(0x48D670, DestroySplashScreen, PATCH_JUMP);
- InjectHook(0x48D770, LoadingScreen, PATCH_JUMP);
- InjectHook(0x48D760, ResetLoadingScreenBar, PATCH_JUMP);
-
- InjectHook(0x48D470, PluginAttach, PATCH_JUMP);
- InjectHook(0x48D520, Initialise3D, PATCH_JUMP);
- InjectHook(0x48D540, Terminate3D, PATCH_JUMP);
- InjectHook(0x48E800, AppEventHandler, PATCH_JUMP);
-ENDPATCHES
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 2046a7f9..e5f42696 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -29,18 +29,12 @@
#include <list>
-#ifndef RWLIBS
-void **rwengine = *(void***)0x5A10E1;
-#else
+#ifdef RWLIBS
extern "C" int vsprintf(char* const _Buffer, char const* const _Format, va_list _ArgList);
#endif
DebugMenuAPI gDebugMenuAPI;
-STARTPATCHES
- InjectHook(0x5A07E0, (void (*)(void*)) &operator delete, PATCH_JUMP);
- InjectHook(0x5A0690, (void* (*)(size_t)) &operator new, PATCH_JUMP);
-ENDPATCHES
#ifdef USE_PS2_RAND
unsigned __int64 myrand_seed = 1;
@@ -387,7 +381,7 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);
extern bool PrintDebugCode;
- extern int16 &DebugCamMode;
+ extern int16 DebugCamMode;
DebugMenuAddVarBool8("Cam", "Use mouse Cam", (int8*)&CCamera::m_bUseMouse3rdPerson, nil);
#ifdef FREE_CAM
DebugMenuAddVarBool8("Cam", "Free Cam", (int8*)&CCamera::bFreeCam, nil);
@@ -494,37 +488,3 @@ void re3_trace(const char *filename, unsigned int lineno, const char *func, cons
#ifdef VALIDATE_SAVE_SIZE
int32 _saveBufCount;
#endif
-
-void
-patch()
-{
- StaticPatcher::Apply();
-
-// Patch<float>(0x46BC61+6, 1.0f); // car distance
- InjectHook(0x59E460, printf, PATCH_JUMP);
- InjectHook(0x475E00, printf, PATCH_JUMP); // _Error
-
-
-// InterceptCall(&open_script_orig, open_script, 0x438869);
-
-// InterceptCall(&RsEventHandler_orig, delayedPatches10, 0x58275E);
-}
-
-BOOL WINAPI
-DllMain(HINSTANCE hInst, DWORD reason, LPVOID)
-{
- if(reason == DLL_PROCESS_ATTACH){
-
- AllocConsole();
- freopen("CONIN$", "r", stdin);
- freopen("CONOUT$", "w", stdout);
- freopen("CONOUT$", "w", stderr);
-
- if (*(DWORD*)0x5C1E75 == 0xB85548EC) // 1.0
- patch();
- else
- return FALSE;
- }
-
- return TRUE;
-}