2016-08-24 13:19:25 +02:00
|
|
|
/*****************************************************************************
|
2018-06-15 14:07:34 +02:00
|
|
|
* Copyright (c) 2014-2018 OpenRCT2 developers
|
2016-08-24 13:19:25 +02:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
2016-08-24 13:19:25 +02:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
2016-08-24 13:19:25 +02:00
|
|
|
*****************************************************************************/
|
|
|
|
|
2018-05-15 12:54:58 +02:00
|
|
|
#include "Addresses.h"
|
|
|
|
|
2021-09-05 16:06:34 +02:00
|
|
|
#include <array>
|
2021-02-13 03:50:29 +01:00
|
|
|
#include <openrct2/Context.h>
|
2017-02-20 21:05:59 +01:00
|
|
|
#include <openrct2/config/Config.h>
|
2018-01-06 00:08:58 +01:00
|
|
|
#include <openrct2/interface/Colour.h>
|
2018-01-06 00:45:53 +01:00
|
|
|
#include <openrct2/interface/Viewport.h>
|
2018-05-15 12:54:58 +02:00
|
|
|
#include <openrct2/object/Object.h>
|
2018-06-01 00:16:53 +02:00
|
|
|
#include <openrct2/paint/tile_element/Paint.TileElement.h>
|
2017-12-31 13:21:34 +01:00
|
|
|
#include <openrct2/ride/Ride.h>
|
2020-04-16 18:58:58 +02:00
|
|
|
#include <openrct2/ride/RideData.h>
|
2020-03-09 22:21:53 +01:00
|
|
|
#include <openrct2/ride/Station.h>
|
2017-10-17 13:51:47 +02:00
|
|
|
#include <openrct2/ride/Track.h>
|
2020-06-21 09:38:53 +02:00
|
|
|
#include <openrct2/ride/Vehicle.h>
|
2018-05-15 12:54:58 +02:00
|
|
|
#include <openrct2/world/Location.hpp>
|
2018-01-11 10:59:26 +01:00
|
|
|
#include <openrct2/world/Sprite.h>
|
2018-05-01 20:21:21 +02:00
|
|
|
#include <openrct2/world/Surface.h>
|
2016-09-12 17:37:57 +02:00
|
|
|
|
2018-12-05 21:33:45 +01:00
|
|
|
class StationObject;
|
|
|
|
|
2018-06-22 22:29:03 +02:00
|
|
|
#define gRideEntries RCT2_ADDRESS(0x009ACFA4, rct_ride_entry*)
|
2018-11-01 13:53:50 +01:00
|
|
|
#define gTileElementTilePointers RCT2_ADDRESS(0x013CE9A4, TileElement*)
|
2018-06-22 22:29:03 +02:00
|
|
|
rct_sprite* sprite_list = RCT2_ADDRESS(0x010E63BC, rct_sprite);
|
2017-12-04 19:57:41 +01:00
|
|
|
|
2020-04-19 13:32:43 +02:00
|
|
|
bool gCheatsEnableAllDrawableTrackPieces = false;
|
|
|
|
|
2017-12-03 23:07:24 +01:00
|
|
|
Ride gRideList[MAX_RIDES];
|
2018-06-20 17:28:51 +02:00
|
|
|
int16_t gMapBaseZ;
|
2016-09-12 17:37:57 +02:00
|
|
|
bool gTrackDesignSaveMode = false;
|
2020-10-27 22:02:39 +01:00
|
|
|
ride_id_t gTrackDesignSaveRideIndex = RIDE_ID_NULL;
|
2018-06-20 17:28:51 +02:00
|
|
|
uint8_t gClipHeight = 255;
|
2020-03-07 21:07:18 +01:00
|
|
|
CoordsXY gClipSelectionA = { 0, 0 };
|
|
|
|
CoordsXY gClipSelectionB = { MAXIMUM_TILE_START_XY, MAXIMUM_TILE_START_XY };
|
2018-06-20 17:28:51 +02:00
|
|
|
uint32_t gScenarioTicks;
|
|
|
|
uint8_t gCurrentRotation;
|
2016-08-24 13:19:25 +02:00
|
|
|
|
2018-06-25 14:41:24 +02:00
|
|
|
// clang-format off
|
2020-01-14 02:22:04 +01:00
|
|
|
constexpr const std::array<CoordsXY, 8> CoordsDirectionDelta = {
|
|
|
|
CoordsXY{ -COORDS_XY_STEP, 0 },
|
|
|
|
CoordsXY{ 0, +COORDS_XY_STEP },
|
|
|
|
CoordsXY{ +COORDS_XY_STEP, 0 },
|
|
|
|
CoordsXY{ 0, -COORDS_XY_STEP },
|
|
|
|
CoordsXY{ -COORDS_XY_STEP, +COORDS_XY_STEP },
|
|
|
|
CoordsXY{ +COORDS_XY_STEP, +COORDS_XY_STEP },
|
|
|
|
CoordsXY{ +COORDS_XY_STEP, -COORDS_XY_STEP },
|
|
|
|
CoordsXY{ -COORDS_XY_STEP, -COORDS_XY_STEP },
|
2018-06-25 14:41:24 +02:00
|
|
|
};
|
2018-05-03 13:17:00 +02:00
|
|
|
|
2018-06-25 14:41:24 +02:00
|
|
|
const TileCoordsXY TileDirectionDelta[] = {
|
|
|
|
{ -1, 0 },
|
|
|
|
{ 0, +1 },
|
|
|
|
{ +1, 0 },
|
|
|
|
{ 0, -1 },
|
|
|
|
{ -1, +1 },
|
|
|
|
{ +1, +1 },
|
|
|
|
{ +1, -1 },
|
|
|
|
{ -1, -1 },
|
|
|
|
};
|
|
|
|
// clang-format on
|
2016-08-24 13:19:25 +02:00
|
|
|
|
2018-06-22 22:29:03 +02:00
|
|
|
uint8_t get_current_rotation()
|
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
return gCurrentRotation & 3;
|
2016-08-24 13:19:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int object_entry_group_counts[] = {
|
2021-09-05 16:06:34 +02:00
|
|
|
128, // ObjectType::Ride
|
|
|
|
252, // ObjectType::SmallScenery
|
|
|
|
128, // ObjectType::LargeScenery
|
|
|
|
128, // ObjectType::Walls
|
|
|
|
32, // ObjectType::Banners
|
|
|
|
16, // ObjectType::Paths
|
|
|
|
15, // ObjectType::PathBits
|
|
|
|
19, // ObjectType::SceneryGroup
|
|
|
|
1, // ObjectType::ParkEntrance
|
|
|
|
1, // ObjectType::Water
|
|
|
|
1, // ObjectType::ScenarioText
|
|
|
|
0, // ObjectType::TerrainSurface
|
|
|
|
0, // ObjectType::TerrainEdge
|
|
|
|
0, // ObjectType::Station
|
|
|
|
0, // ObjectType::Music
|
|
|
|
0, // ObjectType::FootpathSurface
|
|
|
|
0, // ObjectType::FootpathRailings
|
2016-08-24 13:19:25 +02:00
|
|
|
};
|
2021-09-05 16:06:34 +02:00
|
|
|
static_assert(std::size(object_entry_group_counts) == EnumValue(ObjectType::Count));
|
2016-08-24 13:19:25 +02:00
|
|
|
|
2017-02-21 07:29:06 +01:00
|
|
|
GeneralConfiguration gConfigGeneral;
|
2018-06-20 17:28:51 +02:00
|
|
|
uint16_t gMapSelectFlags;
|
|
|
|
uint16_t gMapSelectType;
|
2019-12-19 09:40:21 +01:00
|
|
|
CoordsXY gMapSelectPositionA;
|
|
|
|
CoordsXY gMapSelectPositionB;
|
2019-12-30 17:51:35 +01:00
|
|
|
CoordsXYZ gMapSelectArrowPosition;
|
2018-06-20 17:28:51 +02:00
|
|
|
uint8_t gMapSelectArrowDirection;
|
2016-08-24 13:19:25 +02:00
|
|
|
|
2018-11-01 13:53:50 +01:00
|
|
|
void entrance_paint(paint_session* session, uint8_t direction, int height, const TileElement* tile_element)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
|
|
|
}
|
2018-11-01 13:53:50 +01:00
|
|
|
void banner_paint(paint_session* session, uint8_t direction, int height, const TileElement* tile_element)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
|
|
|
}
|
2018-11-01 13:53:50 +01:00
|
|
|
void surface_paint(paint_session* session, uint8_t direction, uint16_t height, const TileElement* tileElement)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
|
|
|
}
|
2018-11-01 13:53:50 +01:00
|
|
|
void path_paint(paint_session* session, uint16_t height, const TileElement* tileElement)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
|
|
|
}
|
2018-11-01 13:53:50 +01:00
|
|
|
void scenery_paint(paint_session* session, uint8_t direction, int height, const TileElement* tileElement)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
|
|
|
}
|
2018-11-01 13:53:50 +01:00
|
|
|
void fence_paint(paint_session* session, uint8_t direction, int height, const TileElement* tileElement)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
|
|
|
}
|
2018-11-01 13:53:50 +01:00
|
|
|
void large_scenery_paint(paint_session* session, uint8_t direction, uint16_t height, const TileElement* tileElement)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
|
|
|
}
|
2016-08-24 13:19:25 +02:00
|
|
|
|
2019-08-04 18:12:34 +02:00
|
|
|
Ride* get_ride(ride_id_t index)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
2019-08-04 18:12:34 +02:00
|
|
|
if (index >= RCT12_MAX_RIDES_IN_PARK)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
log_error("invalid index %d for ride", index);
|
2018-01-29 17:06:01 +01:00
|
|
|
return nullptr;
|
2017-06-06 23:24:18 +02:00
|
|
|
}
|
|
|
|
return &gRideList[index];
|
2016-08-24 13:19:25 +02:00
|
|
|
}
|
|
|
|
|
2020-04-25 00:10:47 +02:00
|
|
|
rct_ride_entry* get_ride_entry(ObjectEntryIndex index)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
2020-11-10 09:49:54 +01:00
|
|
|
if (index >= object_entry_group_counts[static_cast<int>(ObjectType::Ride)])
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
log_error("invalid index %d for ride type", index);
|
2018-01-29 17:06:01 +01:00
|
|
|
return nullptr;
|
2017-06-06 23:24:18 +02:00
|
|
|
}
|
2017-10-12 21:07:35 +02:00
|
|
|
|
2017-10-15 15:53:16 +02:00
|
|
|
return gRideEntries[index];
|
2016-08-24 13:19:25 +02:00
|
|
|
}
|
|
|
|
|
2019-04-20 22:22:39 +02:00
|
|
|
rct_ride_entry* Ride::GetRideEntry() const
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
2019-04-20 22:22:39 +02:00
|
|
|
rct_ride_entry* rideEntry = get_ride_entry(subtype);
|
|
|
|
if (rideEntry == nullptr)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
log_error("Invalid ride subtype for ride");
|
|
|
|
}
|
2019-04-20 22:22:39 +02:00
|
|
|
return rideEntry;
|
2016-08-24 13:19:25 +02:00
|
|
|
}
|
|
|
|
|
2020-06-10 19:45:18 +02:00
|
|
|
template<> bool SpriteBase::Is<SpriteBase>() const
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<> bool SpriteBase::Is<Peep>() const
|
|
|
|
{
|
2021-03-17 09:04:41 +01:00
|
|
|
return Type == EntityType::Guest || Type == EntityType::Staff;
|
2020-06-10 19:45:18 +02:00
|
|
|
}
|
|
|
|
|
2020-07-26 18:42:02 +02:00
|
|
|
template<> bool SpriteBase::Is<Guest>() const
|
|
|
|
{
|
2021-03-17 09:04:41 +01:00
|
|
|
return Type == EntityType::Guest;
|
2020-07-26 18:42:02 +02:00
|
|
|
}
|
|
|
|
|
2020-07-31 08:48:27 +02:00
|
|
|
template<> bool SpriteBase::Is<Vehicle>() const
|
|
|
|
{
|
2021-03-17 09:04:41 +01:00
|
|
|
return Type == EntityType::Vehicle;
|
2020-07-31 08:48:27 +02:00
|
|
|
}
|
|
|
|
|
2020-08-01 12:29:54 +02:00
|
|
|
SpriteBase* get_sprite(size_t sprite_idx)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
2021-02-24 23:34:34 +01:00
|
|
|
assert(sprite_idx < MAX_ENTITIES);
|
2020-08-01 12:29:54 +02:00
|
|
|
return reinterpret_cast<SpriteBase*>(&sprite_list[sprite_idx]);
|
2016-08-24 13:19:25 +02:00
|
|
|
}
|
|
|
|
|
2019-08-25 16:13:02 +02:00
|
|
|
bool TileElementBase::IsLastForTile() const
|
2019-08-24 22:41:01 +02:00
|
|
|
{
|
2020-03-04 22:28:06 +01:00
|
|
|
return (this->Flags & TILE_ELEMENT_FLAG_LAST_TILE) != 0;
|
2019-08-24 22:41:01 +02:00
|
|
|
}
|
|
|
|
|
2019-08-25 16:13:02 +02:00
|
|
|
void TileElementBase::SetLastForTile(bool on)
|
2019-08-24 22:41:01 +02:00
|
|
|
{
|
|
|
|
if (on)
|
2020-03-04 22:28:06 +01:00
|
|
|
Flags |= TILE_ELEMENT_FLAG_LAST_TILE;
|
2019-08-24 22:41:01 +02:00
|
|
|
else
|
2020-03-04 22:28:06 +01:00
|
|
|
Flags &= ~TILE_ELEMENT_FLAG_LAST_TILE;
|
2016-08-24 13:19:25 +02:00
|
|
|
}
|
|
|
|
|
2018-09-13 19:40:07 +02:00
|
|
|
uint8_t TileElementBase::GetType() const
|
2018-05-02 19:27:04 +02:00
|
|
|
{
|
|
|
|
return this->type & TILE_ELEMENT_TYPE_MASK;
|
2016-08-24 13:19:25 +02:00
|
|
|
}
|
|
|
|
|
2019-02-26 09:50:04 +01:00
|
|
|
bool TileElementBase::IsGhost() const
|
|
|
|
{
|
2020-03-04 22:28:06 +01:00
|
|
|
return (this->Flags & TILE_ELEMENT_FLAG_GHOST) != 0;
|
2019-02-26 09:50:04 +01:00
|
|
|
}
|
|
|
|
|
2019-02-27 11:54:08 +01:00
|
|
|
bool TrackElement::BlockBrakeClosed() const
|
|
|
|
{
|
2020-03-04 22:28:06 +01:00
|
|
|
return (Flags2 & TRACK_ELEMENT_FLAGS2_BLOCK_BRAKE_CLOSED) != 0;
|
2019-02-27 11:54:08 +01:00
|
|
|
}
|
|
|
|
|
2019-12-23 08:35:41 +01:00
|
|
|
TileElement* map_get_first_element_at(const CoordsXY& elementPos)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
2019-12-23 08:35:41 +01:00
|
|
|
if (elementPos.x < 0 || elementPos.y < 0 || elementPos.x > 255 || elementPos.y > 255)
|
2018-06-22 22:29:03 +02:00
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
log_error("Trying to access element outside of range");
|
2018-01-29 17:06:01 +01:00
|
|
|
return nullptr;
|
2017-06-06 23:24:18 +02:00
|
|
|
}
|
2019-12-23 08:35:41 +01:00
|
|
|
auto tileElementPos = TileCoordsXY{ elementPos };
|
|
|
|
return gTileElementTilePointers[tileElementPos.x + tileElementPos.y * 256];
|
2016-08-24 13:19:25 +02:00
|
|
|
}
|
|
|
|
|
2021-08-16 21:51:16 +02:00
|
|
|
int32_t get_height_marker_offset()
|
2016-09-12 22:56:52 +02:00
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
return 0;
|
2016-09-12 22:56:52 +02:00
|
|
|
}
|
2016-10-01 19:03:31 +02:00
|
|
|
|
2018-09-18 14:06:38 +02:00
|
|
|
bool is_csg_loaded()
|
2016-10-01 19:03:31 +02:00
|
|
|
{
|
2018-09-18 14:06:38 +02:00
|
|
|
return false;
|
2016-10-01 19:03:31 +02:00
|
|
|
}
|
2016-10-09 00:20:29 +02:00
|
|
|
|
2018-09-18 14:06:38 +02:00
|
|
|
uint8_t TrackElement::GetSeatRotation() const
|
2017-04-11 19:53:52 +02:00
|
|
|
{
|
2021-01-10 22:38:02 +01:00
|
|
|
const auto* ride = get_ride(GetRideIndex());
|
|
|
|
if (ride != nullptr && ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_LANDSCAPE_DOORS))
|
|
|
|
return DEFAULT_SEAT_ROTATION;
|
|
|
|
|
2019-08-31 13:14:19 +02:00
|
|
|
return ColourScheme >> 4;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::SetSeatRotation(uint8_t newSeatRotation)
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
ColourScheme &= ~TRACK_ELEMENT_COLOUR_SEAT_ROTATION_MASK;
|
|
|
|
ColourScheme |= (newSeatRotation << 4);
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool TrackElement::IsTakingPhoto() const
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return OnridePhotoBits != 0;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::SetPhotoTimeout()
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
OnridePhotoBits = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::SetPhotoTimeout(uint8_t value)
|
|
|
|
{
|
|
|
|
OnridePhotoBits = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t TrackElement::GetPhotoTimeout() const
|
|
|
|
{
|
|
|
|
return OnridePhotoBits;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::DecrementPhotoTimeout()
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
OnridePhotoBits = std::max(0, OnridePhotoBits - 1);
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
uint16_t TrackElement::GetMazeEntry() const
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return MazeEntry;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::SetMazeEntry(uint16_t newMazeEntry)
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
MazeEntry = newMazeEntry;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::MazeEntryAdd(uint16_t addVal)
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
MazeEntry |= addVal;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::MazeEntrySubtract(uint16_t subVal)
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
MazeEntry &= ~subVal;
|
2017-04-11 19:53:52 +02:00
|
|
|
}
|
2017-10-04 17:14:53 +02:00
|
|
|
|
2019-08-31 13:14:19 +02:00
|
|
|
track_type_t TrackElement::GetTrackType() const
|
2017-11-14 13:27:30 +01:00
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return TrackType;
|
2017-11-14 13:27:30 +01:00
|
|
|
}
|
|
|
|
|
2019-08-31 13:14:19 +02:00
|
|
|
void TrackElement::SetTrackType(track_type_t newType)
|
2017-11-14 13:27:30 +01:00
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
TrackType = newType;
|
2017-11-15 09:23:01 +01:00
|
|
|
}
|
|
|
|
|
2018-09-17 22:10:15 +02:00
|
|
|
uint8_t TrackElement::GetSequenceIndex() const
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return Sequence;
|
2018-09-17 22:10:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::SetSequenceIndex(uint8_t newSequenceIndex)
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
Sequence = newSequenceIndex;
|
2018-09-17 22:10:15 +02:00
|
|
|
}
|
|
|
|
|
2018-09-18 14:06:38 +02:00
|
|
|
uint8_t TrackElement::GetStationIndex() const
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return StationIndex;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::SetStationIndex(uint8_t newStationIndex)
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
StationIndex = newStationIndex;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t TrackElement::GetDoorAState() const
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return (ColourScheme & TRACK_ELEMENT_COLOUR_DOOR_A_MASK) >> 2;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t TrackElement::GetDoorBState() const
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return (ColourScheme & TRACK_ELEMENT_COLOUR_DOOR_B_MASK) >> 5;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
2020-02-16 22:21:17 +01:00
|
|
|
ride_id_t TrackElement::GetRideIndex() const
|
2018-09-18 14:06:38 +02:00
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return RideIndex;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
2020-02-16 22:21:17 +01:00
|
|
|
void TrackElement::SetRideIndex(ride_id_t newRideIndex)
|
2018-09-18 14:06:38 +02:00
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
RideIndex = newRideIndex;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t TrackElement::GetColourScheme() const
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return ColourScheme & TRACK_ELEMENT_COLOUR_SCHEME_MASK;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::SetColourScheme(uint8_t newColourScheme)
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
ColourScheme &= ~TRACK_ELEMENT_COLOUR_SCHEME_MASK;
|
|
|
|
ColourScheme |= (newColourScheme & TRACK_ELEMENT_COLOUR_SCHEME_MASK);
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool TrackElement::HasCableLift() const
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return Flags2 & TRACK_ELEMENT_FLAGS2_CABLE_LIFT;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::SetHasCableLift(bool on)
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
Flags2 &= ~TRACK_ELEMENT_FLAGS2_CABLE_LIFT;
|
2018-09-18 14:06:38 +02:00
|
|
|
if (on)
|
2019-08-31 13:14:19 +02:00
|
|
|
Flags2 |= TRACK_ELEMENT_FLAGS2_CABLE_LIFT;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool TrackElement::IsInverted() const
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return Flags2 & TRACK_ELEMENT_FLAGS2_INVERTED;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::SetInverted(bool inverted)
|
|
|
|
{
|
|
|
|
if (inverted)
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
Flags2 |= TRACK_ELEMENT_FLAGS2_INVERTED;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
Flags2 &= ~TRACK_ELEMENT_FLAGS2_INVERTED;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t TrackElement::GetBrakeBoosterSpeed() const
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return BrakeBoosterSpeed << 1;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::SetBrakeBoosterSpeed(uint8_t speed)
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
BrakeBoosterSpeed = (speed >> 1);
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
2019-08-31 13:14:19 +02:00
|
|
|
bool TrackElement::HasGreenLight() const
|
2018-09-18 14:06:38 +02:00
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return (Flags2 & TRACK_ELEMENT_FLAGS2_HAS_GREEN_LIGHT) != 0;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
2019-08-31 13:14:19 +02:00
|
|
|
void TrackElement::SetHasGreenLight(bool on)
|
2018-09-18 14:06:38 +02:00
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
Flags2 &= ~TRACK_ELEMENT_FLAGS2_HAS_GREEN_LIGHT;
|
|
|
|
if (on)
|
2018-09-18 14:06:38 +02:00
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
Flags2 |= TRACK_ELEMENT_FLAGS2_HAS_GREEN_LIGHT;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bool TrackElement::HasChain() const
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return (Flags2 & TRACK_ELEMENT_FLAGS2_CHAIN_LIFT) != 0;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TrackElement::SetHasChain(bool on)
|
|
|
|
{
|
|
|
|
if (on)
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
Flags2 |= TRACK_ELEMENT_FLAGS2_CHAIN_LIFT;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
Flags2 &= ~TRACK_ELEMENT_FLAGS2_CHAIN_LIFT;
|
2018-09-18 14:06:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-21 15:11:50 +01:00
|
|
|
TileCoordsXYZD ride_get_entrance_location(const Ride* ride, const StationIndex stationIndex)
|
2018-03-07 19:10:50 +01:00
|
|
|
{
|
2019-01-01 02:14:19 +01:00
|
|
|
return ride->stations[stationIndex].Entrance;
|
2018-03-07 19:10:50 +01:00
|
|
|
}
|
|
|
|
|
2020-03-21 15:11:50 +01:00
|
|
|
TileCoordsXYZD ride_get_exit_location(const Ride* ride, const StationIndex stationIndex)
|
2018-03-07 19:10:50 +01:00
|
|
|
{
|
2019-01-01 02:14:19 +01:00
|
|
|
return ride->stations[stationIndex].Exit;
|
2018-05-15 12:54:58 +02:00
|
|
|
}
|
2018-09-15 23:32:19 +02:00
|
|
|
|
2018-09-23 12:01:58 +02:00
|
|
|
void TileElementBase::SetType(uint8_t newType)
|
|
|
|
{
|
|
|
|
this->type &= ~TILE_ELEMENT_TYPE_MASK;
|
|
|
|
this->type |= (newType & TILE_ELEMENT_TYPE_MASK);
|
|
|
|
}
|
|
|
|
|
2018-09-15 23:32:19 +02:00
|
|
|
uint8_t TileElementBase::GetDirection() const
|
|
|
|
{
|
|
|
|
return this->type & TILE_ELEMENT_DIRECTION_MASK;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t TileElementBase::GetDirectionWithOffset(uint8_t offset) const
|
|
|
|
{
|
|
|
|
return ((this->type & TILE_ELEMENT_DIRECTION_MASK) + offset) & TILE_ELEMENT_DIRECTION_MASK;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t SurfaceElement::GetSlope() const
|
|
|
|
{
|
2019-08-31 10:01:28 +02:00
|
|
|
return Slope;
|
2018-09-15 23:32:19 +02:00
|
|
|
}
|
|
|
|
|
2020-01-19 16:12:48 +01:00
|
|
|
int32_t SurfaceElement::GetWaterHeight() const
|
2018-09-15 23:32:19 +02:00
|
|
|
{
|
2020-01-19 16:12:48 +01:00
|
|
|
return WaterHeight * 16;
|
2018-09-15 23:32:19 +02:00
|
|
|
}
|
2018-10-03 11:39:33 +02:00
|
|
|
|
|
|
|
bool TrackElement::IsHighlighted() const
|
|
|
|
{
|
2019-08-31 13:14:19 +02:00
|
|
|
return (Flags2 & TRACK_ELEMENT_FLAGS2_HIGHLIGHT);
|
2018-10-03 11:39:33 +02:00
|
|
|
}
|
2018-10-05 13:11:44 +02:00
|
|
|
|
|
|
|
uint8_t PathElement::GetEdges() const
|
|
|
|
{
|
2020-09-08 04:42:42 +02:00
|
|
|
return EdgesAndCorners & 0xF;
|
2018-10-05 13:11:44 +02:00
|
|
|
}
|
2018-12-05 21:33:45 +01:00
|
|
|
|
|
|
|
StationObject* ride_get_station_object(const Ride* ride)
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
2019-05-08 21:56:38 +02:00
|
|
|
|
2020-06-21 09:38:53 +02:00
|
|
|
Ride* Vehicle::GetRide() const
|
|
|
|
{
|
|
|
|
return get_ride(ride);
|
|
|
|
}
|
|
|
|
|
2020-01-19 18:37:24 +01:00
|
|
|
bool Vehicle::IsGhost() const
|
2019-05-08 21:56:38 +02:00
|
|
|
{
|
2020-06-21 09:38:53 +02:00
|
|
|
auto r = GetRide();
|
2021-06-10 08:09:58 +02:00
|
|
|
return r != nullptr && r->status == RideStatus::Simulating;
|
2019-05-08 21:56:38 +02:00
|
|
|
}
|
2019-08-27 21:12:48 +02:00
|
|
|
|
|
|
|
uint8_t TileElementBase::GetOccupiedQuadrants() const
|
|
|
|
{
|
2020-03-04 22:28:06 +01:00
|
|
|
return Flags & TILE_ELEMENT_OCCUPIED_QUADRANTS_MASK;
|
2019-08-27 21:12:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TileElementBase::SetOccupiedQuadrants(uint8_t quadrants)
|
|
|
|
{
|
2020-03-04 22:28:06 +01:00
|
|
|
Flags &= ~TILE_ELEMENT_OCCUPIED_QUADRANTS_MASK;
|
|
|
|
Flags |= (quadrants & TILE_ELEMENT_OCCUPIED_QUADRANTS_MASK);
|
2019-08-27 21:12:48 +02:00
|
|
|
}
|
2019-12-21 16:50:28 +01:00
|
|
|
|
2019-12-22 22:14:02 +01:00
|
|
|
int32_t TileElementBase::GetBaseZ() const
|
2019-12-21 16:50:28 +01:00
|
|
|
{
|
2020-03-13 12:03:43 +01:00
|
|
|
return base_height * COORDS_Z_STEP;
|
2019-12-21 16:50:28 +01:00
|
|
|
}
|
|
|
|
|
2019-12-27 15:26:40 +01:00
|
|
|
void TileElementBase::SetBaseZ(int32_t newZ)
|
|
|
|
{
|
2020-03-13 12:03:43 +01:00
|
|
|
base_height = (newZ / COORDS_Z_STEP);
|
2019-12-27 15:26:40 +01:00
|
|
|
}
|
|
|
|
|
2019-12-22 22:14:02 +01:00
|
|
|
int32_t TileElementBase::GetClearanceZ() const
|
2019-12-21 16:50:28 +01:00
|
|
|
{
|
2020-03-13 12:03:43 +01:00
|
|
|
return clearance_height * COORDS_Z_STEP;
|
2019-12-21 16:50:28 +01:00
|
|
|
}
|
2019-12-27 15:26:40 +01:00
|
|
|
|
|
|
|
void TileElementBase::SetClearanceZ(int32_t newZ)
|
|
|
|
{
|
2020-03-13 12:03:43 +01:00
|
|
|
clearance_height = (newZ / COORDS_Z_STEP);
|
2019-12-27 15:26:40 +01:00
|
|
|
}
|
2019-12-27 15:57:40 +01:00
|
|
|
|
|
|
|
int32_t RideStation::GetBaseZ() const
|
|
|
|
{
|
2020-03-13 12:03:43 +01:00
|
|
|
return Height * COORDS_Z_STEP;
|
2019-12-27 15:57:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void RideStation::SetBaseZ(int32_t newZ)
|
|
|
|
{
|
2020-03-13 12:03:43 +01:00
|
|
|
Height = newZ / COORDS_Z_STEP;
|
2019-12-27 15:57:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
CoordsXYZ RideStation::GetStart() const
|
|
|
|
{
|
|
|
|
TileCoordsXYZ stationTileCoords{ Start.x, Start.y, Height };
|
|
|
|
return stationTileCoords.ToCoordsXYZ();
|
|
|
|
}
|
2020-06-05 22:55:15 +02:00
|
|
|
|
|
|
|
bool TrackElement::IsStation() const
|
|
|
|
{
|
|
|
|
return track_type_is_station(GetTrackType());
|
|
|
|
}
|
|
|
|
|
|
|
|
bool track_type_is_station(track_type_t trackType)
|
|
|
|
{
|
|
|
|
switch (trackType)
|
|
|
|
{
|
2020-08-18 08:28:41 +02:00
|
|
|
case TrackElemType::EndStation:
|
|
|
|
case TrackElemType::BeginStation:
|
|
|
|
case TrackElemType::MiddleStation:
|
2020-06-05 22:55:15 +02:00
|
|
|
return true;
|
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
2020-06-18 16:25:51 +02:00
|
|
|
|
|
|
|
void ride_ratings_calculate_spiral_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_stand_up_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_suspended_swinging_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_inverted_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_junior_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_miniature_railway([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_monorail([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_mini_suspended_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_boat_hire([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_wooden_wild_mouse([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_steeplechase([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_car_ride([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_launched_freefall([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_bobsleigh_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_observation_tower([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_looping_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_dinghy_slide([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_mine_train_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_chairlift([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_corkscrew_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_maze([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_spiral_slide([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_go_karts([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_log_flume([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_river_rapids([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_dodgems([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-07-19 14:41:40 +02:00
|
|
|
void ride_ratings_calculate_swinging_ship([[maybe_unused]] Ride* ride)
|
2020-06-18 16:25:51 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_inverter_ship([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_food_stall([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_shop([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_merry_go_round([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_information_kiosk([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_toilets([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_ferris_wheel([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_motion_simulator([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_3d_cinema([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_top_spin([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_space_rings([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_reverse_freefall_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_lift([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_vertical_drop_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_cash_machine([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_twist([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_haunted_house([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_first_aid([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-07-19 14:51:37 +02:00
|
|
|
void ride_ratings_calculate_circus([[maybe_unused]] Ride* ride)
|
2020-06-18 16:25:51 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_ghost_train([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_twister_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_wooden_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_side_friction_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_wild_mouse([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_multi_dimension_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_flying_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_virginia_reel([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_splash_boats([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_mini_helicopters([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_lay_down_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_suspended_monorail([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_reverser_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_heartline_twister_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_mini_golf([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_giga_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_roto_drop([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_flying_saucers([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_crooked_house([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_monorail_cycles([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_compact_inverted_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_water_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_air_powered_vertical_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_inverted_hairpin_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_magic_carpet([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_submarine_ride([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_river_rafts([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_enterprise([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_inverted_impulse_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_mini_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_mine_ride([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_lim_launched_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ride_ratings_calculate_drink_stall([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
2020-10-10 21:27:12 +02:00
|
|
|
|
|
|
|
void ride_ratings_calculate_hybrid_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
2020-12-12 22:53:50 +01:00
|
|
|
|
2021-01-06 21:10:15 +01:00
|
|
|
void ride_ratings_calculate_single_rail_roller_coaster([[maybe_unused]] Ride* ride)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-12-12 22:53:50 +01:00
|
|
|
const RideTypeDescriptor& Ride::GetRideTypeDescriptor() const
|
|
|
|
{
|
2021-02-26 10:19:03 +01:00
|
|
|
return ::GetRideTypeDescriptor(type);
|
2020-12-12 22:53:50 +01:00
|
|
|
}
|
2021-01-29 16:56:33 +01:00
|
|
|
|
|
|
|
uint8_t TileElementBase::GetOwner() const
|
|
|
|
{
|
|
|
|
return owner & OWNER_MASK;
|
|
|
|
}
|
|
|
|
|
|
|
|
void TileElementBase::SetOwner(uint8_t newOwner)
|
|
|
|
{
|
|
|
|
owner &= ~OWNER_MASK;
|
|
|
|
owner |= (newOwner & OWNER_MASK);
|
|
|
|
}
|
2021-02-13 03:50:29 +01:00
|
|
|
|
|
|
|
namespace OpenRCT2
|
|
|
|
{
|
|
|
|
IContext* GetContext()
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
} // namespace OpenRCT2
|
2021-10-21 04:51:06 +02:00
|
|
|
|
|
|
|
ScreenCoordsXY translate_3d_to_2d_with_z(int32_t rotation, const CoordsXYZ& pos)
|
|
|
|
{
|
|
|
|
auto rotated = pos.Rotate(rotation);
|
|
|
|
// Use right shift to avoid issues like #9301
|
|
|
|
return ScreenCoordsXY{ rotated.y - rotated.x, ((rotated.x + rotated.y) >> 1) - pos.z };
|
|
|
|
}
|