aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp14
-rw-r--r--engines/dreamweb/dreamgen.h3
-rw-r--r--engines/dreamweb/stubs.cpp17
-rw-r--r--engines/dreamweb/stubs.h3
5 files changed, 21 insertions, 17 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index b54d1dc948..4389f06ecf 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -227,6 +227,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'showoutermenu',
'textforend',
'textformonk',
+ 'twodigitnum',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 12ab6b8e8e..9479d34dc1 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -13405,19 +13405,6 @@ morethan10:
_add(dl, 'A');
}
-void DreamGenContext::twodigitnum() {
- STACK_CHECK;
- ah = cl;
- _dec(ah);
-numloop1:
- _inc(ah);
- _sub(al, 10);
- if (!flags.c())
- goto numloop1;
- _add(al, 10);
- _add(al, cl);
-}
-
void DreamGenContext::showword() {
STACK_CHECK;
ch = 0;
@@ -16226,7 +16213,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_dumpwatch: dumpwatch(); break;
case addr_showbyte: showbyte(); break;
case addr_onedigit: onedigit(); break;
- case addr_twodigitnum: twodigitnum(); break;
case addr_showword: showword(); break;
case addr_convnum: convnum(); break;
case addr_mainscreen: mainscreen(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 8c319bd665..97b29517c9 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -107,7 +107,6 @@ public:
static const uint16 addr_mainscreen = 0xc9c8;
static const uint16 addr_convnum = 0xc9c4;
static const uint16 addr_showword = 0xc9c0;
- static const uint16 addr_twodigitnum = 0xc9bc;
static const uint16 addr_onedigit = 0xc9b8;
static const uint16 addr_showbyte = 0xc9b4;
static const uint16 addr_dumpwatch = 0xc9b0;
@@ -1731,7 +1730,7 @@ public:
//void walkandexamine();
void dmaend();
//void quickquit2();
- void twodigitnum();
+ //void twodigitnum();
//void madmantext();
void dumpcurrent();
//void textforend();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index df4ed52421..44f0b87051 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2016,5 +2016,22 @@ void DreamGenContext::loadroom() {
getdimension();
}
+void DreamGenContext::twodigitnum(uint8 in1, uint8 in2, uint8 *out1, uint8 *out2) {
+ *out1 = in1;
+ *out2 = in2;
+ while (*out1 >= 10) {
+ ++(*out2);
+ *out1 -= 10;
+ }
+ *out1 += in2;
+}
+
+void DreamGenContext::twodigitnum() {
+ uint8 out1, out2;
+ twodigitnum(al, cl, &out1, &out2);
+ al = out1;
+ ah = out2;
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 5688e8c7b4..313c2f2393 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -272,5 +272,6 @@
void putundermenu();
void textformonk();
void textforend();
-
+ void twodigitnum(uint8 in1, uint8 in2, uint8 *out1, uint8 *out2);
+ void twodigitnum();