mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 22:13:07 +01:00
Part of #13874: replace curvechain
This commit is contained in:
@@ -87,6 +87,7 @@ RideConstructionState gRideEntranceExitPlacePreviousRideConstructionState;
|
||||
Direction gRideEntranceExitPlaceDirection;
|
||||
|
||||
using namespace OpenRCT2;
|
||||
using namespace OpenRCT2::TrackMetaData;
|
||||
|
||||
static int32_t ride_check_if_construction_allowed(Ride* ride)
|
||||
{
|
||||
@@ -626,6 +627,8 @@ void ride_construction_set_default_next_piece()
|
||||
CoordsXYE xyElement;
|
||||
TileElement* tileElement;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
|
||||
TrackElementDescriptor teDescriptor;
|
||||
switch (_rideConstructionState)
|
||||
{
|
||||
case RideConstructionState::Front:
|
||||
@@ -654,7 +657,8 @@ void ride_construction_set_default_next_piece()
|
||||
}
|
||||
}
|
||||
|
||||
curve = gTrackCurveChain[trackType].next;
|
||||
teDescriptor = GetTrackElementDescriptor(trackType);
|
||||
curve = teDescriptor.CurveChain.next;
|
||||
bank = TrackDefinitions[trackType].bank_end;
|
||||
slope = TrackDefinitions[trackType].vangle_end;
|
||||
|
||||
@@ -699,7 +703,8 @@ void ride_construction_set_default_next_piece()
|
||||
}
|
||||
}
|
||||
|
||||
curve = gTrackCurveChain[trackType].previous;
|
||||
teDescriptor = GetTrackElementDescriptor(trackType);
|
||||
curve = teDescriptor.CurveChain.previous;
|
||||
bank = TrackDefinitions[trackType].bank_start;
|
||||
slope = TrackDefinitions[trackType].vangle_start;
|
||||
|
||||
|
||||
@@ -3087,7 +3087,7 @@ const uint8_t TrackPieceLengths[TrackElemType::Count] = {
|
||||
};
|
||||
|
||||
// rct2: 0x00998C95
|
||||
const track_curve_chain gTrackCurveChain[TrackElemType::Count] = {
|
||||
const static track_curve_chain gTrackCurveChain[TrackElemType::Count] = {
|
||||
{ TRACK_CURVE_NONE, TRACK_CURVE_NONE },
|
||||
{ RideConstructionSpecialPieceSelected | TrackElemType::EndStation, RideConstructionSpecialPieceSelected | TrackElemType::EndStation },
|
||||
{ RideConstructionSpecialPieceSelected | TrackElemType::EndStation, RideConstructionSpecialPieceSelected | TrackElemType::EndStation },
|
||||
|
||||
@@ -29,8 +29,6 @@ struct track_curve_chain
|
||||
int32_t previous;
|
||||
};
|
||||
|
||||
extern const track_curve_chain gTrackCurveChain[TrackElemType::Count];
|
||||
|
||||
struct track_descriptor
|
||||
{
|
||||
bool starts_diagonal;
|
||||
|
||||
Reference in New Issue
Block a user