diff options
author | Bertrand Augereau | 2011-07-21 22:46:16 +0200 |
---|---|---|
committer | Bertrand Augereau | 2011-07-23 18:23:40 +0200 |
commit | 60d4970fd091c618194684bc0030d70fc3808138 (patch) | |
tree | d7e85f5c4e9058eae30c0ba927f2f7e965bcaad0 | |
parent | c4f9afaa023889f2f8cab2a79874aca3b6f6bba3 (diff) | |
download | scummvm-rg350-60d4970fd091c618194684bc0030d70fc3808138.tar.gz scummvm-rg350-60d4970fd091c618194684bc0030d70fc3808138.tar.bz2 scummvm-rg350-60d4970fd091c618194684bc0030d70fc3808138.zip |
DREAMWEB: 'dumptextline' ported to C++
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 19 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 11 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 14 insertions, 21 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index f668f63bf2..79d0dc42e2 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -44,6 +44,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'kernchars', 'getnextword', 'getnumber', + 'dumptextline', 'printboth', 'printchar', 'printdirect', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 216679efc3..2c9f4a45a3 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -19538,24 +19538,6 @@ _tmp1: multiput(); } -void DreamGenContext::dumptextline() { - STACK_CHECK; - _cmp(data.byte(kNewtextline), 1); - if (!flags.z()) - return /* (nodumptextline) */; - data.byte(kNewtextline) = 0; - di = data.word(kTextaddressx); - bx = data.word(kTextaddressy); - _cmp(data.byte(kForeignrelease), 0); - if (flags.z()) - goto _tmp1; - _sub(bx, 3); -_tmp1: - cl = (228); - ch = (13); - multidump(); -} - void DreamGenContext::animpointer() { STACK_CHECK; _cmp(data.byte(kPointermode), 2); @@ -21741,7 +21723,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_dumppointer: dumppointer(); break; case addr_undertextline: undertextline(); break; case addr_deltextline: deltextline(); break; - case addr_dumptextline: dumptextline(); break; case addr_animpointer: animpointer(); break; case addr_setmouse: setmouse(); break; case addr_readmouse: readmouse(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index c6b9bedb92..8dd6417523 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -92,7 +92,6 @@ public: static const uint16 addr_readmouse = 0xcae4; static const uint16 addr_setmouse = 0xcae0; static const uint16 addr_animpointer = 0xcadc; - static const uint16 addr_dumptextline = 0xcad8; static const uint16 addr_deltextline = 0xcad4; static const uint16 addr_undertextline = 0xcad0; static const uint16 addr_dumppointer = 0xcacc; @@ -1518,7 +1517,7 @@ public: void fillopen(); void delsprite(); void getroomspaths(); - void dumptextline(); + //void dumptextline(); void fadescreendownhalf(); void useplate(); void candles1(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 9cc6098f79..3bf26c28fd 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -318,6 +318,17 @@ void DreamGenContext::printslow() { al = printslow(di, bx, dl, (bool)(dl & 1)); } +void DreamGenContext::dumptextline() { + if (data.byte(kNewtextline) != 1) + return; + data.byte(kNewtextline) = 0; + uint16 x = data.word(kTextaddressx); + uint16 y = data.word(kTextaddressy); + if (data.byte(kForeignrelease) != 0) + y -= 3; + multidump(x, y, 228, 13); +} + uint8 DreamGenContext::printslow(uint16 x, uint16 y, uint8 maxWidth, bool centered) { data.byte(kPointerframe) = 1; data.byte(kPointermode) = 3; diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 3f9c5d0c5e..690ae5003a 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -46,6 +46,7 @@ void printdirect(); uint8 printslow(uint16 x, uint16 y, uint8 maxWidth, bool centered); void printslow(); + void dumptextline(); void getnumber(); uint8 getnumber(uint16 maxWidth, bool centered, uint16* offset); void kernchars(); |