aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/alan2/alan2.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2018-12-27 14:48:11 +0200
committerFilippos Karapetis2018-12-28 13:41:39 +0200
commit91490c27adfde5f41b21bb2f3a6f648aab4270d0 (patch)
tree9af66c83e768a1219c7164fcbf70e3e66a35be8f /engines/glk/alan2/alan2.cpp
parentbba8eadfaef76365429249368ca8e6d1385dc3e8 (diff)
downloadscummvm-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.cpp41
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