diff options
Diffstat (limited to 'engines/kyra/script_v2.cpp')
-rw-r--r-- | engines/kyra/script_v2.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp index 2f16a23731..81cb1becef 100644 --- a/engines/kyra/script_v2.cpp +++ b/engines/kyra/script_v2.cpp @@ -76,6 +76,21 @@ int KyraEngine_v2::o2_moveCharacter(EMCState *script) { return 0; } +int KyraEngine_v2::o2_defineItem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_defineItem(%p) (%d, %d, %d, %d)", (const void *)script, + stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + int freeItem = findFreeItem(); + + if (freeItem >= 0) { + _itemList[freeItem].id = stackPos(0); + _itemList[freeItem].x = stackPos(1); + _itemList[freeItem].y = stackPos(2); + _itemList[freeItem].sceneId = stackPos(3); + } + + return freeItem; +} + int KyraEngine_v2::o2_queryGameFlag(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_queryGameFlag(%p) (%d)", (const void *)script, stackPos(0)); return queryGameFlag(stackPos(0)); @@ -174,6 +189,17 @@ int KyraEngine_v2::o2_update(EMCState *script) { return 0; } +int KyraEngine_v2::o2_getShapeFlag1(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_getShapeFlag1(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + return screen()->getShapeFlag1(stackPos(0), stackPos(1)); +} + +int KyraEngine_v2::o2_playWanderScoreViaMap(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_playWanderScoreViaMap(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + snd_playWanderScoreViaMap(stackPos(0), stackPos(1)); + return 0; +} + int KyraEngine_v2::o2_getRand(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_getRand(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); assert(stackPos(0) < stackPos(1)); @@ -210,6 +236,24 @@ int KyraEngine_v2::o2_waitForConfirmationClick(EMCState *script) { return 1; } +int KyraEngine_v2::o2_randomSceneChat(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_randomSceneChat(%p)", (const void *)script); + randomSceneChat(); + return 0; +} + +int KyraEngine_v2::o2_setDlgIndex(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_setDlgIndex(%p) (%d)", (const void *)script, stackPos(0)); + setDlgIndex(stackPos(0)); + return 0; +} + +int KyraEngine_v2::o2_getDlgIndex(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_getDlgIndex(%p) ()", (const void *)script); + return _mainCharacter.dlgIndex; +} + + int KyraEngine_v2::o2_defineRoomEntrance(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_defineRoomEntrance(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); switch (stackPos(0)) { |