mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-09-29 21:56:12 +00:00
Fix Bug #14879 : Double-Lo-Res Graphics colours not correct
This commit is contained in:
parent
c82f15895f
commit
349642cbe5
@ -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)
|
bool UpdateDLoResCell (int x, int y, int xpixel, int ypixel, int offset)
|
||||||
{
|
{
|
||||||
BYTE auxval = *(g_pTextBank1 +offset);
|
BYTE auxval = *(g_pTextBank1 + offset);
|
||||||
BYTE mainval = *(g_pTextBank0+offset);
|
BYTE mainval = *(g_pTextBank0 + offset);
|
||||||
|
|
||||||
if ( (auxval != *(vidlastmem+offset)) ||
|
if ( (auxval != *(vidlastmem+offset)) ||
|
||||||
(mainval != *(vidlastmem+offset+0x400)) ||
|
(mainval != *(vidlastmem+offset+0x400)) ||
|
||||||
g_VideoForceFullRedraw
|
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 , 7,8,SRCOFFS_LORES+((x & 1) << 1),((auxval & 0xF) << 4));
|
||||||
CopySource( xpixel,ypixel+8, 7,8,SRCOFFS_LORES+((x & 1) << 1),(auxval & 0xF0));
|
CopySource( xpixel,ypixel+8, 7,8,SRCOFFS_LORES+((x & 1) << 1),(auxval & 0xF0));
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user