diff options
author | Johannes Schickel | 2005-12-13 13:27:58 +0000 |
---|---|---|
committer | Johannes Schickel | 2005-12-13 13:27:58 +0000 |
commit | 55178803000823e5090aa0316abd92855eafc0f1 (patch) | |
tree | b5da9594904808e647e2707e9ff62676ff4a7e02 /kyra/script_v1.cpp | |
parent | 3e3df54a9c6ad237014c10b896ce81913df9314f (diff) | |
download | scummvm-rg350-55178803000823e5090aa0316abd92855eafc0f1.tar.gz scummvm-rg350-55178803000823e5090aa0316abd92855eafc0f1.tar.bz2 scummvm-rg350-55178803000823e5090aa0316abd92855eafc0f1.zip |
Fixed a bug with transcendScenes in CD version there the old file
is still loaded then.
Also implemented:
cmd_changeCharactersXAndY
cmd_setCharactersLocation
cmd_setCharactersCurrentFrame
svn-id: r19790
Diffstat (limited to 'kyra/script_v1.cpp')
-rw-r--r-- | kyra/script_v1.cpp | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/kyra/script_v1.cpp b/kyra/script_v1.cpp index 211006eb49..0bae4f959e 100644 --- a/kyra/script_v1.cpp +++ b/kyra/script_v1.cpp @@ -948,7 +948,18 @@ int KyraEngine::cmd_internalAnimOff(ScriptState *script) { } int KyraEngine::cmd_changeCharactersXAndY(ScriptState *script) { - warning("STUB: cmd_changeCharactersXAndY"); + debug(3, "cmd_changeCharactersXAndY(0x%X) (%d, %d, %d)", script, stackPos(0), stackPos(1), stackPos(2)); + Character *ch = &_characterList[stackPos(0)]; + int16 x = stackPos(1); + int16 y = stackPos(2); + if (x != -1 && y != -1) { + x &= 0xFFFC; + y &= 0xFFFE; + } + restoreAllObjectBackgrounds(); + ch->x1 = ch->x2 = x; + ch->y1 = ch->y2 = y; + preserveAllBackgrounds(); return 0; } @@ -1060,7 +1071,19 @@ int KyraEngine::cmd_unhideMobileCharacter(ScriptState *script) { } int KyraEngine::cmd_setCharactersLocation(ScriptState *script) { - warning("STUB: cmd_setCharactersLocation"); + debug(3, "cmd_setCharactersLocation(0x%X) (%d, %d)", script, stackPos(0), stackPos(1)); + Character *ch = &_characterList[stackPos(0)]; + AnimObject *animObj = &_charactersAnimState[stackPos(0)]; + int newScene = stackPos(1); + if (_currentCharacter->sceneId == ch->sceneId) { + if (_currentCharacter->sceneId != newScene) + animObj->active = 0; + } else if (_currentCharacter->sceneId == newScene) { + if (_currentCharacter->sceneId != ch->sceneId) + animObj->active = 1; + } + + ch->sceneId = stackPos(1); return 0; } @@ -1274,7 +1297,8 @@ int KyraEngine::cmd_drawItemShapeIntoScene(ScriptState *script) { } int KyraEngine::cmd_setCharactersCurrentFrame(ScriptState *script) { - warning("STUB: cmd_setCharactersCurrentFrame"); + debug(3, "cmd_setCharactersCurrentFrame(0x%X) (%d, %d)", script, stackPos(0), stackPos(1)); + _characterList[stackPos(0)].currentAnimFrame = stackPos(1); return 0; } |