aboutsummaryrefslogtreecommitdiff
path: root/scumm/string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/string.cpp')
-rw-r--r--scumm/string.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 782f60796d..a5a377574f 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -34,6 +34,24 @@
namespace Scumm {
+void ScummEngine::printString(int m, const byte *msg) {
+ switch (m) {
+ case 0:
+ actorTalk(msg);
+ break;
+ case 1:
+ drawString(1, msg);
+ break;
+ case 2:
+ unkMessage1(msg);
+ break;
+ case 3:
+ unkMessage2(msg);
+ break;
+ }
+}
+
+
void ScummEngine::unkMessage1(const byte *msg) {
byte buffer[100];
addMessageToStack(msg, buffer, sizeof(buffer));
@@ -660,8 +678,8 @@ void ScummEngine::initCharset(int charsetno) {
void ScummEngine::enqueueText(const byte *text, int x, int y, byte color, byte charset, bool center) {
BlastText &bt = _blastTextQueue[_blastTextQueuePos++];
assert(_blastTextQueuePos <= ARRAYSIZE(_blastTextQueue));
-
- strcpy((char *)bt.text, (const char *)text);
+
+ addMessageToStack(text, bt.text, sizeof(bt.text));
bt.xpos = x;
bt.ypos = y;
bt.color = color;