aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/game.cpp
diff options
context:
space:
mode:
authorRobert Špalek2009-10-12 01:16:13 +0000
committerRobert Špalek2009-10-12 01:16:13 +0000
commit1a4dcd3c82d6db389a25ad92235843b1841fbf23 (patch)
tree36b8f43f6bdfe5f9082a21547ced828f15162266 /engines/draci/game.cpp
parentca35af26976c0499b83ff3b434ae3d7b9eaef33f (diff)
downloadscummvm-rg350-1a4dcd3c82d6db389a25ad92235843b1841fbf23.tar.gz
scummvm-rg350-1a4dcd3c82d6db389a25ad92235843b1841fbf23.tar.bz2
scummvm-rg350-1a4dcd3c82d6db389a25ad92235843b1841fbf23.zip
Implemented GPL commands JustTalk and JustStay.
The basic commands are done. It remains to implement handling music (after we play it at all), fading palette, and controlling the quick-hero and speed-text flags (after I find out what they do). Now the dragon switches between talking and staying during dialogs. However, the left/right direction doesn't work yet, because we don't respect _lookDir and _useDir yet. svn-id: r44964
Diffstat (limited to 'engines/draci/game.cpp')
-rw-r--r--engines/draci/game.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index c335773de3..13246585be 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -1270,6 +1270,17 @@ void Game::deleteObjectAnimations() {
}
}
+int Game::playingObjectAnimation(const GameObject *obj) const {
+ for (uint i = 0; i < obj->_anim.size(); ++i) {
+ const int animID = obj->_anim[i];
+ const Animation *anim = _vm->_anims->getAnimation(animID);
+ if (anim && anim->isPlaying()) {
+ return i;
+ }
+ }
+ return -1;
+}
+
void Game::enterNewRoom(bool force_reload) {
if (_newRoom == getRoomNum() && !force_reload) {
return;