diff options
author | Paul Gilbert | 2018-11-23 17:07:33 -0800 |
---|---|---|
committer | Paul Gilbert | 2018-12-08 19:05:59 -0800 |
commit | a334cd704e21044e0660f918e1c9e3a5040c5837 (patch) | |
tree | a0859b95f06a7d5eae26e0a04f2f4370be84b320 /engines/glk/frotz/glk_interface.cpp | |
parent | 6f508124937df1b0cda5a2732039a82c4ec16b85 (diff) | |
download | scummvm-rg350-a334cd704e21044e0660f918e1c9e3a5040c5837.tar.gz scummvm-rg350-a334cd704e21044e0660f918e1c9e3a5040c5837.tar.bz2 scummvm-rg350-a334cd704e21044e0660f918e1c9e3a5040c5837.zip |
GLK: FROTZ: Further loading of Infocom pictures files
Diffstat (limited to 'engines/glk/frotz/glk_interface.cpp')
-rw-r--r-- | engines/glk/frotz/glk_interface.cpp | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp index 2790e3009d..4e7a503d82 100644 --- a/engines/glk/frotz/glk_interface.cpp +++ b/engines/glk/frotz/glk_interface.cpp @@ -96,11 +96,17 @@ void GlkInterface::initialize() { glk_stylehint_set(wintype_AllTypes, style_Note, stylehint_Weight, 1); glk_stylehint_set(wintype_AllTypes, style_Note, stylehint_Oblique, 1); + /* + * Open game windows + */ + if (_storyId == BEYOND_ZORK) + showBeyondZorkTitle(); + gos_lower = glk_window_open(0, 0, 0, wintype_TextGrid, 0); if (!gos_lower) gos_lower = glk_window_open(0, 0, 0, wintype_TextBuffer, 0); glk_window_get_size(gos_lower, &width, &height); - glk_window_close(gos_lower, NULL); + glk_window_close(gos_lower, nullptr); gos_lower = glk_window_open(0, 0, 0, wintype_TextBuffer, 0); gos_upper = glk_window_open(gos_lower, @@ -108,7 +114,7 @@ void GlkInterface::initialize() { 0, wintype_TextGrid, 0); - gos_channel = NULL; + gos_channel = nullptr; glk_set_window(gos_lower); gos_curwin = gos_lower; @@ -441,18 +447,17 @@ void GlkInterface::gos_cancel_pending_line() { gos_linepending = 0; } -void GlkInterface::os_restart_game(RestartAction stage) { - // Show Beyond Zork's title screen - if ((stage == RESTART_END) && (_storyId == BEYOND_ZORK)) { -/* - uint w, h; - if (os_picture_data(1, &h, &w)) { - _screen->clear(); - os_draw_picture(1, Common::Point(1, 1)); - _events->waitForPress(); - } - */ +void GlkInterface::showBeyondZorkTitle() { + uint winW, winH, imgW, imgH; + winid_t win = glk_window_open(0, 0, 0, wintype_TextGrid, 0); + glk_window_get_size(gos_lower, &winW, &winH); + + if (os_picture_data(1, &imgW, &imgH)) { + os_draw_picture(1, win, Common::Point(1, 1)); + _events->waitForPress(); } + + glk_window_close(win, nullptr); } void GlkInterface::os_draw_picture(int picture, winid_t win, const Common::Point &pos) { |