From 2f03bc77764edca085753ff99ea363de34bde1df Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 25 Jan 2016 00:35:38 +0100 Subject: LAB: Add a workaround to load the right file in rooms 121 & 122 (Dos and Windows) --- engines/lab/resource.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/lab/resource.cpp b/engines/lab/resource.cpp index ed0cb37c67..aae369fbae 100644 --- a/engines/lab/resource.cpp +++ b/engines/lab/resource.cpp @@ -143,7 +143,14 @@ void Resource::readViews(uint16 roomNum) { } Common::String Resource::translateFileName(const Common::String filename) { - Common::String upperFilename = filename; + Common::String upperFilename; + + // The DOS and Windows version aren't looking for the right file, + if (!filename.compareToIgnoreCase("P:ZigInt/BLK") && (_vm->getPlatform() != Common::kPlatformAmiga)) + upperFilename = "P:ZigInt/ZIGINT.BLK"; + else + upperFilename = filename; + upperFilename.toUppercase(); Common::String fileNameStrFinal; @@ -211,7 +218,7 @@ Common::String Resource::translateFileName(const Common::String filename) { Common::File *Resource::openDataFile(const Common::String filename, uint32 fileHeader) { Common::File *dataFile = new Common::File(); dataFile->open(translateFileName(filename)); - warning("%s", filename.c_str()); + if (!dataFile->isOpen()) { // The DOS version is known to have some missing files if (_vm->getPlatform() == Common::kPlatformDOS) { -- cgit v1.2.3