mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-07 03:18:17 +00:00
SCI: Directly use the new Graphics::VMDDecoder class
svn-id: r51922
This commit is contained in:
parent
1151676d82
commit
96e079a9f7
@ -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();
|
||||
|
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user