diff options
author | Paul Gilbert | 2019-10-24 20:25:24 -0700 |
---|---|---|
committer | Paul Gilbert | 2019-10-26 11:13:29 -0700 |
commit | 07c8437e268b12c0633495579f56c4e08e8ef7d2 (patch) | |
tree | 3e6b5cbba0295a644c79cb279bc0559d6775ecdc /engines/glk/glk_api.cpp | |
parent | fa323c6187ac2a698805c07f6dd2b906e9c117ee (diff) | |
download | scummvm-rg350-07c8437e268b12c0633495579f56c4e08e8ef7d2.tar.gz scummvm-rg350-07c8437e268b12c0633495579f56c4e08e8ef7d2.tar.bz2 scummvm-rg350-07c8437e268b12c0633495579f56c4e08e8ef7d2.zip |
GLK: LEVEL9: Title screen graphics now showing
Diffstat (limited to 'engines/glk/glk_api.cpp')
-rw-r--r-- | engines/glk/glk_api.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/engines/glk/glk_api.cpp b/engines/glk/glk_api.cpp index d86bd26e3f..6d34e3a6e1 100644 --- a/engines/glk/glk_api.cpp +++ b/engines/glk/glk_api.cpp @@ -911,6 +911,39 @@ bool GlkAPI::glk_image_draw_scaled(winid_t win, uint image, int val1, int val2, return false; } +bool GlkAPI::glk_image_draw(winid_t win, const Graphics::Surface &image, uint transColor, + int xp, int yp) { + if (!win) { + warning("image_draw: invalid ref"); + } else if (g_conf->_graphics) { + GraphicsWindow *gfxWin = dynamic_cast<GraphicsWindow *>(win); + + if (gfxWin) + gfxWin->drawPicture(image, 0xff, xp, yp, 0, 0); + } + + return true; +} + +bool GlkAPI::glk_image_draw_scaled(winid_t win, const Graphics::Surface &image, uint transColor, + int xp, int yp, uint width, uint height) { + if (!win) { + warning("image_draw_scaled: invalid ref"); + } else if (g_conf->_graphics) { + GraphicsWindow *gfxWin = dynamic_cast<GraphicsWindow *>(win); + + Graphics::ManagedSurface s(width, height); + s.clear(transColor); + s.transBlitFrom(image, Common::Rect(0, 0, image.w, image.h), + Common::Rect(0, 0, width, height), transColor); + + if (gfxWin) + gfxWin->drawPicture(s, transColor, xp, yp, s.w, s.h); + } + + return true; +} + bool GlkAPI::glk_image_get_info(uint image, uint *width, uint *height) { if (!g_conf->_graphics) return false; |