mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
0.4.20 (in development)
|
||||
------------------------------------------------------------------------
|
||||
- Improved: [#23677] Building new ride track now inherits the colour scheme from the previous piece.
|
||||
- Fix: [#1972, #11679] Vehicles passing by toilets can cause them to glitch.
|
||||
- Fix: [#9999, #10000, #10001, #10002, #10003] Truncated scenario strings when using Catalan, Czech, Japanese, Polish or Russian.
|
||||
- Fix: [#16357] Chairlift station covers draw incorrectly.
|
||||
- Fix: [#21768] Dirty blocks debug overlay is rendered incorrectly on high DPI screens.
|
||||
|
||||
@@ -42,11 +42,10 @@ static void PaintFacility(
|
||||
if (firstCarEntry == nullptr)
|
||||
return;
|
||||
|
||||
auto lengthX = (direction & 1) == 0 ? 28 : 2;
|
||||
auto lengthY = (direction & 1) == 0 ? 2 : 28;
|
||||
CoordsXYZ offset(0, 0, height);
|
||||
BoundBoxXYZ bb = { { direction == 3 ? 28 : 2, direction == 0 ? 28 : 2, height },
|
||||
{ lengthX, lengthY, trackElement.GetClearanceZ() - trackElement.GetBaseZ() - 3 } };
|
||||
const auto lengthZ = trackElement.GetClearanceZ() - trackElement.GetBaseZ() - 3;
|
||||
const CoordsXYZ offset(0, 0, height);
|
||||
const BoundBoxXYZ bb = (direction == 0 || direction == 3) ? BoundBoxXYZ{ { 2, 2, height + lengthZ }, { 28, 28, 1 } }
|
||||
: BoundBoxXYZ{ { 2, 2, height }, { 28, 8, lengthZ } };
|
||||
|
||||
auto imageTemplate = session.TrackColours;
|
||||
auto imageIndex = firstCarEntry->base_image_id + ((direction + 2) & 3);
|
||||
@@ -57,21 +56,21 @@ static void PaintFacility(
|
||||
auto foundationImageIndex = (direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS;
|
||||
auto foundationImageId = foundationImageTemplate.WithIndex(foundationImageIndex);
|
||||
PaintAddImageAsParent(session, foundationImageId, offset, bb);
|
||||
PaintAddImageAsChild(session, imageId, offset, bb);
|
||||
PaintAddImageAsChildRotated(session, direction, imageId, offset, bb);
|
||||
}
|
||||
else
|
||||
{
|
||||
PaintAddImageAsParent(session, imageId, offset, bb);
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, offset, bb);
|
||||
}
|
||||
|
||||
// Base image if door was drawn
|
||||
if (direction == 1)
|
||||
{
|
||||
PaintAddImageAsParent(session, imageId.WithIndexOffset(2), offset, { { 28, 2, height }, { 2, 28, 29 } });
|
||||
PaintAddImageAsParent(session, imageId.WithIndexOffset(2), offset, { { 2, 2, height + lengthZ }, { 28, 28, 1 } });
|
||||
}
|
||||
else if (direction == 2)
|
||||
{
|
||||
PaintAddImageAsParent(session, imageId.WithIndexOffset(4), offset, { { 2, 28, height }, { 28, 2, 29 } });
|
||||
PaintAddImageAsParent(session, imageId.WithIndexOffset(4), offset, { { 2, 2, height + lengthZ }, { 28, 28, 1 } });
|
||||
}
|
||||
|
||||
PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
|
||||
|
||||
Reference in New Issue
Block a user