diff options
author | Eugene Sandulenko | 2018-05-05 20:30:43 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-05-05 23:17:35 +0200 |
commit | a97a3c388675a76f9def98db441e8904232d118a (patch) | |
tree | b8171f94712f5cae124175249d3c1c5df98a13dc | |
parent | 6e58c5aaa521d450878786eaf00c8a71191962ae (diff) | |
download | scummvm-rg350-a97a3c388675a76f9def98db441e8904232d118a.tar.gz scummvm-rg350-a97a3c388675a76f9def98db441e8904232d118a.tar.bz2 scummvm-rg350-a97a3c388675a76f9def98db441e8904232d118a.zip |
PRINCE: Further work on support for extracted games
-rw-r--r-- | engines/prince/resources.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/prince/resources.cpp b/engines/prince/resources.cpp index bb3db04032..342c16e900 100644 --- a/engines/prince/resources.cpp +++ b/engines/prince/resources.cpp @@ -83,11 +83,15 @@ bool PrinceEngine::loadLocation(uint16 locationNr) { const Common::String locationNrStr = Common::String::format("%02d", _locationNr); debugEngine("loadLocation %s", locationNrStr.c_str()); - PtcArchive *locationArchive = new PtcArchive(); - if (!locationArchive->open(locationNrStr + "/databank.ptc")) - error("Can't open location %s", locationNrStr.c_str()); - - SearchMan.add(locationNrStr, locationArchive); + if (!(getFeatures() & GF_EXTRACTED)) { + PtcArchive *locationArchive = new PtcArchive(); + if (!locationArchive->open(locationNrStr + "/databank.ptc")) + error("Can't open location %s", locationNrStr.c_str()); + + SearchMan.add(locationNrStr, locationArchive); + } else { + SearchMan.addSubDirectoryMatching(gameDataDir, locationNrStr); + } loadMusic(_locationNr); |