DIRECTOR: Add loading shared casts for Director version > 3

This commit is contained in:
Dmitry Iskrich 2016-06-29 15:38:36 +03:00 committed by Eugene Sandulenko
parent 7164b1531c
commit aaf8448cbc

View File

@ -381,17 +381,22 @@ void DirectorEngine::setPalette(byte *palette, uint16 count) {
}
void DirectorEngine::loadSharedCastsFrom(Common::String filename) {
Archive *shardcst;
if (getVersion() < 4) {
shardcst = new RIFFArchive();
} else {
shardcst = new RIFXArchive();
}
//TODO d4 arch
RIFFArchive *shardcst = new RIFFArchive();
shardcst->openFile(filename);
Score *castScore = new Score(this);
Common::SeekableSubReadStreamEndian *castStream = shardcst->getResource(MKTAG('V','W','C','R'), 1024);
castScore->loadCastData(*castStream);
_sharedCasts = castScore->_casts;
Common::Array<uint16> dib = shardcst->getResourceIDList(MKTAG('D','I','B',' '));
if (dib.size() != 0) {