diff options
author | Filippos Karapetis | 2018-12-27 14:48:11 +0200 |
---|---|---|
committer | Filippos Karapetis | 2018-12-28 13:41:39 +0200 |
commit | 91490c27adfde5f41b21bb2f3a6f648aab4270d0 (patch) | |
tree | 9af66c83e768a1219c7164fcbf70e3e66a35be8f /engines/glk/alan2/alan2.cpp | |
parent | bba8eadfaef76365429249368ca8e6d1385dc3e8 (diff) | |
download | scummvm-rg350-91490c27adfde5f41b21bb2f3a6f648aab4270d0.tar.gz scummvm-rg350-91490c27adfde5f41b21bb2f3a6f648aab4270d0.tar.bz2 scummvm-rg350-91490c27adfde5f41b21bb2f3a6f648aab4270d0.zip |
GLK: ALAN2: Initial work on the Alan2 subengine
Diffstat (limited to 'engines/glk/alan2/alan2.cpp')
-rw-r--r-- | engines/glk/alan2/alan2.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/engines/glk/alan2/alan2.cpp b/engines/glk/alan2/alan2.cpp index 3869e34c90..c29a124f9a 100644 --- a/engines/glk/alan2/alan2.cpp +++ b/engines/glk/alan2/alan2.cpp @@ -21,6 +21,10 @@ */ #include "glk/alan2/alan2.h" +#include "glk/alan2/decode.h" +#include "glk/alan2/execute.h" +#include "glk/alan2/interpreter.h" +#include "glk/alan2/saveload.h" #include "common/config-manager.h" #include "common/translation.h" #include "common/error.h" @@ -32,14 +36,24 @@ namespace Glk { namespace Alan2 { +Alan2 *_vm = nullptr; Alan2::Alan2(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, gameDesc), vm_exited_cleanly(false) { + _vm = this; } void Alan2::runGame(Common::SeekableReadStream *gameFile) { _gameFile = gameFile; + // TODO: Initialize these properly + int tmp = 0; + Common::String gameFileName; + _decode = new Decode(nullptr, nullptr); + _execute = new Execute(); + _saveLoad = new SaveLoad(gameFileName, nullptr, nullptr, nullptr, nullptr, &tmp); + _interpreter = new Interpreter(_execute, _saveLoad, _stack); + if (!is_gamefile_valid()) return; @@ -70,5 +84,32 @@ bool Alan2::is_gamefile_valid() { return true; } +void Alan2::output(const Common::String str) +{ + // TODO +} + +void Alan2::printMessage(MsgKind msg) +{ + // TODO +} + +void Alan2::printError(MsgKind msg) +{ + // TODO +} + +void Alan2::paragraph() +{ + if (col != 1) + newLine(); + newLine(); +} + +void Alan2::newLine() +{ + // TODO +} + } // End of namespace Alan2 } // End of namespace Glk |