diff --git a/src/openrct2/ride/TrackData.h b/src/openrct2/ride/TrackData.h index 21e63d1089..1dc421f450 100644 --- a/src/openrct2/ride/TrackData.h +++ b/src/openrct2/ride/TrackData.h @@ -9,34 +9,16 @@ #pragma once -#include "../paint/support/MetalSupports.h" -#include "ted/TrackElemType.h" +#include + +namespace OpenRCT2 +{ + enum class TrackElemType : uint16_t; +} namespace OpenRCT2::TrackMetadata { - enum class TrackCurve : uint8_t; - enum class TrackPitch : uint8_t; - enum class TrackRoll : uint8_t; struct TrackElementDescriptor; - struct DodgemsTrackSize - { - uint8_t left; - uint8_t top; - uint8_t right; - uint8_t bottom; - }; - - constexpr DodgemsTrackSize GetDodgemsTrackSize(TrackElemType type) - { - if (type == TrackElemType::flatTrack2x2) - return { 4, 4, 59, 59 }; - if (type == TrackElemType::flatTrack4x4) - return { 4, 4, 123, 123 }; - if (type == TrackElemType::flatTrack2x4) - return { 4, 4, 59, 123 }; - return { 0, 0, 0, 0 }; - } - const TrackElementDescriptor& GetTrackElementDescriptor(TrackElemType type); } // namespace OpenRCT2::TrackMetadata diff --git a/src/openrct2/ride/Vehicle.Dodgems.cpp b/src/openrct2/ride/Vehicle.Dodgems.cpp index 1df1b0882c..f451cc2de5 100644 --- a/src/openrct2/ride/Vehicle.Dodgems.cpp +++ b/src/openrct2/ride/Vehicle.Dodgems.cpp @@ -29,6 +29,25 @@ extern int32_t _vehicleVelocityF64E0C; extern int32_t _vehicleUnkF64E10; extern CoordsXYZ _vehicleCurPosition; +struct DodgemsTrackSize +{ + uint8_t left; + uint8_t top; + uint8_t right; + uint8_t bottom; +}; + +constexpr DodgemsTrackSize GetDodgemsTrackSize(TrackElemType type) +{ + if (type == TrackElemType::flatTrack2x2) + return { 4, 4, 59, 59 }; + if (type == TrackElemType::flatTrack4x4) + return { 4, 4, 123, 123 }; + if (type == TrackElemType::flatTrack2x4) + return { 4, 4, 59, 123 }; + return { 0, 0, 0, 0 }; +} + /** rct2: 0x009A37C4 */ static constexpr CoordsXY kSurroundingTiles[] = { { 0, 0 },