diff options
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/print.cpp | 19 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
2 files changed, 13 insertions, 7 deletions
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp index edaf8ee1eb..8ae9df5df2 100644 --- a/engines/dreamweb/print.cpp +++ b/engines/dreamweb/print.cpp @@ -69,20 +69,25 @@ void DreamGenContext::printchar() { void DreamGenContext::printchar(const Frame *charSet, uint16* x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) { if (c == 255) return; - push(si); - push(di); - if (data.byte(kForeignrelease) != 0) + + uint8 dummyWidth, dummyHeight; + if (width == NULL) + width = &dummyWidth; + if (height == NULL) + height = &dummyHeight; + if (data.byte(kForeignrelease)) y -= 3; uint16 tmp = c - 32 + data.word(kCharshift); showframe(charSet, *x, y, tmp & 0x1ff, (tmp >> 8) & 0xfe, width, height); - di = pop(); - si = pop(); - _cmp(data.byte(kKerning), 0); - if (flags.z()) + if (data.byte(kKerning), 0) *width = kernchars(c, nextChar, *width); (*x) += *width; } +void DreamGenContext::printchar(const Frame *charSet, uint16 x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) { + printchar(charSet, &x, y, c, nextChar, width, height); +} + void DreamGenContext::printslow() { al = printslow(es.ptr(si, 0), di, bx, dl, (bool)(dl & 1)); } diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 30f5f1dfe1..38c0932319 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -61,6 +61,7 @@ void printboth(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar); void printchar(); void printchar(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height); + void printchar(const Frame* charSet, uint16 x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height); void printdirect(); void printdirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered); void printdirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered); |