From bf26f82cbbb1995b5bb31c9e3ac9c974b23c6e12 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 27 Mar 2008 23:46:30 +0000 Subject: Implemented opcode 74: o2_setSceneAnimPos2. svn-id: r31276 --- engines/kyra/kyra_v2.cpp | 2 +- engines/kyra/kyra_v2.h | 1 + engines/kyra/script_v2.cpp | 9 ++++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index a70219fef4..11cc9b2fb9 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -1774,7 +1774,7 @@ void KyraEngine_v2::snd_playSoundEffect(int track) { _lastSfxTrack = track; - int16 vocIndex = (int16) READ_LE_UINT16(&_ingameSoundIndex[track * 2]); + int16 vocIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2]); if (vocIndex != -1) _sound->voicePlay(_ingameSoundList[vocIndex]); else if (_flags.platform == Common::kPlatformPC) diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index 31c08083e9..67d363074d 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -1013,6 +1013,7 @@ protected: int o2_disableSceneAnim(ScriptState *script); int o2_enableSceneAnim(ScriptState *script); int o2_restoreInventoryGfx(ScriptState *script); + int o2_setSceneAnimPos2(ScriptState *script); int o2_update(ScriptState *script); int o2_fadeScenePal(ScriptState *script); int o2_enterNewSceneEx(ScriptState *script); diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp index cce34de2fa..52a2f534a7 100644 --- a/engines/kyra/script_v2.cpp +++ b/engines/kyra/script_v2.cpp @@ -740,6 +740,13 @@ int KyraEngine_v2::o2_restoreInventoryGfx(ScriptState *script) { return 0; } +int KyraEngine_v2::o2_setSceneAnimPos2(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_setSceneAnimPos2(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); + _sceneAnims[stackPos(0)].x2 = stackPos(1); + _sceneAnims[stackPos(0)].y2 = stackPos(2); + return 0; +} + int KyraEngine_v2::o2_update(ScriptState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_update(%p) (%d)", (const void *)script, stackPos(0)); @@ -1802,7 +1809,7 @@ void KyraEngine_v2::setupOpcodeTable() { // 0x48 Opcode(o2_enableSceneAnim), Opcode(o2_restoreInventoryGfx), - OpcodeUnImpl(), + Opcode(o2_setSceneAnimPos2), Opcode(o2_update), // 0x4c OpcodeUnImpl(), -- cgit v1.2.3