From 13297c19298c5ad73c9e996c5c31ca91de124911 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Wed, 27 Jul 2016 21:00:37 -0500 Subject: SCI32: Implement kShowMovie --- engines/sci/engine/vm.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'engines/sci/engine/vm.cpp') diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 3e12084ed6..548fd477bf 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -405,6 +405,21 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) { error("[VM] k%s[%x]: no subfunction ID parameter given", kernelCall.name, kernelCallNr); if (argv[0].isPointer()) error("[VM] k%s[%x]: given subfunction ID is actually a pointer", kernelCall.name, kernelCallNr); + +#ifdef ENABLE_SCI32 + // The Windows version of kShowMovie has subops, but the subop number + // is put in the second parameter in SCI2.1+, even though every other + // kcall with subops puts the subop in the first parameter. To allow use + // of the normal subops system, we swap the arguments so the subop + // number is in the usual place. + if (getSciVersion() > SCI_VERSION_2 && + g_sci->getPlatform() == Common::kPlatformWindows && + strcmp(kernelCall.name, "ShowMovie") == 0) { + assert(argc > 1); + SWAP(argv[0], argv[1]); + } +#endif + const uint16 subId = argv[0].toUint16(); // Skip over subfunction-id argc--; -- cgit v1.2.3 From 31f344079ff6b66f933becd6602e446d94717a4d Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Thu, 11 Aug 2016 21:41:49 -0500 Subject: SCI32: Temporarily revert kShowMovie due to buildbot failures Revert "SCI32: Fix KQ7 1.51 video background" This reverts commit c8affb54cca259f37522216bad739be085bf9caa. Revert "SCI32: Fix crash when kShowMovie is called but the video cannot be found" This reverts commit 93b06f4a9e08de281ee7eb9c780ceac147c3fb23. Revert "SCI32: Fix KQ7 1.51 basic video playback" This reverts commit cdab24aa07c18ad4a25a1659f7fca15cca5e358e. Revert "SCI32: Additional Video32 documentation" This reverts commit 4ff0924e57a9bc9101ee0799a967fe3373dd2574. Revert "SCI32: Implement kShowMovie" This reverts commit 13297c19298c5ad73c9e996c5c31ca91de124911. --- engines/sci/engine/vm.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'engines/sci/engine/vm.cpp') diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 548fd477bf..3e12084ed6 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -405,21 +405,6 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) { error("[VM] k%s[%x]: no subfunction ID parameter given", kernelCall.name, kernelCallNr); if (argv[0].isPointer()) error("[VM] k%s[%x]: given subfunction ID is actually a pointer", kernelCall.name, kernelCallNr); - -#ifdef ENABLE_SCI32 - // The Windows version of kShowMovie has subops, but the subop number - // is put in the second parameter in SCI2.1+, even though every other - // kcall with subops puts the subop in the first parameter. To allow use - // of the normal subops system, we swap the arguments so the subop - // number is in the usual place. - if (getSciVersion() > SCI_VERSION_2 && - g_sci->getPlatform() == Common::kPlatformWindows && - strcmp(kernelCall.name, "ShowMovie") == 0) { - assert(argc > 1); - SWAP(argv[0], argv[1]); - } -#endif - const uint16 subId = argv[0].toUint16(); // Skip over subfunction-id argc--; -- cgit v1.2.3 From ef2c44bf1f2cf128a20096b3bcca2578634814b1 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Wed, 27 Jul 2016 21:00:37 -0500 Subject: SCI32: Implement kShowMovie --- engines/sci/engine/vm.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'engines/sci/engine/vm.cpp') diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 3e12084ed6..548fd477bf 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -405,6 +405,21 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) { error("[VM] k%s[%x]: no subfunction ID parameter given", kernelCall.name, kernelCallNr); if (argv[0].isPointer()) error("[VM] k%s[%x]: given subfunction ID is actually a pointer", kernelCall.name, kernelCallNr); + +#ifdef ENABLE_SCI32 + // The Windows version of kShowMovie has subops, but the subop number + // is put in the second parameter in SCI2.1+, even though every other + // kcall with subops puts the subop in the first parameter. To allow use + // of the normal subops system, we swap the arguments so the subop + // number is in the usual place. + if (getSciVersion() > SCI_VERSION_2 && + g_sci->getPlatform() == Common::kPlatformWindows && + strcmp(kernelCall.name, "ShowMovie") == 0) { + assert(argc > 1); + SWAP(argv[0], argv[1]); + } +#endif + const uint16 subId = argv[0].toUint16(); // Skip over subfunction-id argc--; -- cgit v1.2.3