1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Rename centre_2d_coordinates to centre2dCoordinates

This commit is contained in:
Gymnasiast
2025-09-16 00:20:44 +02:00
parent eca7870818
commit 0dd36af869
4 changed files with 8 additions and 8 deletions

View File

@@ -292,7 +292,7 @@ namespace OpenRCT2::Ui::Windows
auto coord = Network::GetPlayerLastActionCoord(playerIndex);
if (coord.x != 0 || coord.y != 0 || coord.z != 0)
{
auto centreLoc = centre_2d_coordinates(coord, viewport);
auto centreLoc = centre2dCoordinates(coord, viewport);
if (!centreLoc.has_value())
{
return;

View File

@@ -123,7 +123,7 @@ namespace OpenRCT2
* out_x : ax
* out_y : bx
*/
std::optional<ScreenCoordsXY> centre_2d_coordinates(const CoordsXYZ& loc, Viewport* viewport)
std::optional<ScreenCoordsXY> centre2dCoordinates(const CoordsXYZ& loc, Viewport* viewport)
{
// If the start location was invalid
// propagate the invalid location to the output.
@@ -217,7 +217,7 @@ namespace OpenRCT2
},
focus.data);
auto centreLoc = centre_2d_coordinates(centrePos, viewport);
auto centreLoc = centre2dCoordinates(centrePos, viewport);
if (!centreLoc.has_value())
{
LOG_ERROR("Invalid location for viewport.");
@@ -612,7 +612,7 @@ namespace OpenRCT2
if (at_map_edge)
{
auto centreLoc = centre_2d_coordinates({ mapCoord, 0 }, viewport);
auto centreLoc = centre2dCoordinates({ mapCoord, 0 }, viewport);
if (centreLoc.has_value())
{
window->savedViewPos = centreLoc.value();
@@ -676,7 +676,7 @@ namespace OpenRCT2
ViewportSetUndergroundFlag(underground, window, window->viewport);
}
auto centreLoc = centre_2d_coordinates(sprite->GetLocation(), window->viewport);
auto centreLoc = centre2dCoordinates(sprite->GetLocation(), window->viewport);
if (centreLoc.has_value())
{
window->savedViewPos = *centreLoc;
@@ -830,7 +830,7 @@ namespace OpenRCT2
viewport->rotation = (viewport->rotation + direction) & 3;
auto centreLoc = centre_2d_coordinates(coords, viewport);
auto centreLoc = centre2dCoordinates(coords, viewport);
if (centreLoc.has_value())
{

View File

@@ -184,7 +184,7 @@ namespace OpenRCT2
extern Viewport* gMusicTrackingViewport;
void ViewportInitAll();
std::optional<ScreenCoordsXY> centre_2d_coordinates(const CoordsXYZ& loc, Viewport* viewport);
std::optional<ScreenCoordsXY> centre2dCoordinates(const CoordsXYZ& loc, Viewport* viewport);
void ViewportCreate(WindowBase& w, const ScreenCoordsXY& screenCoords, int32_t width, int32_t height, const Focus& focus);
void ViewportRemove(Viewport* viewport);

View File

@@ -216,7 +216,7 @@ namespace OpenRCT2
.rotation = mapPosXYZD.direction,
};
auto viewPos = centre_2d_coordinates(mapPosXYZD, &saveVp);
auto viewPos = centre2dCoordinates(mapPosXYZD, &saveVp);
if (viewPos == std::nullopt)
return std::nullopt;