aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorBertrand Augereau2011-08-11 15:18:41 +0200
committerBertrand Augereau2011-08-11 15:18:41 +0200
commit701776a73aee44d18a729b1cc7f51ff97e2fbc3d (patch)
treeeb424bbfe637c631102deafff9104c89482b8d64 /engines/dreamweb
parentcea283644fb78d4e113fa5c994bfcfce61ba7381 (diff)
downloadscummvm-rg350-701776a73aee44d18a729b1cc7f51ff97e2fbc3d.tar.gz
scummvm-rg350-701776a73aee44d18a729b1cc7f51ff97e2fbc3d.tar.bz2
scummvm-rg350-701776a73aee44d18a729b1cc7f51ff97e2fbc3d.zip
DREAMWEB: 'multiget' and 'multiput' don't dirty segments anymore
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/vgagrafx.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index ebf1bff23c..c87e27a8c4 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -43,15 +43,14 @@ void DreamGenContext::multiget() {
}
void DreamGenContext::multiget(uint8 *dst, uint16 x, uint16 y, uint8 w, uint8 h) {
- unsigned src = x + y * kScreenwidth;
- ds = data.word(kWorkspace);
+ const uint8 *src = workspace() + x + y * kScreenwidth;
if (y + h > 200)
h = 200 - y;
if (x + w > 320)
w = 320 - x;
//debug(1, "multiget %u,%u %ux%u -> segment: %04x->%04x", x, y, w, h, (uint16)ds, (uint16)es);
for(unsigned l = 0; l < h; ++l) {
- const uint8 *src_p = ds.ptr(src + kScreenwidth * l, w);
+ const uint8 *src_p = src + kScreenwidth * l;
uint8 *dst_p = dst + w * l;
memcpy(dst_p, src_p, w);
}
@@ -65,8 +64,7 @@ void DreamGenContext::multiput() {
}
void DreamGenContext::multiput(const uint8 *src, uint16 x, uint16 y, uint8 w, uint8 h) {
- unsigned dst = x + y * kScreenwidth;
- es = data.word(kWorkspace);
+ uint8 *dst = workspace() + x + y * kScreenwidth;
if (y + h > 200)
h = 200 - y;
if (x + w > 320)
@@ -74,7 +72,7 @@ void DreamGenContext::multiput(const uint8 *src, uint16 x, uint16 y, uint8 w, ui
//debug(1, "multiput %ux%u -> segment: %04x->%04x", w, h, (uint16)ds, (uint16)es);
for(unsigned l = 0; l < h; ++l) {
const uint8 *src_p = src + w * l;
- uint8 *dst_p = es.ptr(dst + kScreenwidth * l, w);
+ uint8 *dst_p = dst + kScreenwidth * l;
memcpy(dst_p, src_p, w);
}
}