diff options
author | Paweł Kołodziejski | 2002-11-06 17:55:44 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2002-11-06 17:55:44 +0000 |
commit | 85c7c9ffe62c5a059e18fcf6a7c2acf68476d23d (patch) | |
tree | 2b4809509ae6f5db9907ce7f75e818cdfb0cc422 /scumm/gfx.cpp | |
parent | 73452fa331df18d1226db253ab6b9cc87d3d23ea (diff) | |
download | scummvm-rg350-85c7c9ffe62c5a059e18fcf6a7c2acf68476d23d.tar.gz scummvm-rg350-85c7c9ffe62c5a059e18fcf6a7c2acf68476d23d.tar.bz2 scummvm-rg350-85c7c9ffe62c5a059e18fcf6a7c2acf68476d23d.zip |
applied patch: #634326, and changed strip ranges for after and before scumm v7,
added comments to saveload
svn-id: r5448
Diffstat (limited to 'scumm/gfx.cpp')
-rw-r--r-- | scumm/gfx.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 56f5ef26ce..3fef4a947b 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -430,8 +430,12 @@ void Scumm::initBGBuffers(int height) size = itemsize * gdi._numZBuffer; memset(createResource(rtBuffer, 9, size), 0, size); - for (i = 0; i < 4; i++) - gdi._imgBufOffs[i] = i * itemsize; + for (i = 0; i < (int)ARRAYSIZE(gdi._imgBufOffs); i++) { + if (i < gdi._numZBuffer) + gdi._imgBufOffs[i] = i * itemsize; + else + gdi._imgBufOffs[i] = (gdi._numZBuffer - 1) * itemsize; + } } void Scumm::setPaletteFromPtr(byte *ptr) @@ -1854,8 +1858,13 @@ void Scumm::updateDirtyRect(int virt, int left, int right, int top, int bottom, lp = (left >> 3) + _screenStartStrip; if (lp < 0) lp = 0; - if (rp >= 240) - rp = 240; + if (_features & GF_AFTER_V7) { + if (rp > 409) + rp = 409; + } else { + if (rp >= 200) + rp = 200; + } if (lp <= rp) { num = rp - lp + 1; sp = &gfxUsageBits[lp]; |