aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Augereau2011-11-18 06:17:23 +0100
committerBertrand Augereau2011-11-18 06:25:54 +0100
commit5461b03983a58ba63b2a86cc6042d9a99cb771f4 (patch)
treeffe8e0737cbc35c4d57ac8420872a0ec893ff3c0
parentcfac223cee7cc8136fdf43dea1465a1b060a803b (diff)
downloadscummvm-rg350-5461b03983a58ba63b2a86cc6042d9a99cb771f4.tar.gz
scummvm-rg350-5461b03983a58ba63b2a86cc6042d9a99cb771f4.tar.bz2
scummvm-rg350-5461b03983a58ba63b2a86cc6042d9a99cb771f4.zip
DREAMWEB: 'delcurs' ported to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp37
-rw-r--r--engines/dreamweb/dreamgen.h3
-rw-r--r--engines/dreamweb/stubs.cpp14
-rw-r--r--engines/dreamweb/stubs.h1
5 files changed, 17 insertions, 39 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index bf9f304483..2c5f1f3964 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -239,6 +239,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'loadintotemp3',
'loadtempcharset',
'printcurs',
+ 'delcurs',
'loadroomssample',
], skip_output = [
# These functions are processed but not output
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 24c804e51d..4899673977 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -7294,42 +7294,6 @@ void DreamGenContext::triggermessage() {
data.byte(kLasttrigger) = 0;
}
-void DreamGenContext::delcurs() {
- STACK_CHECK;
- push(es);
- push(bx);
- push(di);
- push(ds);
- push(dx);
- push(si);
- 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:
- push(di);
- push(bx);
- push(cx);
- ds = data.word(kBuffers);
- si = (0);
- multiput();
- cx = pop();
- bx = pop();
- di = pop();
- multidump();
- si = pop();
- dx = pop();
- ds = pop();
- di = pop();
- bx = pop();
- es = pop();
-}
-
void DreamGenContext::useobject() {
STACK_CHECK;
data.byte(kWithobject) = 255;
@@ -15685,7 +15649,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_monmessage: monmessage(); break;
case addr_processtrigger: processtrigger(); break;
case addr_triggermessage: triggermessage(); break;
- case addr_delcurs: delcurs(); break;
case addr_useobject: useobject(); break;
case addr_wheelsound: wheelsound(); break;
case addr_runtap: runtap(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 512f7e6193..643ed0bd2b 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -342,7 +342,6 @@ public:
static const uint16 addr_runtap = 0xc58c;
static const uint16 addr_wheelsound = 0xc588;
static const uint16 addr_useobject = 0xc580;
- static const uint16 addr_delcurs = 0xc57c;
static const uint16 addr_triggermessage = 0xc574;
static const uint16 addr_processtrigger = 0xc570;
static const uint16 addr_monmessage = 0xc56c;
@@ -1848,7 +1847,7 @@ public:
void getexad();
void openforsave();
void closefile();
- void delcurs();
+ //void delcurs();
void randomaccess();
//void calcfrframe();
//void checkifex();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index eb8f2b8218..f8f3be9d01 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -270,6 +270,20 @@ void DreamGenContext::printcurs() {
multidump(x - 6, y, 12, height);
}
+void DreamGenContext::delcurs() {
+ uint16 x = data.word(kCurslocx);
+ uint16 y = data.word(kCurslocy);
+ uint16 width = 6;
+ uint16 height;
+ if (data.byte(kForeignrelease)) {
+ y -= 3;
+ height = 11;
+ } else
+ height = 8;
+ multiput(segRef(data.word(kBuffers)).ptr(kTextunder, 0), x, y, width, height);
+ multidump(x, y, width, 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 ca7b74f19b..1475b71ccd 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -34,6 +34,7 @@
void loadtempcharset();
void loadtempcharset(const char *fileName);
void printcurs();
+ void delcurs();
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);