mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 12:09:15 +00:00
LAB: Migrate engine to Path
This commit is contained in:
parent
abfc953046
commit
244ee1b79e
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user