aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/director/frame.cpp2
-rw-r--r--engines/director/score.cpp7
2 files changed, 1 insertions, 8 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index e2f3b4cddf..ba53d6d1ee 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -741,7 +741,7 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
if (textStream == NULL)
return;
- TextCast *textCast = _sprites[spriteId]->_textCast;
+ TextCast *textCast = _sprites[spriteId]->_buttonCast != nullptr ? (TextCast*)_sprites[spriteId]->_buttonCast : _sprites[spriteId]->_textCast;
uint32 unk1 = textStream->readUint32();
uint32 strLen = textStream->readUint32();
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index e8210b59e0..e31b97abf9 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -438,13 +438,6 @@ void Score::setSpriteCasts() {
}
} else if (_loadedButtons->contains(castId)) {
_frames[i]->_sprites[j]->_buttonCast = _loadedButtons->getVal(castId);
- if (_frames[i]->_sprites[j]->_buttonCast->children.size() == 1) {
- Resource child = _frames[i]->_sprites[j]->_buttonCast->children[0];
- _loadedText->setVal(child.index, new TextCast(*_movieArchive->getResource(child.tag, child.index), _vm->getVersion()));
- _frames[i]->_sprites[j]->_textCast = _loadedText->getVal(child.index);
- } else if (_frames[i]->_sprites[j]->_buttonCast->children.size() > 0) {
- warning("Cast %d has too many children!", j);
- }
}
//if (_loadedScripts->contains(castId))