aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp21
-rw-r--r--engines/dreamweb/dreamgen.h3
-rw-r--r--engines/dreamweb/print.cpp15
-rw-r--r--engines/dreamweb/stubs.h1
5 files changed, 15 insertions, 26 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 520419b20e..6596d4ef23 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -160,6 +160,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'readmouse2',
'readmouse3',
'readmouse4',
+ 'waitframes',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index aab390748d..721ac526e1 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -3926,26 +3926,6 @@ realcreditsearly:
data.byte(kLasthardkey) = 0;
}
-void DreamGenContext::waitframes() {
- STACK_CHECK;
- push(di);
- push(bx);
- push(es);
- push(si);
- push(ds);
- readmouse();
- showpointer();
- vsync();
- dumppointer();
- delpointer();
- ax = data.word(kMousebutton);
- ds = pop();
- si = pop();
- es = pop();
- bx = pop();
- di = pop();
-}
-
void DreamGenContext::monprint() {
STACK_CHECK;
data.byte(kKerning) = 1;
@@ -18109,7 +18089,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_mode640x480: mode640x480(); break;
case addr_set16colpalette: set16colpalette(); break;
case addr_realcredits: realcredits(); break;
- case addr_waitframes: waitframes(); break;
case addr_monprint: monprint(); break;
case addr_fillryan: fillryan(); break;
case addr_fillopen: fillopen(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 2af08a486f..7fc3091819 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -517,7 +517,6 @@ public:
static const uint16 addr_fillopen = 0xc324;
static const uint16 addr_fillryan = 0xc320;
static const uint16 addr_monprint = 0xc314;
- static const uint16 addr_waitframes = 0xc308;
static const uint16 addr_realcredits = 0xc2f8;
static const uint16 addr_set16colpalette = 0xc2f4;
static const uint16 addr_mode640x480 = 0xc2f0;
@@ -1917,7 +1916,7 @@ public:
void searchforfiles();
void monkspeaking();
void fadecalculation();
- void waitframes();
+ //void waitframes();
void clearrest();
//void getreelframeax();
void barwoman();
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index 26084c35d1..844ad97f29 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -112,10 +112,10 @@ uint8 DreamGenContext::printslow(const uint8 *string, uint16 x, uint16 y, uint8
printboth(charSet, &offset2, y, c1, c2);
data.word(kCharshift) = 0;
for (int i=0; i<2; ++i) {
- waitframes();
- if (ax == 0)
+ uint16 mouseState = waitframes();
+ if (mouseState == 0)
continue;
- if (ax != data.word(kOldbutton)) {
+ if (mouseState != data.word(kOldbutton)) {
return 1;
}
}
@@ -220,5 +220,14 @@ void DreamGenContext::kernchars() {
cl = kernchars(al, ah, cl);
}
+uint16 DreamGenContext::waitframes() {
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ delpointer();
+ return data.word(kMousebutton);
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index df6401323e..17ee0d8f1f 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -190,4 +190,5 @@
void readmouse2();
void readmouse3();
void readmouse4();
+ uint16 waitframes();