aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp59
-rw-r--r--engines/dreamweb/dreamgen.h3
-rw-r--r--engines/dreamweb/stubs.cpp31
-rw-r--r--engines/dreamweb/stubs.h2
5 files changed, 35 insertions, 61 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 453dba1e7d..e4d070703d 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -85,6 +85,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'cancelch1',
'getroomspaths',
'makebackob',
+ 'dealwithspecial',
'facerightway',
], skip_output = [
# These functions are processed but not output
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 41a249942c..f448fb2d84 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2923,64 +2923,6 @@ notfudge:
data.byte(kHavedoneobs) = 0;
}
-void DreamGenContext::dealwithspecial() {
- STACK_CHECK;
- _sub(al, 220);
- _cmp(al, 0);
- if (!flags.z())
- goto notplset;
- al = ah;
- placesetobject();
- data.byte(kHavedoneobs) = 1;
- return;
-notplset:
- _cmp(al, 1);
- if (!flags.z())
- goto notremset;
- al = ah;
- removesetobject();
- data.byte(kHavedoneobs) = 1;
- return;
-notremset:
- _cmp(al, 2);
- if (!flags.z())
- goto notplfree;
- al = ah;
- placefreeobject();
- data.byte(kHavedoneobs) = 1;
- return;
-notplfree:
- _cmp(al, 3);
- if (!flags.z())
- goto notremfree;
- al = ah;
- removefreeobject();
- data.byte(kHavedoneobs) = 1;
- return;
-notremfree:
- _cmp(al, 4);
- if (!flags.z())
- goto notryanoff;
- switchryanoff();
- return;
-notryanoff:
- _cmp(al, 5);
- if (!flags.z())
- goto notryanon;
- data.byte(kTurntoface) = ah;
- data.byte(kFacing) = ah;
- switchryanon();
- return;
-notryanon:
- _cmp(al, 6);
- if (!flags.z())
- goto notchangeloc;
- data.byte(kNewlocation) = ah;
- return;
-notchangeloc:
- movemap();
-}
-
void DreamGenContext::movemap() {
STACK_CHECK;
_cmp(ah, 32);
@@ -20320,7 +20262,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_plotreel: plotreel(); break;
case addr_soundonreels: soundonreels(); break;
case addr_reconstruct: reconstruct(); break;
- case addr_dealwithspecial: dealwithspecial(); break;
case addr_movemap: movemap(); break;
case addr_getreelstart: getreelstart(); break;
case addr_deleverything: deleverything(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index e2caf43107..fc141fa5d3 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -642,7 +642,6 @@ public:
static const uint16 addr_deleverything = 0xc1c0;
static const uint16 addr_getreelstart = 0xc1b8;
static const uint16 addr_movemap = 0xc1b4;
- static const uint16 addr_dealwithspecial = 0xc1b0;
static const uint16 addr_reconstruct = 0xc1ac;
static const uint16 addr_soundonreels = 0xc1a8;
static const uint16 addr_plotreel = 0xc1a4;
@@ -1449,7 +1448,7 @@ public:
void printcurs();
//void convertkey();
void outofopen();
- void dealwithspecial();
+ //void dealwithspecial();
//void eraseoldobs();
void dircom();
//void liftsprite();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 5ef8b18317..a9e0ef5929 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -802,5 +802,36 @@ void DreamGenContext::fillspace() {
memset(ds.ptr(dx, cx), al, cx);
}
+void DreamGenContext::dealwithspecial() {
+ uint8 type = al - 220;
+ if (type == 0) {
+ al = ah;
+ placesetobject();
+ data.byte(kHavedoneobs) = 1;
+ } else if (type == 1) {
+ al = ah;
+ removesetobject();
+ data.byte(kHavedoneobs) = 1;
+ } else if (type == 2) {
+ al = ah;
+ placefreeobject();
+ data.byte(kHavedoneobs) = 1;
+ } else if (type == 3) {
+ al = ah;
+ removefreeobject();
+ data.byte(kHavedoneobs) = 1;
+ } else if (type == 4) {
+ switchryanoff();
+ } else if (type == 5) {
+ data.byte(kTurntoface) = ah;
+ data.byte(kFacing) = ah;
+ switchryanon();
+ } else if (type == 6) {
+ data.byte(kNewlocation) = ah;
+ } else {
+ movemap();
+ }
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 01dcbde349..4d35a597c4 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -106,3 +106,5 @@
void lockmon();
void cancelch0();
void cancelch1();
+ void dealwithspecial();
+