Skip to content

Commit

Permalink
LAB: Change the initial valueof _screenBytesPerPage, use it in Journa…
Browse files Browse the repository at this point in the history
…l functions
  • Loading branch information
Strangerke committed Dec 24, 2015
1 parent 6f6c92d commit 997150e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion engines/lab/dispman.cpp
Expand Up @@ -47,7 +47,7 @@ DisplayMan::DisplayMan(LabEngine *vm) : _vm(vm) {
_lastMessageLong = false;
_actionMessageShown = false;

_screenBytesPerPage = 65536;
_screenBytesPerPage = 0;
_curPen = 0;
_curBitmap = nullptr;
_displayBuffer = nullptr;
Expand Down
8 changes: 4 additions & 4 deletions engines/lab/special.cpp
Expand Up @@ -137,13 +137,13 @@ void LabEngine::loadJournalData() {
delete journalFile;

_anim->_noPalChange = true;
_journalBackImage->_imageData = new byte[_graphics->_screenWidth * _graphics->_screenHeight];
_journalBackImage->_imageData = new byte[_graphics->_screenBytesPerPage];
_graphics->readPict("P:Journal.pic", true, false, _journalBackImage->_imageData);
_anim->_noPalChange = false;

// Keep a copy of the blank journal
_blankJournal = new byte[_graphics->_screenWidth * _graphics->_screenHeight];
memcpy(_blankJournal, _journalBackImage->_imageData, _graphics->_screenWidth * _graphics->_screenHeight);
_blankJournal = new byte[_graphics->_screenBytesPerPage];
memcpy(_blankJournal, _journalBackImage->_imageData, _graphics->_screenBytesPerPage);

_screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
}
Expand Down Expand Up @@ -216,7 +216,7 @@ void LabEngine::drawJournal(uint16 wipenum, bool needFade) {
_graphics->fade(true);

// Reset the journal background, so that all the text that has been blitted on it is erased
memcpy(_journalBackImage->_imageData, _blankJournal, _graphics->_screenWidth * _graphics->_screenHeight);
memcpy(_journalBackImage->_imageData, _blankJournal, _graphics->_screenBytesPerPage);

eatMessages();
_event->mouseShow();
Expand Down

0 comments on commit 997150e

Please sign in to comment.