PARALLACTION: Add a workaround for the end credits of NS

The end credits reference a version of Dino called "Dinor", which makes the
engine look for a non-existing file. We set the name to "dino", as it should be
in this case, so that the engine loads the correct file. Part of the fixes for
bug #5866
This commit is contained in:
Filippos Karapetis 2012-09-28 01:47:38 +03:00
parent a1969ae268
commit 17b42b5570

View File

@ -262,8 +262,15 @@ Common::SeekableReadStream *DosDisk_ns::tryOpenFile(const char* name) {
Script* Disk_ns::loadLocation(const char *name) {
char path[PATH_LEN];
const char *charName = _vm->_char.getBaseName();
sprintf(path, "%s%s/%s.loc", _vm->_char.getBaseName(), _language.c_str(), name);
// WORKAROUND: Special case for the Multilingual DOS version: during the ending
// sequence, it tries to load a non-existing file using "Dinor" as a character
// name. In this case, the character name should be just "dino".
if (!strcmp(charName, "Dinor"))
charName = "dino";
sprintf(path, "%s%s/%s.loc", charName, _language.c_str(), name);
debugC(3, kDebugDisk, "Disk_ns::loadLocation(%s): trying '%s'", name, path);
Common::SeekableReadStream *stream = tryOpenFile(path);