diff options
author | Paul Gilbert | 2019-01-02 23:13:13 -0800 |
---|---|---|
committer | Paul Gilbert | 2019-01-02 23:13:13 -0800 |
commit | 85816c8a54d77423c6400e41da93f62fe1f948ff (patch) | |
tree | 7bbfc83db905b320a569e093f9e52849339011c6 /engines/glk/glk.cpp | |
parent | 8d6909608d3faff88a43408b01097a070c45db21 (diff) | |
download | scummvm-rg350-85816c8a54d77423c6400e41da93f62fe1f948ff.tar.gz scummvm-rg350-85816c8a54d77423c6400e41da93f62fe1f948ff.tar.bz2 scummvm-rg350-85816c8a54d77423c6400e41da93f62fe1f948ff.zip |
GLK: Make a _gameFile field in the base Glk engine
Diffstat (limited to 'engines/glk/glk.cpp')
-rw-r--r-- | engines/glk/glk.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/glk/glk.cpp b/engines/glk/glk.cpp index 2525c0b1fa..e7d10fa29d 100644 --- a/engines/glk/glk.cpp +++ b/engines/glk/glk.cpp @@ -107,7 +107,6 @@ void GlkEngine::initGraphicsMode() { } Common::Error GlkEngine::run() { - Common::File f; Common::String filename = getFilename(); if (!Common::File::exists(filename)) return Common::kNoGameDataFoundError; @@ -119,7 +118,7 @@ Common::Error GlkEngine::run() { _blorb = new Blorb(filename, getInterpreterType()); SearchMan.add("blorb", _blorb, 99, false); - if (!f.open("game", *_blorb)) + if (!_gameFile.open("game", *_blorb)) return Common::kNoGameDataFoundError; } else { // Check for a secondary blorb file with the same filename @@ -127,20 +126,20 @@ Common::Error GlkEngine::run() { while (baseName.contains('.')) baseName.deleteLastChar(); - if (f.exists(baseName + ".blorb")) { + if (Common::File::exists(baseName + ".blorb")) { _blorb = new Blorb(baseName + ".blorb", getInterpreterType()); SearchMan.add("blorb", _blorb, 99, false); - } else if (f.exists(baseName + ".blb")) { + } else if (Common::File::exists(baseName + ".blb")) { _blorb = new Blorb(baseName + ".blb", getInterpreterType()); SearchMan.add("blorb", _blorb, 99, false); } // Open up the game file - if (!f.open(filename)) + if (!_gameFile.open(filename)) return Common::kNoGameDataFoundError; } - runGame(&f); + runGame(); return Common::kNoError; } |