summaryrefslogtreecommitdiffstats
path: root/src/control/PathFind.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-04-17 17:08:26 +0200
committerGitHub <noreply@github.com>2020-04-17 17:08:26 +0200
commit1c74d111e8cafa4ad70837725c71f6d478390f01 (patch)
tree818918190bf4403c32137d7348a77e23b643a669 /src/control/PathFind.cpp
parentimplemented CVector2D::NormaliseSafe for SkidMarks (diff)
parentappveyor setup (diff)
downloadre3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar
re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.gz
re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.bz2
re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.lz
re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.xz
re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.zst
re3-1c74d111e8cafa4ad70837725c71f6d478390f01.zip
Diffstat (limited to 'src/control/PathFind.cpp')
-rw-r--r--src/control/PathFind.cpp57
1 files changed, 6 insertions, 51 deletions
diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp
index 9f45c454..9d0959a8 100644
--- a/src/control/PathFind.cpp
+++ b/src/control/PathFind.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "General.h"
#include "FileMgr.h" // only needed for empty function
#include "Camera.h"
@@ -12,7 +12,7 @@ bool gbShowPedPaths;
bool gbShowCarPaths;
bool gbShowCarPathsLinks;
-CPathFind &ThePaths = *(CPathFind*)0x8F6754;
+CPathFind ThePaths;
#define MAX_DIST INT16_MAX-1
#define MIN_PED_ROUTE_DISTANCE 23.8f
@@ -21,11 +21,11 @@ CPathFind &ThePaths = *(CPathFind*)0x8F6754;
// 1 UseInRoadBlock
// 2 east/west road(?)
-CPathInfoForObject *&InfoForTileCars = *(CPathInfoForObject**)0x8F1A8C;
-CPathInfoForObject *&InfoForTilePeds = *(CPathInfoForObject**)0x8F1AE4;
+CPathInfoForObject *InfoForTileCars;
+CPathInfoForObject *InfoForTilePeds;
// unused
-CTempDetachedNode *&DetachedNodesCars = *(CTempDetachedNode**)0x8E2824;
-CTempDetachedNode *&DetachedNodesPeds = *(CTempDetachedNode**)0x8E28A0;
+CTempDetachedNode *DetachedNodesCars;
+CTempDetachedNode *DetachedNodesPeds;
bool
CPedPath::CalcPedRoute(int8 pathType, CVector position, CVector destination, CVector *pointPoses, int16 *pointsFound, int16 maxPoints)
@@ -1766,48 +1766,3 @@ CPathFind::DisplayPathData(void)
}
}
}
-
-STARTPATCHES
- InjectHook(0x42E680, &CPedPath::CalcPedRoute, PATCH_JUMP);
- InjectHook(0x42F100, &CPedPath::AddNodeToPathList, PATCH_JUMP);
- InjectHook(0x42F140, &CPedPath::RemoveNodeFromList, PATCH_JUMP);
- InjectHook(0x42F160, &CPedPath::AddNodeToList, PATCH_JUMP);
- InjectHook(0x42F1A0, &CPedPath::AddBlockade, PATCH_JUMP);
- InjectHook(0x42F420, &CPedPath::AddBlockadeSectorList, PATCH_JUMP);
-
- InjectHook(0x4294A0, &CPathFind::Init, PATCH_JUMP);
- InjectHook(0x42D580, &CPathFind::AllocatePathFindInfoMem, PATCH_JUMP);
- InjectHook(0x429540, &CPathFind::RegisterMapObject, PATCH_JUMP);
- InjectHook(0x42D7E0, &CPathFind::StoreNodeInfoPed, PATCH_JUMP);
- InjectHook(0x42D690, &CPathFind::StoreNodeInfoCar, PATCH_JUMP);
- InjectHook(0x429610, &CPathFind::PreparePathData, PATCH_JUMP);
- InjectHook(0x42B810, &CPathFind::CountFloodFillGroups, PATCH_JUMP);
- InjectHook(0x429C20, &CPathFind::PreparePathDataForType, PATCH_JUMP);
-
- InjectHook(0x42C990, &CPathFind::CalcRoadDensity, PATCH_JUMP);
- InjectHook(0x42E1B0, &CPathFind::TestForPedTrafficLight, PATCH_JUMP);
- InjectHook(0x42E340, &CPathFind::TestCrossesRoad, PATCH_JUMP);
- InjectHook(0x42CBE0, &CPathFind::AddNodeToList, PATCH_JUMP);
- InjectHook(0x42CBB0, &CPathFind::RemoveNodeFromList, PATCH_JUMP);
- InjectHook(0x42B790, &CPathFind::RemoveBadStartNode, PATCH_JUMP);
- InjectHook(0x42E3B0, &CPathFind::SetLinksBridgeLights, PATCH_JUMP);
- InjectHook(0x42DED0, &CPathFind::SwitchOffNodeAndNeighbours, PATCH_JUMP);
- InjectHook(0x42D960, &CPathFind::SwitchRoadsOffInArea, PATCH_JUMP);
- InjectHook(0x42DA50, &CPathFind::SwitchPedRoadsOffInArea, PATCH_JUMP);
- InjectHook(0x42DB50, &CPathFind::SwitchRoadsInAngledArea, PATCH_JUMP);
- InjectHook(0x42E140, &CPathFind::MarkRoadsBetweenLevelsNodeAndNeighbours, PATCH_JUMP);
- InjectHook(0x42DF50, &CPathFind::MarkRoadsBetweenLevelsInArea, PATCH_JUMP);
- InjectHook(0x42E040, &CPathFind::PedMarkRoadsBetweenLevelsInArea, PATCH_JUMP);
- InjectHook(0x42CC30, &CPathFind::FindNodeClosestToCoors, PATCH_JUMP);
- InjectHook(0x42CDC0, &CPathFind::FindNodeClosestToCoorsFavourDirection, PATCH_JUMP);
- InjectHook(0x42CFC0, &CPathFind::FindNodeOrientationForCarPlacement, PATCH_JUMP);
- InjectHook(0x42D060, &CPathFind::FindNodeOrientationForCarPlacementFacingDestination, PATCH_JUMP);
- InjectHook(0x42BF10, &CPathFind::NewGenerateCarCreationCoors, PATCH_JUMP);
- InjectHook(0x42C1E0, &CPathFind::GeneratePedCreationCoors, PATCH_JUMP);
- InjectHook(0x42D2A0, &CPathFind::FindRoadObjectClosestToCoors, PATCH_JUMP);
- InjectHook(0x42B9F0, &CPathFind::FindNextNodeWandering, PATCH_JUMP);
- InjectHook(0x42B040, &CPathFind::DoPathSearch, PATCH_JUMP);
- InjectHook(0x42C8C0, &CPathFind::TestCoorsCloseness, PATCH_JUMP);
- InjectHook(0x42E450, &CPathFind::Save, PATCH_JUMP);
- InjectHook(0x42E550, &CPathFind::Load, PATCH_JUMP);
-ENDPATCHES