diff options
-rw-r--r-- | scumm/gfx.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index f4bbe69e2c..b528a1ae77 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -1396,14 +1396,13 @@ void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs, int startstrip, int width) } copyVirtScreenBuffers(Common::Rect(vs->w, vs->h)); - if (_numZBuffer <= 1) + int numzbuf = getZPlanes(ptr, zplane_list, true); + if (numzbuf <= 1) return; - - getZPlanes(ptr, zplane_list, true); uint32 offs; for (int stripnr = 0; stripnr < _numStrips; stripnr++) - for (int i = 1; i < _numZBuffer; i++) { + for (int i = 1; i < numzbuf; i++) { if (!zplane_list[i]) continue; |