From aa6c7e8574bf54306cf33692515de1662d5e4884 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 6 Jan 2009 22:37:42 +0000 Subject: (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**. --- src/sound.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/sound.cpp') 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 && -- cgit v1.2.3-54-g00ecf