diff options
-rw-r--r-- | engines/dreamweb/runtime.h | 6 | ||||
-rw-r--r-- | engines/dreamweb/sprite.cpp | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/engines/dreamweb/runtime.h b/engines/dreamweb/runtime.h index 714a8d5850..ba16f03d1c 100644 --- a/engines/dreamweb/runtime.h +++ b/engines/dreamweb/runtime.h @@ -287,6 +287,12 @@ public: _freeSegments.push_back(id); } + SegmentRef segRef(uint16 seg) { + SegmentRef result(this); + result = seg; + return result; + } + inline void _cmp(uint8 a, uint8 b) { _sub(a, b); } diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 00cbd2c4dc..8cf0da1de7 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -580,8 +580,7 @@ void DreamGenContext::showrain() { si = 6*58; ax = ds.word(si+2); si = ax + 2080; - es = data.word(kBuffers); - Rain *rain = (Rain *)es.ptr(kRainlist, 0); + Rain *rain = (Rain *)segRef(data.word(kBuffers)).ptr(kRainlist, 0); if (rain->x == 255) return; while (true) { |