diff options
Diffstat (limited to 'engines/agos/charset.cpp')
-rw-r--r-- | engines/agos/charset.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/engines/agos/charset.cpp b/engines/agos/charset.cpp index 51323feb3a..50859d01b4 100644 --- a/engines/agos/charset.cpp +++ b/engines/agos/charset.cpp @@ -303,20 +303,11 @@ void AGOSEngine::renderString(uint vgaSpriteId, uint color, uint width, uint hei p = dst + vgaSpriteId * 8; if (getGameType() == GType_FF || getGameType() == GType_PP) { + if (vgaSpriteId != 1) + WRITE_LE_UINT16(p, READ_LE_UINT32(p - 8) + READ_LE_UINT32(p - 4) * READ_LE_UINT32(p - 2)); + 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! - // - // 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); |