aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-04-21 10:47:43 +0000
committerTorbjörn Andersson2006-04-21 10:47:43 +0000
commit312e49b6eb987ebdce03439dea7a370406e101aa (patch)
treef33df492862157de8ded67d2646079277b11d426 /engines
parent8740bc01340787d4b8af1fd84f9827cef3105b43 (diff)
downloadscummvm-rg350-312e49b6eb987ebdce03439dea7a370406e101aa.tar.gz
scummvm-rg350-312e49b6eb987ebdce03439dea7a370406e101aa.tar.bz2
scummvm-rg350-312e49b6eb987ebdce03439dea7a370406e101aa.zip
Adjust buffer sizes for conversation options, even for sprite id 1. This
doesn't seem to match the original, but there are cases where even the first string is long enough to cause text corruption. For whatever reason, I have not been able to reproduce this text corruption with the original interpreter, though, so maybe we're missing some detail. Or maybe the original interpreter just gets lucky. svn-id: r22070
Diffstat (limited to 'engines')
-rw-r--r--engines/simon/charset.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/simon/charset.cpp b/engines/simon/charset.cpp
index 6f7b8e1c7e..51545c56d4 100644
--- a/engines/simon/charset.cpp
+++ b/engines/simon/charset.cpp
@@ -211,8 +211,14 @@ void SimonEngine::renderString(uint vga_sprite_id, uint color, uint width, uint
// 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!
- if (vga_sprite_id != 1)
- WRITE_LE_UINT16(p + 8, READ_LE_UINT32(p) + width * height);
+ //
+ // The original seems to make an exception for sprite id 1, but
+ // even the first conversation option can be a long line. For
+ // some reason, I cannot reproduce the text corruption with the
+ // original interpreter, though, so maybe we're missing some
+ // detail here. Let's hope it's safe to always adjust the
+ // buffer size anyway.
+ WRITE_LE_UINT16(p + 8, READ_LE_UINT32(p) + width * height);
} else {
WRITE_BE_UINT16(p + 4, height);
WRITE_BE_UINT16(p + 6, width);