aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2015-12-13 22:55:10 +0100
committerWillem Jan Palenstijn2015-12-23 21:34:03 +0100
commit974740d3076984535f941afb18e0adfa7132aab7 (patch)
tree7e88d56805d5ea1b522e379d0c9e113d38a8b574 /engines
parentad54a75b853ada2c4ae4b99368ac3038dcd92d33 (diff)
downloadscummvm-rg350-974740d3076984535f941afb18e0adfa7132aab7.tar.gz
scummvm-rg350-974740d3076984535f941afb18e0adfa7132aab7.tar.bz2
scummvm-rg350-974740d3076984535f941afb18e0adfa7132aab7.zip
LAB: Some renaming in LabEngine
Diffstat (limited to 'engines')
-rw-r--r--engines/lab/lab.cpp12
-rw-r--r--engines/lab/lab.h9
-rw-r--r--engines/lab/special.cpp38
3 files changed, 29 insertions, 30 deletions
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp
index 19dbef344a..18b8b3d065 100644
--- a/engines/lab/lab.cpp
+++ b/engines/lab/lab.cpp
@@ -88,8 +88,8 @@ LabEngine::LabEngine(OSystem *syst, const ADGameDescription *gameDesc)
_rooms = nullptr;
_tilePuzzle = nullptr;
_utils = nullptr;
- journalBackImage = nullptr;
- ScreenImage = nullptr;
+ _journalBackImage = nullptr;
+ _screenImage = nullptr;
_lastTooLong = false;
_interfaceOff = false;
@@ -156,8 +156,8 @@ LabEngine::~LabEngine() {
delete[] _rooms;
delete _tilePuzzle;
delete _utils;
- delete journalBackImage;
- delete ScreenImage;
+ delete _journalBackImage;
+ delete _screenImage;
}
Common::Error LabEngine::run() {
@@ -173,8 +173,8 @@ Common::Error LabEngine::run() {
_anim = new Anim(this);
_tilePuzzle = new TilePuzzle(this);
_utils = new Utils(this);
- journalBackImage = new Image(this);
- ScreenImage = new Image(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 dbb083af97..d968c18013 100644
--- a/engines/lab/lab.h
+++ b/engines/lab/lab.h
@@ -97,6 +97,8 @@ private:
bool _noUpdateDiff;
bool _quitLab;
+ byte *_blankJournal;
+
int _lastWaitTOFTicks;
uint16 _direction;
@@ -122,15 +124,12 @@ private:
Image *_imgMapX[4];
InventoryData *_inventory;
MapData *_maps;
- byte *_blankJournal;
Image *_monitorButton;
+ Image *_journalBackImage;
+ Image *_screenImage;
TextFont *_journalFont;
-
Common::RandomSource _rnd;
- Image *journalBackImage;
- Image *ScreenImage;
-
public:
bool _alternate;
bool _droppingCrumbs;
diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp
index a629fd94ab..5bb9b17be3 100644
--- a/engines/lab/special.cpp
+++ b/engines/lab/special.cpp
@@ -146,15 +146,15 @@ void LabEngine::loadJournalData() {
delete journalFile;
_anim->_noPalChange = true;
- journalBackImage->_imageData = new byte[_graphics->_screenWidth * _graphics->_screenHeight];
- _graphics->readPict("P:Journal.pic", true, false, journalBackImage->_imageData);
+ _journalBackImage->_imageData = new byte[_graphics->_screenWidth * _graphics->_screenHeight];
+ _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);
+ memcpy(_blankJournal, _journalBackImage->_imageData, _graphics->_screenWidth * _graphics->_screenHeight);
- ScreenImage->_imageData = _graphics->getCurrentDrawingBuffer();
+ _screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
}
/**
@@ -180,16 +180,16 @@ void LabEngine::drawJournalText() {
if (_journalPage <= 1) {
curText = _journalTextTitle;
- _graphics->flowTextToMem(journalBackImage, _journalFont, -2, 2, 0, false, true, true, true, _utils->vgaScaleX(52), _utils->vgaScaleY(32), _utils->vgaScaleX(152), _utils->vgaScaleY(148), curText);
+ _graphics->flowTextToMem(_journalBackImage, _journalFont, -2, 2, 0, false, true, true, true, _utils->vgaScaleX(52), _utils->vgaScaleY(32), _utils->vgaScaleX(152), _utils->vgaScaleY(148), curText);
} else {
curText = (char *)(_journalText + charsDrawn);
- charsDrawn += _graphics->flowTextToMem(journalBackImage, _journalFont, -2, 2, 0, false, false, false, true, _utils->vgaScaleX(52), _utils->vgaScaleY(32), _utils->vgaScaleX(152), _utils->vgaScaleY(148), curText);
+ charsDrawn += _graphics->flowTextToMem(_journalBackImage, _journalFont, -2, 2, 0, false, false, false, true, _utils->vgaScaleX(52), _utils->vgaScaleY(32), _utils->vgaScaleX(152), _utils->vgaScaleY(148), curText);
}
_music->updateMusic();
curText = (char *)(_journalText + charsDrawn);
_lastPage = (*curText == 0);
- _graphics->flowTextToMem(journalBackImage, _journalFont, -2, 2, 0, false, false, false, true, _utils->vgaScaleX(171), _utils->vgaScaleY(32), _utils->vgaScaleX(271), _utils->vgaScaleY(148), curText);
+ _graphics->flowTextToMem(_journalBackImage, _journalFont, -2, 2, 0, false, false, false, true, _utils->vgaScaleX(171), _utils->vgaScaleY(32), _utils->vgaScaleX(271), _utils->vgaScaleY(148), curText);
curText = (char *)(_journalText + charsDrawn);
_lastPage = _lastPage || (*curText == 0);
@@ -203,15 +203,15 @@ void LabEngine::turnPage(bool fromLeft) {
for (int i = 0; i < _graphics->_screenWidth; i += 8) {
_music->updateMusic();
waitTOF();
- ScreenImage->_imageData = _graphics->getCurrentDrawingBuffer();
- journalBackImage->blitBitmap(i, 0, ScreenImage, i, 0, 8, _graphics->_screenHeight, false);
+ _screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
+ _journalBackImage->blitBitmap(i, 0, _screenImage, i, 0, 8, _graphics->_screenHeight, false);
}
} else {
for (int i = (_graphics->_screenWidth - 8); i > 0; i -= 8) {
_music->updateMusic();
waitTOF();
- ScreenImage->_imageData = _graphics->getCurrentDrawingBuffer();
- journalBackImage->blitBitmap(i, 0, ScreenImage, i, 0, 8, _graphics->_screenHeight, false);
+ _screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
+ _journalBackImage->blitBitmap(i, 0, _screenImage, i, 0, 8, _graphics->_screenHeight, false);
}
}
}
@@ -226,7 +226,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, _screenImage, 0, 0, _graphics->_screenWidth, _graphics->_screenHeight, false);
else
turnPage((bool)(wipenum == 1));
@@ -247,7 +247,7 @@ void LabEngine::drawJournal(uint16 wipenum, bool needFade) {
_graphics->fade(true, 0);
// 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->_screenWidth * _graphics->_screenHeight);
eatMessages();
_event->mouseShow();
@@ -298,10 +298,10 @@ void LabEngine::doJournal() {
_graphics->blackAllScreen();
_lastPage = false;
- ScreenImage->_width = journalBackImage->_width = _graphics->_screenWidth;
- ScreenImage->_height = journalBackImage->_height = _graphics->_screenHeight;
- journalBackImage->_imageData = nullptr;
- ScreenImage->_imageData = _graphics->getCurrentDrawingBuffer();
+ _screenImage->_width = _journalBackImage->_width = _graphics->_screenWidth;
+ _screenImage->_height = _journalBackImage->_height = _graphics->_screenHeight;
+ _journalBackImage->_imageData = nullptr;
+ _screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
_music->updateMusic();
loadJournalData();
@@ -314,11 +314,11 @@ void LabEngine::doJournal() {
_event->mouseHide();
delete[] _blankJournal;
- delete[] journalBackImage->_imageData;
+ delete[] _journalBackImage->_imageData;
_event->freeButtonList(&_journalButtonList);
_graphics->closeFont(_journalFont);
- ScreenImage->_imageData = _graphics->getCurrentDrawingBuffer();
+ _screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
_graphics->setAPen(0);
_graphics->rectFill(0, 0, _graphics->_screenWidth - 1, _graphics->_screenHeight - 1);