DIRECTOR: Properly reastart movies

This commit is contained in:
Eugene Sandulenko 2020-01-09 18:07:23 +01:00
parent 625f3c1c28
commit 0869e02c1b

View File

@ -256,14 +256,21 @@ void DirectorEngine::clearSharedCast() {
delete _sharedScore;
_sharedScore = nullptr;
delete _sharedDIB;
delete _sharedSTXT;
delete _sharedSound;
delete _sharedBMP;
_sharedDIB = nullptr;
_sharedSTXT = nullptr;
_sharedSound = nullptr;
_sharedBMP = nullptr;
}
void DirectorEngine::loadSharedCastsFrom(Common::String filename) {
if (_sharedScore) {
if (_sharedScore && _sharedScore->_movieArchive) {
if (_sharedScore->_movieArchive->getFileName().equalsIgnoreCase(filename))
return;
}
@ -284,6 +291,8 @@ void DirectorEngine::loadSharedCastsFrom(Common::String filename) {
if (!shardcst->openFile(filename)) {
warning("No shared cast %s", filename.c_str());
delete shardcst;
_sharedScore = new Score(this);
return;