diff options
author | Max Horn | 2003-05-12 20:33:47 +0000 |
---|---|---|
committer | Max Horn | 2003-05-12 20:33:47 +0000 |
commit | 3f798a92b6b94d0b3304d69e1a101540cab5cfe1 (patch) | |
tree | 4f7e254b32733f66d4bbf32ef82058483d2ada6c /scumm | |
parent | b43ea06a8041b55553f28f5b44166d820c31ab5d (diff) | |
download | scummvm-rg350-3f798a92b6b94d0b3304d69e1a101540cab5cfe1.tar.gz scummvm-rg350-3f798a92b6b94d0b3304d69e1a101540cab5cfe1.tar.bz2 scummvm-rg350-3f798a92b6b94d0b3304d69e1a101540cab5cfe1.zip |
added a hack to draw z masks onto the screen (useful to debug potential z masking bugs, like bug #724685)
svn-id: r7476
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/gfx.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 63af9081f3..c03b498f8d 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -1166,6 +1166,26 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int width, c } } } + +#if 0 + // HACK: blit mask(s) onto normal screen. Useful to debug masking + for (i = 0; i < numzbuf; i++) { + mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + y * _numStrips + x + _imgBufOffs[i]; + byte *dst = backbuff_ptr; + byte *dst2 = bgbak_ptr; + for (int h = 0; h < height; h++) { + int maskbits = *mask_ptr; + for (int j = 0; j < 8; j++) { + if (maskbits & 0x80) + dst[j] = dst2[j] = 12+i; + maskbits <<= 1; + } + dst += _vm->_screenWidth; + dst2 += _vm->_screenWidth; + mask_ptr += _numStrips; + } + } +#endif next_iter: CHECK_HEAP; |