mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 07:13:07 +01:00
Render selection grid for Map ownership on the water
This commit is contained in:
committed by
GitHub
parent
a377538f0a
commit
40c7e73189
@@ -1,7 +1,7 @@
|
|||||||
0.4.8 (in development)
|
0.4.8 (in development)
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
- Feature: [#21062] [Plugin] Add API for managing a guest's items.
|
- 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: [#18632, #21306] 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: [#20951] Activate OpenRCT2 window after using native file dialog on macOS.
|
||||||
- Improved: [#21184] The construction marker for rides, paths and large scenery is now shown on top of the water.
|
- Improved: [#21184] The construction marker for rides, paths and large scenery is now shown on top of the water.
|
||||||
- Improved: [#21227] Entrance style dropdown is now sorted alphabetically everywhere.
|
- Improved: [#21227] Entrance style dropdown is now sorted alphabetically everywhere.
|
||||||
|
|||||||
@@ -430,12 +430,16 @@ public:
|
|||||||
{
|
{
|
||||||
MapInvalidateSelectionRect();
|
MapInvalidateSelectionRect();
|
||||||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE;
|
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE;
|
||||||
auto mapCoords = ScreenGetMapXY(screenCoords, nullptr);
|
|
||||||
if (!mapCoords.has_value())
|
auto info = GetMapCoordinatesFromPos(
|
||||||
|
screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Water));
|
||||||
|
if (info.SpriteType == ViewportInteractionItem::None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
auto mapCoords = info.Loc;
|
||||||
|
|
||||||
gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE;
|
gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE;
|
||||||
gMapSelectType = MAP_SELECT_TYPE_FULL;
|
gMapSelectType = MAP_SELECT_TYPE_FULL_LAND_RIGHTS;
|
||||||
|
|
||||||
int32_t landRightsToolSize = _landRightsToolSize;
|
int32_t landRightsToolSize = _landRightsToolSize;
|
||||||
if (landRightsToolSize == 0)
|
if (landRightsToolSize == 0)
|
||||||
@@ -443,11 +447,12 @@ public:
|
|||||||
|
|
||||||
int32_t size = (landRightsToolSize * 32) - 32;
|
int32_t size = (landRightsToolSize * 32) - 32;
|
||||||
int32_t radius = (landRightsToolSize * 16) - 16;
|
int32_t radius = (landRightsToolSize * 16) - 16;
|
||||||
mapCoords->x = (mapCoords->x - radius) & 0xFFE0;
|
mapCoords.x -= radius;
|
||||||
mapCoords->y = (mapCoords->y - radius) & 0xFFE0;
|
mapCoords.y -= radius;
|
||||||
gMapSelectPositionA = *mapCoords;
|
mapCoords = mapCoords.ToTileStart();
|
||||||
gMapSelectPositionB.x = mapCoords->x + size;
|
gMapSelectPositionA = mapCoords;
|
||||||
gMapSelectPositionB.y = mapCoords->y + size;
|
gMapSelectPositionB.x = mapCoords.x + size;
|
||||||
|
gMapSelectPositionB.y = mapCoords.y + size;
|
||||||
MapInvalidateSelectionRect();
|
MapInvalidateSelectionRect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -687,7 +692,7 @@ public:
|
|||||||
|
|
||||||
MapInvalidateSelectionRect();
|
MapInvalidateSelectionRect();
|
||||||
gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE;
|
gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE;
|
||||||
gMapSelectType = MAP_SELECT_TYPE_FULL;
|
gMapSelectType = MAP_SELECT_TYPE_FULL_LAND_RIGHTS;
|
||||||
gMapSelectPositionA = mapCoords;
|
gMapSelectPositionA = mapCoords;
|
||||||
gMapSelectPositionB = mapCoords + CoordsXY{ size, size };
|
gMapSelectPositionB = mapCoords + CoordsXY{ size, size };
|
||||||
MapInvalidateSelectionRect();
|
MapInvalidateSelectionRect();
|
||||||
|
|||||||
Reference in New Issue
Block a user