diff options
author | Paul Gilbert | 2014-05-24 18:19:54 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-05-24 18:19:54 -0400 |
commit | 8f9a75a9255fbccb8be3bbe6fc35aafec00a4260 (patch) | |
tree | 7ef9182103a7d365c55bae5c0496722b28573684 /engines/mads/scene.cpp | |
parent | ef22702ac4f01ab79248dd41b49b37fb119f68e9 (diff) | |
download | scummvm-rg350-8f9a75a9255fbccb8be3bbe6fc35aafec00a4260.tar.gz scummvm-rg350-8f9a75a9255fbccb8be3bbe6fc35aafec00a4260.tar.bz2 scummvm-rg350-8f9a75a9255fbccb8be3bbe6fc35aafec00a4260.zip |
MADS: Add _sceneSurface subsurface, so sprite drawing is cropped correctly
Diffstat (limited to 'engines/mads/scene.cpp')
-rw-r--r-- | engines/mads/scene.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp index d589010194..944c082817 100644 --- a/engines/mads/scene.cpp +++ b/engines/mads/scene.cpp @@ -61,6 +61,11 @@ Scene::Scene(MADSEngine *vm): _vm(vm), _action(_vm), _depthSurface(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()); + + // Set up the verb list _verbList.push_back(VerbInit(VERB_LOOK, VERB_THAT, PREP_NONE)); _verbList.push_back(VerbInit(VERB_TAKE, VERB_THAT, PREP_NONE)); _verbList.push_back(VerbInit(VERB_PUSH, VERB_THAT, PREP_NONE)); @@ -487,7 +492,7 @@ void Scene::drawElements(ScreenTransition transitionType, bool surfaceFlag) { // Draw sprites that have changed if (_vm->getGameID() == GType_RexNebular) // TODO: Implement for V2 games - _spriteSlots.drawSprites(&_vm->_screen); + _spriteSlots.drawSprites(&_sceneSurface); // Draw text elements onto the view _textDisplay.draw(&_vm->_screen); |