aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorBertrand Augereau2011-11-18 08:29:50 +0100
committerBertrand Augereau2011-11-18 08:39:27 +0100
commite808034e1d8f2ed37de0e24ded6d453f3d2fc411 (patch)
tree4e14fd4a486552f17cd02647598f6e60522a21a5 /engines/dreamweb
parent9f1faeb1ab016f6bf8b033cf3cd1d2c49b4d0748 (diff)
downloadscummvm-rg350-e808034e1d8f2ed37de0e24ded6d453f3d2fc411.tar.gz
scummvm-rg350-e808034e1d8f2ed37de0e24ded6d453f3d2fc411.tar.bz2
scummvm-rg350-e808034e1d8f2ed37de0e24ded6d453f3d2fc411.zip
DREAMWEB: 'printchar' now has an overload that doesn't advance x for convenience, and supports NULL output widthheight parameters
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/print.cpp19
-rw-r--r--engines/dreamweb/stubs.h1
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);