From c6dd192ca6a006caf65ccaf8026d8d89106cf66d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 29 Jul 2009 14:54:27 +0000 Subject: Fix animation script sound effect opcode implementation in Kyra3. svn-id: r42890 --- engines/kyra/kyra_mr.h | 1 + engines/kyra/script_mr.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'engines/kyra') diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index 88bfb8c89b..2204f78b82 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -495,6 +495,7 @@ private: bool _useFrameTable; int o3a_setCharacterFrame(EMCState *script); + int o3a_playSoundEffect(EMCState *script); // special shape code int initAnimationShapes(uint8 *filedata); diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp index 1800bd1939..819bf838ca 100644 --- a/engines/kyra/script_mr.cpp +++ b/engines/kyra/script_mr.cpp @@ -1114,6 +1114,12 @@ int KyraEngine_MR::o3a_setCharacterFrame(EMCState *script) { return 0; } +int KyraEngine_MR::o3a_playSoundEffect(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3a_playSoundEffect(%p) (%d)", (const void *)script, stackPos(0)); + snd_playSoundEffect(stackPos(0), 200); + return 0; +} + #pragma mark - int KyraEngine_MR::o3d_updateAnim(EMCState *script) { @@ -1374,7 +1380,7 @@ void KyraEngine_MR::setupOpcodeTable() { // 0x00 Opcode(o2a_setAnimationShapes); Opcode(o3a_setCharacterFrame); - Opcode(o3_playSoundEffect); + Opcode(o3a_playSoundEffect); Opcode(o3_dummy); // 0x04 Opcode(o2a_setResetFrame); -- cgit v1.2.3