diff options
author | Martin Kiewitz | 2009-12-09 09:31:07 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-12-09 09:31:07 +0000 |
commit | 7bce8acd2e56eec870ffb7d269c6a8cb04af0735 (patch) | |
tree | 7af030feacd172e53a23670c0e28a1712567f940 /engines/sci/gui/gui.cpp | |
parent | 7e1bf3fb4b0375c90a4adf3bc305c5b7aef0a5d3 (diff) | |
download | scummvm-rg350-7bce8acd2e56eec870ffb7d269c6a8cb04af0735.tar.gz scummvm-rg350-7bce8acd2e56eec870ffb7d269c6a8cb04af0735.tar.bz2 scummvm-rg350-7bce8acd2e56eec870ffb7d269c6a8cb04af0735.zip |
SCI: implemented _picNotValidSci11 for new kPicNotValid behaviour in sci1.1 (fixes island of dr. brain first pic after copy protection not showing up)
svn-id: r46305
Diffstat (limited to 'engines/sci/gui/gui.cpp')
-rw-r--r-- | engines/sci/gui/gui.cpp | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp index be1ca1ca47..a5be962870 100644 --- a/engines/sci/gui/gui.cpp +++ b/engines/sci/gui/gui.cpp @@ -366,6 +366,12 @@ void SciGui::drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo ce _palette->setOnScreen(); } +int SciGui::getControlPicNotValid() { + if (getSciVersion() >= SCI_VERSION_1_1) + return _screen->_picNotValidSci11; + return _screen->_picNotValid; +} + void SciGui::drawControlButton(Common::Rect rect, reg_t obj, const char *text, int16 fontId, int16 style, bool hilite) { if (!hilite) { rect.grow(1); @@ -378,7 +384,7 @@ void SciGui::drawControlButton(Common::Rect rect, reg_t obj, const char *text, i rect.grow(1); if (style & 8) // selected _gfx->FrameRect(rect); - if (_screen->_picNotValid == 0) { + if (!getControlPicNotValid()) { rect.grow(1); _gfx->BitsShow(rect); } @@ -398,7 +404,7 @@ void SciGui::drawControlText(Common::Rect rect, reg_t obj, const char *text, int _gfx->FrameRect(rect); } rect.grow(1); - if (_screen->_picNotValid == 0) + if (!getControlPicNotValid()) _gfx->BitsShow(rect); } else { _gfx->InvertRect(rect); @@ -422,7 +428,7 @@ void SciGui::drawControlTextEdit(Common::Rect rect, reg_t obj, const char *text, _text->SetFont(oldFontId); rect.grow(1); } - if (_screen->_picNotValid == 0) + if (!getControlPicNotValid()) _gfx->BitsShow(rect); } @@ -432,7 +438,7 @@ void SciGui::drawControlIcon(Common::Rect rect, reg_t obj, GuiResourceId viewId, if (style & 0x20) { _gfx->FrameRect(rect); } - if (_screen->_picNotValid == 0) + if (!getControlPicNotValid()) _gfx->BitsShow(rect); } else { _gfx->InvertRect(rect); @@ -447,7 +453,7 @@ void SciGui::drawControlList(Common::Rect rect, reg_t obj, int16 maxChars, int16 if (isAlias && (style & 8)) { _gfx->FrameRect(rect); } - if (_screen->_picNotValid == 0) + if (!getControlPicNotValid()) _gfx->BitsShow(rect); } } @@ -524,10 +530,19 @@ void SciGui::graphAdjustPriority(int top, int bottom) { } int16 SciGui::picNotValid(int16 newPicNotValid) { - int16 oldPicNotValid = _screen->_picNotValid; + int16 oldPicNotValid; + + if (getSciVersion() >= SCI_VERSION_1_1) { + oldPicNotValid = _screen->_picNotValidSci11; - if (newPicNotValid != -1) - _screen->_picNotValid = newPicNotValid; + if (newPicNotValid != -1) + _screen->_picNotValidSci11 = newPicNotValid; + } else { + oldPicNotValid = _screen->_picNotValid; + + if (newPicNotValid != -1) + _screen->_picNotValid = newPicNotValid; + } return oldPicNotValid; } |