diff options
author | Max Horn | 2003-05-11 11:13:24 +0000 |
---|---|---|
committer | Max Horn | 2003-05-11 11:13:24 +0000 |
commit | e5f8056d88247eb095890c8fa050fc406cbf0abb (patch) | |
tree | 65fec9eb46cb603e25beb0bd71be59ad86a7c1e6 /scumm | |
parent | 134c32bc989a06d52e3f63fe786e28961571eb19 (diff) | |
download | scummvm-rg350-e5f8056d88247eb095890c8fa050fc406cbf0abb.tar.gz scummvm-rg350-e5f8056d88247eb095890c8fa050fc406cbf0abb.tar.bz2 scummvm-rg350-e5f8056d88247eb095890c8fa050fc406cbf0abb.zip |
cleanup / tweaks (V2 masking, at least in Zakdemo, seems not to work properly, though)
svn-id: r7429
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/gfx.cpp | 14 | ||||
-rw-r--r-- | scumm/script_v2.cpp | 4 |
2 files changed, 10 insertions, 8 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 06e4b38e32..a3de607f2a 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -871,7 +871,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c if (_disable_zbuffer) numzbuf = 0; - else if (_numZBuffer <= 1) + else if (_numZBuffer <= 1 || (_vm->_features & GF_AFTER_V2)) numzbuf = _numZBuffer; else { numzbuf = _numZBuffer; @@ -949,7 +949,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c else bgbak_ptr = vs->screenPtr + (y * _numStrips + x) * 8; - mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + (y * _numStrips + x); + mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + (y * _numStrips + x) + _imgBufOffs[1]; const int left = (stripnr << 3); const int right = left + (numstrip << 3); @@ -1013,8 +1013,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c theY++; if (theY >= height) { if (left <= theX && theX < right) { - mask_ptr -= _numStrips * height; - mask_ptr++; + mask_ptr -= _numStrips * height - 1; } theY = 0; theX += 8; @@ -1033,8 +1032,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c theY++; if (theY >= height) { if (left <= theX && theX < right) { - mask_ptr -= _numStrips * height; - mask_ptr++; + mask_ptr -= _numStrips * height - 1; } theY = 0; theX += 8; @@ -1073,8 +1071,6 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c else bgbak_ptr = backbuff_ptr; - mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + (y * _numStrips + x); - if (!(_vm->_features & GF_AFTER_V2)) { if (_vm->_features & GF_16COLOR) { decodeStripEGA(bgbak_ptr, smap_ptr + READ_LE_UINT16(smap_ptr + stripnr * 2 + 2), height); @@ -1085,6 +1081,8 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c } } + mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + (y * _numStrips + x); + CHECK_HEAP; if (vs->alloctwobuffers) { if (_vm->hasCharsetMask(sx << 3, y, (sx + 1) << 3, bottom)) { diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index 842d854a5a..ef2ccba00b 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -821,8 +821,12 @@ void Scumm_v2::o2_doSentence() { // TODO switch(fetchScriptByte()) { case 1: + // TODO - execute the sentence + _sentenceNum--; break; case 2: + // TODO - print the sentence + _sentenceNum--; break; } } |