From 5f39e3b7b544e94d9cdee80d7067006970a16f13 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Thu, 4 Feb 2010 20:52:56 +0000 Subject: SCI: kPicNotValid now uses GfxScreen directly and not SciGui/32 svn-id: r47889 --- engines/sci/graphics/gui.cpp | 19 ------------------- engines/sci/graphics/gui.h | 2 -- engines/sci/graphics/screen.cpp | 18 ++++++++++++++++++ engines/sci/graphics/screen.h | 2 ++ 4 files changed, 20 insertions(+), 21 deletions(-) (limited to 'engines/sci/graphics') diff --git a/engines/sci/graphics/gui.cpp b/engines/sci/graphics/gui.cpp index 4cfe7034cd..7a216e9b0b 100644 --- a/engines/sci/graphics/gui.cpp +++ b/engines/sci/graphics/gui.cpp @@ -296,25 +296,6 @@ void SciGui::graphAdjustPriority(int top, int bottom) { } } -int16 SciGui::picNotValid(int16 newPicNotValid) { - int16 oldPicNotValid; - - if (getSciVersion() >= SCI_VERSION_1_1) { - oldPicNotValid = _screen->_picNotValidSci11; - - if (newPicNotValid != -1) - _screen->_picNotValidSci11 = newPicNotValid; - } else { - oldPicNotValid = _screen->_picNotValid; - - if (newPicNotValid != -1) - _screen->_picNotValid = newPicNotValid; - } - - return oldPicNotValid; -} - - void SciGui::shakeScreen(uint16 shakeCount, uint16 directions) { while (shakeCount--) { if (directions & SCI_SHAKE_DIRECTION_VERTICAL) diff --git a/engines/sci/graphics/gui.h b/engines/sci/graphics/gui.h index 8077fc0249..7ba14d8921 100644 --- a/engines/sci/graphics/gui.h +++ b/engines/sci/graphics/gui.h @@ -79,8 +79,6 @@ public: virtual void graphRedrawBox(Common::Rect rect); virtual void graphAdjustPriority(int top, int bottom); - virtual int16 picNotValid(int16 newPicNotValid); - virtual void shakeScreen(uint16 shakeCount, uint16 directions); virtual uint16 onControl(byte screenMask, Common::Rect rect); diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp index d83d254856..04184cee09 100644 --- a/engines/sci/graphics/screen.cpp +++ b/engines/sci/graphics/screen.cpp @@ -526,4 +526,22 @@ void GfxScreen::scale2x(byte *src, byte *dst, int16 srcWidth, int16 srcHeight) { } } +int16 GfxScreen::kernelPicNotValid(int16 newPicNotValid) { + int16 oldPicNotValid; + + if (getSciVersion() >= SCI_VERSION_1_1) { + oldPicNotValid = _picNotValidSci11; + + if (newPicNotValid != -1) + _picNotValidSci11 = newPicNotValid; + } else { + oldPicNotValid = _picNotValid; + + if (newPicNotValid != -1) + _picNotValid = newPicNotValid; + } + + return oldPicNotValid; +} + } // End of namespace Sci diff --git a/engines/sci/graphics/screen.h b/engines/sci/graphics/screen.h index 7fb5079bf9..ee59411055 100644 --- a/engines/sci/graphics/screen.h +++ b/engines/sci/graphics/screen.h @@ -95,6 +95,8 @@ public: int _picNotValid; // possible values 0, 1 and 2 int _picNotValidSci11; // another variable that is used by kPicNotValid in sci1.1 + int16 kernelPicNotValid(int16 newPicNotValid); + private: uint16 _width; uint16 _height; -- cgit v1.2.3