From 8ae0014bc25e42e519d5a6a31279ee22580aaba9 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 19 May 2015 09:10:35 -0400 Subject: SHERLOCK: Refactor Surface not to descend directly from Graphics::Surface --- engines/sherlock/scalpel/darts.cpp | 8 ++++---- engines/sherlock/scalpel/scalpel.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'engines/sherlock/scalpel') diff --git a/engines/sherlock/scalpel/darts.cpp b/engines/sherlock/scalpel/darts.cpp index e861b9cd62..23ca95454f 100644 --- a/engines/sherlock/scalpel/darts.cpp +++ b/engines/sherlock/scalpel/darts.cpp @@ -332,7 +332,7 @@ void Darts::drawDartThrow(const Common::Point &pt) { int delta = 9; for (int idx = 4; idx < 23; ++idx) { - Graphics::Surface &frame = (*_dartImages)[idx]._frame; + ImageFrame &frame = (*_dartImages)[idx]; // Adjust draw position for animating dart if (idx < 13) @@ -343,15 +343,15 @@ void Darts::drawDartThrow(const Common::Point &pt) { pos.y += delta++; // Draw the dart - Common::Point drawPos(pos.x - frame.w / 2, pos.y - frame.h); + Common::Point drawPos(pos.x - frame._width / 2, pos.y - frame._height); screen._backBuffer1.transBlitFrom(frame, drawPos); - screen.slamArea(drawPos.x, drawPos.y, frame.w, frame.h); + screen.slamArea(drawPos.x, drawPos.y, frame._width, frame._height); // Handle erasing old dart strs if (!oldDrawBounds.isEmpty()) screen.slamRect(oldDrawBounds); - oldDrawBounds = Common::Rect(drawPos.x, drawPos.y, drawPos.x + frame.w, drawPos.y + frame.h); + oldDrawBounds = Common::Rect(drawPos.x, drawPos.y, drawPos.x + frame._width, drawPos.y + frame._height); screen._backBuffer1.blitFrom(screen._backBuffer2, drawPos, oldDrawBounds); events.wait(2); diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp index 1f83ca4872..56c1e28dbe 100644 --- a/engines/sherlock/scalpel/scalpel.cpp +++ b/engines/sherlock/scalpel/scalpel.cpp @@ -301,8 +301,8 @@ bool ScalpelEngine::showCityCutscene() { if (finished) { ImageFile titleImages("title2.vgs", true); - _screen->_backBuffer1.copyFrom(*_screen); - _screen->_backBuffer2.copyFrom(*_screen); + _screen->_backBuffer1.blitFrom(*_screen); + _screen->_backBuffer2.blitFrom(*_screen); // London, England _screen->_backBuffer1.transBlitFrom(titleImages[0], Common::Point(10, 11)); @@ -326,8 +326,8 @@ bool ScalpelEngine::showCityCutscene() { if (finished) { ImageFile titleImages("title.vgs", true); - _screen->_backBuffer1.copyFrom(*_screen); - _screen->_backBuffer2.copyFrom(*_screen); + _screen->_backBuffer1.blitFrom(*_screen); + _screen->_backBuffer2.blitFrom(*_screen); // The Lost Files of _screen->_backBuffer1.transBlitFrom(titleImages[0], Common::Point(75, 6)); @@ -519,7 +519,7 @@ void ScalpelEngine::showLBV(const Common::String &filename) { delete stream; _screen->setPalette(images._palette); - _screen->_backBuffer1.blitFrom(images[0]._frame); + _screen->_backBuffer1.blitFrom(images[0]); _screen->verticalTransition(); } -- cgit v1.2.3