diff options
-rw-r--r-- | engines/director/cast.cpp | 10 | ||||
-rw-r--r-- | engines/director/cast.h | 3 | ||||
-rw-r--r-- | engines/director/score.cpp | 12 |
3 files changed, 14 insertions, 11 deletions
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp index d71ae32521..0dd6e53248 100644 --- a/engines/director/cast.cpp +++ b/engines/director/cast.cpp @@ -179,6 +179,16 @@ TextCast::TextCast(Common::ReadStreamEndian &stream, uint16 version) { modified = 0; } +void TextCast::importStxt(const Stxt *stxt) { + fontId = stxt->_fontId; + textSlant = stxt->_textSlant; + fontSize = stxt->_fontSize; + palinfo1 = stxt->_palinfo1; + palinfo2 = stxt->_palinfo2; + palinfo3 = stxt->_palinfo3; + _ftext = stxt->_ftext; +} + 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 b2ba7fc7df..a542bf7b87 100644 --- a/engines/director/cast.h +++ b/engines/director/cast.h @@ -30,6 +30,8 @@ namespace Director { +class Stxt; + enum CastType { kCastTypeNull = 0, kCastBitmap = 1, @@ -138,6 +140,7 @@ public: uint16 palinfo1, palinfo2, palinfo3; Common::String _ftext; + void importStxt(const Stxt *stxt); }; enum ButtonType { diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 7decd6b3f2..2d78a7089a 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -202,16 +202,6 @@ void Score::loadArchive() { } } -void copyStxt(TextCast *textCast, const Stxt *stxt) { - textCast->fontId = stxt->_fontId; - textCast->textSlant = stxt->_textSlant; - textCast->fontSize = stxt->_fontSize; - textCast->palinfo1 = stxt->_palinfo1; - textCast->palinfo2 = stxt->_palinfo2; - textCast->palinfo3 = stxt->_palinfo3; - textCast->_ftext = stxt->_ftext; -} - void Score::copyCastStxts() { Common::HashMap<int, TextCast *>::iterator tc; for (tc = _loadedText->begin(); tc != _loadedText->end(); ++tc) { @@ -220,7 +210,7 @@ void Score::copyCastStxts() { tc->_value->children[0].index; if (_loadedStxts->getVal(stxtid)){ const Stxt *stxt = _loadedStxts->getVal(stxtid); - copyStxt(tc->_value, stxt); + tc->_value->importStxt(stxt); } } } |