SHERLOCK: Fix crashes due to back buffer refactoring

This commit is contained in:
Paul Gilbert 2016-03-21 20:19:55 -04:00
parent c299b8ce08
commit 8fa5522819
3 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,7 @@ namespace Scalpel {
ScalpelScreen::ScalpelScreen(SherlockEngine *vm) : Screen(vm) {
_backBuffer1.create(320, 200);
_backBuffer2.create(320, 200);
activateBackBuffer1();
}
void ScalpelScreen::makeButton(const Common::Rect &bounds, int textX,

View File

@ -106,6 +106,7 @@ int TattooMap::show() {
ImageFile *map = new ImageFile("map.vgs");
screen._backBuffer1.create(SHERLOCK_SCREEN_WIDTH * 2, SHERLOCK_SCREEN_HEIGHT * 2);
screen._backBuffer1.SHblitFrom((*map)[0], Common::Point(0, 0));
screen.activateBackBuffer1();
delete map;
screen.clear();
@ -224,6 +225,7 @@ int TattooMap::show() {
// Reset the back buffers back to standard size
screen._backBuffer1.create(SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
screen._backBuffer2.create(SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
screen.activateBackBuffer1();
return result;
}

View File

@ -30,6 +30,7 @@ namespace Tattoo {
TattooScreen::TattooScreen(SherlockEngine *vm) : Screen(vm) {
_backBuffer1.create(640, 480);
_backBuffer2.create(640, 480);
activateBackBuffer1();
}
} // End of namespace Tattoo