From 27e3ddc628b75e21f09adf503dc01386b5ee4d9c Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 15 Apr 2009 01:54:24 +0000 Subject: Update renderString to match original code in The Feeble Files. svn-id: r39951 --- engines/agos/charset.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'engines/agos/charset.cpp') 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); -- cgit v1.2.3