diff options
author | Bertrand Augereau | 2011-07-17 16:02:47 +0200 |
---|---|---|
committer | Bertrand Augereau | 2011-07-18 22:59:17 +0200 |
commit | 599c0f486262c1d3677c94f0122dab604e324084 (patch) | |
tree | 287a618cf87e1d87cc442b35eaaa13a526d24e21 | |
parent | 825e736aeded8a52cbdc060c3a0d587d24273d72 (diff) | |
download | scummvm-rg350-599c0f486262c1d3677c94f0122dab604e324084.tar.gz scummvm-rg350-599c0f486262c1d3677c94f0122dab604e324084.tar.bz2 scummvm-rg350-599c0f486262c1d3677c94f0122dab604e324084.zip |
DREAMWEB: Gave a proper signature to gextnextword
-rw-r--r-- | engines/dreamweb/stubs.cpp | 30 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
2 files changed, 17 insertions, 14 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index a2bfd5b96a..646c7e8909 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -217,36 +217,38 @@ void DreamGenContext::setmouse() { data.word(kOldpointerx) = 0xffff; } -void DreamGenContext::getnextword() { - uint8 totalWidth = 0; - bh = 0; +uint8 DreamGenContext::getnextword(uint8 *totalWidth, uint8 *charCount) { + *totalWidth = 0; + *charCount = 0; while(true) { uint8 firstChar = es.byte(di); ++di; - ++bh; + ++*charCount; if ((firstChar == ':') || (firstChar == 0)) { //endall - totalWidth += 6; - bl = totalWidth; - al = 1; - return; + *totalWidth += 6; + return 1; } if (firstChar == 32) { //endword - totalWidth += 6; - bl = totalWidth; - al = 0; - return; + *totalWidth += 6; + return 0; } firstChar = engine->modifyChar(firstChar); if (firstChar != 255) { uint8 secondChar = es.byte(di); uint8 width = ds.byte(6*(firstChar - 32 + data.word(kCharshift))); width = kernchars(firstChar, secondChar, width); - totalWidth += width; - bl = totalWidth; + *totalWidth += width; } } } +void DreamGenContext::getnextword() { + uint8 totalWidth, charCount; + al = getnextword(&totalWidth, &charCount); + bl = totalWidth; + bh = charCount; +} + 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')) diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 70c1cfda13..7f82ba5a54 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -15,6 +15,7 @@ void randomnumber(); void quickquit2(); void getnextword(); + uint8 getnextword(uint8 *totalWidth, uint8 *charCount); void kernchars(); uint8 kernchars(uint8 firstChar, uint8 secondChar, uint8 width); Sprite* spritetable(); |