Fix Bug #14879 : Double-Lo-Res Graphics colours not correct

This commit is contained in:
tomch 2009-07-23 21:43:08 +00:00
parent 59b07f18ee
commit 1e5d3f827a

View File

@ -1510,16 +1510,23 @@ bool UpdateLoResCell (int x, int y, int xpixel, int ypixel, int offset)
}
//===========================================================================
#define ROL_NIB(x) ( (((x)<<1)&0xF) | (((x)>>3)&1) )
bool UpdateDLoResCell (int x, int y, int xpixel, int ypixel, int offset)
{
BYTE auxval = *(g_pTextBank1 +offset);
BYTE mainval = *(g_pTextBank0+offset);
BYTE auxval = *(g_pTextBank1 + offset);
BYTE mainval = *(g_pTextBank0 + offset);
if ( (auxval != *(vidlastmem+offset)) ||
(mainval != *(vidlastmem+offset+0x400)) ||
g_VideoForceFullRedraw
)
{
const BYTE auxval_h = auxval >> 4;
const BYTE auxval_l = auxval & 0xF;
auxval = (ROL_NIB(auxval_h)<<4) | ROL_NIB(auxval_l); // Fix Bug #14879
CopySource( xpixel,ypixel , 7,8,SRCOFFS_LORES+((x & 1) << 1),((auxval & 0xF) << 4));
CopySource( xpixel,ypixel+8, 7,8,SRCOFFS_LORES+((x & 1) << 1),(auxval & 0xF0));
//