diff --git a/engines/glk/hugo/hemisc.cpp b/engines/glk/hugo/hemisc.cpp index c380fbbe6a9b..4115abebc78c 100644 --- a/engines/glk/hugo/hemisc.cpp +++ b/engines/glk/hugo/hemisc.cpp @@ -1544,7 +1544,7 @@ void Hugo::Printout(char *a, int no_scrollback_linebreak) { } if (script && (unsigned char)b[0]>=' ') - if (hugo_writetoscript(b) < 0) FatalError(WRITE_E); + if (hugo_fprintf(script, "%s", b) < 0) FatalError(WRITE_E); #if defined (SCROLLBACK_DEFINED) if (!inwindow && (unsigned char)b[0]>=' ') @@ -1655,7 +1655,8 @@ void Hugo::Printout(char *a, int no_scrollback_linebreak) { if (script && !no_scrollback_linebreak) { - if (hugo_writetoscript("\n")<0) FatalError(WRITE_E); + if (hugo_fprintf(script, "%s", "\n")<0) + FatalError(WRITE_E); } #if defined (SCROLLBACK_DEFINED) diff --git a/engines/glk/hugo/hugo.h b/engines/glk/hugo/hugo.h index 046b6654dc07..eeb65a29be94 100644 --- a/engines/glk/hugo/hugo.h +++ b/engines/glk/hugo/hugo.h @@ -333,6 +333,10 @@ class Hugo : public GlkAPI, public HTokens, public StringFunctions { // No implementation } + void hugo_closefiles() { + // Glk closes all files on exit + } + int hugo_getkey() const { // Not needed here--single-character events are handled solely by hugo_waitforkey(), below return 0; @@ -1111,12 +1115,9 @@ class Hugo : public GlkAPI, public HTokens, public StringFunctions { virtual Common::Error saveGameData(strid_t file, const Common::String &desc) override; // TODO: Stubs to be Properly implemented - void hugo_closefiles() {} - unsigned int FindWord(const char *a) { return 0; } void hugo_stopsample() {} void hugo_stopmusic() {} int hugo_hasgraphics() { return 0; } - int hugo_writetoscript(const char *s) { return 0; } void DisplayPicture() {} void PlayMusic() {} void PlaySample() {}