1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

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
2024-03-20 11:14:52 +00:00
committed by GitHub
parent 3f81a491b0
commit 5a70fd97fb
11 changed files with 654 additions and 620 deletions

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