diff options
author | Dmitry Iskrich | 2016-06-28 16:58:26 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 9319eee100b6c813c2bbe50da79f741e06649018 (patch) | |
tree | 2cf3d9673cb89cec0b6bf496f6303a5da75b1eb5 /engines/director | |
parent | 16cca8054a9ebdb2f3e210b347e0f3d8d42e38d1 (diff) | |
download | scummvm-rg350-9319eee100b6c813c2bbe50da79f741e06649018.tar.gz scummvm-rg350-9319eee100b6c813c2bbe50da79f741e06649018.tar.bz2 scummvm-rg350-9319eee100b6c813c2bbe50da79f741e06649018.zip |
DIRECTOR: Loading shared DIB, STXT
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/director.cpp | 22 | ||||
-rw-r--r-- | engines/director/director.h | 6 |
2 files changed, 24 insertions, 4 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp index edb36e7d95..3fbc0b643f 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -372,7 +372,7 @@ void DirectorEngine::setPalette(byte *palette, uint16 count) { _currentPaletteLength = count; } -Common::HashMap<int, Cast *> DirectorEngine::loadSharedCastsFrom(Common::String filename) { +void DirectorEngine::loadSharedCastsFrom(Common::String filename) { //TODO d4 arch RIFFArchive *shardcst = new RIFFArchive(); @@ -383,6 +383,24 @@ Common::HashMap<int, Cast *> DirectorEngine::loadSharedCastsFrom(Common::String Common::SeekableSubReadStreamEndian *castStream = shardcst->getResource(MKTAG('V','W','C','R'), 1024); castScore->loadCastData(*castStream); - return castScore->_casts; + _sharedCasts = castScore->_casts; + Common::Array<uint16> dib = shardcst->getResourceIDList(MKTAG('D','I','B',' ')); + + if (dib.size() != 0) { + Common::Array<uint16>::iterator iterator; + for (iterator = dib.begin(); iterator != dib.end(); ++iterator) { + _sharedDIB[*iterator] = shardcst->getResource(MKTAG('D','I','B',' '), *iterator); + } + } + + Common::Array<uint16> stxt = shardcst->getResourceIDList(MKTAG('D','I','B',' ')); + + if (stxt.size() != 0) { + Common::Array<uint16>::iterator iterator; + for (iterator = stxt.begin(); iterator != stxt.end(); ++iterator) { + _sharedSTXT[*iterator] = shardcst->getResource(MKTAG('S','T','X','T'), *iterator); + } + } } + } // End of namespace Director diff --git a/engines/director/director.h b/engines/director/director.h index c2559b10fb..566bb2ee9a 100644 --- a/engines/director/director.h +++ b/engines/director/director.h @@ -66,7 +66,7 @@ public: bool hasFeature(EngineFeature f) const; const byte *getPalette() const { return _currentPalette; } uint16 getPaletteColorCount() const { return _currentPaletteLength; } - Common::HashMap<int, Cast *> loadSharedCastsFrom(Common::String filename); + void loadSharedCastsFrom(Common::String filename); Common::HashMap<Common::String, Score *> *_movies; Score *_currentScore; @@ -88,7 +88,9 @@ private: void loadMac(); Common::String readPascalString(Common::SeekableReadStream &stream); - + Common::HashMap<int, Cast *> _sharedCasts; + Common::HashMap<int, Common::SeekableReadStream *> _sharedDIB; + Common::HashMap<int, Common::SeekableReadStream *> _sharedSTXT; Archive *_mainArchive; Common::MacResManager *_macBinary; DirectorSound *_soundManager; |