aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2010-08-08 01:08:48 +0000
committerSven Hesse2010-08-08 01:08:48 +0000
commit96e079a9f78d20344ff5699182194a5b35691e5e (patch)
tree3e4c7bfa816abf1b201055f9226b2d41f4223d0c /engines
parent1151676d8215f411718a28f2d2f58961560efbd1 (diff)
downloadscummvm-rg350-96e079a9f78d20344ff5699182194a5b35691e5e.tar.gz
scummvm-rg350-96e079a9f78d20344ff5699182194a5b35691e5e.tar.bz2
scummvm-rg350-96e079a9f78d20344ff5699182194a5b35691e5e.zip
SCI: Directly use the new Graphics::VMDDecoder class
svn-id: r51922
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/console.cpp7
-rw-r--r--engines/sci/engine/kvideo.cpp7
2 files changed, 10 insertions, 4 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 2432d84faa..fac819167b 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -51,7 +51,7 @@
#include "graphics/video/avi_decoder.h"
#include "sci/video/seq_decoder.h"
#ifdef ENABLE_SCI32
-#include "sci/video/vmd_decoder.h"
+#include "graphics/video/coktel_decoder.h"
#endif
#include "common/file.h"
@@ -234,7 +234,7 @@ void Console::postEnter() {
videoDecoder = seqDecoder;
#ifdef ENABLE_SCI32
} else if (_videoFile.hasSuffix(".vmd")) {
- videoDecoder = new VMDDecoder(g_system->getMixer());
+ videoDecoder = new Graphics::VMDDecoder(g_system->getMixer());
#endif
} else if (_videoFile.hasSuffix(".avi")) {
videoDecoder = new Graphics::AviDecoder(g_system->getMixer());
@@ -245,6 +245,9 @@ void Console::postEnter() {
uint16 y = (g_system->getHeight() - videoDecoder->getHeight()) / 2;
bool skipVideo = false;
+ if (videoDecoder->hasDirtyPalette())
+ videoDecoder->setSystemPalette();
+
while (!g_engine->shouldQuit() && !videoDecoder->endOfVideo() && !skipVideo) {
if (videoDecoder->needsUpdate()) {
Graphics::Surface *frame = videoDecoder->decodeNextFrame();
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp
index 3ad2d95f58..ac6cfb6835 100644
--- a/engines/sci/engine/kvideo.cpp
+++ b/engines/sci/engine/kvideo.cpp
@@ -34,7 +34,7 @@
#include "graphics/video/qt_decoder.h"
#include "sci/video/seq_decoder.h"
#ifdef ENABLE_SCI32
-#include "sci/video/vmd_decoder.h"
+#include "graphics/video/coktel_decoder.h"
#endif
namespace Sci {
@@ -60,6 +60,9 @@ void playVideo(Graphics::VideoDecoder *videoDecoder) {
uint16 y = (screenHeight - height) / 2;
bool skipVideo = false;
+ if (videoDecoder->hasDirtyPalette())
+ videoDecoder->setSystemPalette();
+
while (!g_engine->shouldQuit() && !videoDecoder->endOfVideo() && !skipVideo) {
if (videoDecoder->needsUpdate()) {
Graphics::Surface *frame = videoDecoder->decodeNextFrame();
@@ -203,7 +206,7 @@ reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv) {
if (argv[2] != NULL_REG)
warning("kPlayVMD: third parameter isn't 0 (it's %04x:%04x - %s)", PRINT_REG(argv[2]), s->_segMan->getObjectName(argv[2]));
- videoDecoder = new VMDDecoder(g_system->getMixer());
+ videoDecoder = new Graphics::VMDDecoder(g_system->getMixer());
if (!videoDecoder->loadFile(fileName)) {
warning("Could not open VMD %s", fileName.c_str());