aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/alan2
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/alan2
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/alan2')
-rw-r--r--engines/glk/alan2/alan2.cpp8
-rw-r--r--engines/glk/alan2/alan2.h3
2 files changed, 4 insertions, 7 deletions
diff --git a/engines/glk/alan2/alan2.cpp b/engines/glk/alan2/alan2.cpp
index f9dcb52903..60889f70a3 100644
--- a/engines/glk/alan2/alan2.cpp
+++ b/engines/glk/alan2/alan2.cpp
@@ -45,9 +45,7 @@ Alan2::Alan2(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, g
dscrstkp = 0;
}
-void Alan2::runGame(Common::SeekableReadStream *gameFile) {
- _gameFile = gameFile;
-
+void Alan2::runGame() {
// TODO: Initialize these properly
int tmp = 0;
Common::String gameFileName;
@@ -73,12 +71,12 @@ Common::Error Alan2::saveGameData(strid_t file, const Common::String &desc) {
}
bool Alan2::is_gamefile_valid() {
- if (_gameFile->size() < 8) {
+ if (_gameFile.size() < 8) {
GUIErrorMessage(_("This is too short to be a valid Alan2 file."));
return false;
}
- if (_gameFile->readUint32BE() != MKTAG(2, 8, 1, 0)) {
+ if (_gameFile.readUint32BE() != MKTAG(2, 8, 1, 0)) {
GUIErrorMessage(_("This is not a valid Alan2 file."));
return false;
}
diff --git a/engines/glk/alan2/alan2.h b/engines/glk/alan2/alan2.h
index e2fe6ae9cd..a6ded4304a 100644
--- a/engines/glk/alan2/alan2.h
+++ b/engines/glk/alan2/alan2.h
@@ -45,7 +45,6 @@ class SaveLoad;
*/
class Alan2 : public GlkAPI {
public:
- Common::SeekableReadStream *_gameFile;
bool vm_exited_cleanly;
private:
/**
@@ -61,7 +60,7 @@ public:
/**
* Run the game
*/
- void runGame(Common::SeekableReadStream *gameFile);
+ void runGame();
/**
* Returns the running interpreter type