mirror of https://github.com/OpenRCT2/OpenRCT2.git
Implement invisible platforms on some tracked rides
This commit is contained in:
parent
5486dd3fa4
commit
6f9468a316
|
@ -550,6 +550,9 @@ void track_paint_util_draw_station_inverted(
|
|||
auto stationObj = ride_get_station_object(ride);
|
||||
const bool hasGreenLight = tileElement->AsTrack()->HasGreenLight();
|
||||
|
||||
if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)
|
||||
return;
|
||||
|
||||
bool hasFence;
|
||||
uint32_t imageId;
|
||||
|
||||
|
@ -849,11 +852,14 @@ bool track_paint_util_draw_station_covers_2(
|
|||
return true;
|
||||
}
|
||||
|
||||
void track_paint_util_draw_station_platform(
|
||||
void track_paint_util_draw_narrow_station_platform(
|
||||
paint_session* session, Ride* ride, Direction direction, int32_t height, int32_t zOffset, const TileElement* tileElement)
|
||||
{
|
||||
CoordsXY position = session->MapPosition;
|
||||
auto stationObj = ride_get_station_object(ride);
|
||||
if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)
|
||||
return;
|
||||
|
||||
if (direction & 1)
|
||||
{
|
||||
bool hasFence = track_paint_util_has_fence(EDGE_NE, position, tileElement, ride, session->CurrentRotation);
|
||||
|
@ -898,6 +904,9 @@ void track_paint_util_draw_pier(
|
|||
paint_session* session, Ride* ride, const StationObject* stationObj, const CoordsXY& position, Direction direction,
|
||||
int32_t height, const TileElement* tileElement, uint8_t rotation)
|
||||
{
|
||||
if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)
|
||||
return;
|
||||
|
||||
bool hasFence;
|
||||
uint32_t imageId;
|
||||
|
||||
|
|
|
@ -290,7 +290,7 @@ bool track_paint_util_draw_station_covers(
|
|||
bool track_paint_util_draw_station_covers_2(
|
||||
paint_session* session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height,
|
||||
uint8_t stationVariant);
|
||||
void track_paint_util_draw_station_platform(
|
||||
void track_paint_util_draw_narrow_station_platform(
|
||||
paint_session* session, Ride* ride, Direction direction, int32_t height, int32_t zOffset, const TileElement* tileElement);
|
||||
void track_paint_util_draw_station(
|
||||
paint_session* session, ride_id_t rideIndex, Direction direction, uint16_t height, const TileElement* tileElement);
|
||||
|
|
|
@ -220,7 +220,7 @@ static void air_powered_vertical_rc_track_station(
|
|||
|
||||
auto ride = get_ride(rideIndex);
|
||||
if (ride != nullptr)
|
||||
track_paint_util_draw_station_platform(session, ride, direction, height, 5, tileElement);
|
||||
track_paint_util_draw_narrow_station_platform(session, ride, direction, height, 5, tileElement);
|
||||
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ void bolliger_mabillard_track_station(
|
|||
|
||||
auto ride = get_ride(rideIndex);
|
||||
if (ride != nullptr)
|
||||
track_paint_util_draw_station_platform(session, ride, direction, height, 9, tileElement);
|
||||
track_paint_util_draw_narrow_station_platform(session, ride, direction, height, 9, tileElement);
|
||||
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace HybridRC
|
|||
|
||||
auto ride = get_ride(rideIndex);
|
||||
if (ride != nullptr)
|
||||
track_paint_util_draw_station_platform(session, ride, direction, height, 10, tileElement);
|
||||
track_paint_util_draw_narrow_station_platform(session, ride, direction, height, 10, tileElement);
|
||||
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
|
|
|
@ -254,7 +254,7 @@ static void paint_reverse_freefall_rc_station(
|
|||
|
||||
auto ride = get_ride(rideIndex);
|
||||
if (ride != nullptr)
|
||||
track_paint_util_draw_station_platform(session, ride, direction, height, 5, tileElement);
|
||||
track_paint_util_draw_narrow_station_platform(session, ride, direction, height, 5, tileElement);
|
||||
|
||||
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "../../common.h"
|
||||
#include "../../interface/Viewport.h"
|
||||
#include "../../object/StationObject.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../world/Map.h"
|
||||
|
@ -458,16 +459,23 @@ static void paint_monorail_station(
|
|||
const TileElement* tileElement)
|
||||
{
|
||||
uint32_t imageId;
|
||||
const StationObject* stationObject = nullptr;
|
||||
const auto* ride = get_ride(rideIndex);
|
||||
if (ride != nullptr)
|
||||
stationObject = ride_get_station_object(ride);
|
||||
|
||||
if (direction == 0 || direction == 2)
|
||||
if (stationObject == nullptr || !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
|
||||
{
|
||||
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 2, height - 2, 0, 2, height);
|
||||
}
|
||||
else if (direction == 1 || direction == 3)
|
||||
{
|
||||
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 2, height - 2, 2, 0, height);
|
||||
if (direction == 0 || direction == 2)
|
||||
{
|
||||
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 2, height - 2, 0, 2, height);
|
||||
}
|
||||
else if (direction == 1 || direction == 3)
|
||||
{
|
||||
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
|
||||
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 2, height - 2, 2, 0, height);
|
||||
}
|
||||
}
|
||||
|
||||
imageId = monorail_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK];
|
||||
|
|
|
@ -325,7 +325,7 @@ static void paint_river_rapids_station(
|
|||
paint_river_rapids_track_flat(session, rideIndex, trackSequence, direction, height, tileElement);
|
||||
auto ride = get_ride(rideIndex);
|
||||
if (ride != nullptr)
|
||||
track_paint_util_draw_station_platform(session, ride, direction, height, 12, tileElement);
|
||||
track_paint_util_draw_narrow_station_platform(session, ride, direction, height, 12, tileElement);
|
||||
paint_util_set_general_support_height(session, height + 32, 0x20);
|
||||
}
|
||||
|
||||
|
|
|
@ -811,7 +811,7 @@ static void paint_splash_boats_station(
|
|||
|
||||
auto ride = get_ride(rideIndex);
|
||||
if (ride != nullptr)
|
||||
track_paint_util_draw_station_platform(session, ride, direction, height, 7, tileElement);
|
||||
track_paint_util_draw_narrow_station_platform(session, ride, direction, height, 7, tileElement);
|
||||
|
||||
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
|
||||
|
||||
|
|
Loading…
Reference in New Issue