PINK: Migrate engine to Path

This commit is contained in:
Le Philousophe 2023-09-17 18:23:45 +02:00 committed by Eugene Sandulenko
parent cfdd63abf8
commit e62dcdfed4
2 changed files with 6 additions and 6 deletions

View File

@ -311,10 +311,10 @@ bool PinkEngine::executePageChangeCommand(uint id) {
}
void PinkEngine::openLocalWebPage(const Common::String &pageName) const {
Common::FSNode gameFolder = Common::FSNode(ConfMan.get("path"));
Common::FSNode gameFolder = Common::FSNode(ConfMan.getPath("path"));
Common::FSNode filePath = gameFolder.getChild("INSTALL").getChild(pageName);
if (filePath.exists()) {
Common::String fullUrl = Common::String::format("file:///%s", filePath.getPath().c_str());
Common::String fullUrl = Common::String::format("file:///%s", filePath.getPath().toString('/').c_str());
_system->openUrl(fullUrl);
}
}

View File

@ -47,7 +47,7 @@ PinkEngine::PinkEngine(OSystem *system, const ADGameDescription *desc)
_desc(desc), _bro(nullptr), _menu(nullptr), _actor(nullptr),
_module(nullptr), _screen(nullptr), _pdaMgr(this) {
const Common::FSNode gameDataDir(ConfMan.get("path"));
const Common::FSNode gameDataDir(ConfMan.getPath("path"));
SearchMan.addSubDirectoryMatching(gameDataDir, "install");
g_paletteLookup = new Graphics::PaletteLookup;
@ -76,7 +76,7 @@ Common::Error PinkEngine::init() {
initGraphics(640, 480);
_exeResources = new Common::PEResources();
Common::String fileName = isPeril() ? "pptp.exe" : "hpp.exe";
Common::Path fileName = isPeril() ? "pptp.exe" : "hpp.exe";
if ((_desc->flags & GF_COMPRESSED) && isPeril()) {
fileName = "pptp.ex_";
@ -97,8 +97,8 @@ Common::Error PinkEngine::init() {
initMenu();
Common::String orbName;
Common::String broName;
Common::Path orbName;
Common::Path broName;
if (isPeril()) {
orbName = "PPTP.ORB";
broName = "PPTP.BRO";