diff options
Diffstat (limited to 'engines/dreamweb/vgagrafx.cpp')
-rw-r--r-- | engines/dreamweb/vgagrafx.cpp | 10 |
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); } } |