aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/glulxe
diff options
context:
space:
mode:
authorPaul Gilbert2019-01-02 23:13:13 -0800
committerPaul Gilbert2019-01-02 23:13:13 -0800
commit85816c8a54d77423c6400e41da93f62fe1f948ff (patch)
tree7bbfc83db905b320a569e093f9e52849339011c6 /engines/glk/glulxe
parent8d6909608d3faff88a43408b01097a070c45db21 (diff)
downloadscummvm-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/glulxe')
-rw-r--r--engines/glk/glulxe/glulxe.cpp10
-rw-r--r--engines/glk/glulxe/glulxe.h3
2 files changed, 5 insertions, 8 deletions
diff --git a/engines/glk/glulxe/glulxe.cpp b/engines/glk/glulxe/glulxe.cpp
index aaa63b6141..40f4bdde57 100644
--- a/engines/glk/glulxe/glulxe.cpp
+++ b/engines/glk/glulxe/glulxe.cpp
@@ -31,9 +31,7 @@ Glulxe::Glulxe(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst,
vm_exited_cleanly(false) {
}
-void Glulxe::runGame(Common::SeekableReadStream *gameFile) {
- _gameFile = gameFile;
-
+void Glulxe::runGame() {
if (!is_gamefile_valid())
return;
@@ -51,18 +49,18 @@ Common::Error Glulxe::saveGameData(strid_t file, const Common::String &desc) {
}
bool Glulxe::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/glulxe/glulxe.h b/engines/glk/glulxe/glulxe.h
index 3764ca4fe0..decdc298f7 100644
--- a/engines/glk/glulxe/glulxe.h
+++ b/engines/glk/glulxe/glulxe.h
@@ -34,7 +34,6 @@ namespace Glulxe {
*/
class Glulxe : 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