diff options
author | Martin Kiewitz | 2009-10-29 20:32:55 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-10-29 20:32:55 +0000 |
commit | fc1c05586f898d32ff754976ba5a0c63107958d5 (patch) | |
tree | d6ab94dffd0f91e886626d77cc3807bbf098ab01 | |
parent | c8546fd92ff3626d398e3e56a96323dd95db1e2a (diff) | |
download | scummvm-rg350-fc1c05586f898d32ff754976ba5a0c63107958d5.tar.gz scummvm-rg350-fc1c05586f898d32ff754976ba5a0c63107958d5.tar.bz2 scummvm-rg350-fc1c05586f898d32ff754976ba5a0c63107958d5.zip |
SCI/newgui: SciGuiPicture now acts like sierra sci when drawing cels, so we dont need some hardcoded variable and differ when clearing screen
svn-id: r45508
-rw-r--r-- | engines/sci/gui/gui_gfx.cpp | 4 | ||||
-rw-r--r-- | engines/sci/gui/gui_picture.cpp | 9 | ||||
-rw-r--r-- | engines/sci/gui/gui_screen.cpp | 10 | ||||
-rw-r--r-- | engines/sci/gui/gui_screen.h | 1 |
4 files changed, 12 insertions, 12 deletions
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp index 0a3a36ce33..1df394c302 100644 --- a/engines/sci/gui/gui_gfx.cpp +++ b/engines/sci/gui/gui_gfx.cpp @@ -300,9 +300,9 @@ void SciGuiGfx::drawPicture(GuiResourceId pictureId, int16 animationNr, bool mir SciGuiPicture *picture; picture = new SciGuiPicture(_s->resMan, this, _screen, _palette, pictureId); - // do we add to a picture? if not -> clear screen + // do we add to a picture? if not -> clear screen with white if (!addToFlag) { - ClearScreen(_screen->_colorClearScreen); + ClearScreen(_screen->_colorWhite); } picture->draw(animationNr, mirroredFlag, addToFlag, paletteId); } diff --git a/engines/sci/gui/gui_picture.cpp b/engines/sci/gui/gui_picture.cpp index a21748286d..c59e36f303 100644 --- a/engines/sci/gui/gui_picture.cpp +++ b/engines/sci/gui/gui_picture.cpp @@ -209,6 +209,13 @@ void SciGuiPicture::drawCelData(byte *inbuffer, int size, int headerPos, int rle leftX = callerX + _gfx->GetPort()->left; rightX = MIN<int16>(width + leftX, _gfx->GetPort()->rect.right + _gfx->GetPort()->left); + // Change clearcolor to white, if we dont add to an existing picture. That way we will paint everything on screen + // but white and that wont matter because the screen is supposed to be already white. It seems that most (if not all) + // SCI1.1 games use color 0 as transparency and SCI1 games use color 255 as transparency. Sierra SCI seems to paint + // the whole data to screen and wont skip over transparent pixels. So this will actually make it work like Sierra + if (!_addToFlag) + clearColor = _screen->_colorWhite; + ptr = celBitmap; if (!_mirroredFlag) { // Draw bitmap to screen @@ -605,7 +612,7 @@ void SciGuiPicture::vectorFloodFill(int16 x, int16 y, byte color, byte priority, // This logic was taken directly from sierra sci, floodfill will get aborted on various occations if (screenMask & SCI_SCREEN_MASK_VISUAL) { - if ((color == _screen->_colorWhite) || (searchColor != _screen->_colorClearScreen)) + if ((color == _screen->_colorWhite) || (searchColor != _screen->_colorWhite)) return; } else if (screenMask & SCI_SCREEN_MASK_PRIORITY) { if ((priority == 0) || (searchPriority != 0)) diff --git a/engines/sci/gui/gui_screen.cpp b/engines/sci/gui/gui_screen.cpp index 6818ed3182..627708cf43 100644 --- a/engines/sci/gui/gui_screen.cpp +++ b/engines/sci/gui/gui_screen.cpp @@ -56,18 +56,12 @@ SciGuiScreen::SciGuiScreen(ResourceManager *resMan, int16 width, int16 height, i if (_resMan->isVGA()) { _colorWhite = 255; - // TODO: Find out whats really different between SCI11 and SCI1, because actually the clearScreen in SCI11 - // really uses 255 as well - if (getSciVersion() >= SCI_VERSION_1_1) { - _colorClearScreen = 0; + if (getSciVersion() >= SCI_VERSION_1_1) _colorDefaultVectorData = 255; - } else { - _colorClearScreen = 255; + else _colorDefaultVectorData = 0; - } } else { _colorWhite = 15; - _colorClearScreen = 15; _colorDefaultVectorData = 0; } } diff --git a/engines/sci/gui/gui_screen.h b/engines/sci/gui/gui_screen.h index 4c54c544f3..a30ddc48da 100644 --- a/engines/sci/gui/gui_screen.h +++ b/engines/sci/gui/gui_screen.h @@ -86,7 +86,6 @@ public: int _picNotValid; // possible values 0, 1 and 2 byte _colorWhite; - byte _colorClearScreen; byte _colorDefaultVectorData; private: |