mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-15 12:02:34 +01:00
Fix #23484: Castle station styles are erroneously remappable
This commit is contained in:
committed by
GitHub
parent
82331a4f84
commit
d97ae02db2
@@ -17,6 +17,7 @@
|
||||
- Fix: [#18309] Flying and Multi Dimension trains glitch when changing between inverted and uninverted track when uncap fps is on.
|
||||
- Fix: [#19506] Queue paths can be placed on level crossings by replacing an existing regular path.
|
||||
- Fix: [#23443] New GOG version of RCT2 is not extracted correctly.
|
||||
- Fix: [#23484] Stray coloured pixels on castle-themed stations and Roman-themed entrances/exits (original bug).
|
||||
- Fix: [#23486] Object selection minimum requirements can be bypassed with close window hotkey.
|
||||
- Fix: [#23743] Parks with guest goals over 32767 do not appear in the scenario list.
|
||||
- Fix: [#23844] Sound effects keep playing when loading another save.
|
||||
|
||||
@@ -141,8 +141,7 @@ static void PaintRideEntranceExit(PaintSession& session, uint8_t direction, int3
|
||||
|
||||
auto hasGlass = (stationObj->Flags & StationObjectFlags::isTransparent) != 0;
|
||||
auto colourPrimary = ride->trackColours[0].main;
|
||||
auto colourSecondary = ride->trackColours[0].additional;
|
||||
auto imageTemplate = ImageId(0, colourPrimary, colourSecondary);
|
||||
auto imageTemplate = ImageId(0);
|
||||
ImageId glassImageTemplate;
|
||||
if (hasGlass)
|
||||
{
|
||||
@@ -158,6 +157,18 @@ static void PaintRideEntranceExit(PaintSession& session, uint8_t direction, int3
|
||||
{
|
||||
imageTemplate = ImageId().WithRemap(FilterPaletteID::PaletteGhost);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (stationObj->Flags & StationObjectFlags::hasPrimaryColour)
|
||||
{
|
||||
imageTemplate = imageTemplate.WithPrimary(colourPrimary);
|
||||
}
|
||||
if (stationObj->Flags & StationObjectFlags::hasSecondaryColour)
|
||||
{
|
||||
auto colourSecondary = ride->trackColours[0].additional;
|
||||
imageTemplate = imageTemplate.WithSecondary(colourSecondary);
|
||||
}
|
||||
}
|
||||
|
||||
// Format modified to stop repeated code
|
||||
|
||||
|
||||
@@ -708,14 +708,22 @@ bool TrackPaintUtilDrawStationCovers2(
|
||||
imageOffset += SPR_STATION_COVER_OFFSET_TALL;
|
||||
}
|
||||
|
||||
auto imageTemplate = session.TrackColours;
|
||||
auto imageId = imageTemplate.WithIndex(baseImageIndex + imageOffset);
|
||||
auto imageId = session.TrackColours.WithIndex(baseImageIndex + imageOffset);
|
||||
if (!session.TrackColours.IsRemap())
|
||||
{
|
||||
imageId = ImageId(baseImageIndex + imageOffset);
|
||||
if (stationObject->Flags & StationObjectFlags::hasPrimaryColour)
|
||||
imageId = imageId.WithPrimary(session.TrackColours.GetPrimary());
|
||||
if (stationObject->Flags & StationObjectFlags::hasSecondaryColour)
|
||||
imageId = imageId.WithSecondary(session.TrackColours.GetSecondary());
|
||||
}
|
||||
|
||||
PaintAddImageAsParent(session, imageId, offset, boundBox);
|
||||
|
||||
// Glass
|
||||
if (colour == TrackStationColour && (stationObject->Flags & StationObjectFlags::isTransparent))
|
||||
{
|
||||
imageId = ImageId(baseImageIndex + imageOffset + 12).WithTransparency(imageTemplate.GetPrimary());
|
||||
imageId = ImageId(baseImageIndex + imageOffset + 12).WithTransparency(session.TrackColours.GetPrimary());
|
||||
PaintAddImageAsChild(session, imageId, offset, boundBox);
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user