aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Augereau2011-09-06 08:54:01 +0200
committerBertrand Augereau2011-09-06 09:05:55 +0200
commite6162f1a786af00974f814ea5c11dbd4e76bd972 (patch)
tree1ee5f3bfc82ee28a2a5d9cf5b1c7611a14c5fad0
parenta6b6d05a2c5052a86c9bf3ca31f548c7ba08b5ee (diff)
downloadscummvm-rg350-e6162f1a786af00974f814ea5c11dbd4e76bd972.tar.gz
scummvm-rg350-e6162f1a786af00974f814ea5c11dbd4e76bd972.tar.bz2
scummvm-rg350-e6162f1a786af00974f814ea5c11dbd4e76bd972.zip
DREAMWEB: Ported 'fillryan' to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp46
-rw-r--r--engines/dreamweb/dreamgen.h3
-rw-r--r--engines/dreamweb/stubs.cpp14
-rw-r--r--engines/dreamweb/stubs.h1
5 files changed, 17 insertions, 48 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 6d07d76800..bf0f1343ae 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -190,6 +190,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'obtoinv',
'showryanpage',
'findallryan',
+ 'fillryan',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index ad9cb5fbae..6e56a68369 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -3758,51 +3758,6 @@ nottrigger2:
data.byte(kKerning) = 0;
}
-void DreamGenContext::fillryan() {
- STACK_CHECK;
- es = data.word(kBuffers);
- di = (0+(228*13)+32);
- findallryan();
- si = (0+(228*13)+32);
- al = data.byte(kRyanpage);
- ah = 0;
- cx = 20;
- _mul(cx);
- _add(si, ax);
- di = (80);
- bx = (58);
- cx = 2;
-ryanloop2:
- push(cx);
- push(di);
- push(bx);
- cx = 5;
-ryanloop1:
- push(cx);
- push(di);
- push(bx);
- ax = es.word(si);
- _add(si, 2);
- push(si);
- push(es);
- obtoinv();
- es = pop();
- si = pop();
- bx = pop();
- di = pop();
- cx = pop();
- _add(di, (44));
- if (--cx)
- goto ryanloop1;
- bx = pop();
- di = pop();
- cx = pop();
- _add(bx, (44));
- if (--cx)
- goto ryanloop2;
- showryanpage();
-}
-
void DreamGenContext::fillopen() {
STACK_CHECK;
deltextline();
@@ -17245,7 +17200,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_set16colpalette: set16colpalette(); break;
case addr_realcredits: realcredits(); break;
case addr_monprint: monprint(); break;
- case addr_fillryan: fillryan(); break;
case addr_fillopen: fillopen(); break;
case addr_findallopen: findallopen(); break;
case addr_examineob: examineob(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 8465c59885..42beacb6f1 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -495,7 +495,6 @@ public:
static const uint16 addr_examineob = 0xc33c;
static const uint16 addr_findallopen = 0xc32c;
static const uint16 addr_fillopen = 0xc324;
- static const uint16 addr_fillryan = 0xc320;
static const uint16 addr_monprint = 0xc314;
static const uint16 addr_realcredits = 0xc2f8;
static const uint16 addr_set16colpalette = 0xc2f4;
@@ -1746,7 +1745,7 @@ public:
void dropobject();
void isitright();
void reexfromopen();
- void fillryan();
+ //void fillryan();
void drawitall();
void usestereo();
void showcurrentfile();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 51a79d72fa..a481bb2979 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1841,5 +1841,19 @@ void DreamGenContext::findallryan(uint8 *inv) {
}
}
+void DreamGenContext::fillryan() {
+ uint8 *inv = segRef(data.word(kBuffers)).ptr(kRyaninvlist, 60);
+ findallryan(inv);
+ inv += data.byte(kRyanpage) * 2 * 10;
+ for (size_t i = 0; i < 2; ++i) {
+ for (size_t j = 0; j < 5; ++j) {
+ uint8 objIndex = *inv++;
+ uint8 objType = *inv++;
+ obtoinv(objIndex, objType, kInventx + j * kItempicsize, kInventy + i * kItempicsize);
+ }
+ }
+ showryanpage();
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index c8fbd9bf82..a2d25b905c 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -229,4 +229,5 @@
void showryanpage();
void findallryan();
void findallryan(uint8 *inv);
+ void fillryan();