diff options
author | Paul Gilbert | 2019-11-24 22:30:58 -0800 |
---|---|---|
committer | Paul Gilbert | 2019-11-27 21:10:29 -0800 |
commit | 88444ddc889e4faee110b637961824fcb8abc448 (patch) | |
tree | fab409711e7eaf2105d9290f7c990b2ef5667830 /engines/glk/agt/agt.cpp | |
parent | 28c3584148c49c1c6f118c5cbf13d0bf53d56726 (diff) | |
download | scummvm-rg350-88444ddc889e4faee110b637961824fcb8abc448.tar.gz scummvm-rg350-88444ddc889e4faee110b637961824fcb8abc448.tar.bz2 scummvm-rg350-88444ddc889e4faee110b637961824fcb8abc448.zip |
GLK: AGT: Initialization fixes
Diffstat (limited to 'engines/glk/agt/agt.cpp')
-rw-r--r-- | engines/glk/agt/agt.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/engines/glk/agt/agt.cpp b/engines/glk/agt/agt.cpp index ea28cf8f4f..ff78e59909 100644 --- a/engines/glk/agt/agt.cpp +++ b/engines/glk/agt/agt.cpp @@ -31,15 +31,22 @@ namespace AGT { AGT *g_vm; extern void glk_main(); -extern int glk_startup_code(int argc, char *argv[]); +extern int glk_startup_code(); +extern void gagt_finalizer(); -AGT::AGT(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, gameDesc) { +AGT::AGT(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, gameDesc), + gagt_gamefile(nullptr), gagt_game_message(nullptr) { g_vm = this; } void AGT::runGame() { - glk_startup_code(0, nullptr); + _gameFile.close(); + gagt_gamefile = getFilename().c_str(); + + glk_startup_code(); glk_main(); + + gagt_finalizer(); } Common::Error AGT::readSaveData(Common::SeekableReadStream *rs) { |