aboutsummaryrefslogtreecommitdiff
path: root/engines/teenagent
diff options
context:
space:
mode:
authorVladimir Menshakov2009-09-05 17:14:20 +0000
committerVladimir Menshakov2009-09-05 17:14:20 +0000
commit6ed62584ed39c5cffea17893ed4eab3e23f1a786 (patch)
tree992609a9e6b64d42863ad739fc3bd10b960252a6 /engines/teenagent
parent295f432b87f12d54d8a2a8ab3791b808f4bcc0c1 (diff)
downloadscummvm-rg350-6ed62584ed39c5cffea17893ed4eab3e23f1a786.tar.gz
scummvm-rg350-6ed62584ed39c5cffea17893ed4eab3e23f1a786.tar.bz2
scummvm-rg350-6ed62584ed39c5cffea17893ed4eab3e23f1a786.zip
added actor_animation for the dialog
svn-id: r43963
Diffstat (limited to 'engines/teenagent')
-rw-r--r--engines/teenagent/dialog.cpp14
-rw-r--r--engines/teenagent/dialog.h4
2 files changed, 12 insertions, 6 deletions
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