diff options
author | Paul Gilbert | 2018-11-27 21:35:47 -0800 |
---|---|---|
committer | Paul Gilbert | 2018-12-08 19:05:59 -0800 |
commit | d2836360fbf4f8ec5f90cbaba99002bb23e0aeb6 (patch) | |
tree | f536449857007cf9975877688de6cb8bf261ee34 /engines/glk/tads/tads.cpp | |
parent | 75f4d34070a874437f6f339bac590f99d4b28f65 (diff) | |
download | scummvm-rg350-d2836360fbf4f8ec5f90cbaba99002bb23e0aeb6.tar.gz scummvm-rg350-d2836360fbf4f8ec5f90cbaba99002bb23e0aeb6.tar.bz2 scummvm-rg350-d2836360fbf4f8ec5f90cbaba99002bb23e0aeb6.zip |
GLK: TADS: GLK window initialization
Diffstat (limited to 'engines/glk/tads/tads.cpp')
-rw-r--r-- | engines/glk/tads/tads.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/engines/glk/tads/tads.cpp b/engines/glk/tads/tads.cpp index 8301813231..aa309279e7 100644 --- a/engines/glk/tads/tads.cpp +++ b/engines/glk/tads/tads.cpp @@ -28,6 +28,36 @@ namespace Glk { namespace TADS { TADS::TADS(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, gameDesc) { + /* + * GLK Initialization + */ + mainwin = glk_window_open(0, 0, 0, wintype_TextBuffer, 0); + + if (!mainwin) + error("fatal: could not open window!\n"); + + // get default colors for main window + if (!glk_style_measure(mainwin, style_Normal, stylehint_TextColor, &mainfg)) + mainfg = 0; + + if (!glk_style_measure(mainwin, style_Normal, stylehint_BackColor, &mainbg)) + mainbg = 0; + + // get default colors for status window + statuswin = glk_window_open(mainwin, winmethod_Above | winmethod_Fixed, 1, + wintype_TextGrid, 0); + + if (!glk_style_measure(statuswin, style_Normal, stylehint_TextColor, &statusfg)) + statusfg = 0; + + if (!glk_style_measure(statuswin, style_Normal, stylehint_BackColor, &statusbg)) + statusbg = 0; + + // close status window; reopened on request + glk_window_close(statuswin, 0); + statuswin = nullptr; + + glk_set_window(mainwin); } Common::Error TADS::loadGameData(strid_t file) { |