diff options
Diffstat (limited to 'engines/lab')
-rw-r--r-- | engines/lab/lab.cpp | 6 | ||||
-rw-r--r-- | engines/lab/lab.h | 1 | ||||
-rw-r--r-- | engines/lab/special.cpp | 17 |
3 files changed, 5 insertions, 19 deletions
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp index b36bb136cf..d21dc66a30 100644 --- a/engines/lab/lab.cpp +++ b/engines/lab/lab.cpp @@ -89,7 +89,6 @@ LabEngine::LabEngine(OSystem *syst, const ADGameDescription *gameDesc) _utils = nullptr; _console = nullptr; _journalBackImage = nullptr; - _screenImage = nullptr; _lastTooLong = false; _interfaceOff = false; @@ -158,10 +157,6 @@ LabEngine::~LabEngine() { delete _utils; delete _console; delete _journalBackImage; - // _screenImage->_imageData is always pointing to the current drawing buffer. - // It shouldn't be deleted there. - _screenImage->_imageData = nullptr; - delete _screenImage; } Common::Error LabEngine::run() { @@ -179,7 +174,6 @@ Common::Error LabEngine::run() { _utils = new Utils(this); _console = new Console(this); _journalBackImage = new Image(this); - _screenImage = new Image(this); if (getPlatform() == Common::kPlatformWindows) { // Check if this is the Wyrmkeep trial diff --git a/engines/lab/lab.h b/engines/lab/lab.h index 752cbab0a3..37415057ab 100644 --- a/engines/lab/lab.h +++ b/engines/lab/lab.h @@ -136,7 +136,6 @@ private: MapData *_maps; Image *_monitorButton; Image *_journalBackImage; - Image *_screenImage; TextFont *_journalFont; public: diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index de9f1d9786..9a631e4980 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -141,8 +141,6 @@ void LabEngine::loadJournalData() { // Keep a copy of the blank journal _blankJournal = new byte[_graphics->_screenBytesPerPage]; memcpy(_blankJournal, _journalBackImage->_imageData, _graphics->_screenBytesPerPage); - - _screenImage->_imageData = _graphics->getCurrentDrawingBuffer(); } void LabEngine::drawJournalText() { @@ -182,15 +180,13 @@ void LabEngine::turnPage(bool fromLeft) { for (int i = 0; i < _graphics->_screenWidth; i += 8) { updateMusicAndEvents(); waitTOF(); - _screenImage->_imageData = _graphics->getCurrentDrawingBuffer(); - _journalBackImage->blitBitmap(i, 0, _screenImage, i, 0, 8, _graphics->_screenHeight, false); + _journalBackImage->blitBitmap(i, 0, nullptr, i, 0, 8, _graphics->_screenHeight, false); } } else { for (int i = (_graphics->_screenWidth - 8); i > 0; i -= 8) { updateMusicAndEvents(); waitTOF(); - _screenImage->_imageData = _graphics->getCurrentDrawingBuffer(); - _journalBackImage->blitBitmap(i, 0, _screenImage, i, 0, 8, _graphics->_screenHeight, false); + _journalBackImage->blitBitmap(i, 0, nullptr, i, 0, 8, _graphics->_screenHeight, false); } } } @@ -202,7 +198,7 @@ void LabEngine::drawJournal(uint16 wipenum, bool needFade) { _graphics->loadBackPict("P:Journal.pic", _highPalette); if (wipenum == 0) - _journalBackImage->blitBitmap(0, 0, _screenImage, 0, 0, _graphics->_screenWidth, _graphics->_screenHeight, false); + _journalBackImage->blitBitmap(0, 0, nullptr, 0, 0, _graphics->_screenWidth, _graphics->_screenHeight, false); else turnPage((wipenum == 1)); @@ -261,10 +257,9 @@ void LabEngine::doJournal() { _graphics->blackAllScreen(); _lastPage = false; - _screenImage->_width = _journalBackImage->_width = _graphics->_screenWidth; - _screenImage->_height = _journalBackImage->_height = _graphics->_screenHeight; + _journalBackImage->_width = _graphics->_screenWidth; + _journalBackImage->_height = _graphics->_screenHeight; _journalBackImage->_imageData = nullptr; - _screenImage->_imageData = _graphics->getCurrentDrawingBuffer(); updateMusicAndEvents(); loadJournalData(); @@ -283,8 +278,6 @@ void LabEngine::doJournal() { _event->freeButtonList(&_journalButtonList); _graphics->closeFont(&_journalFont); - _screenImage->_imageData = _graphics->getCurrentDrawingBuffer(); - _graphics->rectFill(0, 0, _graphics->_screenWidth - 1, _graphics->_screenHeight - 1, 0); _graphics->blackScreen(); } |