From 7e88112ad2a27ad50f54fb84b92ec97c2262939a Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 28 Jul 2011 21:09:51 +0200 Subject: DREAMWEB: Fix kerning in printchar ah should contain the next char to print for kernchars(), but it was getting clobbered in one code path, and not even set in another. --- engines/dreamweb/stubs.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index ec94ffc40c..2ac3751313 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -307,14 +307,16 @@ void DreamGenContext::printchar(uint16 dst, uint16 src, uint16* x, uint16 y, uin return; push(si); push(di); + push(ax); if (data.byte(kForeignrelease) != 0) y -= 3; showframe(dst, src, *x, y, c - 32 + data.word(kCharshift), 0, width, height); + ax = pop(); di = pop(); si = pop(); _cmp(data.byte(kKerning), 0); if (flags.z()) - kernchars(); + *width = kernchars(c, ah, *width); (*x) += *width; } @@ -408,6 +410,7 @@ void DreamGenContext::printdirect(uint16 x, uint16 *y, uint8 maxWidth, bool cent return; } c = engine->modifyChar(c); + ah = es.byte(si); // get next char for kerning uint8 width, height; push(es); printchar(es, ds, &i, *y, c, &width, &height); -- cgit v1.2.3