mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-31 18:55:23 +01:00
Close #21184: Draw selection square on water
This commit is contained in:
committed by
GitHub
parent
bf4f82da07
commit
3f83cad03a
@@ -3,6 +3,7 @@
|
||||
- Feature: [#21062] [Plugin] Add API for managing a guest's items.
|
||||
- Improved: [#18632] Land ownership and construction rights are now shown on top of the water.
|
||||
- Improved: [#20951] Activate OpenRCT2 window after using native file dialog on macOS.
|
||||
- Improved: [#21184] The construction marker for rides, paths and large scenery is not shown on top of the water.
|
||||
- Improved: [#21227] Entrance style dropdown is now sorted alphabetically everywhere.
|
||||
- Change: [#21200] Raise maximum lift speeds of the Reverser Coaster, Side Friction Coaster, and Virginia Reel for RCT1 parity.
|
||||
- Change: [#21225] Raise maximum allowed misc entities to 1600.
|
||||
|
||||
@@ -1311,6 +1311,17 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
|
||||
|
||||
const auto image_id = ImageId(SPR_TERRAIN_SELECTION_CORNER + Byte97B444[surfaceShape], fpId);
|
||||
PaintAttachToPreviousPS(session, image_id, 0, 0);
|
||||
|
||||
auto [waterHeight, waterSurfaceShape] = SurfaceGetHeightAboveWater(tileElement, height, surfaceShape);
|
||||
const bool isUnderWater = (surfaceShape != waterSurfaceShape || height != waterHeight);
|
||||
if (isUnderWater)
|
||||
{
|
||||
const auto imageId2 = ImageId(SPR_TERRAIN_SELECTION_CORNER + Byte97B444[waterSurfaceShape], fpId);
|
||||
PaintStruct* backup = session.LastPS;
|
||||
PaintAddImageAsParent(session, imageId2, { 0, 0, waterHeight }, { 32, 32, 0 });
|
||||
session.LastPS = backup;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user