aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/print.cpp
diff options
context:
space:
mode:
authorD G Turner2011-12-01 19:43:43 +0000
committerD G Turner2011-12-01 19:43:43 +0000
commit349cbc527f33858b6275daaa8f770cd6f7fcd42d (patch)
tree9e8b535ba79d699c408631419dd80965e6eb40c9 /engines/dreamweb/print.cpp
parentd1144963da664891baae241b72d6cfc65ae8d216 (diff)
downloadscummvm-rg350-349cbc527f33858b6275daaa8f770cd6f7fcd42d.tar.gz
scummvm-rg350-349cbc527f33858b6275daaa8f770cd6f7fcd42d.tar.bz2
scummvm-rg350-349cbc527f33858b6275daaa8f770cd6f7fcd42d.zip
DREAMWEB: Fix compilation due to dreamgen.* function renaming.
Diffstat (limited to 'engines/dreamweb/print.cpp')
-rw-r--r--engines/dreamweb/print.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index 791c85be55..fcdaad902e 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -24,15 +24,15 @@
namespace DreamGen {
-void DreamGenContext::printboth(const Frame *charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar) {
+void DreamGenContext::printBoth(const Frame *charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar) {
uint16 newX = *x;
uint8 width, height;
- printchar(charSet, &newX, y, c, nextChar, &width, &height);
- multidump(*x, y, width, height);
+ printChar(charSet, &newX, y, c, nextChar, &width, &height);
+ multiDump(*x, y, width, height);
*x = newX;
}
-uint8 DreamGenContext::getnextword(const Frame *charSet, const uint8 *string, uint8 *totalWidth, uint8 *charCount) {
+uint8 DreamGenContext::getNextWord(const Frame *charSet, const uint8 *string, uint8 *totalWidth, uint8 *charCount) {
*totalWidth = 0;
*charCount = 0;
while(true) {
@@ -51,22 +51,22 @@ uint8 DreamGenContext::getnextword(const Frame *charSet, const uint8 *string, ui
if (firstChar != 255) {
uint8 secondChar = *string;
uint8 width = charSet[firstChar - 32 + data.word(kCharshift)].width;
- width = kernchars(firstChar, secondChar, width);
+ width = kernChars(firstChar, secondChar, width);
*totalWidth += width;
}
}
}
-void DreamGenContext::printchar() {
+void DreamGenContext::printChar() {
uint16 x = di;
uint8 width, height;
- printchar((const Frame *)ds.ptr(0, 0), &x, bx, al, ah, &width, &height);
+ printChar((const Frame *)ds.ptr(0, 0), &x, bx, al, ah, &width, &height);
di = x;
cl = width;
ch = height;
}
-void DreamGenContext::printchar(const Frame *charSet, uint16* x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) {
+void DreamGenContext::printChar(const Frame *charSet, uint16* x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) {
if (c == 255)
return;
@@ -78,33 +78,33 @@ void DreamGenContext::printchar(const Frame *charSet, uint16* x, uint16 y, uint8
if (data.byte(kForeignrelease))
y -= 3;
uint16 tmp = c - 32 + data.word(kCharshift);
- showframe(charSet, *x, y, tmp & 0x1ff, (tmp >> 8) & 0xfe, width, height);
+ showFrame(charSet, *x, y, tmp & 0x1ff, (tmp >> 8) & 0xfe, width, height);
if (data.byte(kKerning), 0)
- *width = kernchars(c, nextChar, *width);
+ *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::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));
+void DreamGenContext::printSlow() {
+ al = printSlow(es.ptr(si, 0), di, bx, dl, (bool)(dl & 1));
}
-uint8 DreamGenContext::printslow(const uint8 *string, uint16 x, uint16 y, uint8 maxWidth, bool centered) {
+uint8 DreamGenContext::printSlow(const uint8 *string, uint16 x, uint16 y, uint8 maxWidth, bool centered) {
data.byte(kPointerframe) = 1;
data.byte(kPointermode) = 3;
const Frame* charSet = (const Frame *)segRef(data.word(kCharset1)).ptr(0, 0);
do {
uint16 offset = x;
- uint16 charCount = getnumber(charSet, string, maxWidth, centered, &offset);
+ uint16 charCount = getNumber(charSet, string, maxWidth, centered, &offset);
do {
uint8 c0 = string[0];
uint8 c1 = string[1];
uint8 c2 = string[2];
c0 = engine->modifyChar(c0);
- printboth(charSet, &offset, y, c0, c1);
+ printBoth(charSet, &offset, y, c0, c1);
if ((c1 == 0) || (c1 == ':')) {
return 0;
}
@@ -112,10 +112,10 @@ uint8 DreamGenContext::printslow(const uint8 *string, uint16 x, uint16 y, uint8
c1 = engine->modifyChar(c1);
data.word(kCharshift) = 91;
uint16 offset2 = offset;
- printboth(charSet, &offset2, y, c1, c2);
+ printBoth(charSet, &offset2, y, c1, c2);
data.word(kCharshift) = 0;
for (int i=0; i<2; ++i) {
- uint16 mouseState = waitframes();
+ uint16 mouseState = waitFrames();
if (data.byte(kQuitrequested))
return 0;
if (mouseState == 0)
@@ -133,26 +133,26 @@ uint8 DreamGenContext::printslow(const uint8 *string, uint16 x, uint16 y, uint8
} while (true);
}
-void DreamGenContext::printdirect() {
+void DreamGenContext::printDirect() {
uint16 y = bx;
uint16 initialSi = si;
const uint8 *initialString = es.ptr(si, 0);
const uint8 *string = initialString;
- al = printdirect(&string, di, &y, dl, (bool)(dl & 1));
+ al = printDirect(&string, di, &y, dl, (bool)(dl & 1));
si = initialSi + (string - initialString);
bx = y;
}
-uint8 DreamGenContext::printdirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered) {
- return printdirect(&string, x, &y, maxWidth, centered);
+uint8 DreamGenContext::printDirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered) {
+ return printDirect(&string, x, &y, maxWidth, centered);
}
-uint8 DreamGenContext::printdirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered) {
+uint8 DreamGenContext::printDirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered) {
data.word(kLastxpos) = x;
const Frame *charSet = (const Frame *)segRef(data.word(kCurrentset)).ptr(0, 0);
while (true) {
uint16 offset = x;
- uint8 charCount = getnumber(charSet, *string, maxWidth, centered, &offset);
+ uint8 charCount = getNumber(charSet, *string, maxWidth, centered, &offset);
uint16 i = offset;
do {
uint8 c = (*string)[0];
@@ -163,7 +163,7 @@ uint8 DreamGenContext::printdirect(const uint8** string, uint16 x, uint16 *y, ui
}
c = engine->modifyChar(c);
uint8 width, height;
- printchar(charSet, &i, *y, c, nextChar, &width, &height);
+ printChar(charSet, &i, *y, c, nextChar, &width, &height);
data.word(kLastxpos) = i;
--charCount;
} while(charCount);
@@ -171,18 +171,18 @@ uint8 DreamGenContext::printdirect(const uint8** string, uint16 x, uint16 *y, ui
}
}
-void DreamGenContext::getnumber() {
+void DreamGenContext::getNumber() {
uint16 offset = di;
- cl = getnumber((Frame *)ds.ptr(0, 0), es.ptr(si, 0), dl, (bool)(dl & 1), &offset);
+ cl = getNumber((Frame *)ds.ptr(0, 0), es.ptr(si, 0), dl, (bool)(dl & 1), &offset);
di = offset;
}
-uint8 DreamGenContext::getnumber(const Frame *charSet, const uint8 *string, uint16 maxWidth, bool centered, uint16* offset) {
+uint8 DreamGenContext::getNumber(const Frame *charSet, const uint8 *string, uint16 maxWidth, bool centered, uint16* offset) {
uint8 totalWidth = 0;
uint8 charCount = 0;
while (true) {
uint8 wordTotalWidth, wordCharCount;
- uint8 done = getnextword(charSet, string, &wordTotalWidth, &wordCharCount);
+ uint8 done = getNextWord(charSet, string, &wordTotalWidth, &wordCharCount);
string += wordCharCount;
if (done == 1) { //endoftext
@@ -217,7 +217,7 @@ uint8 DreamGenContext::getnumber(const Frame *charSet, const uint8 *string, uint
}
}
-uint8 DreamGenContext::kernchars(uint8 firstChar, uint8 secondChar, uint8 width) {
+uint8 DreamGenContext::kernChars(uint8 firstChar, uint8 secondChar, uint8 width) {
if ((firstChar == 'a') || (al == 'u')) {
if ((secondChar == 'n') || (secondChar == 't') || (secondChar == 'r') || (secondChar == 'i') || (secondChar == 'l'))
return width-1;
@@ -225,23 +225,23 @@ uint8 DreamGenContext::kernchars(uint8 firstChar, uint8 secondChar, uint8 width)
return width;
}
-uint16 DreamGenContext::waitframes() {
- readmouse();
- showpointer();
- vsync();
- dumppointer();
- delpointer();
+uint16 DreamGenContext::waitFrames() {
+ readMouse();
+ showPointer();
+ vSync();
+ dumpPointer();
+ delPointer();
return data.word(kMousebutton);
}
-void DreamGenContext::monprint() {
+void DreamGenContext::monPrint() {
uint16 originalBx = bx;
const char *string = (const char *)es.ptr(bx, 0);
- const char *nextString = monprint(string);
+ const char *nextString = monPrint(string);
bx = originalBx + (nextString - string);
}
-const char *DreamGenContext::monprint(const char *string) {
+const char *DreamGenContext::monPrint(const char *string) {
data.byte(kKerning) = 1;
uint16 x = data.word(kMonadx);
Frame *charset = tempCharset();
@@ -249,7 +249,7 @@ const char *DreamGenContext::monprint(const char *string) {
bool done = false;
while (!done) {
- uint16 count = getnumber(charset, (const uint8 *)iterator, 166, false, &x);
+ uint16 count = getNumber(charset, (const uint8 *)iterator, 166, false, &x);
do {
char c = *iterator++;
if (c == ':')
@@ -265,18 +265,18 @@ const char *DreamGenContext::monprint(const char *string) {
break;
}
c = engine->modifyChar(c);
- printchar(charset, &x, data.word(kMonady), c, 0, NULL, NULL);
+ printChar(charset, &x, data.word(kMonady), c, 0, NULL, NULL);
data.word(kCurslocx) = x;
data.word(kCurslocy) = data.word(kMonady);
data.word(kMaintimer) = 1;
- printcurs();
- vsync();
- lockmon();
- delcurs();
+ printCurs();
+ vSync();
+ lockMon();
+ delCurs();
} while (--count);
x = data.word(kMonadx);
- scrollmonitor();
+ scrollMonitor();
data.word(kCurslocx) = data.word(kMonadx);
}