mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Decrease Window dependencies in Vehicle.cpp
This commit is contained in:
committed by
Aaron van Geffen
parent
7d0417a366
commit
d09134e64a
@@ -2703,4 +2703,28 @@ rct_viewport * window_get_viewport(rct_window * w)
|
||||
return w->viewport;
|
||||
}
|
||||
|
||||
|
||||
rct_window * window_get_listening()
|
||||
{
|
||||
for (rct_window * w = RCT2_LAST_WINDOW; w >= g_window_list; w--)
|
||||
{
|
||||
if (w->viewport == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (w->viewport->flags & VIEWPORT_FLAG_SOUND_ON)
|
||||
{
|
||||
return w;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
rct_windowclass window_get_classification(rct_window * window)
|
||||
{
|
||||
return window->classification;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user