Implement "no platforms" for Junior RC (#19379)

This commit is contained in:
Michael Steenbeek 2023-02-12 22:33:24 +01:00 committed by GitHub
parent 07d198f084
commit 3912381502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 8 deletions

View File

@ -38,8 +38,9 @@
- Fix: [#19112] Text boxes not updated with empty strings in Track List, Server List, and Start Server windows.
- Fix: [#19114] [Plugin] GameActionResult does not comply to API specification.
- Fix: [#19136] SV6 saves with experimental RCT1 paths not imported correctly.
- Fix: [#19250] MusicObjects do not free their preview images
- Fix: [#19292] Overflow in totalRideValue
- Fix: [#19250] MusicObjects do not free their preview images.
- Fix: [#19292] Overflow in totalRideValue.
- Fix: [#19379] "No platforms" station style shows platforms on the Junior Roller Coaster.
- Fix: [#19380] Startup crash when no sequences are installed and random sequences are enabled.
0.4.3 (2022-12-14)

View File

@ -13,6 +13,7 @@
#include "../../interface/Viewport.h"
#include "../../interface/Window.h"
#include "../../localisation/Localisation.h"
#include "../../object/StationObject.h"
#include "../../paint/Paint.h"
#include "../../paint/Supports.h"
#include "../../sprites.h"
@ -1839,12 +1840,16 @@ void JuniorRCPaintStation(
ImageId imageId;
bool isBraked = trackElement.IsBrakeClosed();
auto stationObj = ride.GetStationObject();
if (direction == 0 || direction == 2)
{
// height -= 2 (height - 2)
imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_SW_NE);
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } });
if (stationObj != nullptr && !(stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
{
// height -= 2 (height - 2)
imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_SW_NE);
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } });
}
// height += 2 (height)
if (trackElement.GetTrackType() == TrackElemType::EndStation && drawBlockBrake)
@ -1864,9 +1869,12 @@ void JuniorRCPaintStation(
}
else if (direction == 1 || direction == 3)
{
// height -= 2 (height - 2)
imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_NW_SE);
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } });
if (stationObj != nullptr && !(stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
{
// height -= 2 (height - 2)
imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_NW_SE);
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } });
}
// height += 2 (height)
if (trackElement.GetTrackType() == TrackElemType::EndStation && drawBlockBrake)