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.h | |
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.h')
-rw-r--r-- | engines/glk/alan2/alan2.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/engines/glk/alan2/alan2.h b/engines/glk/alan2/alan2.h index f4515516f7..716e198c74 100644 --- a/engines/glk/alan2/alan2.h +++ b/engines/glk/alan2/alan2.h @@ -26,10 +26,20 @@ #include "common/scummsys.h" #include "common/stack.h" #include "glk/glk_api.h" +#include "glk/alan2/acode.h" +#include "glk/alan2/types.h" namespace Glk { namespace Alan2 { +typedef Common::FixedStack<Aptr, 100> Alan2Stack; +class Decode; +class Execute; +class Interpreter; +class SaveLoad; + +#define N_EVTS 100 + /** * Alan2 game interpreter */ @@ -67,8 +77,65 @@ public: * Save the game to the passed stream */ virtual Common::Error saveGameData(strid_t file, const Common::String &desc) override; + + /** + * Output a string to the screen + */ + void output(const Common::String str); + + /** + * Print a message from the message table + */ + void printMessage(MsgKind msg); + + /** + * Print an error from the message table, force new player input and abort + */ + void printError(MsgKind msg); + + /** + * Make a new paragraph, i.e one empty line (one or two newlines) + */ + void paragraph(); + + /** + * Print the the status line on the top of the screen + */ + void statusLine(); + + /** + * Make a newline, but check for screen full + */ + void newLine(); + + // Engine variables + Alan2Stack *_stack; + int pc; + ParamElem *params; + Aword *memory; // The Amachine memory + int memTop; // Top of memory + CurVars cur; // Amachine variables + int col; + bool fail; + int scores[100]; // FIXME: type + size + AcdHdr *header; + bool _needSpace; // originally "needsp" + + EvtElem *evts; // Event table pointer + bool looking = false; // LOOKING? flag + int dscrstkp = 0; // Describe-stack pointer + Common::File *_txtFile; + bool _anyOutput; + winid_t _bottomWindow; + + Decode *_decode; + Execute *_execute; + Interpreter *_interpreter; + SaveLoad *_saveLoad; }; +extern Alan2 *_vm; + } // End of namespace Alan2 } // End of namespace Glk |