diff options
author | Paul Gilbert | 2014-09-03 22:09:50 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-09-03 22:09:50 -0400 |
commit | 82b2b2d65d0398cb1f3a17f421cbf78f52286faa (patch) | |
tree | 6926e98ede2ef29bdf89b3ccc08755da8a0a7fd7 /engines/mads/scene.cpp | |
parent | 4be8aa8906d1fd72826efcf138f62de5b8cd39b1 (diff) | |
download | scummvm-rg350-82b2b2d65d0398cb1f3a17f421cbf78f52286faa.tar.gz scummvm-rg350-82b2b2d65d0398cb1f3a17f421cbf78f52286faa.tar.bz2 scummvm-rg350-82b2b2d65d0398cb1f3a17f421cbf78f52286faa.zip |
MADS: Properly implement drawing to a subset of the screen
Diffstat (limited to 'engines/mads/scene.cpp')
-rw-r--r-- | engines/mads/scene.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp index cb68d38eec..ad24dd4f60 100644 --- a/engines/mads/scene.cpp +++ b/engines/mads/scene.cpp @@ -63,8 +63,7 @@ Scene::Scene(MADSEngine *vm) _paletteUsageF.push_back(PaletteUsage::UsageEntry(0xF)); // Set up a scene surface that maps to our physical screen drawing surface - _sceneSurface.init(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT, MADS_SCREEN_WIDTH, - _vm->_screen.getPixels(), Graphics::PixelFormat::createFormatCLUT8()); + restrictScene(); // Set up the verb list _verbList.push_back(VerbInit(VERB_LOOK, VERB_THAT, PREP_NONE)); @@ -85,6 +84,11 @@ Scene::~Scene() { delete _animationData; } +void Scene::restrictScene() { + _sceneSurface.init(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT, MADS_SCREEN_WIDTH, + _vm->_screen.getPixels(), Graphics::PixelFormat::createFormatCLUT8()); +} + void Scene::clearVocab() { _activeVocabs.clear(); } @@ -511,7 +515,7 @@ void Scene::drawElements(ScreenTransition transitionType, bool surfaceFlag) { _vm->_sound->startQueuedCommands(); } else { // Copy dirty areas to the screen - _dirtyAreas.copyToScreen(_vm->_screen._offset); + _dirtyAreas.copyToScreen(); } _spriteSlots.cleanUp(); |