diff options
author | Bertrand Augereau | 2011-11-18 00:41:09 +0100 |
---|---|---|
committer | Bertrand Augereau | 2011-11-18 01:03:49 +0100 |
commit | e79dda07f469626d9f2c06450a13625c52e47329 (patch) | |
tree | 45b330ae2f0ed1bc1ab477abe571d56ee0fd920d | |
parent | 79be8a541bd014abe9aa011b0e9f12768a370efd (diff) | |
download | scummvm-rg350-e79dda07f469626d9f2c06450a13625c52e47329.tar.gz scummvm-rg350-e79dda07f469626d9f2c06450a13625c52e47329.tar.bz2 scummvm-rg350-e79dda07f469626d9f2c06450a13625c52e47329.zip |
DREAMWEB: 'printcurs' ported to C++
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 58 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 7 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 16 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 21 insertions, 62 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index fddf64b141..bf9f304483 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -238,6 +238,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'loadintotemp2', 'loadintotemp3', 'loadtempcharset', + 'printcurs', 'loadroomssample', ], skip_output = [ # These functions are processed but not output diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 41c91a5be5..24c804e51d 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -7294,63 +7294,6 @@ void DreamGenContext::triggermessage() { data.byte(kLasttrigger) = 0; } -void DreamGenContext::printcurs() { - STACK_CHECK; - push(si); - push(di); - push(ds); - push(dx); - push(bx); - push(es); - di = data.word(kCurslocx); - bx = data.word(kCurslocy); - cl = 6; - ch = 8; - _cmp(data.byte(kForeignrelease), 0); - if (flags.z()) - goto _tmp1; - _sub(bx, 3); - ch = 11; -_tmp1: - ds = data.word(kBuffers); - si = (0); - push(di); - push(bx); - multiget(); - bx = pop(); - di = pop(); - push(bx); - push(di); - _inc(data.word(kMaintimer)); - ax = data.word(kMaintimer); - _and(al, 16); - if (!flags.z()) - goto flashcurs; - al = '/'; - _sub(al, 32); - ah = 0; - ds = data.word(kTempcharset); - showframe(); -flashcurs: - di = pop(); - bx = pop(); - _sub(di, 6); - cl = 12; - ch = 8; - _cmp(data.byte(kForeignrelease), 0); - if (flags.z()) - goto _tmp2; - ch = 11; -_tmp2: - multidump(); - es = pop(); - bx = pop(); - dx = pop(); - ds = pop(); - di = pop(); - si = pop(); -} - void DreamGenContext::delcurs() { STACK_CHECK; push(es); @@ -15742,7 +15685,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_monmessage: monmessage(); break; case addr_processtrigger: processtrigger(); break; case addr_triggermessage: triggermessage(); break; - case addr_printcurs: printcurs(); break; case addr_delcurs: delcurs(); break; case addr_useobject: useobject(); break; case addr_wheelsound: wheelsound(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 281a92b11c..512f7e6193 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -343,7 +343,6 @@ public: static const uint16 addr_wheelsound = 0xc588; static const uint16 addr_useobject = 0xc580; static const uint16 addr_delcurs = 0xc57c; - static const uint16 addr_printcurs = 0xc578; static const uint16 addr_triggermessage = 0xc574; static const uint16 addr_processtrigger = 0xc570; static const uint16 addr_monmessage = 0xc56c; @@ -1338,7 +1337,7 @@ public: void hangoncurs(); //void getblockofpixel(); //void kernchars(); - void printcurs(); + //void printcurs(); //void convertkey(); void outofopen(); //void dealwithspecial(); @@ -1934,7 +1933,7 @@ public: void quitkey(); void processtrigger(); void monmessage(); - void readdesticon(); + void volumeadjust(); void randomnum2(); void loadsecondsample(); void transfercontoex(); @@ -1952,7 +1951,7 @@ public: void accesslightoff(); void usehole(); void useobject(); - void volumeadjust(); + void readdesticon(); //void watchcount(); }; } diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index ce25a92766..eb8f2b8218 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -254,6 +254,22 @@ void DreamGenContext::loadtempcharset(const char *fileName) { data.word(kTempcharset) = standardload(fileName); } +void DreamGenContext::printcurs() { + uint16 x = data.word(kCurslocx); + uint16 y = data.word(kCurslocy); + uint16 height; + if (data.byte(kForeignrelease)) { + y -= 3; + height = 11; + } else + height = 8; + multiget(segRef(data.word(kBuffers)).ptr(kTextunder, 0), x, y, 6, height); + ++data.word(kMaintimer); + if ((data.word(kMaintimer) & 16) == 0) + showframe((Frame *)segRef(data.word(kTempcharset)).ptr(0, 0), x, y, '/' - 32, 0); + multidump(x - 6, y, 12, height); +} + void DreamGenContext::seecommandtail() { data.word(kSoundbaseadd) = 0x220; data.byte(kSoundint) = 5; diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index ff8d597418..ca7b74f19b 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -33,6 +33,7 @@ void loadintotemp3(const char *fileName); void loadtempcharset(); void loadtempcharset(const char *fileName); + void printcurs(); void multidump(); void multidump(uint16 x, uint16 y, uint8 width, uint8 height); void frameoutv(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, int16 x, int16 y); |