[Scummvm-cvs-logs] scummvm master -> 2f59fd364229e2eb656c7b89804218fd3e7aec2e
dreammaster
dreammaster at scummvm.org
Sat Jul 4 00:52:08 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2f59fd3642 SHERLOCK: RT: Fix loading double-wide scenes
Commit: 2f59fd364229e2eb656c7b89804218fd3e7aec2e
https://github.com/scummvm/scummvm/commit/2f59fd364229e2eb656c7b89804218fd3e7aec2e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-07-03T18:51:05-04:00
Commit Message:
SHERLOCK: RT: Fix loading double-wide scenes
Changed paths:
engines/sherlock/scene.cpp
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index ea761fe..f3bbad6 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);
}
}
More information about the Scummvm-git-logs
mailing list