MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / moveMainViewToMapView

Function moveMainViewToMapView

src/OpenLoco/src/Ui/Windows/MapWindow.cpp:1144–1155  ·  view source on GitHub ↗

0x0046B9D4

Source from the content-addressed store, hash-verified

1142
1143 // 0x0046B9D4
1144 static void moveMainViewToMapView(Pos2 pos)
1145 {
1146 auto z = TileManager::getHeight(pos).landHeight;
1147 auto window = WindowManager::getMainWindow();
1148
1149 if (window == nullptr)
1150 {
1151 return;
1152 }
1153
1154 window->viewportCentreOnTile({ static_cast<coord_t>(pos.x), static_cast<coord_t>(pos.y), static_cast<coord_t>(z) });
1155 }
1156
1157 // 0x0046B97C
1158 static void scrollMouseDown([[maybe_unused]] Window& self, int16_t x, int16_t y, [[maybe_unused]] uint8_t scrollIndex)

Callers 1

scrollMouseDownFunction · 0.85

Calls 3

getHeightFunction · 0.85
getMainWindowFunction · 0.85
viewportCentreOnTileMethod · 0.80

Tested by

no test coverage detected