[Scummvm-cvs-logs] scummvm master -> 1de8427361de7b810b5043a80827bb38e474b974
tramboi
bertrand_augereau at yahoo.fr
Mon Sep 5 17:49:06 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1de8427361 DREAMWEB: 'isitworn' and 'makeworn' ported to C++
Commit: 1de8427361de7b810b5043a80827bb38e474b974
https://github.com/scummvm/scummvm/commit/1de8427361de7b810b5043a80827bb38e474b974
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-09-02T00:23:27-07:00
Commit Message:
DREAMWEB: 'isitworn' and 'makeworn' ported to C++
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/stubs.cpp
engines/dreamweb/stubs.h
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 3e04ddd..a9fb153 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 0fd6ae1..c28c289 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 c8dc192..f3b502a 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 d63e884..7313966 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 e1abc1b..4d22fcc 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);
More information about the Scummvm-git-logs
mailing list