From e6162f1a786af00974f814ea5c11dbd4e76bd972 Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Tue, 6 Sep 2011 08:54:01 +0200 Subject: DREAMWEB: Ported 'fillryan' to C++ --- engines/dreamweb/dreamgen.cpp | 46 ------------------------------------------- engines/dreamweb/dreamgen.h | 3 +-- engines/dreamweb/stubs.cpp | 14 +++++++++++++ engines/dreamweb/stubs.h | 1 + 4 files changed, 16 insertions(+), 48 deletions(-) (limited to 'engines/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(); -- cgit v1.2.3