BLADERUNNER: Try and close all TLK on shutdown always

This commit is contained in:
Thanasis Antoniou 2019-06-20 10:11:44 +03:00
parent e6c61ff67b
commit edd63137ab

View file

@ -71,14 +71,13 @@ void Chapters::closeResources() {
}
#endif // BLADERUNNER_ORIGINAL_BUGS
_vm->closeArchive(Common::String::format("VQA%d.MIX", MIN(id, 3)));
if (_vm->_cutContent) {
for (int chi = 1; chi < 4; ++chi) {
if (_vm->isArchiveOpen(Common::String::format("%d.TLK", chi))) {
_vm->closeArchive(Common::String::format("%d.TLK", chi));
}
// It's better to try and close every TLK file here (if open), since
// when switching from Restored Content version to Original (due to a save game load)
// TLK files would still remain open -- and should still be closed here
for (int chi = 1; chi < 4; ++chi) {
if (_vm->isArchiveOpen(Common::String::format("%d.TLK", chi))) {
_vm->closeArchive(Common::String::format("%d.TLK", chi));
}
} else {
_vm->closeArchive(Common::String::format("%d.TLK", MIN(id, 3)));
}
_vm->closeArchive(Common::String::format("OUTTAKE%d.MIX", id));
_hasOpenResources = false;