2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Function to replace pixel conversion routine
9 #include "graphics_intern.h"
10 #include <proto/graphics.h>
11 #include <proto/oop.h>
13 /*****************************************************************************
17 AROS_LH4(APTR
, SetRGBConversionFunctionA
,
20 AROS_LHA(ULONG
, srcPixFmt
, D0
),
21 AROS_LHA(ULONG
, dstPixFmt
, D1
),
22 AROS_LHA(APTR
, function
, A0
),
23 AROS_LHA(struct TagItem
*, tags
, A1
),
26 struct GfxBase
*, GfxBase
, 198, Graphics
)
29 Replace RGB pixel conversion routine used for converting from
30 srcPixFmt to dstPixFmt.
33 srcPixFmt, dstPixFmt - One of the truecolor vHidd_StdPixFmt_#?
34 function - function of type HIDDT_RGBConversionFunction
35 tags - none defined yet
38 Previous conversion routine or (APTR)-1 on failure (bad value
39 for srcPixFmt and/or dstPixFmt)
42 The conversion function must return 1 if it did the conversion,
43 or 0 if for whatever reason it did not do it or want to do it.
44 Then the fallback pixel conversion routine will be used.
47 See AROS/test/patchrgbconv.c
58 *****************************************************************************/
61 AROS_LIBBASE_EXT_DECL(struct GfxBase
*,GfxBase
)
65 return (APTR
)HIDD_BM_SetRGBConversionFunction(SDD(GfxBase
)->framebuffer
,
66 (HIDDT_StdPixFmt
)srcPixFmt
,
67 (HIDDT_StdPixFmt
)dstPixFmt
,
68 (HIDDT_RGBConversionFunction
)function
);
72 } /* SetRGBConversionFunctionA */