mirror of https://github.com/OpenRCT2/OpenRCT2.git
Part of #13874: replace height markers positions tables
This commit is contained in:
parent
1bfa26e4c5
commit
72e6f9a694
|
@ -4316,7 +4316,7 @@ const track_type_t TrackElementMirrorMap[TrackElemType::Count] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/** rct2: 0x00999694 */
|
/** rct2: 0x00999694 */
|
||||||
const uint32_t TrackHeightMarkerPositions[TrackElemType::Count] = {
|
const static uint32_t TrackHeightMarkerPositions[TrackElemType::Count] = {
|
||||||
(1 << 0), // TrackElemType::Flat
|
(1 << 0), // TrackElemType::Flat
|
||||||
(1 << 0), // TrackElemType::EndStation
|
(1 << 0), // TrackElemType::EndStation
|
||||||
(1 << 0), // TrackElemType::BeginStation
|
(1 << 0), // TrackElemType::BeginStation
|
||||||
|
|
|
@ -64,8 +64,6 @@ constexpr const dodgems_track_size DodgemsTrackSize(track_type_t type)
|
||||||
}
|
}
|
||||||
extern const track_type_t TrackElementMirrorMap[TrackElemType::Count];
|
extern const track_type_t TrackElementMirrorMap[TrackElemType::Count];
|
||||||
|
|
||||||
extern const uint32_t TrackHeightMarkerPositions[TrackElemType::Count];
|
|
||||||
|
|
||||||
extern const uint8_t TrackSequenceElementAllowedWallEdges[TrackElemType::Count][16];
|
extern const uint8_t TrackSequenceElementAllowedWallEdges[TrackElemType::Count][16];
|
||||||
|
|
||||||
struct TrackElementDescriptor
|
struct TrackElementDescriptor
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include "TrackData.h"
|
#include "TrackData.h"
|
||||||
#include "TrackDesign.h"
|
#include "TrackDesign.h"
|
||||||
|
|
||||||
|
using namespace OpenRCT2::TrackMetaData;
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
/* rct2: 0x007667AC */
|
/* rct2: 0x007667AC */
|
||||||
static constexpr TileCoordsXY EntranceOffsetEdgeNE[] = {
|
static constexpr TileCoordsXY EntranceOffsetEdgeNE[] = {
|
||||||
|
@ -2202,7 +2204,8 @@ void PaintTrack(paint_session* session, Direction direction, int32_t height, con
|
||||||
if (PaintShouldShowHeightMarkers(session, VIEWPORT_FLAG_TRACK_HEIGHTS))
|
if (PaintShouldShowHeightMarkers(session, VIEWPORT_FLAG_TRACK_HEIGHTS))
|
||||||
{
|
{
|
||||||
session->InteractionType = ViewportInteractionItem::None;
|
session->InteractionType = ViewportInteractionItem::None;
|
||||||
if (TrackHeightMarkerPositions[trackType] & (1 << trackSequence))
|
const auto& teDescriptor = GetTrackElementDescriptor(trackType);
|
||||||
|
if (teDescriptor.HeightMarkerPositions & (1 << trackSequence))
|
||||||
{
|
{
|
||||||
uint16_t ax = ride->GetRideTypeDescriptor().Heights.VehicleZOffset;
|
uint16_t ax = ride->GetRideTypeDescriptor().Heights.VehicleZOffset;
|
||||||
// 0x1689 represents 0 height there are -127 to 128 heights above and below it
|
// 0x1689 represents 0 height there are -127 to 128 heights above and below it
|
||||||
|
|
Loading…
Reference in New Issue