diff options
author | Bertrand Augereau | 2011-07-30 23:37:18 +0200 |
---|---|---|
committer | Bertrand Augereau | 2011-07-30 23:37:18 +0200 |
commit | 52fef5a59949e915d1785c094dda64e2db5edea2 (patch) | |
tree | 00d5d8776ca222276683800b3b957f5a33e11a6c /engines | |
parent | 7c40d798de8f650f6178ea94c62042a850c1d604 (diff) | |
download | scummvm-rg350-52fef5a59949e915d1785c094dda64e2db5edea2.tar.gz scummvm-rg350-52fef5a59949e915d1785c094dda64e2db5edea2.tar.bz2 scummvm-rg350-52fef5a59949e915d1785c094dda64e2db5edea2.zip |
DREAMWEB: 'plotreel' ported to C++
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 43 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 34 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 36 insertions, 45 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index f448fb2d84..12126fce78 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -2816,48 +2816,6 @@ void DreamGenContext::reelsonscreen() { usetimedtext(); } -void DreamGenContext::plotreel() { - STACK_CHECK; - getreelstart(); -retryreel: - push(es); - push(si); - ax = es.word(si+2); - _cmp(al, 220); - if (flags.c()) - goto normalreel; - _cmp(al, 255); - if (flags.z()) - goto normalreel; - dealwithspecial(); - _inc(data.word(kReelpointer)); - si = pop(); - es = pop(); - _add(si, 40); - goto retryreel; -normalreel: - cx = 8; -plotloop: - push(cx); - push(es); - push(si); - ax = es.word(si); - _cmp(ax, 0x0ffff); - if (flags.z()) - goto notplot; - showreelframe(); -notplot: - si = pop(); - es = pop(); - cx = pop(); - _add(si, 5); - if (--cx) - goto plotloop; - soundonreels(); - bx = pop(); - es = pop(); -} - void DreamGenContext::soundonreels() { STACK_CHECK; bl = data.byte(kReallocation); @@ -20259,7 +20217,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_updatepeople: updatepeople(); break; case addr_getreelframeax: getreelframeax(); break; case addr_reelsonscreen: reelsonscreen(); break; - case addr_plotreel: plotreel(); break; case addr_soundonreels: soundonreels(); break; case addr_reconstruct: reconstruct(); break; case addr_movemap: movemap(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index fc141fa5d3..264fece0b0 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -644,7 +644,6 @@ public: static const uint16 addr_movemap = 0xc1b4; static const uint16 addr_reconstruct = 0xc1ac; static const uint16 addr_soundonreels = 0xc1a8; - static const uint16 addr_plotreel = 0xc1a4; static const uint16 addr_reelsonscreen = 0xc1a0; static const uint16 addr_getreelframeax = 0xc19c; static const uint16 addr_updatepeople = 0xc198; @@ -1857,7 +1856,7 @@ public: void opentvdoor(); void triggermessage(); void finalframe(); - void plotreel(); + //void plotreel(); void swapwithopen(); //void makesprite(); void dreamweb(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index a9e0ef5929..0dcaa9e72b 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -833,5 +833,39 @@ void DreamGenContext::dealwithspecial() { } } +void DreamGenContext::plotreel() { + getreelstart(); + while (true) { + push(es); + push(si); + ax = es.word(si+2); + if (al < 220) + break; + if (al == 255) + break; + dealwithspecial(); + _inc(data.word(kReelpointer)); + si = pop(); + es = pop(); + _add(si, 40); + } + + for (size_t i = 0; i < 8; ++i) { + push(cx); + push(es); + push(si); + ax = es.word(si); + if (ax != 0xffff) + showreelframe(); + si = pop(); + es = pop(); + cx = pop(); + _add(si, 5); + } + soundonreels(); + bx = pop(); + es = pop(); +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 4d35a597c4..a8bcd019c5 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -106,5 +106,6 @@ void lockmon(); void cancelch0(); void cancelch1(); + void plotreel(); void dealwithspecial(); |