aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-01-01 17:16:12 +0000
committerFilippos Karapetis2010-01-01 17:16:12 +0000
commit763c59bd4617bb1adaaadc3f3d1808c87e63b033 (patch)
tree7c3b6af7acf42432824b6acc745703f3612e815f
parentbba2c8ce952b5242e3ff80054f1ac9cc48bcd097 (diff)
downloadscummvm-rg350-763c59bd4617bb1adaaadc3f3d1808c87e63b033.tar.gz
scummvm-rg350-763c59bd4617bb1adaaadc3f3d1808c87e63b033.tar.bz2
scummvm-rg350-763c59bd4617bb1adaaadc3f3d1808c87e63b033.zip
Fixed KQ5CD (regression from rev. 46656)
svn-id: r46839
-rw-r--r--engines/sci/engine/kmisc.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 6522f78ce7..819b3a78b7 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -252,10 +252,18 @@ enum kPlatformOps {
};
reg_t kPlatform(EngineState *s, int argc, reg_t *argv) {
- bool isWindows = ((SciEngine*)g_engine)->getPlatform() == Common::kPlatformWindows;
+ if (argc == 0) {
+ // This is called in KQ5CD with no parameters, where
+ // it seems to do some graphics driver check. This
+ // kernel function didn't have subfunctions then.
+ // If 0 is returned, the game functions normally,
+ // otherwise all the animations show up like a
+ // slideshow (e.g. in the intro). So we return 0 :)
+ return NULL_REG;
+ }
- // No arguments is the same as operation 0
- uint16 operation = (argc == 1) ? argv[0].toUint16() : 0;
+ bool isWindows = ((SciEngine*)g_engine)->getPlatform() == Common::kPlatformWindows;
+ uint16 operation = argv[0].toUint16();
switch (operation) {
case kPlatformUnk0: