Move vehicle sounds update into Ui library (#21577)

* Move vehicle sounds update into Ui library

* Add missing statics

* Apply review comments

* Sprinkle some const

* Clang format accumulate
This commit is contained in:
Duncan authored and GitHub committed 2024-03-20 11:14:52 +00:00
1 parent 3f81a491b0
commit 5a70fd97fb
11 files changed
+654 -620

No files matched your search

-25
View File
@@ -1841,31 +1841,6 @@ Viewport* WindowGetViewport(WindowBase* w)
return w->viewport;
}
WindowBase* WindowGetListening()
{
for (auto it = g_window_list.rbegin(); it != g_window_list.rend(); it++)
{
auto& w = **it;
if (w.flags & WF_DEAD)
continue;
auto viewport = w.viewport;
if (viewport != nullptr)
{
if (viewport->flags & VIEWPORT_FLAG_SOUND_ON)
{
return &w;
}
}
}
return nullptr;
}
WindowClass WindowGetClassification(const WindowBase& window)
{
return window.classification;
}
/**
*
* rct2: 0x006EAF26