aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2011-12-07 23:45:33 +0100
committerMax Horn2011-12-08 00:24:22 +0100
commitb07edcb8febe6fb73c63d6c4eee3a399b78afa6f (patch)
tree98bd504b8047a966ddd52d3ad276ce4c80d75ae5
parent460e53172b8b3c4da9796bd2ea6eed6efdda0dd2 (diff)
downloadscummvm-rg350-b07edcb8febe6fb73c63d6c4eee3a399b78afa6f.tar.gz
scummvm-rg350-b07edcb8febe6fb73c63d6c4eee3a399b78afa6f.tar.bz2
scummvm-rg350-b07edcb8febe6fb73c63d6c4eee3a399b78afa6f.zip
DREAMWEB: Move printBoth, printChar, printDirect to DreamBase
-rw-r--r--engines/dreamweb/dreambase.h5
-rw-r--r--engines/dreamweb/print.cpp12
-rw-r--r--engines/dreamweb/stubs.h11
3 files changed, 17 insertions, 11 deletions
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index b3df83de06..9c84a3c493 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -57,6 +57,11 @@ public:
// from print.cpp
uint8 getNextWord(const Frame *charSet, const uint8 *string, uint8 *totalWidth, uint8 *charCount);
+ 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 printBoth(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar);
+ uint8 printDirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered);
+ uint8 printDirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered);
uint8 getNumber(const Frame *charSet, const uint8 *string, uint16 maxWidth, bool centered, uint16 *offset);
uint8 kernChars(uint8 firstChar, uint8 secondChar, uint8 width);
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index 1fc652f4b3..c554053fb7 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -24,7 +24,7 @@
namespace DreamGen {
-void DreamGenContext::printBoth(const Frame *charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar) {
+void DreamBase::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);
@@ -57,7 +57,7 @@ uint8 DreamBase::getNextWord(const Frame *charSet, const uint8 *string, uint8 *t
}
}
-void DreamGenContext::printChar(const Frame *charSet, uint16* x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) {
+void DreamBase::printChar(const Frame *charSet, uint16* x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) {
if (c == 255)
return;
@@ -75,7 +75,7 @@ void DreamGenContext::printChar(const Frame *charSet, uint16* x, uint16 y, uint8
(*x) += *width;
}
-void DreamGenContext::printChar(const Frame *charSet, uint16 x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) {
+void DreamBase::printChar(const Frame *charSet, uint16 x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) {
printChar(charSet, &x, y, c, nextChar, width, height);
}
@@ -125,16 +125,16 @@ void DreamGenContext::printDirect() {
uint16 initialSi = si;
const uint8 *initialString = es.ptr(si, 0);
const uint8 *string = initialString;
- al = printDirect(&string, di, &y, dl, (bool)(dl & 1));
+ al = DreamBase::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) {
+uint8 DreamBase::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 DreamBase::printDirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered) {
data.word(kLastxpos) = x;
const Frame *charSet = engine->currentCharset();
while (true) {
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index ec01fd116f..c601481e9f 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -67,12 +67,13 @@
void seeCommandTail();
void randomNumber();
void quickQuit2();
- void printBoth(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar);
- 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();
- uint8 printDirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered);
- uint8 printDirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered);
+ uint8 printDirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered) {
+ return DreamBase::printDirect(string, x, y, maxWidth, centered);
+ }
+ uint8 printDirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered) {
+ return DreamBase::printDirect(string, x, y, maxWidth, centered);
+ }
void printMessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered);
void printMessage();
void useTimedText();