Fix #17973: Path items overlay parts of the land

This commit is contained in:
Rik Smeets 2022-09-24 22:25:12 +02:00 committed by GitHub
parent 6c6ea169f1
commit ffcd9551c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 14 deletions

View file

@ -69,6 +69,7 @@
- Fix: [#17959] Areas marked for dirty drawing are too large.
- Fix: [#17963] Some marketing campaigns cant be started after Finances window tab has been on Research.
- Fix: [#17966] Reversed steel trains do not properly import from S4.
- Fix: [#17973] Bins and lamps overlay parts of the land (original bug).
- Fix: [#18008] Steeplechase S-bends has multiple gaps visible in the tracks.
- Fix: [#18009] Visual glitch with litter at edge of sloped path.
- Fix: [#18025] Fix land ownership in Six Holland, Six Flags Magic Mountain, North America - Grand Canyon and Asia - Great Wall of China Tourism Enhancement scenarios.

View file

@ -150,25 +150,25 @@ static void path_bit_lights_paint(
{
auto imageIndex = GetFootpathLampImage(pathBitEntry, EDGE_NE, isBroken);
PaintAddImageAsParent(
session, imageTemplate.WithIndex(imageIndex), { 2, 16, height }, { 1, 1, 23 }, { 3, 16, height + 2 });
session, imageTemplate.WithIndex(imageIndex), { 2, 16, height }, { 0, 16, 23 }, { 6, 8, height + 2 });
}
if (!(edges & EDGE_SE))
{
auto imageIndex = GetFootpathLampImage(pathBitEntry, EDGE_SE, isBroken);
PaintAddImageAsParent(
session, imageTemplate.WithIndex(imageIndex), { 16, 30, height }, { 1, 0, 23 }, { 16, 29, height + 2 });
session, imageTemplate.WithIndex(imageIndex), { 16, 30, height }, { 16, 0, 23 }, { 8, 23, height + 2 });
}
if (!(edges & EDGE_SW))
{
auto imageIndex = GetFootpathLampImage(pathBitEntry, EDGE_SW, isBroken);
PaintAddImageAsParent(
session, imageTemplate.WithIndex(imageIndex), { 30, 16, height }, { 0, 1, 23 }, { 29, 16, height + 2 });
session, imageTemplate.WithIndex(imageIndex), { 30, 16, height }, { 0, 16, 23 }, { 23, 8, height + 2 });
}
if (!(edges & EDGE_NW))
{
auto imageIndex = GetFootpathLampImage(pathBitEntry, EDGE_NW, isBroken);
PaintAddImageAsParent(
session, imageTemplate.WithIndex(imageIndex), { 16, 2, height }, { 1, 1, 23 }, { 16, 3, height + 2 });
session, imageTemplate.WithIndex(imageIndex), { 16, 2, height }, { 16, 0, 23 }, { 8, 6, height + 2 });
}
}
@ -206,7 +206,7 @@ static void path_bit_bins_paint(
auto imageIndex = GetFootpathBinImage(pathBitEntry, EDGE_NE, binsAreVandalised, binIsFull);
if (!highlightPathIssues || binIsFull || binsAreVandalised)
PaintAddImageAsParent(
session, imageTemplate.WithIndex(imageIndex), { 7, 16, height }, { 1, 1, 7 }, { 7, 16, height + 2 });
session, imageTemplate.WithIndex(imageIndex), { 7, 16, height }, { 0, 16, 7 }, { 6, 8, height + 2 });
}
if (!(edges & EDGE_SE))
{
@ -214,25 +214,23 @@ static void path_bit_bins_paint(
auto imageIndex = GetFootpathBinImage(pathBitEntry, EDGE_SE, binsAreVandalised, binIsFull);
if (!highlightPathIssues || binIsFull || binsAreVandalised)
PaintAddImageAsParent(
session, imageTemplate.WithIndex(imageIndex), { 16, 25, height }, { 1, 1, 7 }, { 16, 25, height + 2 });
session, imageTemplate.WithIndex(imageIndex), { 16, 25, height }, { 16, 0, 7 }, { 8, 23, height + 2 });
}
if (!(edges & EDGE_SW))
{
auto binIsFull = IsBinFull(session, pathElement, EDGE_SW);
auto imageIndex = GetFootpathBinImage(pathBitEntry, EDGE_SW, binsAreVandalised, binIsFull);
if (!highlightPathIssues || binIsFull || binsAreVandalised)
PaintAddImageAsParent(
session, imageTemplate.WithIndex(imageIndex), { 25, 16, height }, { 1, 1, 7 }, { 25, 16, height + 2 });
session, imageTemplate.WithIndex(imageIndex), { 25, 16, height }, { 0, 16, 7 }, { 23, 8, height + 2 });
}
if (!(edges & EDGE_NW))
{
auto binIsFull = IsBinFull(session, pathElement, EDGE_NW);
auto imageIndex = GetFootpathBinImage(pathBitEntry, EDGE_NW, binsAreVandalised, binIsFull);
if (!highlightPathIssues || binIsFull || binsAreVandalised)
PaintAddImageAsParent(
session, imageTemplate.WithIndex(imageIndex), { 16, 7, height }, { 1, 1, 7 }, { 16, 7, height + 2 });
session, imageTemplate.WithIndex(imageIndex), { 16, 7, height }, { 16, 0, 7 }, { 8, 6, height + 2 });
}
}
@ -278,10 +276,10 @@ static void path_bit_jumping_fountains_paint(
return;
auto imageId = imageTemplate.WithIndex(pathBitEntry.image);
PaintAddImageAsParent(session, imageId.WithIndexOffset(1), { 0, 0, height }, { 1, 1, 2 }, { 3, 3, height + 2 });
PaintAddImageAsParent(session, imageId.WithIndexOffset(2), { 0, 0, height }, { 1, 1, 2 }, { 3, 29, height + 2 });
PaintAddImageAsParent(session, imageId.WithIndexOffset(3), { 0, 0, height }, { 1, 1, 2 }, { 29, 29, height + 2 });
PaintAddImageAsParent(session, imageId.WithIndexOffset(4), { 0, 0, height }, { 1, 1, 2 }, { 29, 3, height + 2 });
PaintAddImageAsParent(session, imageId.WithIndexOffset(1), { 0, 0, height }, { 1, 1, 2 }, { 6, 8, height + 2 });
PaintAddImageAsParent(session, imageId.WithIndexOffset(2), { 0, 0, height }, { 1, 1, 2 }, { 8, 23, height + 2 });
PaintAddImageAsParent(session, imageId.WithIndexOffset(3), { 0, 0, height }, { 1, 1, 2 }, { 23, 8, height + 2 });
PaintAddImageAsParent(session, imageId.WithIndexOffset(4), { 0, 0, height }, { 1, 1, 2 }, { 8, 6, height + 2 });
}
/**