[Scummvm-cvs-logs] SF.net SVN: scummvm:[51922] scummvm/trunk/engines/sci
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Sun Aug 8 03:08:48 CEST 2010
Revision: 51922
http://scummvm.svn.sourceforge.net/scummvm/?rev=51922&view=rev
Author: drmccoy
Date: 2010-08-08 01:08:48 +0000 (Sun, 08 Aug 2010)
Log Message:
-----------
SCI: Directly use the new Graphics::VMDDecoder class
Modified Paths:
--------------
scummvm/trunk/engines/sci/console.cpp
scummvm/trunk/engines/sci/engine/kvideo.cpp
Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp 2010-08-08 01:08:17 UTC (rev 51921)
+++ scummvm/trunk/engines/sci/console.cpp 2010-08-08 01:08:48 UTC (rev 51922)
@@ -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 @@
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 @@
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();
Modified: scummvm/trunk/engines/sci/engine/kvideo.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kvideo.cpp 2010-08-08 01:08:17 UTC (rev 51921)
+++ scummvm/trunk/engines/sci/engine/kvideo.cpp 2010-08-08 01:08:48 UTC (rev 51922)
@@ -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 @@
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 @@
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());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list