1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Rename SetLocation to SetViewportLocation, this is less confusing

This commit is contained in:
ζeh Matt
2025-04-25 17:34:39 +03:00
parent 7a764a05a8
commit 12063aa884
5 changed files with 7 additions and 7 deletions

View File

@@ -112,7 +112,7 @@ namespace OpenRCT2::Editor
gameState.scenarioCategory = ScenarioCategory::other;
ViewportInitAll();
WindowBase* mainWindow = OpenEditorWindows();
mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
mainWindow->SetViewportLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
LoadPalette();
gScreenAge = 0;
gameState.scenarioName = LanguageGetString(STR_MY_NEW_SCENARIO);
@@ -183,7 +183,7 @@ namespace OpenRCT2::Editor
getGameState().editorStep = EditorStep::ObjectSelection;
ViewportInitAll();
WindowBase* mainWindow = OpenEditorWindows();
mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
mainWindow->SetViewportLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
LoadPalette();
GameLoadScripts();
@@ -211,7 +211,7 @@ namespace OpenRCT2::Editor
getGameState().editorStep = EditorStep::ObjectSelection;
ViewportInitAll();
WindowBase* mainWindow = OpenEditorWindows();
mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
mainWindow->SetViewportLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
LoadPalette();
GameLoadScripts();

View File

@@ -916,7 +916,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar
{
auto location = TileCoordsXYZ(int_val[0], int_val[1], 0).ToCoordsXYZ().ToTileCentre();
location.z = TileElementHeight(location);
w->SetLocation(location);
w->SetViewportLocation(location);
console.Execute("get location");
}
}

View File

@@ -8,7 +8,7 @@
namespace OpenRCT2
{
void WindowBase::SetLocation(const CoordsXYZ& coords)
void WindowBase::SetViewportLocation(const CoordsXYZ& coords)
{
WindowScrollToLocation(*this, coords);
flags &= ~WF_SCROLLING_TO_LOCATION;

View File

@@ -109,7 +109,7 @@ namespace OpenRCT2
VisibilityCache visibility{};
EntityId viewport_smart_follow_sprite{ EntityId::GetNull() }; // Handles setting viewport target sprite etc
void SetLocation(const CoordsXYZ& coords);
void SetViewportLocation(const CoordsXYZ& coords);
void Invalidate();
void RemoveViewport();
void SetWidgets(const std::span<const Widget> newWidgets);

View File

@@ -28,7 +28,7 @@ namespace OpenRCT2::Title
// Prevent scroll adjustment due to window placement when in-game
auto oldLegacyScene = gLegacyScene;
gLegacyScene = LegacyScene::titleSequence;
w->SetLocation({ loc, z });
w->SetViewportLocation({ loc, z });
gLegacyScene = oldLegacyScene;
}