mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-11 10:02:27 +01:00
Simplified conversions from TileCoordsXYZ to CoordsXY
This commit is contained in:
@@ -765,8 +765,7 @@ bool Peep::Place(TileCoordsXYZ location, bool apply)
|
||||
TileElement* tileElement = reinterpret_cast<TileElement*>(pathElement);
|
||||
if (!pathElement)
|
||||
{
|
||||
tileElement = reinterpret_cast<TileElement*>(
|
||||
map_get_surface_element_at(TileCoordsXY{ location.x, location.y }.ToCoordsXY()));
|
||||
tileElement = reinterpret_cast<TileElement*>(map_get_surface_element_at(location.ToCoordsXYZ()));
|
||||
}
|
||||
|
||||
if (!tileElement)
|
||||
|
||||
@@ -136,8 +136,7 @@ protected:
|
||||
static ::testing::AssertionResult AssertIsStartPosition(const char*, const TileCoordsXYZ& location)
|
||||
{
|
||||
const uint32_t expectedSurfaceStyle = 11u;
|
||||
const uint32_t style = map_get_surface_element_at(TileCoordsXY{ location.x, location.y }.ToCoordsXY())
|
||||
->GetSurfaceStyle();
|
||||
const uint32_t style = map_get_surface_element_at(location.ToCoordsXYZ())->GetSurfaceStyle();
|
||||
|
||||
if (style != expectedSurfaceStyle)
|
||||
return ::testing::AssertionFailure()
|
||||
@@ -152,8 +151,7 @@ protected:
|
||||
{
|
||||
const uint32_t forbiddenSurfaceStyle = 8u;
|
||||
|
||||
const uint32_t style = map_get_surface_element_at(TileCoordsXY{ location.x, location.y }.ToCoordsXY())
|
||||
->GetSurfaceStyle();
|
||||
const uint32_t style = map_get_surface_element_at(location.ToCoordsXYZ())->GetSurfaceStyle();
|
||||
|
||||
if (style == forbiddenSurfaceStyle)
|
||||
return ::testing::AssertionFailure()
|
||||
|
||||
Reference in New Issue
Block a user