diff options
author | Torbjörn Andersson | 2006-04-19 20:04:53 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-04-19 20:04:53 +0000 |
commit | 343dacdcf74bdf8bea69ea2b9c2f60a670386b66 (patch) | |
tree | bdc4b4938e462053a4501401b5413f6ee364e22f /engines/simon | |
parent | 70d23ccf2922ce6743cb7a49f4f55a9372fe44f8 (diff) | |
download | scummvm-rg350-343dacdcf74bdf8bea69ea2b9c2f60a670386b66.tar.gz scummvm-rg350-343dacdcf74bdf8bea69ea2b9c2f60a670386b66.tar.bz2 scummvm-rg350-343dacdcf74bdf8bea69ea2b9c2f60a670386b66.zip |
Fix text corruption with long FF conversation options. The renderString()
function has to adjust the buffer offsets, or a long string can spill over into
the next buffer. (Or, in the test case I used, into the next *two* buffers.)
It would probably be safe - but apparently unnecessary? - to make this change
for the Simon games as well.
svn-id: r22039
Diffstat (limited to 'engines/simon')
-rw-r--r-- | engines/simon/charset.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/simon/charset.cpp b/engines/simon/charset.cpp index 151f3221a7..f0b5cfa040 100644 --- a/engines/simon/charset.cpp +++ b/engines/simon/charset.cpp @@ -207,6 +207,11 @@ void SimonEngine::renderString(uint vga_sprite_id, uint color, uint width, uint if (getGameType() == GType_FF) { WRITE_LE_UINT16(p + 4, height); WRITE_LE_UINT16(p + 6, width); + // We need to adjust the offset to the next buffer to be right + // after this one. By default, each buffer is only 9000 bytes + // long. A two-line string can very well be more than twice + // that size! + WRITE_LE_UINT16(p + 8, READ_LE_UINT32(p) + width * height); } else { WRITE_BE_UINT16(p + 4, height); WRITE_BE_UINT16(p + 6, width); |