diff options
Diffstat (limited to 'engines/glk/hugo/hugo.h')
-rw-r--r-- | engines/glk/hugo/hugo.h | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/engines/glk/hugo/hugo.h b/engines/glk/hugo/hugo.h index 7032bbad9f..15d171173f 100644 --- a/engines/glk/hugo/hugo.h +++ b/engines/glk/hugo/hugo.h @@ -34,6 +34,103 @@ namespace Hugo { * Hugo game interpreter */ class Hugo : public GlkAPI { +private: + winid_t mainwin, currentwin; + + /** + * address_scale refers to the factor by which addresses are multiplied to + * get the "real" address. In this way, a 16-bit integer can reference + * 64K * 16 = 1024K of memory. + */ + int address_scale; + + int game_version; + int object_size; + HUGO_FILE game; + HUGO_FILE script; + HUGO_FILE save; + HUGO_FILE playback; + HUGO_FILE record; + HUGO_FILE io; char ioblock; char ioerror; + + char id[3]; + char serial[9]; + unsigned int codestart; + unsigned int objtable; + unsigned int eventtable; + unsigned int proptable; + unsigned int arraytable; + unsigned int dicttable; + unsigned int syntable; + unsigned int initaddr; + unsigned int mainaddr; + unsigned int parseaddr; + unsigned int parseerroraddr; + unsigned int findobjectaddr; + unsigned int endgameaddr; + unsigned int speaktoaddr; + unsigned int performaddr; + int objects; + int events; + int dictcount; + int syncount; +#if !defined (COMPILE_V25) + char context_command[MAX_CONTEXT_COMMANDS][64]; + int context_commands; +#endif + unsigned char *mem; + int loaded_in_memory; + unsigned int defseg; + unsigned int gameseg; + long codeptr; + long codeend; + char pbuffer[MAXBUFFER * 2 + 1]; + int currentpos; + int currentline; + int full; + signed char def_fcolor, def_bgcolor, def_slfcolor, def_slbgcolor; + signed char fcolor, bgcolor, icolor, default_bgcolor; + int currentfont; + char capital; + unsigned int textto; + int SCREENWIDTH, SCREENHEIGHT; + int physical_windowwidth, physical_windowheight, + physical_windowtop, physical_windowleft, + physical_windowbottom, physical_windowright; + int inwindow; + int charwidth, lineheight, FIXEDCHARWIDTH, FIXEDLINEHEIGHT; + int current_text_x, current_text_y; + int undostack[MAXUNDO][5]; + int undoptr; + int undoturn; + char undoinvalid; + char undorecord; +private: + /** + * \defgroup heglk + * @{ + */ + + /** + * Does whatever has to be done to initially set up the display + */ + void hugo_init_screen(); + + /** + * Does whatever has to be done to clean up the display pre-termination + */ + void hugo_cleanup_screen(); + + void hugo_settextwindow(int left, int top, int right, int bottom); + + /**@}*/ +private: + /** + * Allocate memory block + */ + void *hugo_blockalloc(size_t num) { return new byte[num]; } + + void hugo_blockfree(void *block) { delete[] block; } public: /** * Constructor |