diff options
Diffstat (limited to 'engines/kyra/script_v1.cpp')
-rw-r--r-- | engines/kyra/script_v1.cpp | 640 |
1 files changed, 320 insertions, 320 deletions
diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp index b315a92b4a..55b74dc8cb 100644 --- a/engines/kyra/script_v1.cpp +++ b/engines/kyra/script_v1.cpp @@ -35,16 +35,16 @@ namespace Kyra { #define stackPos(x) script->stack[script->sp+x] #define stackPosString(x) (char*)&script->dataPtr->text[READ_BE_UINT16(&((uint16 *)script->dataPtr->text)[stackPos(x)])] -int KyraEngine::cmd_magicInMouseItem(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_magicInMouseItem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_magicInMouseItem(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_magicInMouseItem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); magicInMouseItem(stackPos(0), stackPos(1), -1); return 0; } -int KyraEngine::cmd_characterSays(ScriptState *script) { +int KyraEngine::c1_characterSays(ScriptState *script) { _skipFlag = false; if (_features & GF_TALKIE) { - debugC(3, kDebugLevelScriptFuncs, "cmd_characterSays(%p) (%d, '%s', %d, %d)", (const void *)script, stackPos(0), stackPosString(1), stackPos(2), stackPos(3)); + debugC(3, kDebugLevelScriptFuncs, "c1_characterSays(%p) (%d, '%s', %d, %d)", (const void *)script, stackPos(0), stackPosString(1), stackPos(2), stackPos(3)); if (speechEnabled()) { snd_voiceWaitForFinish(); snd_playVoiceFile(stackPos(0)); @@ -52,17 +52,17 @@ int KyraEngine::cmd_characterSays(ScriptState *script) { if (textEnabled()) characterSays(stackPosString(1), stackPos(2), stackPos(3)); } else { - debugC(3, kDebugLevelScriptFuncs, "cmd_characterSays(%p) ('%s', %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2)); + debugC(3, kDebugLevelScriptFuncs, "c1_characterSays(%p) ('%s', %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2)); characterSays(stackPosString(0), stackPos(1), stackPos(2)); } return 0; } -int KyraEngine::cmd_pauseTicks(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_pauseTicks(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_pauseTicks(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_pauseTicks(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); if (stackPos(1)) { - warning("STUB: special cmd_pauseTicks"); + warning("STUB: special c1_pauseTicks"); // delete this after correct implementing delayWithTicks(stackPos(0)); } else { @@ -71,34 +71,34 @@ int KyraEngine::cmd_pauseTicks(ScriptState *script) { return 0; } -int KyraEngine::cmd_drawSceneAnimShape(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_drawSceneAnimShape(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); +int KyraEngine::c1_drawSceneAnimShape(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_drawSceneAnimShape(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); _screen->drawShape(stackPos(4), _sprites->_sceneShapes[stackPos(0)], stackPos(1), stackPos(2), 0, (stackPos(3) != 0) ? 1 : 0); return 0; } -int KyraEngine::cmd_queryGameFlag(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_queryGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); +int KyraEngine::c1_queryGameFlag(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_queryGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); return queryGameFlag(stackPos(0)); } -int KyraEngine::cmd_setGameFlag(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); +int KyraEngine::c1_setGameFlag(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); return setGameFlag(stackPos(0)); } -int KyraEngine::cmd_resetGameFlag(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_resetGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); +int KyraEngine::c1_resetGameFlag(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_resetGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); return resetGameFlag(stackPos(0)); } -int KyraEngine::cmd_runNPCScript(ScriptState *script) { - warning("STUB: cmd_runNPCScript"); +int KyraEngine::c1_runNPCScript(ScriptState *script) { + warning("STUB: c1_runNPCScript"); return 0; } -int KyraEngine::cmd_setSpecialExitList(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setSpecialExitList(%p) (%d, %d, %d, %d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7), stackPos(8), stackPos(9)); +int KyraEngine::c1_setSpecialExitList(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setSpecialExitList(%p) (%d, %d, %d, %d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7), stackPos(8), stackPos(9)); for (int i = 0; i < 10; ++i) { _exitList[i] = stackPos(i); @@ -108,20 +108,20 @@ int KyraEngine::cmd_setSpecialExitList(ScriptState *script) { return 0; } -int KyraEngine::cmd_blockInWalkableRegion(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_blockInWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); +int KyraEngine::c1_blockInWalkableRegion(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_blockInWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); _screen->blockInRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); return 0; } -int KyraEngine::cmd_blockOutWalkableRegion(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_blockOutWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); +int KyraEngine::c1_blockOutWalkableRegion(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_blockOutWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); _screen->blockOutRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); return 0; } -int KyraEngine::cmd_walkPlayerToPoint(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_walkPlayerToPoint(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); +int KyraEngine::c1_walkPlayerToPoint(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_walkPlayerToPoint(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); int normalTimers = stackPos(2); if (!normalTimers) { @@ -149,8 +149,8 @@ int KyraEngine::cmd_walkPlayerToPoint(ScriptState *script) { return 0; } -int KyraEngine::cmd_dropItemInScene(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_dropItemInScene(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); +int KyraEngine::c1_dropItemInScene(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_dropItemInScene(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); int item = stackPos(0); int xpos = stackPos(1); int ypos = stackPos(2); @@ -175,8 +175,8 @@ int KyraEngine::cmd_dropItemInScene(ScriptState *script) { return 0; } -int KyraEngine::cmd_drawAnimShapeIntoScene(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_drawAnimShapeIntoScene(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); +int KyraEngine::c1_drawAnimShapeIntoScene(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_drawAnimShapeIntoScene(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); _screen->hideMouse(); _animator->restoreAllObjectBackgrounds(); int shape = stackPos(0); @@ -193,51 +193,51 @@ int KyraEngine::cmd_drawAnimShapeIntoScene(ScriptState *script) { return 0; } -int KyraEngine::cmd_createMouseItem(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_createMouseItem(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_createMouseItem(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_createMouseItem(%p) (%d)", (const void *)script, stackPos(0)); createMouseItem(stackPos(0)); return 0; } -int KyraEngine::cmd_savePageToDisk(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_savePageToDisk(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); +int KyraEngine::c1_savePageToDisk(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_savePageToDisk(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); _screen->savePageToDisk(stackPosString(0), stackPos(1)); return 0; } -int KyraEngine::cmd_sceneAnimOn(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_sceneAnimOn(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_sceneAnimOn(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_sceneAnimOn(%p) (%d)", (const void *)script, stackPos(0)); _sprites->_anims[stackPos(0)].play = true; return 0; } -int KyraEngine::cmd_sceneAnimOff(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_sceneAnimOff(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_sceneAnimOff(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_sceneAnimOff(%p) (%d)", (const void *)script, stackPos(0)); _sprites->_anims[stackPos(0)].play = false; return 0; } -int KyraEngine::cmd_getElapsedSeconds(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_getElapsedSeconds(%p) ()", (const void *)script); +int KyraEngine::c1_getElapsedSeconds(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_getElapsedSeconds(%p) ()", (const void *)script); return _system->getMillis() / 1000; } -int KyraEngine::cmd_mouseIsPointer(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_mouseIsPointer(%p) ()", (const void *)script); +int KyraEngine::c1_mouseIsPointer(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_mouseIsPointer(%p) ()", (const void *)script); if (_itemInHand == -1) { return 1; } return 0; } -int KyraEngine::cmd_destroyMouseItem(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_destroyMouseItem(%p) ()", (const void *)script); +int KyraEngine::c1_destroyMouseItem(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_destroyMouseItem(%p) ()", (const void *)script); destroyMouseItem(); return 0; } -int KyraEngine::cmd_runSceneAnimUntilDone(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_runSceneAnimUntilDone(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_runSceneAnimUntilDone(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_runSceneAnimUntilDone(%p) (%d)", (const void *)script, stackPos(0)); _screen->hideMouse(); _animator->restoreAllObjectBackgrounds(); _sprites->_anims[stackPos(0)].play = true; @@ -254,49 +254,49 @@ int KyraEngine::cmd_runSceneAnimUntilDone(ScriptState *script) { return 0; } -int KyraEngine::cmd_fadeSpecialPalette(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_fadeSpecialPalette(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); +int KyraEngine::c1_fadeSpecialPalette(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_fadeSpecialPalette(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); _screen->fadeSpecialPalette(stackPos(0), stackPos(1), stackPos(2), stackPos(3)); return 0; } -int KyraEngine::cmd_playAdlibSound(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_playAdlibSound(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_playAdlibSound(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_playAdlibSound(%p) (%d)", (const void *)script, stackPos(0)); snd_playSoundEffect(stackPos(0)); return 0; } -int KyraEngine::cmd_playAdlibScore(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_playAdlibScore(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_playAdlibScore(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_playAdlibScore(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); snd_playWanderScoreViaMap(stackPos(0), stackPos(1)); return 0; } -int KyraEngine::cmd_phaseInSameScene(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_phaseInSameScene(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_phaseInSameScene(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_phaseInSameScene(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); transcendScenes(stackPos(0), stackPos(1)); return 0; } -int KyraEngine::cmd_setScenePhasingFlag(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setScenePhasingFlag(%p) ()", (const void *)script); +int KyraEngine::c1_setScenePhasingFlag(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setScenePhasingFlag(%p) ()", (const void *)script); _scenePhasingFlag = 1; return 1; } -int KyraEngine::cmd_resetScenePhasingFlag(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_resetScenePhasingFlag(%p) ()", (const void *)script); +int KyraEngine::c1_resetScenePhasingFlag(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_resetScenePhasingFlag(%p) ()", (const void *)script); _scenePhasingFlag = 0; return 0; } -int KyraEngine::cmd_queryScenePhasingFlag(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_queryScenePhasingFlag(%p) ()", (const void *)script); +int KyraEngine::c1_queryScenePhasingFlag(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_queryScenePhasingFlag(%p) ()", (const void *)script); return _scenePhasingFlag; } -int KyraEngine::cmd_sceneToDirection(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_sceneToDirection(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_sceneToDirection(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_sceneToDirection(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); assert(stackPos(0) < _roomTableSize); Room *curRoom = &_roomTable[stackPos(0)]; uint16 returnValue = 0xFFFF; @@ -325,8 +325,8 @@ int KyraEngine::cmd_sceneToDirection(ScriptState *script) { return returnValue; } -int KyraEngine::cmd_setBirthstoneGem(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setBirthstoneGem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_setBirthstoneGem(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setBirthstoneGem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); int index = stackPos(0); if (index < 4 && index >= 0) { _birthstoneGemTable[index] = stackPos(1); @@ -335,62 +335,62 @@ int KyraEngine::cmd_setBirthstoneGem(ScriptState *script) { return 0; } -int KyraEngine::cmd_placeItemInGenericMapScene(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_placeItemInGenericMapScene(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_placeItemInGenericMapScene(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_placeItemInGenericMapScene(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); placeItemInGenericMapScene(stackPos(0), stackPos(1)); return 0; } -int KyraEngine::cmd_setBrandonStatusBit(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setBrandonStatusBit(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_setBrandonStatusBit(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setBrandonStatusBit(%p) (%d)", (const void *)script, stackPos(0)); _brandonStatusBit |= stackPos(0); return 0; } -int KyraEngine::cmd_pauseSeconds(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_pauseSeconds(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_pauseSeconds(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_pauseSeconds(%p) (%d)", (const void *)script, stackPos(0)); if (stackPos(0) > 0 && !_skipFlag) delay(stackPos(0)*1000, true); _skipFlag = false; return 0; } -int KyraEngine::cmd_getCharactersLocation(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_getCharactersLocation(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_getCharactersLocation(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_getCharactersLocation(%p) (%d)", (const void *)script, stackPos(0)); return _characterList[stackPos(0)].sceneId; } -int KyraEngine::cmd_runNPCSubscript(ScriptState *script) { - warning("STUB: cmd_runNPCSubscript"); +int KyraEngine::c1_runNPCSubscript(ScriptState *script) { + warning("STUB: c1_runNPCSubscript"); return 0; } -int KyraEngine::cmd_magicOutMouseItem(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_magicOutMouseItem(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_magicOutMouseItem(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_magicOutMouseItem(%p) (%d)", (const void *)script, stackPos(0)); magicOutMouseItem(stackPos(0), -1); return 0; } -int KyraEngine::cmd_internalAnimOn(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_internalAnimOn(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_internalAnimOn(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_internalAnimOn(%p) (%d)", (const void *)script, stackPos(0)); _animator->sprites()[stackPos(0)].active = 1; return 0; } -int KyraEngine::cmd_forceBrandonToNormal(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_forceBrandonToNormal(%p) ()", (const void *)script); +int KyraEngine::c1_forceBrandonToNormal(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_forceBrandonToNormal(%p) ()", (const void *)script); checkAmuletAnimFlags(); return 0; } -int KyraEngine::cmd_poisonDeathNow(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_poisonDeathNow(%p) ()", (const void *)script); +int KyraEngine::c1_poisonDeathNow(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_poisonDeathNow(%p) ()", (const void *)script); seq_poisonDeathNow(1); return 0; } -int KyraEngine::cmd_setScaleMode(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setScaleMode(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); +int KyraEngine::c1_setScaleMode(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setScaleMode(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); int len = stackPos(0); int setValue1 = stackPos(1); int start2 = stackPos(2); @@ -410,8 +410,8 @@ int KyraEngine::cmd_setScaleMode(ScriptState *script) { return _scaleMode; } -int KyraEngine::cmd_openWSAFile(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_openWSAFile(%p) ('%s', %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3)); +int KyraEngine::c1_openWSAFile(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_openWSAFile(%p) ('%s', %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3)); char *filename = stackPosString(0); int wsaIndex = stackPos(1); @@ -422,8 +422,8 @@ int KyraEngine::cmd_openWSAFile(ScriptState *script) { return 0; } -int KyraEngine::cmd_closeWSAFile(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_closeWSAFile(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_closeWSAFile(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_closeWSAFile(%p) (%d)", (const void *)script, stackPos(0)); int wsaIndex = stackPos(0); if (_movieObjects[wsaIndex]) { @@ -433,8 +433,8 @@ int KyraEngine::cmd_closeWSAFile(ScriptState *script) { return 0; } -int KyraEngine::cmd_runWSAFromBeginningToEnd(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_runWSAFromBeginningToEnd(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); +int KyraEngine::c1_runWSAFromBeginningToEnd(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_runWSAFromBeginningToEnd(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); _screen->hideMouse(); @@ -474,8 +474,8 @@ int KyraEngine::cmd_runWSAFromBeginningToEnd(ScriptState *script) { return 0; } -int KyraEngine::cmd_displayWSAFrame(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_displayWSAFrame(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); +int KyraEngine::c1_displayWSAFrame(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_displayWSAFrame(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); int frame = stackPos(0); int xpos = stackPos(1); int ypos = stackPos(2); @@ -501,14 +501,14 @@ int KyraEngine::cmd_displayWSAFrame(ScriptState *script) { return 0; } -int KyraEngine::cmd_enterNewScene(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_enterNewScene(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); +int KyraEngine::c1_enterNewScene(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_enterNewScene(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); enterNewScene(stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); return 0; } -int KyraEngine::cmd_setSpecialEnterXAndY(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setSpecialEnterXAndY(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_setSpecialEnterXAndY(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setSpecialEnterXAndY(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); _brandonPosX = stackPos(0); _brandonPosY = stackPos(1); if (_brandonPosX + 1 == 0 && _brandonPosY + 1 == 0) @@ -516,8 +516,8 @@ int KyraEngine::cmd_setSpecialEnterXAndY(ScriptState *script) { return 0; } -int KyraEngine::cmd_runWSAFrames(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_runWSAFrames(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); +int KyraEngine::c1_runWSAFrames(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_runWSAFrames(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); int xpos = stackPos(0); int ypos = stackPos(1); int delayTime = stackPos(2); @@ -543,8 +543,8 @@ int KyraEngine::cmd_runWSAFrames(ScriptState *script) { return 0; } -int KyraEngine::cmd_popBrandonIntoScene(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_popBrandonIntoScene(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); +int KyraEngine::c1_popBrandonIntoScene(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_popBrandonIntoScene(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); int changeScaleMode = stackPos(3); int xpos = (int16)(stackPos(0) & 0xFFFC); int ypos = (int16)(stackPos(1) & 0xFFFE); @@ -593,30 +593,30 @@ int KyraEngine::cmd_popBrandonIntoScene(ScriptState *script) { return 0; } -int KyraEngine::cmd_restoreAllObjectBackgrounds(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_restoreAllObjectBackgrounds(%p) ()", (const void *)script); +int KyraEngine::c1_restoreAllObjectBackgrounds(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_restoreAllObjectBackgrounds(%p) ()", (const void *)script); _animator->restoreAllObjectBackgrounds(); return 0; } -int KyraEngine::cmd_setCustomPaletteRange(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setCustomPaletteRange(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); +int KyraEngine::c1_setCustomPaletteRange(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setCustomPaletteRange(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); uint8 *screenPal = _screen->_currentPalette; memcpy(&screenPal[stackPos(1)*3], _specialPalettes[stackPos(0)], stackPos(2)*3); _screen->setScreenPalette(screenPal); return 0; } -int KyraEngine::cmd_loadPageFromDisk(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_loadPageFromDisk(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); +int KyraEngine::c1_loadPageFromDisk(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_loadPageFromDisk(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); _screen->loadPageFromDisk(stackPosString(0), stackPos(1)); _animator->_updateScreen = true; return 0; } -int KyraEngine::cmd_customPrintTalkString(ScriptState *script) { +int KyraEngine::c1_customPrintTalkString(ScriptState *script) { if (_features & GF_TALKIE) { - debugC(3, kDebugLevelScriptFuncs, "cmd_customPrintTalkString(%p) (%d, '%s', %d, %d, %d)", (const void *)script, stackPos(0), stackPosString(1), stackPos(2), stackPos(3), stackPos(4) & 0xFF); + debugC(3, kDebugLevelScriptFuncs, "c1_customPrintTalkString(%p) (%d, '%s', %d, %d, %d)", (const void *)script, stackPos(0), stackPosString(1), stackPos(2), stackPos(3), stackPos(4) & 0xFF); if (speechEnabled()) { snd_voiceWaitForFinish(); @@ -626,7 +626,7 @@ int KyraEngine::cmd_customPrintTalkString(ScriptState *script) { if (textEnabled()) _text->printTalkTextMessage(stackPosString(1), stackPos(2), stackPos(3), stackPos(4) & 0xFF, 0, 2); } else { - debugC(3, kDebugLevelScriptFuncs, "cmd_customPrintTalkString(%p) ('%s', %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF); + debugC(3, kDebugLevelScriptFuncs, "c1_customPrintTalkString(%p) ('%s', %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF); _skipFlag = false; _text->printTalkTextMessage(stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF, 0, 2); } @@ -634,36 +634,36 @@ int KyraEngine::cmd_customPrintTalkString(ScriptState *script) { return 0; } -int KyraEngine::cmd_restoreCustomPrintBackground(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_restoreCustomPrintBackground(%p) ()", (const void *)script); +int KyraEngine::c1_restoreCustomPrintBackground(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_restoreCustomPrintBackground(%p) ()", (const void *)script); _text->restoreTalkTextMessageBkgd(2, 0); return 0; } -int KyraEngine::cmd_hideMouse(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_hideMouse(%p) ()", (const void *)script); +int KyraEngine::c1_hideMouse(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_hideMouse(%p) ()", (const void *)script); _screen->hideMouse(); return 0; } -int KyraEngine::cmd_showMouse(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_showMouse(%p) ()", (const void *)script); +int KyraEngine::c1_showMouse(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_showMouse(%p) ()", (const void *)script); _screen->showMouse(); return 0; } -int KyraEngine::cmd_getCharacterX(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_getCharacterX(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_getCharacterX(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_getCharacterX(%p) (%d)", (const void *)script, stackPos(0)); return _characterList[stackPos(0)].x1; } -int KyraEngine::cmd_getCharacterY(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_getCharacterY(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_getCharacterY(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_getCharacterY(%p) (%d)", (const void *)script, stackPos(0)); return _characterList[stackPos(0)].y1; } -int KyraEngine::cmd_changeCharactersFacing(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_changeCharactersFacing(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); +int KyraEngine::c1_changeCharactersFacing(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_changeCharactersFacing(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); int character = stackPos(0); int facing = stackPos(1); int newAnimFrame = stackPos(2); @@ -681,8 +681,8 @@ int KyraEngine::cmd_changeCharactersFacing(ScriptState *script) { return 0; } -int KyraEngine::cmd_copyWSARegion(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_copyWSARegion(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); +int KyraEngine::c1_copyWSARegion(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_copyWSARegion(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); int xpos = stackPos(0); int ypos = stackPos(1); int width = stackPos(2); @@ -694,26 +694,26 @@ int KyraEngine::cmd_copyWSARegion(ScriptState *script) { return 0; } -int KyraEngine::cmd_printText(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_printText(%p) ('%s', %d, %d, 0x%X, 0x%X)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); +int KyraEngine::c1_printText(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_printText(%p) ('%s', %d, %d, 0x%X, 0x%X)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); _screen->printText(stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); _screen->updateScreen(); return 0; } -int KyraEngine::cmd_random(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_random(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_random(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_random(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); assert(stackPos(0) < stackPos(1)); return _rnd.getRandomNumberRng(stackPos(0), stackPos(1)); } -int KyraEngine::cmd_loadSoundFile(ScriptState *script) { - warning("STUB: cmd_loadSoundFile"); +int KyraEngine::c1_loadSoundFile(ScriptState *script) { + warning("STUB: c1_loadSoundFile"); return 0; } -int KyraEngine::cmd_displayWSAFrameOnHidPage(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_displayWSAFrameOnHidPage(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); +int KyraEngine::c1_displayWSAFrameOnHidPage(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_displayWSAFrameOnHidPage(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); int frame = stackPos(0); int xpos = stackPos(1); int ypos = stackPos(2); @@ -741,8 +741,8 @@ int KyraEngine::cmd_displayWSAFrameOnHidPage(ScriptState *script) { return 0; } -int KyraEngine::cmd_displayWSASequentialFrames(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_displayWSASequentialFrames(%p) (%d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6)); +int KyraEngine::c1_displayWSASequentialFrames(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_displayWSASequentialFrames(%p) (%d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6)); int startFrame = stackPos(0); int endFrame = stackPos(1); int xpos = stackPos(2); @@ -819,8 +819,8 @@ int KyraEngine::cmd_displayWSASequentialFrames(ScriptState *script) { return 0; } -int KyraEngine::cmd_drawCharacterStanding(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_drawCharacterStanding(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); +int KyraEngine::c1_drawCharacterStanding(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_drawCharacterStanding(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); int character = stackPos(0); int animFrame = stackPos(1); int newFacing = stackPos(2); @@ -836,14 +836,14 @@ int KyraEngine::cmd_drawCharacterStanding(ScriptState *script) { return 0; } -int KyraEngine::cmd_internalAnimOff(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_internalAnimOff(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_internalAnimOff(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_internalAnimOff(%p) (%d)", (const void *)script, stackPos(0)); _animator->sprites()[stackPos(0)].active = 0; return 0; } -int KyraEngine::cmd_changeCharactersXAndY(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_changeCharactersXAndY(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); +int KyraEngine::c1_changeCharactersXAndY(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_changeCharactersXAndY(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); Character *ch = &_characterList[stackPos(0)]; int16 x = stackPos(1); int16 y = stackPos(2); @@ -858,26 +858,26 @@ int KyraEngine::cmd_changeCharactersXAndY(ScriptState *script) { return 0; } -int KyraEngine::cmd_clearSceneAnimatorBeacon(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_clearSceneAnimatorBeacon(%p) ()", (const void *)script); +int KyraEngine::c1_clearSceneAnimatorBeacon(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_clearSceneAnimatorBeacon(%p) ()", (const void *)script); _sprites->_sceneAnimatorBeaconFlag = 0; return 0; } -int KyraEngine::cmd_querySceneAnimatorBeacon(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_querySceneAnimatorBeacon(%p) ()", (const void *)script); +int KyraEngine::c1_querySceneAnimatorBeacon(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_querySceneAnimatorBeacon(%p) ()", (const void *)script); return _sprites->_sceneAnimatorBeaconFlag; } -int KyraEngine::cmd_refreshSceneAnimator(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_refreshSceneAnimator(%p) ()", (const void *)script); +int KyraEngine::c1_refreshSceneAnimator(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_refreshSceneAnimator(%p) ()", (const void *)script); _sprites->updateSceneAnims(); _animator->updateAllObjectShapes(); return 0; } -int KyraEngine::cmd_placeItemInOffScene(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_placeItemInOffScene(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); +int KyraEngine::c1_placeItemInOffScene(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_placeItemInOffScene(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); int item = stackPos(0); int xpos = stackPos(1); int ypos = stackPos(2); @@ -895,8 +895,8 @@ int KyraEngine::cmd_placeItemInOffScene(ScriptState *script) { return 0; } -int KyraEngine::cmd_wipeDownMouseItem(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_wipeDownMouseItem(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); +int KyraEngine::c1_wipeDownMouseItem(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_wipeDownMouseItem(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); _screen->hideMouse(); wipeDownMouseItem(stackPos(1), stackPos(2)); destroyMouseItem(); @@ -904,8 +904,8 @@ int KyraEngine::cmd_wipeDownMouseItem(ScriptState *script) { return 0; } -int KyraEngine::cmd_placeCharacterInOtherScene(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_placeCharacterInOtherScene(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); +int KyraEngine::c1_placeCharacterInOtherScene(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_placeCharacterInOtherScene(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); int id = stackPos(0); int sceneId = stackPos(1); int xpos = (int16)(stackPos(2) & 0xFFFC); @@ -921,19 +921,19 @@ int KyraEngine::cmd_placeCharacterInOtherScene(ScriptState *script) { return 0; } -int KyraEngine::cmd_getKey(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_getKey(%p) ()", (const void *)script); +int KyraEngine::c1_getKey(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_getKey(%p) ()", (const void *)script); waitForEvent(); return 0; } -int KyraEngine::cmd_specificItemInInventory(ScriptState *script) { - warning("STUB: cmd_specificItemInInventory"); +int KyraEngine::c1_specificItemInInventory(ScriptState *script) { + warning("STUB: c1_specificItemInInventory"); return 0; } -int KyraEngine::cmd_popMobileNPCIntoScene(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_popMobileNPCIntoScene(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), (int16)(stackPos(4) & 0xFFFC), (int8)(stackPos(5) & 0xFE)); +int KyraEngine::c1_popMobileNPCIntoScene(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_popMobileNPCIntoScene(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), (int16)(stackPos(4) & 0xFFFC), (int8)(stackPos(5) & 0xFE)); int character = stackPos(0); int sceneId = stackPos(1); int animFrame = stackPos(2); @@ -953,23 +953,23 @@ int KyraEngine::cmd_popMobileNPCIntoScene(ScriptState *script) { return 0; } -int KyraEngine::cmd_mobileCharacterInScene(ScriptState *script) { - warning("STUB: cmd_mobileCharacterInScene"); +int KyraEngine::c1_mobileCharacterInScene(ScriptState *script) { + warning("STUB: c1_mobileCharacterInScene"); return 0; } -int KyraEngine::cmd_hideMobileCharacter(ScriptState *script) { - warning("STUB: cmd_hideMobileCharacter"); +int KyraEngine::c1_hideMobileCharacter(ScriptState *script) { + warning("STUB: c1_hideMobileCharacter"); return 0; } -int KyraEngine::cmd_unhideMobileCharacter(ScriptState *script) { - warning("STUB: cmd_unhideMobileCharacter"); +int KyraEngine::c1_unhideMobileCharacter(ScriptState *script) { + warning("STUB: c1_unhideMobileCharacter"); return 0; } -int KyraEngine::cmd_setCharactersLocation(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setCharactersLocation(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_setCharactersLocation(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setCharactersLocation(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); Character *ch = &_characterList[stackPos(0)]; AnimObject *animObj = &_animator->actors()[stackPos(0)]; int newScene = stackPos(1); @@ -985,8 +985,8 @@ int KyraEngine::cmd_setCharactersLocation(ScriptState *script) { return 0; } -int KyraEngine::cmd_walkCharacterToPoint(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_walkCharacterToPoint(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); +int KyraEngine::c1_walkCharacterToPoint(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_walkCharacterToPoint(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); int character = stackPos(0); int toX = stackPos(1); int toY = stackPos(2); @@ -1068,8 +1068,8 @@ int KyraEngine::cmd_walkCharacterToPoint(ScriptState *script) { return 0; } -int KyraEngine::cmd_specialEventDisplayBrynnsNote(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_specialEventDisplayBrynnsNote(%p) ()", (const void *)script); +int KyraEngine::c1_specialEventDisplayBrynnsNote(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_specialEventDisplayBrynnsNote(%p) ()", (const void *)script); _screen->hideMouse(); _screen->savePageToDisk("HIDPAGE.TMP", 2); _screen->savePageToDisk("SEENPAGE.TMP", 0); @@ -1091,8 +1091,8 @@ int KyraEngine::cmd_specialEventDisplayBrynnsNote(ScriptState *script) { return 0; } -int KyraEngine::cmd_specialEventRemoveBrynnsNote(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_specialEventRemoveBrynnsNote(%p) ()", (const void *)script); +int KyraEngine::c1_specialEventRemoveBrynnsNote(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_specialEventRemoveBrynnsNote(%p) ()", (const void *)script); _screen->hideMouse(); _screen->loadPageFromDisk("SEENPAGE.TMP", 0); _screen->loadPageFromDisk("HIDPAGE.TMP", 2); @@ -1102,26 +1102,26 @@ int KyraEngine::cmd_specialEventRemoveBrynnsNote(ScriptState *script) { return 0; } -int KyraEngine::cmd_setLogicPage(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setLogicPage(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_setLogicPage(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setLogicPage(%p) (%d)", (const void *)script, stackPos(0)); _screen->_curPage = stackPos(0); return stackPos(0); } -int KyraEngine::cmd_fatPrint(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_fatPrint(%p) ('%s', %d, %d, %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); +int KyraEngine::c1_fatPrint(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_fatPrint(%p) ('%s', %d, %d, %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); _text->printText(stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); return 0; } -int KyraEngine::cmd_preserveAllObjectBackgrounds(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_preserveAllObjectBackgrounds(%p) ()", (const void *)script); +int KyraEngine::c1_preserveAllObjectBackgrounds(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_preserveAllObjectBackgrounds(%p) ()", (const void *)script); _animator->preserveAllBackgrounds(); return 0; } -int KyraEngine::cmd_updateSceneAnimations(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_updateSceneAnimations(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_updateSceneAnimations(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_updateSceneAnimations(%p) (%d)", (const void *)script, stackPos(0)); if (stackPos(0)) { _sprites->updateSceneAnims(); _animator->updateAllObjectShapes(); @@ -1129,24 +1129,24 @@ int KyraEngine::cmd_updateSceneAnimations(ScriptState *script) { return 0; } -int KyraEngine::cmd_sceneAnimationActive(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_sceneAnimationActive(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_sceneAnimationActive(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_sceneAnimationActive(%p) (%d)", (const void *)script, stackPos(0)); return _sprites->_anims[stackPos(0)].play; } -int KyraEngine::cmd_setCharactersMovementDelay(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setCharactersMovementDelay(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_setCharactersMovementDelay(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setCharactersMovementDelay(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); setTimerDelay(stackPos(0)+5, stackPos(1)); return 0; } -int KyraEngine::cmd_getCharactersFacing(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_getCharactersFacing(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_getCharactersFacing(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_getCharactersFacing(%p) (%d)", (const void *)script, stackPos(0)); return _characterList[stackPos(0)].facing; } -int KyraEngine::cmd_bkgdScrollSceneAndMasksRight(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_bkgdScrollSceneAndMasksRight(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_bkgdScrollSceneAndMasksRight(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_bkgdScrollSceneAndMasksRight(%p) (%d)", (const void *)script, stackPos(0)); _screen->copyBackgroundBlock(stackPos(0), 2, 0); _screen->copyBackgroundBlock2(stackPos(0)); // update the whole screen @@ -1155,14 +1155,14 @@ int KyraEngine::cmd_bkgdScrollSceneAndMasksRight(ScriptState *script) { return 0; } -int KyraEngine::cmd_dispelMagicAnimation(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_dispelMagicAnimation(%p) ()", (const void *)script); +int KyraEngine::c1_dispelMagicAnimation(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_dispelMagicAnimation(%p) ()", (const void *)script); seq_dispelMagicAnimation(); return 0; } -int KyraEngine::cmd_findBrightestFireberry(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_findBrightestFireberry(%p) ()", (const void *)script); +int KyraEngine::c1_findBrightestFireberry(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_findBrightestFireberry(%p) ()", (const void *)script); if (_currentCharacter->sceneId >= 187 && _currentCharacter->sceneId <= 198) { return 29; } @@ -1204,8 +1204,8 @@ int KyraEngine::cmd_findBrightestFireberry(ScriptState *script) { return brightestFireberry; } -int KyraEngine::cmd_setFireberryGlowPalette(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setFireberryGlowPalette(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_setFireberryGlowPalette(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setFireberryGlowPalette(%p) (%d)", (const void *)script, stackPos(0)); int palIndex = 0; switch (stackPos(0)) { case 0x1E: @@ -1242,20 +1242,20 @@ int KyraEngine::cmd_setFireberryGlowPalette(ScriptState *script) { return 0; } -int KyraEngine::cmd_setDeathHandlerFlag(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setDeathHandlerFlag(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_setDeathHandlerFlag(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setDeathHandlerFlag(%p) (%d)", (const void *)script, stackPos(0)); _deathHandler = stackPos(0); return 0; } -int KyraEngine::cmd_drinkPotionAnimation(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_drinkPotionAnimation(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); +int KyraEngine::c1_drinkPotionAnimation(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_drinkPotionAnimation(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); seq_playDrinkPotionAnim(stackPos(0), stackPos(1), stackPos(2)); return 0; } -int KyraEngine::cmd_makeAmuletAppear(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_makeAmuletAppear(%p) ()", (const void *)script); +int KyraEngine::c1_makeAmuletAppear(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_makeAmuletAppear(%p) ()", (const void *)script); WSAMovieV1 amulet(this); amulet.open("AMULET.WSA", 1, 0); amulet.setX(224); @@ -1299,8 +1299,8 @@ int KyraEngine::cmd_makeAmuletAppear(ScriptState *script) { return 0; } -int KyraEngine::cmd_drawItemShapeIntoScene(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_drawItemShapeIntoScene(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); +int KyraEngine::c1_drawItemShapeIntoScene(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_drawItemShapeIntoScene(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); int item = stackPos(0); int x = stackPos(1); int y = stackPos(2); @@ -1323,14 +1323,14 @@ int KyraEngine::cmd_drawItemShapeIntoScene(ScriptState *script) { return 0; } -int KyraEngine::cmd_setCharactersCurrentFrame(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setCharactersCurrentFrame(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_setCharactersCurrentFrame(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setCharactersCurrentFrame(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); _characterList[stackPos(0)].currentAnimFrame = stackPos(1); return 0; } -int KyraEngine::cmd_waitForConfirmationMouseClick(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_waitForConfirmationMouseClick(%p) ()", (const void *)script); +int KyraEngine::c1_waitForConfirmationMouseClick(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_waitForConfirmationMouseClick(%p) ()", (const void *)script); // if (mouseEnabled) { while (!_mousePressFlag) { updateMousePointer(); @@ -1353,40 +1353,40 @@ int KyraEngine::cmd_waitForConfirmationMouseClick(ScriptState *script) { return 0; } -int KyraEngine::cmd_pageFlip(ScriptState *script) { - warning("STUB: cmd_pageFlip"); +int KyraEngine::c1_pageFlip(ScriptState *script) { + warning("STUB: c1_pageFlip"); return 0; } -int KyraEngine::cmd_setSceneFile(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setSceneFile(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_setSceneFile(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setSceneFile(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); setSceneFile(stackPos(0), stackPos(1)); return 0; } -int KyraEngine::cmd_getItemInMarbleVase(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_getItemInMarbleVase(%p) ()", (const void *)script); +int KyraEngine::c1_getItemInMarbleVase(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_getItemInMarbleVase(%p) ()", (const void *)script); return _marbleVaseItem; } -int KyraEngine::cmd_setItemInMarbleVase(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setItemInMarbleVase(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_setItemInMarbleVase(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setItemInMarbleVase(%p) (%d)", (const void *)script, stackPos(0)); _marbleVaseItem = stackPos(0); return 0; } -int KyraEngine::cmd_addItemToInventory(ScriptState *script) { - warning("STUB: cmd_addItemToInventory"); +int KyraEngine::c1_addItemToInventory(ScriptState *script) { + warning("STUB: c1_addItemToInventory"); return 0; } -int KyraEngine::cmd_intPrint(ScriptState *script) { - warning("STUB: cmd_intPrint"); +int KyraEngine::c1_intPrint(ScriptState *script) { + warning("STUB: c1_intPrint"); return 0; } -int KyraEngine::cmd_shakeScreen(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_shakeScreen(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_shakeScreen(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_shakeScreen(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); int waitTicks = stackPos(1); int times = stackPos(0); @@ -1398,60 +1398,60 @@ int KyraEngine::cmd_shakeScreen(ScriptState *script) { return 0; } -int KyraEngine::cmd_createAmuletJewel(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_createAmuletJewel(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_createAmuletJewel(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_createAmuletJewel(%p) (%d)", (const void *)script, stackPos(0)); seq_createAmuletJewel(stackPos(0), 0, 0, 0); return 0; } -int KyraEngine::cmd_setSceneAnimCurrXY(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setSceneAnimCurrXY(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); +int KyraEngine::c1_setSceneAnimCurrXY(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setSceneAnimCurrXY(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); _sprites->_anims[stackPos(0)].x = stackPos(1); _sprites->_anims[stackPos(0)].y = stackPos(2); return 0; } -int KyraEngine::cmd_poisonBrandonAndRemaps(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_poisonBrandonAndRemaps(%p) ()", (const void *)script); +int KyraEngine::c1_poisonBrandonAndRemaps(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_poisonBrandonAndRemaps(%p) ()", (const void *)script); setBrandonPoisonFlags(1); return 0; } -int KyraEngine::cmd_fillFlaskWithWater(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_fillFlaskWithWater(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_fillFlaskWithWater(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_fillFlaskWithWater(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); seq_fillFlaskWithWater(stackPos(0), stackPos(1)); return 0; } -int KyraEngine::cmd_getCharactersMovementDelay(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_getCharactersMovementDelay(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_getCharactersMovementDelay(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_getCharactersMovementDelay(%p) (%d)", (const void *)script, stackPos(0)); return getTimerDelay(stackPos(0)+5); } -int KyraEngine::cmd_getBirthstoneGem(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_getBirthstoneGem(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_getBirthstoneGem(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_getBirthstoneGem(%p) (%d)", (const void *)script, stackPos(0)); if (stackPos(0) < 4) { return _birthstoneGemTable[stackPos(0)]; } return 0; } -int KyraEngine::cmd_queryBrandonStatusBit(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_queryBrandonStatusBit(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_queryBrandonStatusBit(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_queryBrandonStatusBit(%p) (%d)", (const void *)script, stackPos(0)); if (_brandonStatusBit & stackPos(0)) { return 1; } return 0; } -int KyraEngine::cmd_playFluteAnimation(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_playFluteAnimation(%p) ()", (const void *)script); +int KyraEngine::c1_playFluteAnimation(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_playFluteAnimation(%p) ()", (const void *)script); seq_playFluteAnimation(); return 0; } -int KyraEngine::cmd_playWinterScrollSequence(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_playWinterScrollSequence(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_playWinterScrollSequence(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_playWinterScrollSequence(%p) (%d)", (const void *)script, stackPos(0)); if (!stackPos(0)) { seq_winterScroll2(); } else { @@ -1460,43 +1460,43 @@ int KyraEngine::cmd_playWinterScrollSequence(ScriptState *script) { return 0; } -int KyraEngine::cmd_getIdolGem(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_getIdolGem(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_getIdolGem(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_getIdolGem(%p) (%d)", (const void *)script, stackPos(0)); return _idolGemsTable[stackPos(0)];; } -int KyraEngine::cmd_setIdolGem(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setIdolGem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_setIdolGem(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setIdolGem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); _idolGemsTable[stackPos(0)] = stackPos(1); return 0; } -int KyraEngine::cmd_totalItemsInScene(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_totalItemsInScene(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_totalItemsInScene(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_totalItemsInScene(%p) (%d)", (const void *)script, stackPos(0)); return countItemsInScene(stackPos(0)); } -int KyraEngine::cmd_restoreBrandonsMovementDelay(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_restoreBrandonsMovementDelay(%p) ()", (const void *)script); +int KyraEngine::c1_restoreBrandonsMovementDelay(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_restoreBrandonsMovementDelay(%p) ()", (const void *)script); setWalkspeed(_configWalkspeed); return 0; } -int KyraEngine::cmd_setMousePos(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setMousePos(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_setMousePos(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setMousePos(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); _system->warpMouse(stackPos(0), stackPos(1)); _mouseX = stackPos(0); _mouseY = stackPos(1); return 0; } -int KyraEngine::cmd_getMouseState(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_getMouseState(%p) ()", (const void *)script); +int KyraEngine::c1_getMouseState(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_getMouseState(%p) ()", (const void *)script); return _mouseState; } -int KyraEngine::cmd_setEntranceMouseCursorTrack(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setEntranceMouseCursorTrack(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); +int KyraEngine::c1_setEntranceMouseCursorTrack(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setEntranceMouseCursorTrack(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); _entranceMouseCursorTracks[0] = stackPos(0); _entranceMouseCursorTracks[1] = stackPos(1); _entranceMouseCursorTracks[2] = stackPos(0) + stackPos(2) - 1; @@ -1505,20 +1505,20 @@ int KyraEngine::cmd_setEntranceMouseCursorTrack(ScriptState *script) { return 0; } -int KyraEngine::cmd_itemAppearsOnGround(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_itemAppearsOnGround(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); +int KyraEngine::c1_itemAppearsOnGround(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_itemAppearsOnGround(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); processItemDrop(_currentCharacter->sceneId, stackPos(0), stackPos(1), stackPos(2), 2, 0); return 0; } -int KyraEngine::cmd_setNoDrawShapesFlag(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setNoDrawShapesFlag(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_setNoDrawShapesFlag(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setNoDrawShapesFlag(%p) (%d)", (const void *)script, stackPos(0)); _animator->_noDrawShapesFlag = stackPos(0); return 0; } -int KyraEngine::cmd_fadeEntirePalette(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_fadeEntirePalette(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_fadeEntirePalette(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_fadeEntirePalette(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); int cmd = stackPos(0); uint8 *fadePal = 0; if (cmd == 0) { @@ -1530,7 +1530,7 @@ int KyraEngine::cmd_fadeEntirePalette(ScriptState *script) { memset(fadePal, 0, sizeof(uint8)*768); } else if (cmd == 1) { //fadePal = _screen->getPalette(3); - warning("unimplemented cmd_fadeEntirePalette function"); + warning("unimplemented c1_fadeEntirePalette function"); return 0; } else if (cmd == 2) { // HACK @@ -1543,8 +1543,8 @@ int KyraEngine::cmd_fadeEntirePalette(ScriptState *script) { return 0; } -int KyraEngine::cmd_itemOnGroundHere(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_itemOnGroundHere(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_itemOnGroundHere(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_itemOnGroundHere(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); assert(stackPos(0) < _roomTableSize); Room *curRoom = &_roomTable[stackPos(0)]; for (int i = 0; i < 12; ++i) { @@ -1554,19 +1554,19 @@ int KyraEngine::cmd_itemOnGroundHere(ScriptState *script) { return 0; } -int KyraEngine::cmd_queryCauldronState(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_queryCauldronState(%p) ()", (const void *)script); +int KyraEngine::c1_queryCauldronState(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_queryCauldronState(%p) ()", (const void *)script); return _cauldronState; } -int KyraEngine::cmd_setCauldronState(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setCauldronState(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_setCauldronState(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setCauldronState(%p) (%d)", (const void *)script, stackPos(0)); _cauldronState = stackPos(0); return _cauldronState; } -int KyraEngine::cmd_queryCrystalState(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_queryCrystalState(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_queryCrystalState(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_queryCrystalState(%p) (%d)", (const void *)script, stackPos(0)); if (!stackPos(0)) { return _crystalState[0]; } else if (stackPos(0) == 1) { @@ -1575,8 +1575,8 @@ int KyraEngine::cmd_queryCrystalState(ScriptState *script) { return -1; } -int KyraEngine::cmd_setCrystalState(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setCrystalState(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_setCrystalState(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setCrystalState(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); if (!stackPos(0)) { _crystalState[0] = stackPos(1); } else if (stackPos(0) == 1) { @@ -1585,13 +1585,13 @@ int KyraEngine::cmd_setCrystalState(ScriptState *script) { return stackPos(1); } -int KyraEngine::cmd_setPaletteRange(ScriptState *script) { - warning("STUB: cmd_setPaletteRange"); +int KyraEngine::c1_setPaletteRange(ScriptState *script) { + warning("STUB: c1_setPaletteRange"); return 0; } -int KyraEngine::cmd_shrinkBrandonDown(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_shrinkBrandonDown(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_shrinkBrandonDown(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_shrinkBrandonDown(%p) (%d)", (const void *)script, stackPos(0)); int delayTime = stackPos(0); checkAmuletAnimFlags(); int scaleValue = _scaleTable[_currentCharacter->y1]; @@ -1615,8 +1615,8 @@ int KyraEngine::cmd_shrinkBrandonDown(ScriptState *script) { return 0; } -int KyraEngine::cmd_growBrandonUp(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_growBrandonUp(%p) ()", (const void *)script); +int KyraEngine::c1_growBrandonUp(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_growBrandonUp(%p) ()", (const void *)script); int scaleValue = _scaleTable[_currentCharacter->y1]; int scale = 0; if (_scaleMode) { @@ -1636,123 +1636,123 @@ int KyraEngine::cmd_growBrandonUp(ScriptState *script) { return 0; } -int KyraEngine::cmd_setBrandonScaleXAndY(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setBrandonScaleXAndY(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_setBrandonScaleXAndY(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setBrandonScaleXAndY(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); _animator->_brandonScaleX = stackPos(0); _animator->_brandonScaleY = stackPos(1); return 0; } -int KyraEngine::cmd_resetScaleMode(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_resetScaleMode(%p) ()", (const void *)script); +int KyraEngine::c1_resetScaleMode(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_resetScaleMode(%p) ()", (const void *)script); _scaleMode = 0; return 0; } -int KyraEngine::cmd_getScaleDepthTableValue(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_getScaleDepthTableValue(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_getScaleDepthTableValue(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_getScaleDepthTableValue(%p) (%d)", (const void *)script, stackPos(0)); assert(stackPos(0) < ARRAYSIZE(_scaleTable)); return _scaleTable[stackPos(0)]; } -int KyraEngine::cmd_setScaleDepthTableValue(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setScaleDepthTableValue(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_setScaleDepthTableValue(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setScaleDepthTableValue(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); assert(stackPos(0) < ARRAYSIZE(_scaleTable)); _scaleTable[stackPos(0)] = stackPos(1); return stackPos(1); } -int KyraEngine::cmd_message(ScriptState *script) { +int KyraEngine::c1_message(ScriptState *script) { if (_features & GF_TALKIE) { - debugC(3, kDebugLevelScriptFuncs, "cmd_message(%p) (%d, '%s', %d)", (const void *)script, stackPos(0), stackPosString(1), stackPos(2)); + debugC(3, kDebugLevelScriptFuncs, "c1_message(%p) (%d, '%s', %d)", (const void *)script, stackPos(0), stackPosString(1), stackPos(2)); drawSentenceCommand(stackPosString(1), stackPos(2)); } else { - debugC(3, kDebugLevelScriptFuncs, "cmd_message(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); + debugC(3, kDebugLevelScriptFuncs, "c1_message(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); drawSentenceCommand(stackPosString(0), stackPos(1)); } return 0; } -int KyraEngine::cmd_checkClickOnNPC(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_checkClickOnNPC(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_checkClickOnNPC(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_checkClickOnNPC(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); return checkForNPCScriptRun(stackPos(0), stackPos(1)); } -int KyraEngine::cmd_getFoyerItem(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_getFoyerItem(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_getFoyerItem(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_getFoyerItem(%p) (%d)", (const void *)script, stackPos(0)); assert(stackPos(0) < ARRAYSIZE(_foyerItemTable)); return _foyerItemTable[stackPos(0)]; } -int KyraEngine::cmd_setFoyerItem(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setFoyerItem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine::c1_setFoyerItem(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setFoyerItem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); assert(stackPos(0) < ARRAYSIZE(_foyerItemTable)); _foyerItemTable[stackPos(0)] = stackPos(1); return stackPos(1); } -int KyraEngine::cmd_setNoItemDropRegion(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setNoItemDropRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); +int KyraEngine::c1_setNoItemDropRegion(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setNoItemDropRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); addToNoDropRects(stackPos(0), stackPos(1), stackPos(2), stackPos(3)); return 0; } -int KyraEngine::cmd_walkMalcolmOn(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_walkMalcolmOn(%p) ()", (const void *)script); +int KyraEngine::c1_walkMalcolmOn(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_walkMalcolmOn(%p) ()", (const void *)script); if (!_malcolmFlag) _malcolmFlag = 1; return 0; } -int KyraEngine::cmd_passiveProtection(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_passiveProtection(%p) ()", (const void *)script); +int KyraEngine::c1_passiveProtection(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_passiveProtection(%p) ()", (const void *)script); return 1; } -int KyraEngine::cmd_setPlayingLoop(ScriptState *script) { - warning("STUB: cmd_setPlayingLoop"); +int KyraEngine::c1_setPlayingLoop(ScriptState *script) { + warning("STUB: c1_setPlayingLoop"); return 0; } -int KyraEngine::cmd_brandonToStoneSequence(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_brandonToStoneSequence(%p) ()", (const void *)script); +int KyraEngine::c1_brandonToStoneSequence(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_brandonToStoneSequence(%p) ()", (const void *)script); seq_brandonToStone(); return 0; } -int KyraEngine::cmd_brandonHealingSequence(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_brandonHealingSequence(%p) ()", (const void *)script); +int KyraEngine::c1_brandonHealingSequence(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_brandonHealingSequence(%p) ()", (const void *)script); seq_brandonHealing(); return 0; } -int KyraEngine::cmd_protectCommandLine(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_protectCommandLine(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_protectCommandLine(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_protectCommandLine(%p) (%d)", (const void *)script, stackPos(0)); return stackPos(0); } -int KyraEngine::cmd_pauseMusicSeconds(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_pauseMusicSeconds(%p) ()", (const void *)script); +int KyraEngine::c1_pauseMusicSeconds(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_pauseMusicSeconds(%p) ()", (const void *)script); // if music disabled // return - cmd_pauseSeconds(script); + c1_pauseSeconds(script); return 0; } -int KyraEngine::cmd_resetMaskRegion(ScriptState *script) { - warning("STUB: cmd_resetMaskRegion"); +int KyraEngine::c1_resetMaskRegion(ScriptState *script) { + warning("STUB: c1_resetMaskRegion"); return 0; } -int KyraEngine::cmd_setPaletteChangeFlag(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_setPaletteChangeFlag(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_setPaletteChangeFlag(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_setPaletteChangeFlag(%p) (%d)", (const void *)script, stackPos(0)); _paletteChanged = stackPos(0); return _paletteChanged; } -int KyraEngine::cmd_fillRect(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_fillRect(%p) (%d, %d, %d, %d, %d, 0x%X)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); +int KyraEngine::c1_fillRect(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_fillRect(%p) (%d, %d, %d, %d, %d, 0x%X)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); int videoPageBackup = _screen->_curPage; _screen->_curPage = stackPos(0); _screen->fillRect(stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); @@ -1760,20 +1760,20 @@ int KyraEngine::cmd_fillRect(ScriptState *script) { return 0; } -int KyraEngine::cmd_vocUnload(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_vocUnload(%p) ()", (const void *)script); +int KyraEngine::c1_vocUnload(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_vocUnload(%p) ()", (const void *)script); // this should unload all voc files (not needed) return 0; } -int KyraEngine::cmd_vocLoad(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_vocLoad(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine::c1_vocLoad(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_vocLoad(%p) (%d)", (const void *)script, stackPos(0)); // this should load the specified voc file (not needed) return 0; } -int KyraEngine::cmd_dummy(ScriptState *script) { - debugC(3, kDebugLevelScriptFuncs, "cmd_dummy(%p) ()", (const void *)script); +int KyraEngine::c1_dummy(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "c1_dummy(%p) ()", (const void *)script); return 0; } |