diff options
author | Oystein Eftevaag | 2007-10-13 18:47:52 +0000 |
---|---|---|
committer | Oystein Eftevaag | 2007-10-13 18:47:52 +0000 |
commit | 4f93e96d5ff321ad051f0cee9c6083fe85ad1686 (patch) | |
tree | babb7327da4e35b703453a14a87c32f077815e8c /engines/kyra/kyra_v2.cpp | |
parent | 3f7b4e62ccb9ee97d75aecc773ff7a125903c4bd (diff) | |
download | scummvm-rg350-4f93e96d5ff321ad051f0cee9c6083fe85ad1686.tar.gz scummvm-rg350-4f93e96d5ff321ad051f0cee9c6083fe85ad1686.tar.bz2 scummvm-rg350-4f93e96d5ff321ad051f0cee9c6083fe85ad1686.zip |
Implemented the o2_setCharacterAnimFrame opcode and made sure o2_delay does game updates during the delay
svn-id: r29208
Diffstat (limited to 'engines/kyra/kyra_v2.cpp')
-rw-r--r-- | engines/kyra/kyra_v2.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index ebde29f4d1..fa1394ba9c 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -671,6 +671,24 @@ void KyraEngine_v2::removeInputTop() { _eventList.erase(_eventList.begin()); } +void KyraEngine_v2::delay(uint32 amount, bool updateGame, bool isMainLoop) { + + uint32 start = _system->getMillis(); + do { + if (updateGame) { + if (_chatText) + updateWithText(); + else + update(); + } + + + if (amount > 0 ) + _system->delayMillis(amount > 10 ? 10 : amount); + + } while (!_skipFlag && _system->getMillis() < start + amount && !_quitFlag); +} + void KyraEngine_v2::cleanup() { delete [] _gamePlayBuffer; delete [] _unkBuf500Bytes; @@ -1460,7 +1478,7 @@ void KyraEngine_v2::setupOpcodeTable() { Opcode(o2_setSceneComment), OpcodeUnImpl(), OpcodeUnImpl(), - OpcodeUnImpl(), + Opcode(o2_setCharacterAnimFrame), // 0x0c OpcodeUnImpl(), Opcode(o2_trySceneChange), |