win32: make scanlines look more like lcd scanlines.

This commit is contained in:
zeromus 2009-07-15 17:44:06 +00:00
parent 8ea1fc16c7
commit 215a6cb6fa
1 changed files with 12 additions and 2 deletions

View File

@ -4,12 +4,21 @@
#include <string.h>
typedef u64 uint64;
extern CACHE_ALIGN u16 fadeOutColors[17][0x8000];
// stretches a single line
inline void DoubleLine16( uint16 *lpDst, uint16 *lpSrc, unsigned int Width){
while(Width--){
*lpDst++ = *lpSrc;
*lpDst++ = *lpSrc++;
*lpDst++ = fadeOutColors[3][(*lpSrc++)];
}
}
inline void DoubleLine16_2( uint16 *lpDst, uint16 *lpSrc, unsigned int Width){
while(Width--){
*lpDst++ = fadeOutColors[3][(*lpSrc)];
*lpDst++ = fadeOutColors[6][(*lpSrc++)];
}
}
@ -28,7 +37,8 @@ void RenderScanline( SSurface Src, SSurface Dst)
if(Src.Width != 512)
for (H = 0; H < srcHeight; H++, lpSrc += srcPitch)
DoubleLine16 (lpDst, lpSrc, Src.Width), lpDst += dstPitch,
memset (lpDst, 0, 512*2), lpDst += dstPitch;
DoubleLine16_2 (lpDst, lpSrc, Src.Width), lpDst += dstPitch;
//memset (lpDst, 0, 512*2), lpDst += dstPitch;
else
for (H = 0; H < srcHeight; H++, lpSrc += srcPitch)
memcpy (lpDst, lpSrc, Src.Width << 1), lpDst += dstPitch,