aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/stubs.cpp
diff options
context:
space:
mode:
authorBertrand Augereau2011-07-18 14:30:07 +0200
committerBertrand Augereau2011-07-23 18:23:38 +0200
commit599fbf4fe6e8fd92105ae2bcdd21e0c2f82005f9 (patch)
treec91a3b67f440677e430b70411e6d492bccfcbd19 /engines/dreamweb/stubs.cpp
parentb728323df751a0aec5aee890cdce52f50796b12a (diff)
downloadscummvm-rg350-599fbf4fe6e8fd92105ae2bcdd21e0c2f82005f9.tar.gz
scummvm-rg350-599fbf4fe6e8fd92105ae2bcdd21e0c2f82005f9.tar.bz2
scummvm-rg350-599fbf4fe6e8fd92105ae2bcdd21e0c2f82005f9.zip
DREAMWEB: 'printdirect' ported to C++
Diffstat (limited to 'engines/dreamweb/stubs.cpp')
-rw-r--r--engines/dreamweb/stubs.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index b68f7e67df..fa7ec63a40 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -271,6 +271,37 @@ void DreamGenContext::getnextword() {
bh = charCount;
}
+void DreamGenContext::printdirect() {
+ data.word(kLastxpos) = di;
+ ds = data.word(kCurrentset);
+ while (true) {
+ push(bx);
+ push(di);
+ push(dx);
+ uint8 charCount = getnumber(dl, (bool)(dl & 1));
+ do {
+ ax = es.word(si);
+ ++si;
+ if ((al == 0) || (al == ':')) {
+ dx = pop();
+ di = pop();
+ bx = pop();
+ return;
+ }
+ push(es);
+ al = engine->modifyChar(al);
+ printchar();
+ data.word(kLastxpos) = di;
+ es = pop();
+ --charCount;
+ } while(charCount);
+ dx = pop();
+ di = pop();
+ bx = pop();
+ bx += data.word(kLinespacing);
+ }
+}
+
void DreamGenContext::getnumber() {
cl = getnumber(dl, (bool)(dl & 1));
}