diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp index 0f2f2dd4766..053d94a8de8 100644 --- a/engines/lab/lab.cpp +++ b/engines/lab/lab.cpp @@ -130,7 +130,7 @@ LabEngine::LabEngine(OSystem *syst, const ADGameDescription *gameDesc) _highPalette[i] = 0; _introPlaying = false; - const Common::FSNode gameDataDir(ConfMan.get("path")); + const Common::FSNode gameDataDir(ConfMan.getPath("path")); SearchMan.addSubDirectoryMatching(gameDataDir, "game", 0, 4); } diff --git a/engines/lab/resource.cpp b/engines/lab/resource.cpp index 2ba6206ce61..261e0ca8e35 100644 --- a/engines/lab/resource.cpp +++ b/engines/lab/resource.cpp @@ -143,7 +143,7 @@ void Resource::readViews(uint16 roomNum) { delete dataFile; } -Common::String Resource::translateFileName(const Common::String filename) { +Common::Path Resource::translateFileName(const Common::String &filename) { Common::String upperFilename; // The DOS and Windows version aren't looking for the right file, @@ -213,7 +213,7 @@ Common::String Resource::translateFileName(const Common::String filename) { fileNameStrFinal += upperFilename; - return fileNameStrFinal; + return Common::Path(fileNameStrFinal); } Common::File *Resource::openDataFile(const Common::String filename, uint32 fileHeader) { @@ -227,13 +227,13 @@ Common::File *Resource::openDataFile(const Common::String filename, uint32 fileH delete dataFile; return nullptr; } else - error("openDataFile: Couldn't open %s (%s)", translateFileName(filename).c_str(), filename.c_str()); + error("openDataFile: Couldn't open %s (%s)", translateFileName(filename).toString().c_str(), filename.c_str()); } if (fileHeader > 0) { uint32 headerTag = dataFile->readUint32BE(); if (headerTag != fileHeader) { dataFile->close(); - error("openDataFile: Unexpected header in %s (%s) - expected: %d, got: %d", translateFileName(filename).c_str(), filename.c_str(), fileHeader, headerTag); + error("openDataFile: Unexpected header in %s (%s) - expected: %d, got: %d", translateFileName(filename).toString().c_str(), filename.c_str(), fileHeader, headerTag); } } diff --git a/engines/lab/resource.h b/engines/lab/resource.h index cd03bb1afdb..b5dfa0ad34d 100644 --- a/engines/lab/resource.h +++ b/engines/lab/resource.h @@ -113,7 +113,7 @@ private: void readCloseUps(uint16 depth, Common::File *file, CloseDataList &close); void readView(Common::File *file, ViewDataList &view); void readStaticText(); - Common::String translateFileName(const Common::String filename); + Common::Path translateFileName(const Common::String &filename); Common::String _staticText[48]; };