(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**.

This commit is contained in:
rubidium
2009-01-06 22:37:42 +00:00
parent 6138f6a2bb
commit 19edb3ccc3
4 changed files with 89 additions and 134 deletions

View File

@@ -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 &&