mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
LAB: Some renaming in LabEngine
This commit is contained in:
parent
ad54a75b85
commit
974740d307
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user