aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/scene.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-03-10 21:51:23 -0500
committerPaul Gilbert2016-03-14 20:56:26 -0400
commitb4e3d4abc16d9996651874c8952b1ce846dcb6a1 (patch)
tree73fa735117b04d3643693f156d635bced2c32053 /engines/mads/scene.cpp
parent9c7569b74bf3493f7970a912ae54b87d73e6633e (diff)
downloadscummvm-rg350-b4e3d4abc16d9996651874c8952b1ce846dcb6a1.tar.gz
scummvm-rg350-b4e3d4abc16d9996651874c8952b1ce846dcb6a1.tar.bz2
scummvm-rg350-b4e3d4abc16d9996651874c8952b1ce846dcb6a1.zip
MADS: Changed engine to use Graphics::ManagedSurface
Diffstat (limited to 'engines/mads/scene.cpp')
-rw-r--r--engines/mads/scene.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 83ab1151a9..66f56f9407 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -89,8 +89,7 @@ Scene::~Scene() {
}
void Scene::restrictScene() {
- _sceneSurface.init(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT, MADS_SCREEN_WIDTH,
- _vm->_screen.getPixels(), Graphics::PixelFormat::createFormatCLUT8());
+ _sceneSurface.create(*_vm->_screen, Common::Rect(0, 0, MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT));
}
void Scene::clearVocab() {
@@ -517,7 +516,7 @@ void Scene::drawElements(ScreenTransition transitionType, bool surfaceFlag) {
if (_posAdjust != Common::Point(0, 0))
warning("Adjust used %d %d", _posAdjust.x, _posAdjust.y);
// Copy background for the dirty areas to the screen
- _dirtyAreas.copy(&_backgroundSurface, &_vm->_screen, _posAdjust);
+ _dirtyAreas.copy(&_backgroundSurface, _vm->_screen, _posAdjust);
// Handle dirty areas for foreground objects
_spriteSlots.setDirtyAreas();
@@ -528,11 +527,11 @@ void Scene::drawElements(ScreenTransition transitionType, bool surfaceFlag) {
_spriteSlots.drawSprites(&_sceneSurface);
// Draw text elements onto the view
- _textDisplay.draw(&_vm->_screen);
+ _textDisplay.draw(_vm->_screen);
if (transitionType) {
// Fading in the screen
- _vm->_screen.transition(transitionType, surfaceFlag);
+ _vm->_screen->transition(transitionType, surfaceFlag);
_vm->_sound->startQueuedCommands();
} else {
// Copy dirty areas to the screen