aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-07-28 21:09:51 +0200
committerWillem Jan Palenstijn2011-07-28 21:09:51 +0200
commit7e88112ad2a27ad50f54fb84b92ec97c2262939a (patch)
tree05e2072af5017226477d7390a77fcc2e0b3252c6 /engines/dreamweb
parent53e5522e5a895ba8bdd7fc20b03d0c67bc840eeb (diff)
downloadscummvm-rg350-7e88112ad2a27ad50f54fb84b92ec97c2262939a.tar.gz
scummvm-rg350-7e88112ad2a27ad50f54fb84b92ec97c2262939a.tar.bz2
scummvm-rg350-7e88112ad2a27ad50f54fb84b92ec97c2262939a.zip
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.
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/stubs.cpp5
1 files changed, 4 insertions, 1 deletions
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);