Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gymnasiast committed May 1, 2024
1 parent b37a435 commit 52b5d94
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions src/openrct2/ride/Track.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ constexpr uint32_t RideConstructionSpecialPieceSelected = 0x10000;
constexpr uint8_t kRCT2DefaultBlockBrakeSpeed = 2;
constexpr int32_t kBlockBrakeBaseSpeed = 0x20364;
constexpr int32_t kBlockBrakeSpeedOffset = kBlockBrakeBaseSpeed - (kRCT2DefaultBlockBrakeSpeed << 16);
constexpr uint8_t const kLegacyBrakeSpeedMultiplier = 2;
constexpr uint8_t const kLegacyBrakeSpeedMask = 0b00011110;
constexpr uint8_t const kMaximumBrakeSpeed = 0b00111111; // 2 high bits reserved for potential future behavior

constexpr uint8_t kMaximumBrakeSpeed = 30;
constexpr uint8_t kLegacyBrakeSpeedMultiplier = 2;
constexpr uint8_t kLegacyBrakeSpeedMask = 0b00011110;
constexpr uint8_t kMaximumBrakeSpeed = 0b00111111; // 2 high bits reserved for potential future behavior

using track_type_t = uint16_t;

Expand Down
4 changes: 2 additions & 2 deletions src/openrct2/ride/TrackDesign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con
trackFlags = ride.GetRideTypeDescriptor().GetRelativeBoosterSpeed(trackFlags);
}

// check to ensure the value is serializable. This warning will not apply to new track design format
// check to ensure the value is serialisable. This warning will not apply to new track design format.
bool tooHigh = trackFlags > kLegacyBrakeSpeedMask;
bool tooPrecise = trackFlags & 1;
if (tooPrecise || tooHigh)
{
warningMessage = STR_TRACK_DESIGN_SPEED_UNSERIALIZABLE;
warningMessage = STR_TRACK_DESIGN_SPEED_UNSERIALISABLE;
}
if (tooPrecise)
{
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/ride/coaster/meta/GigaCoaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ constexpr RideTypeDescriptor GigaCoasterRTD =
.RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned),
.DefaultMode = RideMode::ContinuousCircuit,
.OperatingSettings = { 10, 27, 17, 68 },
.TrackSpeedSettings = { 60, 60 }
.TrackSpeedSettings = { 60, 60 },
.LegacyBoosterSettings = { 17, 68, 1 },
.Naming = { STR_RIDE_NAME_GIGA_COASTER, STR_RIDE_DESCRIPTION_GIGA_COASTER },
.NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station },
Expand Down

0 comments on commit 52b5d94

Please sign in to comment.