diff options
author | Paul Gilbert | 2019-01-05 18:00:17 -0800 |
---|---|---|
committer | Paul Gilbert | 2019-01-05 18:00:17 -0800 |
commit | cde7a021644774262f25d833303507ca180d8508 (patch) | |
tree | b4b303aaec8848bf819158c1fe08afab65396b0d | |
parent | 81541a5f049c4dd8ec10a9c13b163cf478bdc921 (diff) | |
download | scummvm-rg350-cde7a021644774262f25d833303507ca180d8508.tar.gz scummvm-rg350-cde7a021644774262f25d833303507ca180d8508.tar.bz2 scummvm-rg350-cde7a021644774262f25d833303507ca180d8508.zip |
GLK: FROTX: Draw pictures at the correct position
-rw-r--r-- | engines/glk/frotz/glk_interface.cpp | 8 | ||||
-rw-r--r-- | engines/glk/window_graphics.cpp | 2 |
2 files changed, 7 insertions, 3 deletions
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) { diff --git a/engines/glk/window_graphics.cpp b/engines/glk/window_graphics.cpp index 063a590dc6..049d31425b 100644 --- a/engines/glk/window_graphics.cpp +++ b/engines/glk/window_graphics.cpp @@ -230,7 +230,7 @@ void GraphicsWindow::drawPicture(Picture *src, int x0, int y0, int width, int h w = sx1 - sx0; h = sy1 - sy0; - _surface->transBlitFrom(*src, Rect(sx0, sy0, sx0 + w, sy0 + h), Point(0, 0), src->getTransparentColor()); + _surface->transBlitFrom(*src, Rect(sx0, sy0, sx0 + w, sy0 + h), Point(x0, y0), src->getTransparentColor()); } void GraphicsWindow::getSize(uint *width, uint *height) const { |