aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/kgraphics.cpp2
-rw-r--r--engines/sci/graphics/gui.cpp19
-rw-r--r--engines/sci/graphics/gui.h2
-rw-r--r--engines/sci/graphics/screen.cpp18
-rw-r--r--engines/sci/graphics/screen.h2
5 files changed, 21 insertions, 22 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 27437bdcdd..25a4839b2f 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -215,7 +215,7 @@ reg_t kMoveCursor(EngineState *s, int argc, reg_t *argv) {
reg_t kPicNotValid(EngineState *s, int argc, reg_t *argv) {
int16 newPicNotValid = (argc > 0) ? argv[0].toUint16() : -1;
- return make_reg(0, s->_gui->picNotValid(newPicNotValid));
+ return make_reg(0, s->_gfxScreen->kernelPicNotValid(newPicNotValid));
}
Common::Rect kGraphCreateRect(int16 x, int16 y, int16 x1, int16 y1) {
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;