diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2024-10-15 13:09:43 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-15 13:09:43 -0600 |
| commit | a0862b6a159373f2e1554e489ecb5bb08d89654e (patch) | |
| tree | b5c33fc7f65b438ee74898dd9ed7ba25b0fa108a /src/engine/vehicles/Utils.cpp | |
| parent | 58d56fcba848e8545052c1d85ef27d0b02841538 (diff) | |
[modding] Implement Vehicles & Fix Animations (#109)
* Train works
* Fix minimap
* Fix highway
* Fix
* Refactor train and boat
* Update
* Implement Trucks
* Fix tanker
* Finish implementing vehicles
* Fix animations
* Fix spawn players
* Fix spawn players
* Fix loading custom data
---------
Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/engine/vehicles/Utils.cpp')
| -rw-r--r-- | src/engine/vehicles/Utils.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/engine/vehicles/Utils.cpp b/src/engine/vehicles/Utils.cpp new file mode 100644 index 000000000..d2a3ece57 --- /dev/null +++ b/src/engine/vehicles/Utils.cpp @@ -0,0 +1,12 @@ +#include <libultraship.h> +#include "Utils.h" + +extern "C" { +#include "macros.h" +#include "defines.h" +#include "code_80005FD0.h" +} + +uint32_t CalculateWaypointDistribution(size_t i, uint32_t numVehicles, size_t numWaypoints, uint32_t centerWaypoint) { + return (uint32_t)(((i * numWaypoints) / numVehicles) + centerWaypoint) % numWaypoints; +} |
