From 6ed62584ed39c5cffea17893ed4eab3e23f1a786 Mon Sep 17 00:00:00 2001 From: Vladimir Menshakov Date: Sat, 5 Sep 2009 17:14:20 +0000 Subject: added actor_animation for the dialog svn-id: r43963 --- engines/teenagent/dialog.cpp | 14 ++++++++++---- engines/teenagent/dialog.h | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'engines') diff --git a/engines/teenagent/dialog.cpp b/engines/teenagent/dialog.cpp index 4d500d44e5..5649ffdc1a 100644 --- a/engines/teenagent/dialog.cpp +++ b/engines/teenagent/dialog.cpp @@ -28,7 +28,7 @@ namespace TeenAgent { -void Dialog::show(Scene * scene, uint16 addr, uint16 animation) { +void Dialog::show(Scene * scene, uint16 addr, uint16 animation, uint16 actor_animation) { debug(0, "Dialog::show(%04x, %u)", addr, animation); Resources * res = Resources::instance(); int n = 0; @@ -58,7 +58,13 @@ void Dialog::show(Scene * scene, uint16 addr, uint16 animation) { if (animation != 0) { SceneEvent e(SceneEvent::PlayAnimation); e.animation = animation; - e.color = 0x83; //3rd slot, async animation + e.color = 0x83; //4th slot, async animation + scene->push(e); + } + if (actor_animation != 0) { + SceneEvent e(SceneEvent::PlayAnimation); + e.animation = actor_animation; + e.color = 0x80; //1st slot, async animation scene->push(e); } SceneEvent e(SceneEvent::Message); @@ -90,7 +96,7 @@ void Dialog::show(Scene * scene, uint16 addr, uint16 animation) { } } -uint16 Dialog::pop(Scene *scene, uint16 addr, uint16 animation) { +uint16 Dialog::pop(Scene *scene, uint16 addr, uint16 animation, uint16 actor_animation) { debug(0, "Dialog::pop(%04x, %u)", addr, animation); Resources * res = Resources::instance(); uint16 next; @@ -101,7 +107,7 @@ uint16 Dialog::pop(Scene *scene, uint16 addr, uint16 animation) { uint16 next2 = res->dseg.get_word(addr); if (next2 != 0xffff) res->dseg.set_word(addr - 2, 0); - show(scene, next, animation); + show(scene, next, animation, actor_animation); return next; } diff --git a/engines/teenagent/dialog.h b/engines/teenagent/dialog.h index 84e8edbb7a..30f78676bf 100644 --- a/engines/teenagent/dialog.h +++ b/engines/teenagent/dialog.h @@ -33,8 +33,8 @@ namespace TeenAgent { class Scene; class Dialog { public: - static uint16 pop(Scene *scene, uint16 addr, uint16 animation = 0); - static void show(Scene *scene, uint16 addr, uint16 animation = 0); + static uint16 pop(Scene *scene, uint16 addr, uint16 animation = 0, uint16 actor_animation = 0); + static void show(Scene *scene, uint16 addr, uint16 animation = 0, uint16 actor_animation = 0); }; } // End of namespace TeenAgent -- cgit v1.2.3