Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gymnasiast authored and spacek531 committed May 2, 2024
1 parent 2b9e714 commit 0327e26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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

0 comments on commit 0327e26

Please sign in to comment.