SCUMM: (LOOM/EGA) - fix bug 13763 (Inaccurate text position)

I am going to clean this up a bit after confirming the behavior of the other v1-3 games. I bet that it it is the same thing (only that it probably doesn't matter, due to the text display being restricted to the top of the screen and the verb screen).
This commit is contained in:
athrxx
2022-08-15 01:06:19 +02:00
parent 2af18f7a91
commit b4185bdf60
+10 -1
View File
@@ -456,7 +456,16 @@ int CharsetRendererClassic::getCharWidth(uint16 chr) const {
int CharsetRenderer::getStringWidth(int arg, const byte *text) {
int pos = 0;
int width = (_vm->_game.id == GID_FT) ? 0 : 1;
// I have confirmed from disasm that LOOM EGA and FM-TOWNS (EN/JP) do not add 1 to the width
// while LOOM VGA Talkie and MONKEY1 EGA do. So that seems to have been introduced with version 4.
// TODO: Check other v1-3 games. Loom IS the only game in that version range that has charset mask
// (overlaying) text display, the others are limited to top screen and verb screen. So it might not
// be that relevant....
int width = 1;
if (_vm->_game.id == GID_FT || (_vm->_game.id == GID_LOOM && _vm->_game.version < 4))
width = 0;
int chr;
int oldID = getCurID();
int code = (_vm->_game.heversion >= 80) ? 127 : 64;