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

Function getMainViewport

src/OpenLoco/src/Ui/WindowManager.cpp:158–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156 }
157
158 Viewport* getMainViewport()
159 {
160 auto mainWindow = getMainWindow();
161 if (mainWindow != nullptr)
162 {
163 return mainWindow->viewports[0];
164 }
165 return nullptr;
166 }
167
168 template<typename TPred>
169 static Window* findImpl(TPred pred)

Callers 3

spendMoneyEffectFunction · 0.85
updateAmbientNoiseFunction · 0.85
drawSavePreviewImageFunction · 0.85

Calls 1

getMainWindowFunction · 0.85

Tested by

no test coverage detected