aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdevtools/tasmrecover/tasm-recover2
-rw-r--r--engines/dreamweb/dreamgen.cpp18
-rw-r--r--engines/dreamweb/dreamgen.h6
-rw-r--r--engines/dreamweb/stubs.cpp17
-rw-r--r--engines/dreamweb/stubs.h4
5 files changed, 25 insertions, 22 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 3e04ddd1dd..a9fb1539a4 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -185,6 +185,8 @@ generator = cpp(context, "DreamGen", blacklist = [
'checkifpathison',
'delsprite',
'dumpeverything',
+ 'isitworn',
+ 'makeworn',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 0fd6ae19d2..c28c289b77 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -4015,22 +4015,6 @@ finishfill:
bx = pop();
}
-void DreamGenContext::isitworn() {
- STACK_CHECK;
- al = es.byte(bx+12);
- _cmp(al, 'W'-'A');
- if (!flags.z())
- return /* (notworn) */;
- al = es.byte(bx+13);
- _cmp(al, 'E'-'A');
-}
-
-void DreamGenContext::makeworn() {
- STACK_CHECK;
- es.byte(bx+12) = 'W'-'A';
- es.byte(bx+13) = 'E'-'A';
-}
-
void DreamGenContext::examineob() {
STACK_CHECK;
data.byte(kPointermode) = 0;
@@ -17385,8 +17369,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_findallryan: findallryan(); break;
case addr_findallopen: findallopen(); break;
case addr_obtoinv: obtoinv(); break;
- case addr_isitworn: isitworn(); break;
- case addr_makeworn: makeworn(); break;
case addr_examineob: examineob(); break;
case addr_makemainscreen: makemainscreen(); break;
case addr_getbackfromob: getbackfromob(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index c8dc1924f4..f3b502a8f6 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -494,8 +494,6 @@ public:
static const uint16 addr_getbackfromob = 0xc344;
static const uint16 addr_makemainscreen = 0xc340;
static const uint16 addr_examineob = 0xc33c;
- static const uint16 addr_makeworn = 0xc338;
- static const uint16 addr_isitworn = 0xc334;
static const uint16 addr_obtoinv = 0xc330;
static const uint16 addr_findallopen = 0xc32c;
static const uint16 addr_findallryan = 0xc328;
@@ -1273,7 +1271,7 @@ public:
void neterror();
void storeit();
//void lockeddoorway();
- void isitworn();
+ //void isitworn();
//void putundertimed();
//void dumpmap();
//void multidump();
@@ -1667,7 +1665,7 @@ public:
//void showallfree();
void loadnews();
void rollem();
- void makeworn();
+ //void makeworn();
void examineobtext();
void startup();
void savegame();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index d63e8843f6..731396697d 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1779,5 +1779,22 @@ bool DreamGenContext::checkifset(uint8 x, uint8 y) {
return false;
}
+void DreamGenContext::isitworn() {
+ flags._z = isitworn((const DynObject *)es.ptr(bx, sizeof(DynObject)));
+}
+
+bool DreamGenContext::isitworn(const DynObject *object) {
+ return (object->id[0] == 'W'-'A') && (object->id[1] == 'E'-'A');
+}
+
+void DreamGenContext::makeworn() {
+ makeworn((DynObject *)es.ptr(bx, sizeof(DynObject)));
+}
+
+void DreamGenContext::makeworn(DynObject *object) {
+ object->id[0] = 'W'-'A';
+ object->id[1] = 'E'-'A';
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index e1abc1b1dc..4d22fcc0bf 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -220,4 +220,8 @@
bool checkifset(uint8 x, uint8 y);
void checkifpathison();
bool checkifpathison(uint8 index);
+ void isitworn();
+ bool isitworn(const DynObject *object);
+ void makeworn();
+ void makeworn(DynObject *object);