aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp13
-rw-r--r--engines/dreamweb/dreamgen.h3
-rw-r--r--engines/dreamweb/stubs.cpp14
-rw-r--r--engines/dreamweb/stubs.h2
5 files changed, 18 insertions, 15 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 8e37b4e851..c884e4af3a 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -145,6 +145,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'adjustlen',
'finishedwalking',
'checkone',
+ 'getflagunderp',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 0ee8c50cd3..288a7a5ae8 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -15976,18 +15976,6 @@ searchmess:
printdirect();
}
-void DreamGenContext::getflagunderp() {
- STACK_CHECK;
- cx = data.word(kMousex);
- _sub(cx, data.word(kMapadx));
- ax = data.word(kMousey);
- _sub(ax, data.word(kMapady));
- ch = al;
- checkone();
- data.byte(kLastflag) = cl;
- data.byte(kLastflagex) = ch;
-}
-
void DreamGenContext::setwalk() {
STACK_CHECK;
_cmp(data.byte(kLinepointer), 254);
@@ -18582,7 +18570,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_examineobtext: examineobtext(); break;
case addr_printmessage: printmessage(); break;
case addr_printmessage2: printmessage2(); break;
- case addr_getflagunderp: getflagunderp(); break;
case addr_setwalk: setwalk(); break;
case addr_bresenhams: bresenhams(); break;
case addr_workoutframes: workoutframes(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 7ed079c00e..eb15b18840 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -115,7 +115,6 @@ public:
static const uint16 addr_workoutframes = 0xca54;
static const uint16 addr_bresenhams = 0xca50;
static const uint16 addr_setwalk = 0xca44;
- static const uint16 addr_getflagunderp = 0xca40;
static const uint16 addr_printmessage2 = 0xca30;
static const uint16 addr_printmessage = 0xca2c;
static const uint16 addr_examineobtext = 0xca20;
@@ -1843,7 +1842,7 @@ public:
void louischair();
void saveems();
void locationpic();
- void getflagunderp();
+ //void getflagunderp();
void dolook();
void opentvdoor();
void triggermessage();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index f0938ea30b..7cf1a307e3 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1163,6 +1163,20 @@ bool DreamGenContext::finishedwalkingCPP() {
return (data.byte(kLinepointer) == 254) && (data.byte(kFacing) == data.byte(kTurntoface));
}
+void DreamGenContext::getflagunderp() {
+ uint8 flag, flagEx;
+ getflagunderp(&flag, &flagEx);
+ cl = flag;
+ ch = flagEx;
+}
+
+void DreamGenContext::getflagunderp(uint8 *flag, uint8 *flagEx) {
+ uint8 type, flagX, flagY;
+ checkone(data.word(kMousex) - data.word(kMapadx), data.word(kMousey) - data.word(kMapady), flag, flagEx, &type, &flagX, &flagY);
+ cl = data.byte(kLastflag) = *flag;
+ ch = data.byte(kLastflagex) = *flagEx;
+}
+
bool DreamGenContext::isCD() {
// The original sources has two codepaths depending if the game is 'if cd' or not
// This is a hack to guess which version to use with the assumption that if we have a cd version
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 9d5550be5b..80bee35e06 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -171,4 +171,6 @@
void finishedwalking();
void checkone();
void checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY);
+ void getflagunderp();
+ void getflagunderp(uint8 *flag, uint8 *flagEx);