From cde7a021644774262f25d833303507ca180d8508 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 5 Jan 2019 18:00:17 -0800 Subject: GLK: FROTX: Draw pictures at the correct position --- engines/glk/frotz/glk_interface.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engines/glk/frotz') diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp index cf90ddc93e..959ab31064 100644 --- a/engines/glk/frotz/glk_interface.cpp +++ b/engines/glk/frotz/glk_interface.cpp @@ -498,11 +498,15 @@ void GlkInterface::showBeyondZorkTitle() { } void GlkInterface::os_draw_picture(int picture, const Common::Point &pos) { - glk_image_draw(_wp._background, picture, pos.x - 1, pos.y - 1); + glk_image_draw(_wp._background, picture, + (pos.x - 1) * g_conf->_monoInfo._cellW, + (pos.y - 1) * g_conf->_monoInfo._cellH); } void GlkInterface::os_draw_picture(int picture, const Common::Rect &r) { - glk_image_draw_scaled(_wp._background, picture, r.left, r.top, r.width(), r.height()); + Point cell(g_conf->_monoInfo._cellW, g_conf->_monoInfo._cellH); + glk_image_draw_scaled(_wp._background, picture, (r.left - 1) * cell.x, (r.top - 1) * cell.y, + r.width() * cell.x, r.height() * cell.y); } zchar GlkInterface::os_read_key(int timeout, bool show_cursor) { -- cgit v1.2.3