From 4b15cdb3b623edceed3642929ded31b5d4ec5beb Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 28 Jan 2019 20:50:33 -0800 Subject: GLK: FROTZ: Fix rendering text to upper window in Zork Zero --- engines/glk/frotz/glk_interface.cpp | 8 +++----- engines/glk/frotz/processor_text.cpp | 2 +- engines/glk/frotz/windows.cpp | 4 ++++ 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'engines/glk') diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp index 740a43f847..9c0b8feb51 100644 --- a/engines/glk/frotz/glk_interface.cpp +++ b/engines/glk/frotz/glk_interface.cpp @@ -382,15 +382,13 @@ void GlkInterface::split_window(zword lines) { if (h_version < V4) lines++; - if (!lines || lines > curr_status_ht) { + if ((!lines || lines > curr_status_ht) && h_version != 6) { uint height; glk_window_get_size(_wp._upper, nullptr, &height); if (lines != height) - glk_window_set_arrangement( - glk_window_get_parent(_wp._upper), - winmethod_Above | winmethod_Fixed, - lines, nullptr); + glk_window_set_arrangement(glk_window_get_parent(_wp._upper), + winmethod_Above | winmethod_Fixed, lines, nullptr); curr_status_ht = lines; } mach_status_ht = lines; diff --git a/engines/glk/frotz/processor_text.cpp b/engines/glk/frotz/processor_text.cpp index 1f3d6b3e44..0ae21240c5 100644 --- a/engines/glk/frotz/processor_text.cpp +++ b/engines/glk/frotz/processor_text.cpp @@ -879,7 +879,7 @@ void Processor::z_print_obj() { } void Processor::z_print_paddr() { - decode_text (HIGH_STRING, zargs[0]); + decode_text(HIGH_STRING, zargs[0]); } void Processor::z_print_ret() { diff --git a/engines/glk/frotz/windows.cpp b/engines/glk/frotz/windows.cpp index 8e0435e842..04f0e264aa 100644 --- a/engines/glk/frotz/windows.cpp +++ b/engines/glk/frotz/windows.cpp @@ -54,6 +54,10 @@ void Windows::setup(bool isVersion6) { winmethod_Arbitrary | winmethod_Fixed, 0, wintype_TextBuffer, 0); _upper = g_vm->glk_window_open(g_vm->glk_window_get_root(), winmethod_Arbitrary | winmethod_Fixed, 0, wintype_TextGrid, 0); + _upper.setPosition(Point(0, 0)); + _upper.setSize(Point(320, 8)); + _lower.setPosition(Point(0, 8)); + _lower.setSize(Point(320, 200 - 8)); } else { _lower = g_vm->glk_window_open(0, 0, 0, wintype_TextBuffer, 0); -- cgit v1.2.3