aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBertrand Augereau2011-06-26 19:32:02 +0200
committerBertrand Augereau2011-07-18 22:59:14 +0200
commit9f8036cd86670a3de8562b7c6e398ddace8650fa (patch)
treef33dd1050e7d15fcf14398ddebc6679e5803d9d2 /engines
parent880bcc69ef24fa6fa333a38d14d47d45c123aeb5 (diff)
downloadscummvm-rg350-9f8036cd86670a3de8562b7c6e398ddace8650fa.tar.gz
scummvm-rg350-9f8036cd86670a3de8562b7c6e398ddace8650fa.tar.bz2
scummvm-rg350-9f8036cd86670a3de8562b7c6e398ddace8650fa.zip
DREAMWEB: Blacklisted frameoutbh and frameoutfx
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/dreamgen.cpp86
-rw-r--r--engines/dreamweb/dreamgen.h8
-rw-r--r--engines/dreamweb/stubs.cpp41
-rw-r--r--engines/dreamweb/stubs.h2
4 files changed, 41 insertions, 96 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index c96ce3f4f2..23027ef6d2 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -4090,90 +4090,6 @@ zeroblock:
goto loop120;
}
-void DreamGenContext::frameoutbh() {
- STACK_CHECK;
- push(dx);
- ax = bx;
- bx = dx;
- _mul(bx);
- _add(di, ax);
- dx = pop();
- push(cx);
- ch = 0;
- _sub(dx, cx);
- cx = pop();
-bhloop2:
- push(cx);
- ch = 0;
- ah = 255;
-bhloop1:
- _cmp(es.byte(di), ah);
- if (!flags.z())
- goto nofill;
- _movsb();
- if (--cx)
- goto bhloop1;
- goto nextline;
-nofill:
- _inc(di);
- _inc(si);
- if (--cx)
- goto bhloop1;
-nextline:
- _add(di, dx);
- cx = pop();
- _dec(ch);
- if (!flags.z())
- goto bhloop2;
-}
-
-void DreamGenContext::frameoutfx() {
- STACK_CHECK;
- push(dx);
- ax = bx;
- bx = dx;
- _mul(bx);
- _add(di, ax);
- dx = pop();
- push(cx);
- ch = 0;
- _add(dx, cx);
- cx = pop();
-frameloopfx1:
- push(cx);
- ch = 0;
-frameloopfx2:
- _lodsb();
- _cmp(al, 0);
- if (!flags.z())
- goto backtosolidfx;
-backtootherfx:
- _dec(di);
- if (--cx)
- goto frameloopfx2;
- cx = pop();
- _add(di, dx);
- _dec(ch);
- if (!flags.z())
- goto frameloopfx1;
- return;
-frameloopfx3:
- _lodsb();
- _cmp(al, 0);
- if (flags.z())
- goto backtootherfx;
-backtosolidfx:
- es.byte(di) = al;
- _dec(di);
- if (--cx)
- goto frameloopfx3;
- cx = pop();
- _add(di, dx);
- _dec(ch);
- if (!flags.z())
- goto frameloopfx1;
-}
-
void DreamGenContext::transferinv() {
STACK_CHECK;
di = data.word(kExframepos);
@@ -21912,8 +21828,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_zoom: zoom(); break;
case addr_delthisone: delthisone(); break;
case addr_doblocks: doblocks(); break;
- case addr_frameoutbh: frameoutbh(); break;
- case addr_frameoutfx: frameoutfx(); break;
case addr_transferinv: transferinv(); break;
case addr_transfermap: transfermap(); break;
case addr_fadedos: fadedos(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index a52e142973..354a3464e8 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -618,8 +618,6 @@ public:
static const uint16 addr_fadedos = 0xc248;
static const uint16 addr_transfermap = 0xc244;
static const uint16 addr_transferinv = 0xc240;
- static const uint16 addr_frameoutfx = 0xc23c;
- static const uint16 addr_frameoutbh = 0xc238;
static const uint16 addr_doblocks = 0xc228;
static const uint16 addr_delthisone = 0xc214;
static const uint16 addr_zoom = 0xc210;
@@ -1341,7 +1339,7 @@ public:
void channel0only();
void worktoscreenm();
void removeemm();
- void mansatstill();
+ //void frameoutbh();
void getobtextstart();
void loadfolder();
void decide();
@@ -1589,7 +1587,7 @@ public:
void openhoteldoor();
void removesetobject();
void checkifperson();
- void frameoutfx();
+ //void frameoutfx();
void blank();
void drinker();
void nextcolon();
@@ -1681,7 +1679,7 @@ public:
//void showframe();
void random();
void obicons();
- void frameoutbh();
+ void mansatstill();
void channel1only();
void playguitar();
void lastfolder();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 512732a87a..fb7d79275b 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -93,6 +93,39 @@ void DreamGenContext::frameoutnm(uint8* dst, const uint8* src, uint16 pitch, uin
}
}
+void DreamGenContext::frameoutbh(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) {
+ uint16 stride = pitch - width;
+ dst += y * pitch + x;
+
+ for (uint16 i = 0; i < height; ++i) {
+ for (uint16 j = 0; j < width; ++j) {
+ if (*dst == 0xff) {
+ *dst = *src;
+ }
+ ++src;
+ ++dst;
+ }
+ dst += stride;
+ }
+}
+
+void DreamGenContext::frameoutfx(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) {
+ uint16 stride = pitch - width;
+ dst += y * pitch + x;
+ dst -= width;
+
+ for (uint16 j = 0; j < height; ++j) {
+ for (uint16 i = 0; i < width; ++i) {
+ uint8 pixel = src[width - i - 1];
+ if (pixel)
+ *dst = pixel;
+ ++dst;
+ }
+ src += width;
+ dst += stride;
+ }
+}
+
void DreamGenContext::seecommandtail() {
data.word(kSoundbaseadd) = 0x220;
data.byte(kSoundint) = 5;
@@ -595,7 +628,7 @@ uint16 DreamGenContext::showframeCPP(uint16 dst, uint16 src, uint16 x, uint16 y,
bx -= height / 2;
}
if (effectsFlag & 64) { //diffdest
- frameoutfx();
+ frameoutfx(es.ptr(0, dx * height), ds.ptr(si, width * height), dx, width, height, di, bx);
return written;
}
if (effectsFlag & 8) { //printlist
@@ -609,9 +642,8 @@ uint16 DreamGenContext::showframeCPP(uint16 dst, uint16 src, uint16 x, uint16 y,
ax = pop();
}
if (effectsFlag & 4) { //flippedx
- dx = (320);
es = data.word(kWorkspace);
- frameoutfx();
+ frameoutfx(es.ptr(0, 320 * height), ds.ptr(si, width * height), 320, width, height, di, bx);
return written;
}
if (effectsFlag & 2) { //nomask
@@ -620,9 +652,8 @@ uint16 DreamGenContext::showframeCPP(uint16 dst, uint16 src, uint16 x, uint16 y,
return written;
}
if (effectsFlag & 32) {
- dx = (320);
es = data.word(kWorkspace);
- frameoutbh();
+ frameoutbh(es.ptr(0, 320 * height), ds.ptr(si, width * height), 320, width, height, di, bx);
return written;
}
}
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 0b48c2d363..46250fc414 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -1,6 +1,8 @@
void multidump();
void frameoutv(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
void frameoutnm(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
+ void frameoutbh(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
+ void frameoutfx(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
void worktoscreen();
void multiget();
void convertkey();