1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 15:54:31 +01:00

Use fixed size storage for Rides, cleanup interface a bit

This commit is contained in:
ζeh Matt
2023-02-21 23:20:48 +02:00
parent 4e45c0176c
commit 063d97f4f2
8 changed files with 63 additions and 44 deletions

View File

@@ -163,7 +163,7 @@ public:
if (mapCoords == _placementLoc)
{
TrackDesignPreviewDrawOutlines(
tds, _trackDesign.get(), *GetOrAllocateRide(PreviewRideId), { mapCoords, 0, _currentTrackPieceDirection });
tds, _trackDesign.get(), *RideAllocateAtIndex(PreviewRideId), { mapCoords, 0, _currentTrackPieceDirection });
return;
}
@@ -203,7 +203,7 @@ public:
WidgetInvalidate(*this, WIDX_PRICE);
}
TrackDesignPreviewDrawOutlines(tds, _trackDesign.get(), *GetOrAllocateRide(PreviewRideId), trackLoc);
TrackDesignPreviewDrawOutlines(tds, _trackDesign.get(), *RideAllocateAtIndex(PreviewRideId), trackLoc);
}
void OnToolDown(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) override
@@ -425,7 +425,7 @@ private:
return z
+ TrackDesignGetZPlacement(
_trackDesign.get(), *GetOrAllocateRide(PreviewRideId), { loc, z, _currentTrackPieceDirection });
_trackDesign.get(), *RideAllocateAtIndex(PreviewRideId), { loc, z, _currentTrackPieceDirection });
}
void DrawMiniPreviewTrack(TrackDesign* td6, int32_t pass, const CoordsXY& origin, CoordsXY min, CoordsXY max)