diff options
author | Johannes Schickel | 2005-12-22 19:31:38 +0000 |
---|---|---|
committer | Johannes Schickel | 2005-12-22 19:31:38 +0000 |
commit | 22033482b0d47c5ed03de8e0226af4e65c85393d (patch) | |
tree | c5dba8507dd182d6baacff38384e8ba864648c76 /kyra | |
parent | c36104ac0ca2f350decd4622a70690f651ce7446 (diff) | |
download | scummvm-rg350-22033482b0d47c5ed03de8e0226af4e65c85393d.tar.gz scummvm-rg350-22033482b0d47c5ed03de8e0226af4e65c85393d.tar.bz2 scummvm-rg350-22033482b0d47c5ed03de8e0226af4e65c85393d.zip |
Small bugfixes with enterNewScene and cmd_pauseSeconds.
Implemented opcode: cmd_setSceneFile
svn-id: r19829
Diffstat (limited to 'kyra')
-rw-r--r-- | kyra/kyra.cpp | 14 | ||||
-rw-r--r-- | kyra/kyra.h | 1 | ||||
-rw-r--r-- | kyra/script_v1.cpp | 5 |
3 files changed, 14 insertions, 6 deletions
diff --git a/kyra/kyra.cpp b/kyra/kyra.cpp index 2de295f445..7abcf00f42 100644 --- a/kyra/kyra.cpp +++ b/kyra/kyra.cpp @@ -1341,7 +1341,7 @@ void KyraEngine::enterNewScene(int sceneId, int facing, int unk1, int unk2, int } void KyraEngine::transcendScenes(int roomIndex, int roomName) { - debug(9, "transcendScenes(%d, %d, %d, %d)", roomIndex, roomName); + debug(9, "transcendScenes(%d, %d)", roomIndex, roomName); assert(roomIndex < _roomTableSize); if (_features & GF_TALKIE) { char file[32]; @@ -1364,6 +1364,12 @@ void KyraEngine::transcendScenes(int roomIndex, int roomName) { _unkScreenVar3 = 0; } +void KyraEngine::setSceneFile(int roomIndex, int roomName) { + debug(9, "setSceneFile(%d, %d)", roomIndex, roomName); + assert(roomIndex < _roomTableSize); + _roomTable[roomIndex].nameIndex = roomName; +} + void KyraEngine::moveCharacterToPos(int character, int facing, int xpos, int ypos) { debug(9, "moveCharacterToPos(%d, %d, %d, %d)", character, facing, xpos, ypos); Character *ch = &_characterList[character]; @@ -1690,8 +1696,8 @@ void KyraEngine::initSceneData(int facing, int unk1, int brandonAlive) { break; } - if ((uint8)(_northExitHeight & 0xFF) >= ypos) { - ypos = (_northExitHeight & 0xFF); + if ((uint8)(_northExitHeight & 0xFF) + 2 >= ypos) { + ypos = (_northExitHeight & 0xFF) + 4; } if (xpos >= 308) { xpos = 304; @@ -1743,7 +1749,7 @@ void KyraEngine::initSceneData(int facing, int unk1, int brandonAlive) { _currentCharacter->x2 = xpos; _currentCharacter->y1 = ypos; _currentCharacter->y2 = ypos; - facing = 4; + facing = 2; xpos2 = 192; ypos2 = 128; setFacing = 0; diff --git a/kyra/kyra.h b/kyra/kyra.h index 464e5c7c42..07c12793b3 100644 --- a/kyra/kyra.h +++ b/kyra/kyra.h @@ -428,6 +428,7 @@ protected: void enterNewScene(int sceneId, int facing, int unk1, int unk2, int brandonAlive); void transcendScenes(int roomIndex, int roomName); + void setSceneFile(int roomIndex, int roomName); void moveCharacterToPos(int character, int facing, int xpos, int ypos); void setCharacterPositionWithUpdate(int character); int setCharacterPosition(int character, int *facingTable); diff --git a/kyra/script_v1.cpp b/kyra/script_v1.cpp index 7dbc143b08..57db9d2b96 100644 --- a/kyra/script_v1.cpp +++ b/kyra/script_v1.cpp @@ -577,7 +577,7 @@ int KyraEngine::cmd_setBrandonStatusBit(ScriptState *script) { int KyraEngine::cmd_pauseSeconds(ScriptState *script) { debug(3, "cmd_pauseSeconds(0x%X) (%d)", script, stackPos(0)); if (stackPos(0) > 0) - delay(stackPos(0)*1000, false); + delay(stackPos(0)*1000, true); return 0; } @@ -1393,7 +1393,8 @@ int KyraEngine::cmd_pageFlip(ScriptState *script) { } int KyraEngine::cmd_setSceneFile(ScriptState *script) { - warning("STUB: cmd_setSceneFile"); + debug(3, "cmd_setSceneFile(0x%X) (%d, %d)", script, stackPos(0), stackPos(1)); + setSceneFile(stackPos(0), stackPos(1)); return 0; } |