summaryrefslogtreecommitdiffstats
path: root/src/peds/PedRoutes.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2019-10-06 23:39:25 +0200
committereray orçunus <erayorcunus@gmail.com>2019-10-06 23:39:25 +0200
commitd5d1c7ec5fc98f8355d812587938314406a6df80 (patch)
treee1652a9c39e77bd1bc8b81973fccbe91eb3d8eae /src/peds/PedRoutes.cpp
parentRadio shadow fix, RAMPAGE!! message fix (diff)
downloadre3-d5d1c7ec5fc98f8355d812587938314406a6df80.tar
re3-d5d1c7ec5fc98f8355d812587938314406a6df80.tar.gz
re3-d5d1c7ec5fc98f8355d812587938314406a6df80.tar.bz2
re3-d5d1c7ec5fc98f8355d812587938314406a6df80.tar.lz
re3-d5d1c7ec5fc98f8355d812587938314406a6df80.tar.xz
re3-d5d1c7ec5fc98f8355d812587938314406a6df80.tar.zst
re3-d5d1c7ec5fc98f8355d812587938314406a6df80.zip
Diffstat (limited to '')
-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