diff options
-rw-r--r-- | engines/sherlock/scene.cpp | 13 | ||||
-rw-r--r-- | engines/sherlock/screen.cpp | 3 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_scene.cpp | 5 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_user_interface.cpp | 5 |
4 files changed, 16 insertions, 10 deletions
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index f3bbad6904..450370de2d 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -362,12 +362,6 @@ bool Scene::loadScene(const Common::String &filename) { _invGraphicItems = bgHeader._numImages + 1; if (IS_ROSE_TATTOO) { - screen.initPaletteFade(bgHeader._bytesWritten); - rrmStream->read(screen._cMap, PALETTE_SIZE); - screen.translatePalette(screen._cMap); - - paletteLoaded(); - // Resize the screen if necessary int fullWidth = SHERLOCK_SCREEN_WIDTH + bgHeader._scrollSize; if (screen._backBuffer1.w() != fullWidth) { @@ -375,6 +369,13 @@ bool Scene::loadScene(const Common::String &filename) { screen._backBuffer2.create(fullWidth, SHERLOCK_SCREEN_HEIGHT); } + // Handle initializing the palette + screen.initPaletteFade(bgHeader._bytesWritten); + rrmStream->read(screen._cMap, PALETTE_SIZE); + screen.translatePalette(screen._cMap); + + paletteLoaded(); + // Read in background if (_compressed) { res.decompress(*rrmStream, (byte *)screen._backBuffer1.getPixels(), fullWidth * SHERLOCK_SCREEN_HEIGHT); diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp index e20c1b5182..404b3d5984 100644 --- a/engines/sherlock/screen.cpp +++ b/engines/sherlock/screen.cpp @@ -523,8 +523,7 @@ void Screen::vgaBar(const Common::Rect &r, int color) { } void Screen::setDisplayBounds(const Common::Rect &r) { - assert(r.left == 0 && r.top == 0); - _sceneSurface.setPixels(_backBuffer1.getPixels(), r.width(), r.height(), _backBuffer1.getPixelFormat()); + _sceneSurface.setPixels(_backBuffer1.getBasePtr(r.left, r.top), r.width(), r.height(), _backBuffer1.getPixelFormat()); _backBuffer = &_sceneSurface; } diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp index a7f2a875f3..c8b769a76f 100644 --- a/engines/sherlock/tattoo/tattoo_scene.cpp +++ b/engines/sherlock/tattoo/tattoo_scene.cpp @@ -354,6 +354,11 @@ void TattooScene::doBgAnim() { if (!vm._fastMode) events.wait(3); + if (screen._flushScreen) { + screen.slamRect(Common::Rect(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT), ui._currentScroll); + screen._flushScreen = false; + } + screen._flushScreen = false; _doBgAnimDone = true; ui._drawMenu = false; diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp index 12cf4aec6d..a7b73920e8 100644 --- a/engines/sherlock/tattoo/tattoo_user_interface.cpp +++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp @@ -33,7 +33,8 @@ TattooUserInterface::TattooUserInterface(SherlockEngine *vm): UserInterface(vm), _inventoryWidget(vm), _messageWidget(vm), _textWidget(vm), _tooltipWidget(vm), _verbsWidget(vm) { Common::fill(&_lookupTable[0], &_lookupTable[PALETTE_COUNT], 0); Common::fill(&_lookupTable1[0], &_lookupTable1[PALETTE_COUNT], 0); - _scrollSize = _scrollSpeed = 0; + _scrollSize = 0; + _scrollSpeed = 16; _drawMenu = false; _bgShape = nullptr; _personFound = false; @@ -57,7 +58,7 @@ TattooUserInterface::~TattooUserInterface() { } void TattooUserInterface::initScrollVars() { - _scrollSize = 0; + _scrollSize = _vm->_screen->_backBuffer1.w() - SHERLOCK_SCREEN_WIDTH; _currentScroll.x = _currentScroll.y = 0; _targetScroll.x = _targetScroll.y = 0; } |