diff options
author | Bastien Bouclet | 2016-08-04 06:28:04 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-03 08:50:10 +0200 |
commit | 1bb5424dddca2cf150fa1a09f4845e193b581e3e (patch) | |
tree | 33abe1c43bc93f9e649bc768a99d9d25bf9706b6 /engines/mohawk/riven_graphics.cpp | |
parent | abe6889bbe640c15e0fdf454d3867eb22869db5c (diff) | |
download | scummvm-rg350-1bb5424dddca2cf150fa1a09f4845e193b581e3e.tar.gz scummvm-rg350-1bb5424dddca2cf150fa1a09f4845e193b581e3e.tar.bz2 scummvm-rg350-1bb5424dddca2cf150fa1a09f4845e193b581e3e.zip |
MOHAWK: Move PLST handling to the RivenCard class
Diffstat (limited to 'engines/mohawk/riven_graphics.cpp')
-rw-r--r-- | engines/mohawk/riven_graphics.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp index 983c31efa3..34da11f6b7 100644 --- a/engines/mohawk/riven_graphics.cpp +++ b/engines/mohawk/riven_graphics.cpp @@ -82,42 +82,12 @@ void RivenGraphics::copyImageToScreen(uint16 image, uint32 left, uint32 top, uin _dirtyScreen = true; } -void RivenGraphics::drawPLST(uint16 x) { - Common::SeekableReadStream* plst = _vm->getResource(ID_PLST, _vm->getCurCard()->getId()); - uint16 recordCount = plst->readUint16BE(); - - for (uint16 i = 0; i < recordCount; i++) { - uint16 index = plst->readUint16BE(); - uint16 id = plst->readUint16BE(); - uint16 left = plst->readUint16BE(); - uint16 top = plst->readUint16BE(); - uint16 right = plst->readUint16BE(); - uint16 bottom = plst->readUint16BE(); - - // We are also checking here to make sure we haven't drawn the image yet on screen. - // This fixes problems with drawing PLST 1 twice and some other images twice. PLST - // 1 is sometimes not called by the scripts, so some cards don't appear if we don't - // draw PLST 1 each time. This "hack" is here to catch any PLST attempting to draw - // twice. There should never be a problem with doing it this way. - if (index == x && !(Common::find(_activatedPLSTs.begin(), _activatedPLSTs.end(), x) != _activatedPLSTs.end())) { - debug(0, "Drawing image %d", id); - copyImageToScreen(id, left, top, right, bottom); - _activatedPLSTs.push_back(x); - break; - } - } - - delete plst; -} - void RivenGraphics::updateScreen(Common::Rect updateRect) { if (_updatesEnabled) { _vm->runUpdateScreenScript(); _vm->_sound->triggerDrawSound(); if (_dirtyScreen) { - _activatedPLSTs.clear(); - // Copy to screen if there's no transition. Otherwise transition. ;) if (_scheduledTransition < 0) _vm->_system->copyRectToScreen(_mainScreen->getBasePtr(updateRect.left, updateRect.top), _mainScreen->pitch, updateRect.left, updateRect.top, updateRect.width(), updateRect.height()); |