diff options
Diffstat (limited to 'engines/glk/hugo/hugo.cpp')
-rw-r--r-- | engines/glk/hugo/hugo.cpp | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/engines/glk/hugo/hugo.cpp b/engines/glk/hugo/hugo.cpp index 5945d81d83..7884bc43e0 100644 --- a/engines/glk/hugo/hugo.cpp +++ b/engines/glk/hugo/hugo.cpp @@ -25,11 +25,57 @@ namespace Glk { namespace Hugo { -Hugo::Hugo(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, gameDesc) { +Hugo::Hugo(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, gameDesc), + mainwin(nullptr), currentwin(nullptr), address_scale(16), + SCREENWIDTH(0), SCREENHEIGHT(0), FIXEDCHARWIDTH(0), FIXEDLINEHEIGHT(0), + game_version(0), object_size(0), game(nullptr), script(nullptr), save(nullptr), + playback(nullptr), record(nullptr), io(nullptr), ioblock('\0'), ioerror('\0'), + codestart(0), objtable(0), eventtable(0), proptable(0), arraytable(0), dicttable(0), + syntable(0), initaddr(0), mainaddr(0), parseaddr(0), parseerroraddr(0), + findobjectaddr(0), endgameaddr(0), speaktoaddr(0), performaddr(0), + objects(0), events(0), dictcount(0), syncount(0), mem(nullptr), loaded_in_memory(0), + defseg(0), gameseg(0), codeptr(0), codeend(0), currentpos(0), currentline(0), full(0), + def_fcolor(0), def_bgcolor(0), def_slfcolor(0), def_slbgcolor(0), fcolor(0), bgcolor(0), + icolor(0), default_bgcolor(0), currentfont(0), capital(0), textto(0), + physical_windowwidth(0), physical_windowheight(0), physical_windowtop(0), + physical_windowleft(0), physical_windowbottom(0), physical_windowright(0), + inwindow(0), charwidth(0), lineheight(0), current_text_x(0), current_text_y(0), + undoptr(0), undoturn(0), undoinvalid(0), undorecord(0) { +#if !defined (COMPILE_V25) + Common::fill(&context_command[0][0], &context_command[MAX_CONTEXT_COMMANDS][64], 0); + context_commands = 0; +#endif + + Common::fill(&id[0], &id[3], '\0'); + Common::fill(&serial[0], &serial[9], '\0'); + Common::fill(&pbuffer[0], &pbuffer[MAXBUFFER * 2 + 1], 0); + Common::fill(&undostack[0][0], &undostack[MAXUNDO][5], 0); } +// TODO: Proper method implementations +void SetupDisplay() {} +void LoadGame() {} +void PlayGame() {} +void hugo_closefiles() {} + void Hugo::runGame() { + hugo_init_screen(); + + SetupDisplay(); + + strcpy(pbuffer, ""); + + gameseg = 0; + + LoadGame(); + + PlayGame(); + + hugo_cleanup_screen(); + hugo_blockfree(mem); + mem = nullptr; + hugo_closefiles(); } Common::Error Hugo::loadGameData(strid_t file) { |