diff options
author | Matthew Hoops | 2009-12-27 19:16:06 +0000 |
---|---|---|
committer | Matthew Hoops | 2009-12-27 19:16:06 +0000 |
commit | 264bec306a642b4f40ef88b31c40e7421ddfab9a (patch) | |
tree | 0d10b8e69b6ada3eab684b3f0ede694465804625 /engines/sci | |
parent | 3b30b1dcfa8ec4017157b661ff2a52e558cc6c5f (diff) | |
download | scummvm-rg350-264bec306a642b4f40ef88b31c40e7421ddfab9a.tar.gz scummvm-rg350-264bec306a642b4f40ef88b31c40e7421ddfab9a.tar.bz2 scummvm-rg350-264bec306a642b4f40ef88b31c40e7421ddfab9a.zip |
Implement kPlatform subfunctions 0 and 2, and stub 1 and 3 (CD speed and CD check). This fixes the DOS version of GK1 CD to play the SEQ's instead of the AVI's.
svn-id: r46656
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/kmisc.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index bbf4cf72d5..6522f78ce7 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -241,6 +241,10 @@ enum kSciPlatforms { }; enum kPlatformOps { + kPlatformUnk0 = 0, + kPlatformCDSpeed = 1, + kPlatformUnk2 = 2, + kPlatformCDCheck = 3, kPlatformGetPlatform = 4, kPlatformUnk5 = 5, kPlatformIsHiRes = 6, @@ -249,9 +253,24 @@ enum kPlatformOps { reg_t kPlatform(EngineState *s, int argc, reg_t *argv) { bool isWindows = ((SciEngine*)g_engine)->getPlatform() == Common::kPlatformWindows; - uint16 operation = argv[0].toUint16(); + + // No arguments is the same as operation 0 + uint16 operation = (argc == 1) ? argv[0].toUint16() : 0; switch (operation) { + case kPlatformUnk0: + return make_reg(0, !isWindows); + case kPlatformCDSpeed: + // TODO: Returns CD Speed? + warning("STUB: kPlatform(CDSpeed)"); + break; + case kPlatformUnk2: + // Always returns 2 + return make_reg(0, 2); + case kPlatformCDCheck: + // TODO: Some sort of CD check? + warning("STUB: kPlatform(CDCheck)"); + break; case kPlatformGetPlatform: return make_reg(0, (isWindows) ? kSciPlatformWindows : kSciPlatformDOS); case kPlatformUnk5: @@ -264,7 +283,7 @@ reg_t kPlatform(EngineState *s, int argc, reg_t *argv) { default: warning("Unsupported kPlatform operation %d", operation); } - + return NULL_REG; } |