diff options
author | Paul Gilbert | 2015-05-15 20:44:12 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-05-15 20:44:12 -0400 |
commit | 95ce29ac7470435dbec167df526cf4ff38fc8805 (patch) | |
tree | e93adbd670b9a0cd86b7ee5e1ac77c0fd907b891 /engines/sherlock | |
parent | 62ce7a9c839f82121c14ce8357d107bc1ba70244 (diff) | |
download | scummvm-rg350-95ce29ac7470435dbec167df526cf4ff38fc8805.tar.gz scummvm-rg350-95ce29ac7470435dbec167df526cf4ff38fc8805.tar.bz2 scummvm-rg350-95ce29ac7470435dbec167df526cf4ff38fc8805.zip |
SHERLOCK: Fix random pixel transitions, and make it the default fade style
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/screen.cpp | 2 | ||||
-rw-r--r-- | engines/sherlock/sherlock.cpp | 3 | ||||
-rw-r--r-- | engines/sherlock/surface.cpp | 7 | ||||
-rw-r--r-- | engines/sherlock/surface.h | 2 |
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 |