summaryrefslogtreecommitdiffstats
path: root/src/peds/PedRoutes.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2019-10-06 23:46:19 +0200
committerGitHub <noreply@github.com>2019-10-06 23:46:19 +0200
commitc792c776f2e03d2081a187321703233e84c91362 (patch)
treee1652a9c39e77bd1bc8b81973fccbe91eb3d8eae /src/peds/PedRoutes.cpp
parentRadio shadow fix, RAMPAGE!! message fix (diff)
parentPeds (diff)
downloadre3-c792c776f2e03d2081a187321703233e84c91362.tar
re3-c792c776f2e03d2081a187321703233e84c91362.tar.gz
re3-c792c776f2e03d2081a187321703233e84c91362.tar.bz2
re3-c792c776f2e03d2081a187321703233e84c91362.tar.lz
re3-c792c776f2e03d2081a187321703233e84c91362.tar.xz
re3-c792c776f2e03d2081a187321703233e84c91362.tar.zst
re3-c792c776f2e03d2081a187321703233e84c91362.zip
Diffstat (limited to 'src/peds/PedRoutes.cpp')
-rw-r--r--src/peds/PedRoutes.cpp26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/peds/PedRoutes.cpp b/src/peds/PedRoutes.cpp
index f1f73988..a8e8d2ab 100644
--- a/src/peds/PedRoutes.cpp
+++ b/src/peds/PedRoutes.cpp
@@ -3,5 +3,27 @@
#include "main.h"
#include "PedRoutes.h"
-WRAPPER int16 CRouteNode::GetRouteThisPointIsOn(int16) { EAXJMP(0x4EE7A0); }
-WRAPPER CVector CRouteNode::GetPointPosition(int16) { EAXJMP(0x4EE780); } \ No newline at end of file
+CRouteNode (&gaRoutes)[NUMPEDROUTES] = *(CRouteNode(*)[NUMPEDROUTES]) * (uintptr*)0x62E090;
+
+int16
+CRouteNode::GetRouteThisPointIsOn(int16 point)
+{
+ return gaRoutes[point].m_route;
+}
+
+// Actually GetFirstPointOfRoute
+int16
+CRouteNode::GetRouteStart(int16 route)
+{
+ for (int i = 0; i < NUMPEDROUTES; i++) {
+ if (route == gaRoutes[i].m_route)
+ return i;
+ }
+ return -1;
+}
+
+CVector
+CRouteNode::GetPointPosition(int16 point)
+{
+ return gaRoutes[point].m_pos;
+} \ No newline at end of file