New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / graphics / loadrgb32.c
blobc5d4d3df7f7c1774e865265788599da448840fcb
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 <proto/graphics.h>
12 #if DEBUG
13 #undef THIS_FILE
14 static const char THIS_FILE[] = __FILE__;
15 #endif
17 /*****************************************************************************
19 NAME */
21 AROS_LH2(void, LoadRGB32,
23 /* SYNOPSIS */
24 AROS_LHA(struct ViewPort *, vp, A0),
25 AROS_LHA(const ULONG *, table, A1),
27 /* LOCATION */
28 struct GfxBase *, GfxBase, 147, Graphics)
30 /* FUNCTION
32 INPUTS
34 RESULT
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
44 INTERNALS
46 HISTORY
47 27-11-96 digulla automatically created from
48 graphics_lib.fd and clib/graphics_protos.h
50 *****************************************************************************/
52 AROS_LIBFUNC_INIT
53 AROS_LIBBASE_EXT_DECL(struct GfxBase *,GfxBase)
55 ASSERT_VALID_PTR(vp);
56 ASSERT_VALID_PTR_OR_NULL(table);
58 /* it is legal to pass a NULL table */
60 if (table)
62 ULONG count;
64 /* table is terminated by a count value of 0 */
66 while ((count = (*table) >> 16))
68 ULONG first, t;
70 first = (*table) & 0xFFFF;
72 table ++;
74 for (t = 0; t < count; t++)
76 SetRGB32 (vp,
77 t + first,
78 table[0],
79 table[1],
80 table[2]);
82 table += 3;
85 } /* while (*table) */
88 AROS_LIBFUNC_EXIT
90 } /* LoadRGB32 */