summaryrefslogtreecommitdiff
path: root/src/sound.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-06 22:37:42 +0000
committerrubidium <rubidium@openttd.org>2009-01-06 22:37:42 +0000
commit19edb3ccc3146c8ce4c739dadb2b53b1ed760850 (patch)
treed95cb0751c055d7052bc2f0af8a848c6476c6125 /src/sound.cpp
parent6138f6a2bbc5c7d63c6f5b3b0138931d8d59cdb3 (diff)
downloadopenttd-19edb3ccc3146c8ce4c739dadb2b53b1ed760850.tar.xz
(svn r14880) -Codechange: make it clear which way the FOR_ALL_WINDOWS goes (from back to front or vice versa) and make it iterate over the Window* instead of Window**.
Diffstat (limited to 'src/sound.cpp')
-rw-r--r--src/sound.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index 6c1039816..cd795560d 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -211,12 +211,11 @@ void SndCopyToPool()
*/
static void SndPlayScreenCoordFx(SoundFx sound, int left, int right, int top, int bottom)
{
- Window* const *wz;
-
if (msf.effect_vol == 0) return;
- FOR_ALL_WINDOWS(wz) {
- const ViewPort *vp = (*wz)->viewport;
+ const Window *w;
+ FOR_ALL_WINDOWS_FROM_BACK(w) {
+ const ViewPort *vp = w->viewport;
if (vp != NULL &&
left < vp->virtual_left + vp->virtual_width && right > vp->virtual_left &&