New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / graphics / writechunkypixels.c
blob2f73ef8d2124e65e66822f2d6408013c912b2216
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <aros/debug.h>
9 #include "graphics_intern.h"
10 #include "gfxfuncsupport.h"
12 /*****************************************************************************
14 NAME */
15 #include <proto/graphics.h>
17 AROS_LH7(void, WriteChunkyPixels,
19 /* SYNOPSIS */
20 AROS_LHA(struct RastPort *, rp, A0),
21 AROS_LHA(LONG , xstart, D0),
22 AROS_LHA(LONG , ystart, D1),
23 AROS_LHA(LONG , xstop, D2),
24 AROS_LHA(LONG , ystop, D3),
25 AROS_LHA(UBYTE *, array, A2),
26 AROS_LHA(LONG , bytesperrow, D4),
28 /* LOCATION */
29 struct GfxBase *, GfxBase, 176, Graphics)
31 /* FUNCTION
33 INPUTS
35 RESULT
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 INTERNALS
47 HISTORY
48 27-11-96 digulla automatically created from
49 graphics_lib.fd and clib/graphics_protos.h
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
54 AROS_LIBBASE_EXT_DECL(struct GfxBase *,GfxBase)
56 HIDDT_PixelLUT pixlut;
58 pixlut.entries = AROS_PALETTE_SIZE;
59 pixlut.pixels = IS_HIDD_BM(rp->BitMap) ? HIDD_BM_PIXTAB(rp->BitMap) : NULL;
61 FIX_GFXCOORD(xstart);
62 FIX_GFXCOORD(ystart);
63 FIX_GFXCOORD(xstop);
64 FIX_GFXCOORD(ystop);
66 if ((xstart > xstop) || (ystart > ystop)) return;
68 if (!pixlut.pixels)
70 if (GetBitMapAttr(rp->BitMap, BMA_DEPTH) > 8)
72 D(bug("WriteChunkyPixels: can't work on hicolor/truecolor screen without LUT"));
73 return;
77 write_pixels_8(rp, array
78 , bytesperrow
79 , xstart, ystart
80 , xstop, ystop
81 , &pixlut
82 , GfxBase);
84 AROS_LIBFUNC_EXIT
86 } /* WriteChunkyPixels */