[Scummvm-cvs-logs] scummvm master -> 997150e76e562438f0d939f54fd1e3fb89b1e005

Strangerke Strangerke at scummvm.org
Thu Dec 24 01:18:17 CET 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
997150e76e LAB: Change the initial valueof _screenBytesPerPage, use it in Journal functions


Commit: 997150e76e562438f0d939f54fd1e3fb89b1e005
    https://github.com/scummvm/scummvm/commit/997150e76e562438f0d939f54fd1e3fb89b1e005
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-12-24T01:12:39+01:00

Commit Message:
LAB: Change the initial valueof _screenBytesPerPage, use it in Journal functions

Changed paths:
    engines/lab/dispman.cpp
    engines/lab/special.cpp



diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp
index e9736a9..5722ba9 100644
--- a/engines/lab/dispman.cpp
+++ b/engines/lab/dispman.cpp
@@ -47,7 +47,7 @@ DisplayMan::DisplayMan(LabEngine *vm) : _vm(vm) {
 	_lastMessageLong = false;
 	_actionMessageShown = false;
 
-	_screenBytesPerPage = 65536;
+	_screenBytesPerPage = 0;
 	_curPen = 0;
 	_curBitmap = nullptr;
 	_displayBuffer = nullptr;
diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp
index cdbaa7b..857b604 100644
--- a/engines/lab/special.cpp
+++ b/engines/lab/special.cpp
@@ -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();
 }
@@ -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();






More information about the Scummvm-git-logs mailing list