aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Augereau2011-11-30 14:36:58 +0100
committerBertrand Augereau2011-11-30 14:36:58 +0100
commitb34791e98723f27950f28351943b4ef84d9a4104 (patch)
tree17347dc30c71795987596e910dc2afb3e6331c56
parent19daa15f8e3da59b1f32663da65a138c6c2264f7 (diff)
downloadscummvm-rg350-b34791e98723f27950f28351943b4ef84d9a4104.tar.gz
scummvm-rg350-b34791e98723f27950f28351943b4ef84d9a4104.tar.bz2
scummvm-rg350-b34791e98723f27950f28351943b4ef84d9a4104.zip
DREAMWEB: Less VM side-effects in 'doblocks'
-rw-r--r--engines/dreamweb/backdrop.cpp9
-rw-r--r--engines/dreamweb/stubs.cpp4
2 files changed, 3 insertions, 10 deletions
diff --git a/engines/dreamweb/backdrop.cpp b/engines/dreamweb/backdrop.cpp
index 63aec2dd1d..3e4b4dcb64 100644
--- a/engines/dreamweb/backdrop.cpp
+++ b/engines/dreamweb/backdrop.cpp
@@ -27,12 +27,9 @@ namespace DreamGen {
void DreamGenContext::doblocks() {
uint16 dstOffset = data.word(kMapady) * 320 + data.word(kMapadx);
uint16 mapOffset = kMap + data.byte(kMapy) * kMapwidth + data.byte(kMapx);
- ds = data.word(kMapdata);
- const uint8 *mapData = ds.ptr(mapOffset, 0);
- ds = data.word(kBackdrop);
- const uint8 *blocks = ds.ptr(kBlocks, 0);
- es = data.word(kWorkspace);
- uint8 *dstBuffer = es.ptr(dstOffset, 0);
+ const uint8 *mapData = segRef(data.word(kMapdata)).ptr(mapOffset, 0);
+ const uint8 *blocks = segRef(data.word(kBackdrop)).ptr(kBlocks, 0);
+ uint8 *dstBuffer = workspace() + dstOffset;
for (size_t i = 0; i < 10; ++i) {
for (size_t j = 0; j < 11; ++j) {
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index c4e2ae18a6..134555dac0 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2513,11 +2513,7 @@ void DreamGenContext::drawfloor() {
eraseoldobs();
drawflags();
calcmapad();
- push(es);
- push(bx);
doblocks();
- bx = pop();
- es = pop();
showallobs();
showallfree();
showallex();