diff options
author | Sylvain Dupont | 2010-10-11 23:12:59 +0000 |
---|---|---|
committer | Sylvain Dupont | 2010-10-11 23:12:59 +0000 |
commit | 21cb3a62b678de56138de1b5527d202e10dd9916 (patch) | |
tree | 4b9c8586ce57ab6f7bdc468680a3f3c601ea8790 /engines/toon/toon.cpp | |
parent | b7d8cd1eb57dc46a40a8ed0381b1485c7d8e3421 (diff) | |
download | scummvm-rg350-21cb3a62b678de56138de1b5527d202e10dd9916.tar.gz scummvm-rg350-21cb3a62b678de56138de1b5527d202e10dd9916.tar.bz2 scummvm-rg350-21cb3a62b678de56138de1b5527d202e10dd9916.zip |
TOON: Reverted script throttle for now and fixed anim timing issue
svn-id: r53155
Diffstat (limited to 'engines/toon/toon.cpp')
-rw-r--r-- | engines/toon/toon.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index e9616e9f9a..02e76b8960 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -729,17 +729,20 @@ void ToonEngine::setPaletteEntries(uint8 *palette, int32 offset, int32 num) { } void ToonEngine::simpleUpdate() { - updateCharacters(_tickLength); - updateAnimationSceneScripts(_tickLength); - updateTimer(getTickLength()); + int32 elapsedTime = _system->getMillis() - _oldTimer2; + _oldTimer2 = _system->getMillis(); + _oldTimer = _oldTimer2; + + updateCharacters(elapsedTime); + updateAnimationSceneScripts(elapsedTime); + updateTimer(elapsedTime); + _animationManager->update(elapsedTime); render(); if (!_audioManager->voiceStillPlaying()) { _currentTextLine = 0; _currentTextLineId = -1; } - _oldTimer2 = _system->getMillis(); - _oldTimer = _oldTimer2; } void ToonEngine::fixPaletteEntries(uint8 *palette, int num) { @@ -775,7 +778,7 @@ void ToonEngine::updateAnimationSceneScripts(int32 timeElapsed) { if (!_script->run(&_sceneAnimationScripts[_lastProcessedSceneScript]._state)) _animationSceneScriptRunFlag = false; - waitForScriptStep(); + //waitForScriptStep(); if (_sceneAnimationScripts[_lastProcessedSceneScript]._frozen) break; @@ -3065,7 +3068,7 @@ const char *ToonEngine::getSpecialConversationMusic(int32 conversationId) { 0, 0 }; - return specialMusic[randRange(0, 1) + conversationId * 2]; + return specialMusic[randRange(0, 1) + conversationId * 2]; } void ToonEngine::viewInventoryItem(Common::String str, int32 lineId, int32 itemDest) { |