diff options
Diffstat (limited to '')
-rw-r--r-- | src/peds/PedRoutes.cpp | 26 |
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 |