summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/control/ObjectData.cpp5
-rw-r--r--src/control/ObjectData.h7
-rw-r--r--src/control/PathFind.cpp6
-rw-r--r--src/control/PathFind.h5
4 files changed, 23 insertions, 0 deletions
diff --git a/src/control/ObjectData.cpp b/src/control/ObjectData.cpp
new file mode 100644
index 00000000..28c34658
--- /dev/null
+++ b/src/control/ObjectData.cpp
@@ -0,0 +1,5 @@
+#include "common.h"
+#include "patcher.h"
+#include "ObjectData.h"
+
+WRAPPER void CObjectData::Initialise(const char *filename) { EAXJMP(0x4BC0E0); }
diff --git a/src/control/ObjectData.h b/src/control/ObjectData.h
new file mode 100644
index 00000000..7df1c845
--- /dev/null
+++ b/src/control/ObjectData.h
@@ -0,0 +1,7 @@
+#pragma once
+
+class CObjectData
+{
+public:
+ static void Initialise(const char *filename);
+};
diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp
index 8cfc17e7..c3af2e30 100644
--- a/src/control/PathFind.cpp
+++ b/src/control/PathFind.cpp
@@ -77,6 +77,12 @@ CPathFind::StoreNodeInfoCar(int16 id, int16 node, int8 type, int8 next, int16 x,
}
void
+CPathFind::RegisterMapObject(CTreadable *mapObject)
+{
+ m_mapObjects[m_numMapObjects++] = mapObject;
+}
+
+void
CPathFind::PreparePathData(void)
{
int i, j, k;
diff --git a/src/control/PathFind.h b/src/control/PathFind.h
index ed3c7e9f..83b89953 100644
--- a/src/control/PathFind.h
+++ b/src/control/PathFind.h
@@ -67,6 +67,8 @@ struct CPathInfoForObject
int8 numRightLanes;
uint8 crossing : 1;
};
+extern CPathInfoForObject *&InfoForTileCars;
+extern CPathInfoForObject *&InfoForTilePeds;
struct CTempNode
{
@@ -125,6 +127,9 @@ public:
void CalcNodeCoors(int16 x, int16 y, int16 z, int32 id, CVector *out);
void StoreNodeInfoPed(int16 id, int16 node, int8 type, int8 next, int16 x, int16 y, int16 z, int16 width, bool crossing);
void StoreNodeInfoCar(int16 id, int16 node, int8 type, int8 next, int16 x, int16 y, int16 z, int16 width, int8 numLeft, int8 numRight);
+ void RegisterMapObject(CTreadable *mapObject);
+
+ bool IsPathObject(int id) { return id < PATHNODESIZE && (InfoForTileCars[id*12].type != 0 || InfoForTilePeds[id*12].type != 0); }
};
static_assert(sizeof(CPathFind) == 0x4c8f4, "CPathFind: error");