diff options
author | Paul Gilbert | 2015-07-03 18:51:05 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-03 18:51:05 -0400 |
commit | 2f59fd364229e2eb656c7b89804218fd3e7aec2e (patch) | |
tree | aade48a8dad47971a8297d052b84112a8a964ac1 /engines/sherlock | |
parent | 62d0fed9a766f5177af0ce0964420d8a392a0bd9 (diff) | |
download | scummvm-rg350-2f59fd364229e2eb656c7b89804218fd3e7aec2e.tar.gz scummvm-rg350-2f59fd364229e2eb656c7b89804218fd3e7aec2e.tar.bz2 scummvm-rg350-2f59fd364229e2eb656c7b89804218fd3e7aec2e.zip |
SHERLOCK: RT: Fix loading double-wide scenes
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/scene.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index ea761fea49..f3bbad6904 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -368,11 +368,18 @@ bool Scene::loadScene(const Common::String &filename) { paletteLoaded(); + // Resize the screen if necessary + int fullWidth = SHERLOCK_SCREEN_WIDTH + bgHeader._scrollSize; + if (screen._backBuffer1.w() != fullWidth) { + screen._backBuffer1.create(fullWidth, SHERLOCK_SCREEN_HEIGHT); + screen._backBuffer2.create(fullWidth, SHERLOCK_SCREEN_HEIGHT); + } + // Read in background if (_compressed) { - res.decompress(*rrmStream, (byte *)screen._backBuffer1.getPixels(), SHERLOCK_SCREEN_WIDTH * SHERLOCK_SCREEN_HEIGHT); + res.decompress(*rrmStream, (byte *)screen._backBuffer1.getPixels(), fullWidth * SHERLOCK_SCREEN_HEIGHT); } else { - rrmStream->read(screen._backBuffer1.getPixels(), SHERLOCK_SCREEN_WIDTH * SHERLOCK_SCREEN_HEIGHT); + rrmStream->read(screen._backBuffer1.getPixels(), fullWidth * SHERLOCK_SCREEN_HEIGHT); } } |