diff options
-rw-r--r-- | engines/agos/animation.cpp | 4 | ||||
-rw-r--r-- | engines/mohawk/video.cpp | 3 | ||||
-rw-r--r-- | engines/saga/introproc_saga2.cpp | 3 | ||||
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 5 | ||||
-rw-r--r-- | engines/sword1/animation.cpp | 2 | ||||
-rw-r--r-- | engines/sword2/animation.cpp | 4 | ||||
-rw-r--r-- | engines/toon/movie.cpp | 3 | ||||
-rw-r--r-- | video/video_decoder.cpp | 8 | ||||
-rw-r--r-- | video/video_decoder.h | 7 |
9 files changed, 15 insertions, 24 deletions
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index ec8293c91f..8fc93e4153 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -278,7 +278,7 @@ void MoviePlayerDXA::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { } while (--h); if (hasDirtyPalette()) - setSystemPalette(); + g_system->getPaletteManager()->setPalette(getPalette(), 0, 256); } void MoviePlayerDXA::playVideo() { @@ -445,7 +445,7 @@ void MoviePlayerSMK::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { } while (--h); if (hasDirtyPalette()) - setSystemPalette(); + g_system->getPaletteManager()->setPalette(getPalette(), 0, 256); } void MoviePlayerSMK::playVideo() { diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index 5b811382ff..13adfcb1cd 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -29,6 +29,7 @@ #include "common/textconsole.h" #include "common/system.h" +#include "graphics/palette.h" #include "graphics/surface.h" #include "video/qt_decoder.h" @@ -238,7 +239,7 @@ bool VideoManager::updateMovies() { frame = convertedFrame; } else if (pixelFormat.bytesPerPixel == 1 && _videoStreams[i]->hasDirtyPalette()) { // Set the palette when running in 8bpp mode only - _videoStreams[i]->setSystemPalette(); + _vm->_system->getPaletteManager()->setPalette(_videoStreams[i]->getPalette(), 0, 256); } // Clip the width/height to make sure we stay on the screen (Myst does this a few times) diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp index 15f7f4dc15..260eca98e6 100644 --- a/engines/saga/introproc_saga2.cpp +++ b/engines/saga/introproc_saga2.cpp @@ -32,6 +32,7 @@ #include "common/keyboard.h" #include "common/system.h" #include "common/textconsole.h" +#include "graphics/palette.h" #include "graphics/surface.h" #include "video/smk_decoder.h" @@ -110,7 +111,7 @@ void Scene::playMovie(const char *filename) { _vm->_system->copyRectToScreen(frame->pixels, frame->pitch, x, y, frame->w, frame->h); if (smkDecoder->hasDirtyPalette()) - smkDecoder->setSystemPalette(); + _vm->_system->getPaletteManager()->setPalette(smkDecoder->getPalette(), 0, 256); _vm->_system->updateScreen(); } diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index fedae2eb6f..0056f6c78b 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -28,6 +28,7 @@ #include "common/system.h" #include "common/textconsole.h" #include "engines/engine.h" +#include "graphics/palette.h" #include "graphics/surface.h" #include "sci/sci.h" @@ -494,7 +495,7 @@ void GfxFrameout::showVideo() { uint16 y = videoDecoder->getPos().y; if (videoDecoder->hasDirtyPalette()) - videoDecoder->setSystemPalette(); + g_system->getPaletteManager()->setPalette(videoDecoder->getPalette(), 0, 256); while (!g_engine->shouldQuit() && !videoDecoder->endOfVideo() && !skipVideo) { if (videoDecoder->needsUpdate()) { @@ -503,7 +504,7 @@ void GfxFrameout::showVideo() { g_system->copyRectToScreen(frame->pixels, frame->pitch, x, y, frame->w, frame->h); if (videoDecoder->hasDirtyPalette()) - videoDecoder->setSystemPalette(); + g_system->getPaletteManager()->setPalette(videoDecoder->getPalette(), 0, 256); g_system->updateScreen(); } diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index 70f1e5dc03..98725a302a 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -312,7 +312,7 @@ bool MoviePlayer::playVideo() { } if (_decoder->hasDirtyPalette()) { - _decoder->setSystemPalette(); + _vm->_system->getPaletteManager()->setPalette(_decoder->getPalette(), 0, 256); if (!_movieTexts.empty()) { // Look for the best color indexes to use to display the subtitles diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index e603925e73..24b52cd85a 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -38,6 +38,8 @@ #include "sword2/screen.h" #include "sword2/animation.h" +#include "graphics/palette.h" + #include "gui/message.h" #include "video/dxa_decoder.h" @@ -330,7 +332,7 @@ bool MoviePlayer::playVideo() { } if (_decoder->hasDirtyPalette()) { - _decoder->setSystemPalette(); + _vm->_system->getPaletteManager()->setPalette(_decoder->getPalette(), 0, 256); uint32 maxWeight = 0; uint32 minWeight = 0xFFFFFFFF; diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp index d988a3ed60..8c85e20f7c 100644 --- a/engines/toon/movie.cpp +++ b/engines/toon/movie.cpp @@ -25,6 +25,7 @@ #include "common/keyboard.h" #include "common/stream.h" #include "common/system.h" +#include "graphics/palette.h" #include "graphics/surface.h" #include "toon/audio.h" @@ -126,7 +127,7 @@ bool Movie::playVideo(bool isFirstIntroVideo) { } } } - _decoder->setSystemPalette(); + _vm->_system->getPaletteManager()->setPalette(_decoder->getPalette(), 0, 256); _vm->_system->updateScreen(); } diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index a7d3789b65..1ead6af54e 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -700,12 +700,4 @@ void AdvancedVideoDecoder::startAudioLimit(const Audio::Timestamp &limit) { ((AudioTrack *)*it)->start(limit); } -////////////////////////////////////////////// -///////////////// DEPRECATED ///////////////// -////////////////////////////////////////////// - -void VideoDecoder::setSystemPalette() { - g_system->getPaletteManager()->setPalette(getPalette(), 0, 256); -} - } // End of namespace Video diff --git a/video/video_decoder.h b/video/video_decoder.h index 0135425bac..72be634f17 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -114,13 +114,6 @@ public: virtual bool hasDirtyPalette() const { return false; } /** - * Set the system palette to the palette returned by getPalette. - * @see getPalette - * @note This function is now deprecated. There is no replacement. - */ - void setSystemPalette(); - - /** * Returns the current frame number of the video. * @return the last frame decoded by the video */ |