aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/charset.cpp
diff options
context:
space:
mode:
authorTravis Howell2009-04-15 01:54:24 +0000
committerTravis Howell2009-04-15 01:54:24 +0000
commit27e3ddc628b75e21f09adf503dc01386b5ee4d9c (patch)
tree434ea1f713f92f5a9dbfef40f355f0947676f29c /engines/agos/charset.cpp
parent2758ae34ea7759c689fdf59a2033a8d4b8fafac0 (diff)
downloadscummvm-rg350-27e3ddc628b75e21f09adf503dc01386b5ee4d9c.tar.gz
scummvm-rg350-27e3ddc628b75e21f09adf503dc01386b5ee4d9c.tar.bz2
scummvm-rg350-27e3ddc628b75e21f09adf503dc01386b5ee4d9c.zip
Update renderString to match original code in The Feeble Files.
svn-id: r39951
Diffstat (limited to 'engines/agos/charset.cpp')
-rw-r--r--engines/agos/charset.cpp15
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);