diff options
author | Martin Kiewitz | 2009-10-13 08:09:17 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-10-13 08:09:17 +0000 |
commit | 1731acc320a2fbaf79162597272e787a0ffe8c10 (patch) | |
tree | 464c79b942551300800e720160de998942a76d0c | |
parent | 3f914e67a0f1e4a0a32c694abd7e86d05c2a6f53 (diff) | |
download | scummvm-rg350-1731acc320a2fbaf79162597272e787a0ffe8c10.tar.gz scummvm-rg350-1731acc320a2fbaf79162597272e787a0ffe8c10.tar.bz2 scummvm-rg350-1731acc320a2fbaf79162597272e787a0ffe8c10.zip |
SCI/newgui: floodfill / remove screenMasks that are already filled with the right value (otherwise we could get into an endless loop)
svn-id: r45006
-rw-r--r-- | engines/sci/gui/gui_picture.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/gui/gui_picture.cpp b/engines/sci/gui/gui_picture.cpp index ba2ffc2c24..bb927a91f2 100644 --- a/engines/sci/gui/gui_picture.cpp +++ b/engines/sci/gui/gui_picture.cpp @@ -599,6 +599,14 @@ void SciGuiPicture::vectorFloodFill(int16 x, int16 y, byte color, byte priority, return; } + // Now remove screens, that already got the right color/priority/control + if ((screenMask & SCI_SCREEN_MASK_VISUAL) && (searchColor == color)) + screenMask ^= SCI_SCREEN_MASK_VISUAL; + if ((screenMask & SCI_SCREEN_MASK_PRIORITY) && (searchPriority == priority)) + screenMask ^= SCI_SCREEN_MASK_PRIORITY; + if ((screenMask & SCI_SCREEN_MASK_CONTROL) && (searchControl == control)) + screenMask ^= SCI_SCREEN_MASK_CONTROL; + // hard borders for filling int l = curPort->rect.left + curPort->left; int t = curPort->rect.top + curPort->top; |