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/magnetic | |
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/magnetic')
-rw-r--r-- | engines/glk/magnetic/magnetic.cpp | 10 | ||||
-rw-r--r-- | engines/glk/magnetic/magnetic.h | 3 |
2 files changed, 5 insertions, 8 deletions
diff --git a/engines/glk/magnetic/magnetic.cpp b/engines/glk/magnetic/magnetic.cpp index f3f3e79a86..9bfdc4825c 100644 --- a/engines/glk/magnetic/magnetic.cpp +++ b/engines/glk/magnetic/magnetic.cpp @@ -31,9 +31,7 @@ Magnetic::Magnetic(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(s vm_exited_cleanly(false) { } -void Magnetic::runGame(Common::SeekableReadStream *gameFile) { - _gameFile = gameFile; - +void Magnetic::runGame() { if (!is_gamefile_valid()) return; @@ -51,18 +49,18 @@ Common::Error Magnetic::saveGameData(strid_t file, const Common::String &desc) { } bool Magnetic::is_gamefile_valid() { - if (_gameFile->size() < 8) { + if (_gameFile.size() < 8) { GUIErrorMessage(_("This is too short to be a valid Glulx file.")); return false; } - if (_gameFile->readUint32BE() != MKTAG('G', 'l', 'u', 'l')) { + if (_gameFile.readUint32BE() != MKTAG('G', 'l', 'u', 'l')) { GUIErrorMessage(_("This is not a valid Glulx file.")); return false; } // We support version 2.0 through 3.1.* - uint version = _gameFile->readUint32BE(); + uint version = _gameFile.readUint32BE(); if (version < 0x20000) { GUIErrorMessage(_("This Glulx file is too old a version to execute.")); return false; diff --git a/engines/glk/magnetic/magnetic.h b/engines/glk/magnetic/magnetic.h index 6f30768d0c..024ef51e1e 100644 --- a/engines/glk/magnetic/magnetic.h +++ b/engines/glk/magnetic/magnetic.h @@ -34,7 +34,6 @@ namespace Magnetic { */ class Magnetic : public GlkAPI { public: - Common::SeekableReadStream *_gameFile; bool vm_exited_cleanly; private: /** @@ -50,7 +49,7 @@ public: /** * Run the game */ - void runGame(Common::SeekableReadStream *gameFile); + void runGame(); /** * Returns the running interpreter type |