aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sherlock/screen.cpp2
-rw-r--r--engines/sherlock/sherlock.cpp3
-rw-r--r--engines/sherlock/surface.cpp7
-rw-r--r--engines/sherlock/surface.h2
4 files changed, 13 insertions, 1 deletions
diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp
index 38bbb93800..cbf18f146f 100644
--- a/engines/sherlock/screen.cpp
+++ b/engines/sherlock/screen.cpp
@@ -217,7 +217,7 @@ void Screen::randomTransition() {
if (offset < (SHERLOCK_SCREEN_WIDTH * SHERLOCK_SCREEN_HEIGHT))
*((byte *)getPixels() + offset) = *((const byte *)_backBuffer->getPixels() + offset);
- if (idx != 0 && (idx % 100) == 0) {
+ if (idx != 0 && (idx % 300) == 0) {
// Ensure there's a full screen dirty rect for the next frame update
if (_dirtyRects.empty())
addDirtyRect(Common::Rect(0, 0, this->w, this->h));
diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp
index 95da79d988..81d461b161 100644
--- a/engines/sherlock/sherlock.cpp
+++ b/engines/sherlock/sherlock.cpp
@@ -129,6 +129,9 @@ Common::Error SherlockEngine::run() {
if (shouldQuit())
break;
+ // Clear the screen
+ _screen->clear();
+
// Reset UI flags
_ui->reset();
diff --git a/engines/sherlock/surface.cpp b/engines/sherlock/surface.cpp
index 2dfbdef77f..36e625794c 100644
--- a/engines/sherlock/surface.cpp
+++ b/engines/sherlock/surface.cpp
@@ -172,4 +172,11 @@ bool Surface::clip(Common::Rect &srcBounds, Common::Rect &destBounds) {
return true;
}
+/**
+ * Clear the screen
+ */
+void Surface::clear() {
+ fillRect(Common::Rect(0, 0, this->w, this->h), 0);
+}
+
} // End of namespace Sherlock
diff --git a/engines/sherlock/surface.h b/engines/sherlock/surface.h
index d4a1584968..b2a759aa8d 100644
--- a/engines/sherlock/surface.h
+++ b/engines/sherlock/surface.h
@@ -53,6 +53,8 @@ public:
void fillRect(int x1, int y1, int x2, int y2, byte color);
void fillRect(const Common::Rect &r, byte color);
+
+ void clear();
};
} // End of namespace Sherlock