aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-17 00:07:03 +0000
committerFilippos Karapetis2010-06-17 00:07:03 +0000
commita7b76c04d9df2c30d541554b9f907f6bcedd307a (patch)
treef963e8031ecbd8f59b0fb409399b9ccb7d6a37e9 /engines
parent18dc295a339cb7cc618ba565f68d05c6eada9782 (diff)
downloadscummvm-rg350-a7b76c04d9df2c30d541554b9f907f6bcedd307a.tar.gz
scummvm-rg350-a7b76c04d9df2c30d541554b9f907f6bcedd307a.tar.bz2
scummvm-rg350-a7b76c04d9df2c30d541554b9f907f6bcedd307a.zip
Added handling of VMD video files in kResCheck, fixes video playing in GK2
svn-id: r49913
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kscripts.cpp8
-rw-r--r--engines/sci/resource.h1
-rw-r--r--engines/sci/sci.cpp1
3 files changed, 10 insertions, 0 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index a8cf92b2a6..88e765a0ff 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -29,6 +29,8 @@
#include "sci/engine/selector.h"
#include "sci/engine/kernel.h"
+#include "common/file.h"
+
namespace Sci {
// Loads arbitrary resources of type 'restype' with resource numbers 'resnrs'
@@ -93,6 +95,12 @@ reg_t kResCheck(EngineState *s, int argc, reg_t *argv) {
Resource *res = NULL;
ResourceType restype = (ResourceType)(argv[0].toUint16() & 0x7f);
+ if (restype == kResourceTypeVMD) {
+ char fileName[50];
+ sprintf(fileName, "%d.vmd", argv[1].toUint16());
+ return make_reg(0, Common::File::exists(fileName));
+ }
+
if ((restype == kResourceTypeAudio36) || (restype == kResourceTypeSync36)) {
if (argc >= 6) {
uint noun = argv[2].toUint16() & 0xff;
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index b37f71832d..591273b252 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -98,6 +98,7 @@ enum ResourceType {
kResourceTypeUnknown1, // Translation, currently unsupported
kResourceTypeUnknown2,
kResourceTypeRobot,
+ kResourceTypeVMD,
kResourceTypeInvalid,
// Mac-only resources, these resource types are self-defined
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 03f54caf31..1dc02ac7c3 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -123,6 +123,7 @@ SciEngine::SciEngine(OSystem *syst, const ADGameDescription *desc)
SearchMan.addSubDirectoryMatching(gameDataDir, "avi"); // AVI movie files for Windows versions
SearchMan.addSubDirectoryMatching(gameDataDir, "seq"); // SEQ movie files for DOS versions
SearchMan.addSubDirectoryMatching(gameDataDir, "robot"); // robot movie files
+ SearchMan.addSubDirectoryMatching(gameDataDir, "movies"); // vmd movie files
SearchMan.addSubDirectoryMatching(gameDataDir, "vmd"); // vmd movie files
// Add the patches directory, except for KQ6CD; The patches folder in some versions of KQ6CD