diff options
author | Paul Gilbert | 2019-01-03 18:01:32 -0800 |
---|---|---|
committer | Paul Gilbert | 2019-01-03 18:01:32 -0800 |
commit | d5bf1396def859fcdbfc541e19df37f1dca5552c (patch) | |
tree | a4b0accba70576b3ae039b0b4e89e8aa136b0e2c | |
parent | 642efa7f6a0772099a555b8bf612052ce8d5baff (diff) | |
download | scummvm-rg350-d5bf1396def859fcdbfc541e19df37f1dca5552c.tar.gz scummvm-rg350-d5bf1396def859fcdbfc541e19df37f1dca5552c.tar.bz2 scummvm-rg350-d5bf1396def859fcdbfc541e19df37f1dca5552c.zip |
GLK: FROTZ: os_picture_data wasn't dividing by cell size
-rw-r--r-- | engines/glk/frotz/glk_interface.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp index 0f08799fc9..1efb751a17 100644 --- a/engines/glk/frotz/glk_interface.cpp +++ b/engines/glk/frotz/glk_interface.cpp @@ -291,7 +291,14 @@ bool GlkInterface::os_picture_data(int picture, uint *height, uint *width) { *height = _pics->size(); return true; } else { - return glk_image_get_info(picture, width, height); + bool result = glk_image_get_info(picture, width, height); + + int cellW = g_conf->_monoInfo._cellW; + int cellH = g_conf->_monoInfo._cellH; + *width = (*width + cellW - 1) / cellW; + *height = (*height + cellH - 1) / cellH; + + return result; } } |