From c822e849de786f1b1be2dfbcdd3364d0b33c7297 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 31 May 2015 16:28:41 -0400 Subject: SHERLOCK: Move scroll variables from Screen to TattooUserInterface --- engines/sherlock/screen.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'engines/sherlock/screen.cpp') diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp index a3af5559c7..708493cd30 100644 --- a/engines/sherlock/screen.cpp +++ b/engines/sherlock/screen.cpp @@ -44,10 +44,6 @@ Screen::Screen(SherlockEngine *vm) : Surface(g_system->getWidth(), g_system->get // Rose Tattoo specific fields _fadeBytesRead = _fadeBytesToRead = 0; _oldFadePercent = 0; - _scrollSize = 0; - _scrollSpeed = 0; - _currentScroll = 0; - _targetScroll = 0; _flushScreen = false; } @@ -310,6 +306,16 @@ void Screen::flushScaleImage(ImageFrame *frame, const Common::Point &pt, int16 * *height = newBounds.height(); } +void Screen::blockMove(const Common::Rect &r, const Common::Point &scrollPos) { + Common::Rect bounds = r; + bounds.translate(scrollPos.x, scrollPos.y); + slamRect(bounds); +} + +void Screen::blockMove(const Common::Point &scrollPos) { + blockMove(Common::Rect(0, 0, w(), h()), scrollPos); +} + void Screen::print(const Common::Point &pt, byte color, const char *formatStr, ...) { // Create the string to display va_list args; @@ -491,15 +497,6 @@ void Screen::setupBGArea(const byte cMap[PALETTE_SIZE]) { warning("TODO"); } -/** - * Initializes scroll variables - */ -void Screen::initScrollVars() { - _scrollSize = 0; - _currentScroll = 0; - _targetScroll = 0; -} - void Screen::translatePalette(byte palette[PALETTE_SIZE]) { for (int idx = 0; idx < PALETTE_SIZE; ++idx) palette[idx] = VGA_COLOR_TRANS(palette[idx]); -- cgit v1.2.3