diff options
author | Colin Snover | 2016-11-04 20:45:45 -0500 |
---|---|---|
committer | Colin Snover | 2016-11-04 20:45:45 -0500 |
commit | 2eea7dc9615b665ffcae881f8cf921a295399453 (patch) | |
tree | c4e01b54c1cf882d602deb6f037fbcdf7cd9a80c /engines/sci/graphics | |
parent | 4bfd005c78b4093c01f08ab3e9a3ecf9189c8c84 (diff) | |
download | scummvm-rg350-2eea7dc9615b665ffcae881f8cf921a295399453.tar.gz scummvm-rg350-2eea7dc9615b665ffcae881f8cf921a295399453.tar.bz2 scummvm-rg350-2eea7dc9615b665ffcae881f8cf921a295399453.zip |
SCI32: Implement kPlayVMDIgnorePalettes
Used in Shivers room 35170 when pressing the play button.
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/video32.cpp | 4 | ||||
-rw-r--r-- | engines/sci/graphics/video32.h | 12 |
2 files changed, 15 insertions, 1 deletions
diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp index 8e267f9144..bf0c990015 100644 --- a/engines/sci/graphics/video32.cpp +++ b/engines/sci/graphics/video32.cpp @@ -503,6 +503,7 @@ VMDPlayer::VMDPlayer(SegManager *segMan, EventManager *eventMan) : _blackLines(false), _leaveScreenBlack(false), _leaveLastFrame(false), + _ignorePalettes(false), _blackoutPlane(nullptr), @@ -566,6 +567,7 @@ VMDPlayer::IOStatus VMDPlayer::close() { _decoder->close(); _isOpen = false; _isInitialized = false; + _ignorePalettes = false; if (!_planeIsOwned && _screenItem != nullptr) { g_sci->_gfxFrameout->deleteScreenItem(*_screenItem); @@ -827,7 +829,7 @@ void VMDPlayer::renderFrame() const { // we are just submitting it directly here because the decoder exposes // this information a little bit differently than the one in SSCI const bool dirtyPalette = _decoder->hasDirtyPalette(); - if (dirtyPalette) { + if (dirtyPalette && !_ignorePalettes) { Palette palette; palette.timestamp = g_sci->getTickCount(); for (uint16 i = 0; i < _startColor; ++i) { diff --git a/engines/sci/graphics/video32.h b/engines/sci/graphics/video32.h index c3ae891c2e..4fc627e674 100644 --- a/engines/sci/graphics/video32.h +++ b/engines/sci/graphics/video32.h @@ -353,6 +353,13 @@ private: #pragma mark - #pragma mark VMDPlayer - Rendering +public: + /** + * Causes the VMD player to ignore all palettes in + * the currently playing video. + */ + void ignorePalettes() { _ignorePalettes = true; } + private: /** * The location of the VMD plane, in game script @@ -414,6 +421,11 @@ private: bool _leaveLastFrame; /** + * Whether or not palettes from the VMD should be ignored. + */ + bool _ignorePalettes; + + /** * Renders a frame of video to the output bitmap. */ void renderFrame() const; |