aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Montoir2004-09-28 21:42:34 +0000
committerGregory Montoir2004-09-28 21:42:34 +0000
commitabba267bb7680386e3ee2b075052fadfe581a0fc (patch)
tree64512b60438856b2c9402ac70ce7df0669eb1cbe
parentce8c99bf62838099142aa79f2935e64639aa5571 (diff)
downloadscummvm-rg350-abba267bb7680386e3ee2b075052fadfe581a0fc.tar.gz
scummvm-rg350-abba267bb7680386e3ee2b075052fadfe581a0fc.tar.bz2
scummvm-rg350-abba267bb7680386e3ee2b075052fadfe581a0fc.zip
use the return value of getZPlanes rather that directly accessing _numZBuffer
svn-id: r15333
-rw-r--r--scumm/gfx.cpp7
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;