aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBertrand Augereau2011-07-27 17:42:11 +0200
committerBertrand Augereau2011-07-28 17:26:48 +0200
commitb5c6ac150b81d49dad0a9d2f6327cb85a7c525ff (patch)
tree272e4329c8a71f7d234f444513d19732f4ece34a /engines
parentf657d4800a93d6111d723f702aebf42d98ccbf0f (diff)
downloadscummvm-rg350-b5c6ac150b81d49dad0a9d2f6327cb85a7c525ff.tar.gz
scummvm-rg350-b5c6ac150b81d49dad0a9d2f6327cb85a7c525ff.tar.bz2
scummvm-rg350-b5c6ac150b81d49dad0a9d2f6327cb85a7c525ff.zip
DREAMWEB: diffDest blitting in 'showframe' doesn't pollute the interface any more
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/print.cpp20
-rw-r--r--engines/dreamweb/sprite.cpp10
-rw-r--r--engines/dreamweb/stubs.cpp5
-rw-r--r--engines/dreamweb/stubs.h11
4 files changed, 19 insertions, 27 deletions
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index f2a7450cc1..a73e9f0792 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -28,14 +28,14 @@ namespace DreamGen {
void DreamGenContext::printboth() {
uint16 x = di;
- printboth(es, ds, &x, bx, al);
+ printboth(ds, &x, bx, al);
di = x;
}
-void DreamGenContext::printboth(uint16 dst, uint16 src, uint16 *x, uint16 y, uint8 c) {
+void DreamGenContext::printboth(uint16 src, uint16 *x, uint16 y, uint8 c) {
uint16 newX = *x;
uint8 width, height;
- printchar(dst, src, &newX, y, c, &width, &height);
+ printchar(src, &newX, y, c, &width, &height);
multidump(*x, y, width, height);
*x = newX;
}
@@ -76,13 +76,13 @@ void DreamGenContext::getnextword() {
void DreamGenContext::printchar() {
uint16 x = di;
uint8 width, height;
- printchar(es, ds, &x, bx, al, &width, &height);
+ printchar(ds, &x, bx, al, &width, &height);
di = x;
cl = width;
ch = height;
}
-void DreamGenContext::printchar(uint16 dst, uint16 src, uint16* x, uint16 y, uint8 c, uint8 *width, uint8 *height) {
+void DreamGenContext::printchar(uint16 src, uint16* x, uint16 y, uint8 c, uint8 *width, uint8 *height) {
if (c == 255)
return;
push(si);
@@ -90,7 +90,7 @@ void DreamGenContext::printchar(uint16 dst, uint16 src, uint16* x, uint16 y, uin
if (data.byte(kForeignrelease) != 0)
y -= 3;
uint16 tmp = c - 32 + data.word(kCharshift);
- showframe(dst, src, *x, y, tmp & 0xff, tmp >> 8, width, height);
+ showframe(src, *x, y, tmp & 0xff, tmp >> 8, width, height);
di = pop();
si = pop();
_cmp(data.byte(kKerning), 0);
@@ -117,7 +117,7 @@ uint8 DreamGenContext::printslow(uint16 x, uint16 y, uint8 maxWidth, bool center
push(es);
push(ds);
c0 = engine->modifyChar(c0);
- printboth(es, ds, &offset, y, c0);
+ printboth(ds, &offset, y, c0);
ds = pop();
es = pop();
uint8 c1 = es.byte(si+1);
@@ -133,7 +133,7 @@ uint8 DreamGenContext::printslow(uint16 x, uint16 y, uint8 maxWidth, bool center
c1 = engine->modifyChar(c1);
data.word(kCharshift) = 91;
uint16 offset2 = offset;
- printboth(es, ds, &offset2, y, c1);
+ printboth(ds, &offset2, y, c1);
data.word(kCharshift) = 0;
es = pop();
ds = pop();
@@ -179,9 +179,7 @@ void DreamGenContext::printdirect(uint16 x, uint16 *y, uint8 maxWidth, bool cent
}
c = engine->modifyChar(c);
uint8 width, height;
- push(es);
- printchar(es, ds, &i, *y, c, &width, &height);
- es = pop();
+ printchar(ds, &i, *y, c, &width, &height);
data.word(kLastxpos) = i;
--charCount;
} while(charCount);
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 00d778c477..d6347b62bf 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -35,10 +35,6 @@ Sprite *DreamGenContext::spritetable() {
}
void DreamGenContext::printsprites() {
- printsprites(es);
-}
-
-void DreamGenContext::printsprites(uint16 dst) {
for (size_t priority = 0; priority < 7; ++priority) {
Sprite *sprites = spritetable();
for (size_t j = 0; j < 16; ++j) {
@@ -49,12 +45,12 @@ void DreamGenContext::printsprites(uint16 dst) {
continue;
if (sprite.hidden == 1)
continue;
- printasprite(dst, &sprite);
+ printasprite(&sprite);
}
}
}
-void DreamGenContext::printasprite(uint16 dst, const Sprite *sprite) {
+void DreamGenContext::printasprite(const Sprite *sprite) {
uint16 x, y;
if (sprite->y >= 220) {
y = data.word(kMapady) - (256 - sprite->y);
@@ -74,7 +70,7 @@ void DreamGenContext::printasprite(uint16 dst, const Sprite *sprite) {
else
c = 0;
uint8 width, height;
- showframe(es, READ_LE_UINT16(&sprite->w6), x, y, sprite->b15, c, &width, &height);
+ showframe(READ_LE_UINT16(&sprite->w6), x, y, sprite->b15, c, &width, &height);
}
void DreamGenContext::clearsprites() {
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index bf649aeb02..140e278d1d 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -671,8 +671,7 @@ void DreamGenContext::frameoutv(uint8 *dst, const uint8 *src, uint16 pitch, uint
}
}
-void DreamGenContext::showframe(uint16 dst, uint16 src, uint16 x, uint16 y, uint8 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height) {
- es = dst;
+void DreamGenContext::showframe(uint16 src, uint16 x, uint16 y, uint8 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height) {
ds = src;
al = frameNumber;
ah = effectsFlag;
@@ -734,7 +733,7 @@ void DreamGenContext::showframe(uint16 dst, uint16 src, uint16 x, uint16 y, uint
void DreamGenContext::showframe() {
uint8 width, height;
- showframe(es, ds, di, bx, al, ah, &width, &height);
+ showframe(ds, di, bx, al, ah, &width, &height);
cl = width;
ch = height;
}
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index d48d634371..559c95625d 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -32,7 +32,6 @@
void convertkey();
void cls();
void printsprites();
- void printsprites(uint16 dst);
void quickquit();
void readoneblock();
void printundermon();
@@ -42,9 +41,9 @@
void getnextword();
uint8 getnextword(const uint8 *string, uint8 *totalWidth, uint8 *charCount);
void printboth();
- void printboth(uint16 dst, uint16 src, uint16 *x, uint16 y, uint8 c);
+ void printboth(uint16 src, uint16 *x, uint16 y, uint8 c);
void printchar();
- void printchar(uint16 dst, uint16 src, uint16 *x, uint16 y, uint8 c, uint8 *width, uint8 *height);
+ void printchar(uint16 src, uint16 *x, uint16 y, uint8 c, uint8 *width, uint8 *height);
void printdirect();
void printdirect(uint16 x, uint16 *y, uint8 maxWidth, bool centered);
void usetimedtext();
@@ -54,13 +53,13 @@
void printslow();
void dumptextline();
void getnumber();
- uint8 getnumber(uint16 index, uint16 maxWidth, bool centered, uint16* offset);
+ uint8 getnumber(uint16 index, uint16 maxWidth, bool centered, uint16 *offset);
void kernchars();
uint8 kernchars(uint8 firstChar, uint8 secondChar, uint8 width);
Sprite *spritetable();
void showframe();
- void showframe(uint16 dst, uint16 src, uint16 x, uint16 y, uint8 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height);
- void printasprite(uint16 dst, const Sprite *sprite);
+ void showframe(uint16 src, uint16 x, uint16 y, uint8 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height);
+ void printasprite(const Sprite *sprite);
void width160();
void multiput(uint16 x, uint16 y, uint8 width, uint8 height);
void multiput();