aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/kyra_v2.cpp
diff options
context:
space:
mode:
authorOystein Eftevaag2007-10-13 18:47:52 +0000
committerOystein Eftevaag2007-10-13 18:47:52 +0000
commit4f93e96d5ff321ad051f0cee9c6083fe85ad1686 (patch)
treebabb7327da4e35b703453a14a87c32f077815e8c /engines/kyra/kyra_v2.cpp
parent3f7b4e62ccb9ee97d75aecc773ff7a125903c4bd (diff)
downloadscummvm-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.cpp20
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),