NES palette fixes from Quietust.

Some fixes of gray background for NES. Though maybe proper approach
would be to add global vars instead of checking every time.

svn-id: r17190
This commit is contained in:
Eugene Sandulenko 2005-03-21 01:15:30 +00:00
parent d1e46a5420
commit 11a1f9bb00
3 changed files with 17 additions and 7 deletions

View file

@ -878,12 +878,16 @@ void CharsetRenderer::restoreCharsetBg() {
}
} else {
// Clear area
memset(screenBuf, 0, vs->h * vs->pitch);
if (_vm->_features & GF_NES)
memset(screenBuf, 0x1d, vs->h * vs->pitch);
else
memset(screenBuf, 0, vs->h * vs->pitch);
}
if (vs->hasTwoBuffers) {
// Clean out the charset mask
memset(_vm->gdi._textSurface.pixels, CHARSET_MASK_TRANSPARENCY, _vm->gdi._textSurface.pitch * _vm->gdi._textSurface.h);
memset(_vm->gdi._textSurface.pixels, (_vm->_features & GF_NES) ? 0x1d :
CHARSET_MASK_TRANSPARENCY, _vm->gdi._textSurface.pitch * _vm->gdi._textSurface.h);
}
}
}