mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:52:57 +00:00
Handle NULL color translation
svn path=/trunk/; revision=5116
This commit is contained in:
parent
6b72cd60c5
commit
c341c05952
1 changed files with 9 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: dib4bpp.c,v 1.13 2003/05/18 17:16:17 ea Exp $ */
|
/* $Id: dib4bpp.c,v 1.14 2003/07/14 17:34:52 gvg Exp $ */
|
||||||
#undef WIN32_LEAN_AND_MEAN
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -115,8 +115,15 @@ DIB_4BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
|
||||||
sx = SourcePoint->x;
|
sx = SourcePoint->x;
|
||||||
|
|
||||||
for (i=DestRect->left; i<DestRect->right; i++)
|
for (i=DestRect->left; i<DestRect->right; i++)
|
||||||
|
{
|
||||||
|
if (NULL != ColorTranslation)
|
||||||
{
|
{
|
||||||
DIB_4BPP_PutPixel(DestSurf, i, j, XLATEOBJ_iXlate(ColorTranslation, DIB_4BPP_GetPixel(SourceSurf, sx, sy)));
|
DIB_4BPP_PutPixel(DestSurf, i, j, XLATEOBJ_iXlate(ColorTranslation, DIB_4BPP_GetPixel(SourceSurf, sx, sy)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DIB_4BPP_PutPixel(DestSurf, i, j, DIB_4BPP_GetPixel(SourceSurf, sx, sy));
|
||||||
|
}
|
||||||
sx++;
|
sx++;
|
||||||
}
|
}
|
||||||
sy++;
|
sy++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue