diff options
author | Bertrand Augereau | 2011-07-18 14:30:07 +0200 |
---|---|---|
committer | Bertrand Augereau | 2011-07-23 18:23:38 +0200 |
commit | 599fbf4fe6e8fd92105ae2bcdd21e0c2f82005f9 (patch) | |
tree | c91a3b67f440677e430b70411e6d492bccfcbd19 /engines/dreamweb/stubs.cpp | |
parent | b728323df751a0aec5aee890cdce52f50796b12a (diff) | |
download | scummvm-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.cpp | 31 |
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)); } |