2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
9 #include <aros/debug.h>
10 #include "graphics_intern.h"
12 /*****************************************************************************
15 #include <proto/graphics.h>
17 AROS_LH2(void, LoadRGB32
,
20 AROS_LHA(struct ViewPort
*, vp
, A0
),
21 AROS_LHA(const ULONG
*, table
, A1
),
24 struct GfxBase
*, GfxBase
, 147, Graphics
)
27 Load RGB color values from table.
31 table - pointer to table of records
32 1 Word with the number of colors to load
33 1 Word with the first color to be loaded.
34 3 Longwords representing a left justified 32 bit RGB triplet.
35 The list is terminated by a count value of 0.
41 ULONG table[] = { 1l << 16 + 0 , 0xffffffff , 0 , 0 , 0}
42 ULONG table[] = { 256l << 16 + 0 , r1 , g1 , b1 , r2 , g2 , b2 , ..... 0}
51 27-11-96 digulla automatically created from
52 graphics_lib.fd and clib/graphics_protos.h
54 *****************************************************************************/
59 ASSERT_VALID_PTR_OR_NULL(table
);
61 /* it is legal to pass a NULL table */
63 D(bug("LoadRGB32(0x%p)\n", vp
));
68 /* table is terminated by a count value of 0 */
70 while ((count
= (*table
) >> 16))
74 first
= (*table
) & 0xFFFF;
78 D(bug("[LoadRGB32] Setting %u colors starting from %u\n", count
, first
));
79 for (t
= 0; t
< count
; t
++)
81 D(bug("[LoadRGB32] Color %u R 0x%08lX G 0x%08lX B %08lX\n", t
+ first
, table
[0], table
[1], table
[2]));
91 } /* while (*table) */