aboutsummaryrefslogtreecommitdiff
path: root/engines/teenagent
diff options
context:
space:
mode:
Diffstat (limited to 'engines/teenagent')
-rw-r--r--engines/teenagent/callbacks.cpp5
-rw-r--r--engines/teenagent/dialog.cpp10
-rw-r--r--engines/teenagent/scene.cpp3
3 files changed, 10 insertions, 8 deletions
diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp
index d21e5b4eee..87d75da3cc 100644
--- a/engines/teenagent/callbacks.cpp
+++ b/engines/teenagent/callbacks.cpp
@@ -618,10 +618,9 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
if (CHECK_FLAG(0xdbda, 1)) { //papers are shown
loadScene(5, 124, 199);
} else {
- playAnimation(809, 1, true);
- Dialog::show(scene, 0x5FE9);
+ Dialog::show(scene, 0x5FE9, 0, 809, 0xd1, 0xd0, 0, 1);
moveTo(269, 175, 4);
- Dialog::pop(scene, 0xDB56);
+ Dialog::pop(scene, 0xDB56, 0, 809, 0xd1, 0xd0, 0, 1);
}
return true;
diff --git a/engines/teenagent/dialog.cpp b/engines/teenagent/dialog.cpp
index a968d0e298..8adbde4ba9 100644
--- a/engines/teenagent/dialog.cpp
+++ b/engines/teenagent/dialog.cpp
@@ -61,13 +61,12 @@ void Dialog::show(Scene *scene, uint16 addr, uint16 animation1, uint16 animation
switch (n) {
case 1:
//debug(0, "new line\n");
- message += '\n';
+ if (!message.empty())
+ message += '\n';
break;
case 2:
- //debug(0, "displaymessage\n");
-
+ //debug(0, "displaymessage %s", message.c_str());
if (color == color2) {
-
//pause animation in other slot
if (animation1 != 0) {
SceneEvent e(SceneEvent::kPauseAnimation);
@@ -96,6 +95,9 @@ void Dialog::show(Scene *scene, uint16 addr, uint16 animation1, uint16 animation
}
{
+ message.trim();
+ if (message.empty())
+ break;
SceneEvent e(SceneEvent::kMessage);
e.message = message;
e.color = color;
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index d5ba251f47..1b92176929 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -655,7 +655,8 @@ Common::Point Scene::messagePosition(const Common::String &str, Common::Point po
}
void Scene::displayMessage(const Common::String &str, byte color) {
- debug(0, "displayMessage: %s", str.c_str());
+ //assert(!str.empty());
+ //debug(0, "displayMessage: %s", str.c_str());
message = str;
message_pos = messagePosition(str, position);
message_color = color;