From a5056cde9812a18dd76e3c453ba4bb62b9d303ab Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 4 Aug 2010 15:17:09 +0000 Subject: SCI: Add 'movie' subdirectory for VMD's The Torin's intro movie now plays. Minor kPlayVMD cleanup. svn-id: r51739 --- engines/sci/engine/kvideo.cpp | 11 +++++++---- engines/sci/sci.cpp | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index cd103dade7..3ad2d95f58 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -205,11 +205,15 @@ reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv) { videoDecoder = new VMDDecoder(g_system->getMixer()); + if (!videoDecoder->loadFile(fileName)) { + warning("Could not open VMD %s", fileName.c_str()); + break; + } + if (reshowCursor) g_sci->_gfxCursor->kernelHide(); - if (videoDecoder && videoDecoder->loadFile(fileName)) - playVideo(videoDecoder); + playVideo(videoDecoder); if (reshowCursor) g_sci->_gfxCursor->kernelShow(); @@ -280,8 +284,7 @@ reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv) { // Looks to be setting the video size and position. Called with 4 extra integer // parameters (e.g. 86, 41, 235, 106) default: - warningMsg = "PlayVMD - unsupported subop. Params: " + - Common::String::printf("%d", argc) + " ("; + warningMsg = Common::String::printf("PlayVMD - unsupported subop %d. Params: %d (", operation, argc); for (int i = 0; i < argc; i++) { warningMsg += Common::String::printf("%04x:%04x", PRINT_REG(argv[i])); diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 6abe52fea4..7624aed569 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -126,6 +126,7 @@ SciEngine::SciEngine(OSystem *syst, const ADGameDescription *desc, SciGameId gam SearchMan.addSubDirectoryMatching(gameDataDir, "seq"); // SEQ movie files for DOS versions SearchMan.addSubDirectoryMatching(gameDataDir, "robot"); // robot movie files SearchMan.addSubDirectoryMatching(gameDataDir, "robots"); // robot movie files + SearchMan.addSubDirectoryMatching(gameDataDir, "movie"); // vmd movie files SearchMan.addSubDirectoryMatching(gameDataDir, "movies"); // vmd movie files SearchMan.addSubDirectoryMatching(gameDataDir, "vmd"); // vmd movie files -- cgit v1.2.3