aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/cachedmactext.cpp1
-rw-r--r--engines/director/cast.cpp8
-rw-r--r--engines/director/cast.h2
-rw-r--r--engines/director/lingo/lingo-code.cpp4
4 files changed, 13 insertions, 2 deletions
diff --git a/engines/director/cachedmactext.cpp b/engines/director/cachedmactext.cpp
index d9a0740f78..e152974911 100644
--- a/engines/director/cachedmactext.cpp
+++ b/engines/director/cachedmactext.cpp
@@ -34,6 +34,7 @@ void CachedMacText::makeMacText() {
assert(_wm != NULL);
delete _macText;
+ _macText = nullptr;
if ((int)_textCast->_textAlign == -1)
_align = (Graphics::TextAlign)3;
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index d864b50bfc..f01b4a17d9 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -217,7 +217,7 @@ void TextCast::importStxt(const Stxt *stxt) {
_ftext = stxt->_ftext;
}
-void TextCast::importRTE(byte* text) {
+void TextCast::importRTE(byte *text) {
//assert(rteList.size() == 3);
//child0 is probably font data.
//child1 is the raw text.
@@ -225,6 +225,12 @@ void TextCast::importRTE(byte* text) {
//child2 is positional?
}
+void TextCast::setText(const char *text) {
+ _ftext = text;
+
+ _cachedMacText->forceDirty();
+}
+
ShapeCast::ShapeCast(Common::ReadStreamEndian &stream, uint16 version) {
if (version < 4) {
/*byte flags = */ stream.readByte();
diff --git a/engines/director/cast.h b/engines/director/cast.h
index 213cfbd1c9..7b3ed2701f 100644
--- a/engines/director/cast.h
+++ b/engines/director/cast.h
@@ -128,6 +128,8 @@ class TextCast : public Cast {
public:
TextCast(Common::ReadStreamEndian &stream, uint16 version = 2);
+ void setText(const char *text);
+
SizeType _borderSize;
SizeType _gutterSize;
SizeType _boxShadow;
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index b2607edd55..ca9073e8d6 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -341,7 +341,9 @@ void Lingo::c_assign() {
}
}
- warning("STUB: c_assing REFERENCE");
+ d2.toString();
+
+ g_director->getCurrentScore()->_loadedText->getVal(d1.u.i)->setText(d2.u.s->c_str());
return;
}