2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
10 #include <aros/debug.h>
11 #include "graphics_intern.h"
12 #include <proto/graphics.h>
14 /*****************************************************************************
18 AROS_LH2(void, LoadRGB32
,
21 AROS_LHA(struct ViewPort
*, vp
, A0
),
22 AROS_LHA(const ULONG
*, table
, A1
),
25 struct GfxBase
*, GfxBase
, 147, Graphics
)
28 Load RGB color values from table.
32 table - pointer to table of records
33 1 Word with the number of colors to load
34 1 Word with the first color to be loaded.
35 3 Longwords representing a left justified 32 bit RGB triplet.
36 The list is terminated by a count value of 0.
42 ULONG table[] = { 1l << 16 + 0 , 0xffffffff , 0 , 0 , 0}
43 ULONG table[] = { 256l << 16 + 0 , r1 , g1 , b1 , r2 , g2 , b2 , ..... 0}
52 27-11-96 digulla automatically created from
53 graphics_lib.fd and clib/graphics_protos.h
55 *****************************************************************************/
60 ASSERT_VALID_PTR_OR_NULL(table
);
62 /* it is legal to pass a NULL table */
64 D(bug("LoadRGB32(0x%p)\n", vp
));
69 /* table is terminated by a count value of 0 */
71 while ((count
= (*table
) >> 16))
75 first
= (*table
) & 0xFFFF;
79 D(bug("[LoadRGB32] Setting %u colors starting from %u\n", count
, first
));
80 for (t
= 0; t
< count
; t
++)
82 D(bug("[LoadRGB32] Color %u R 0x%08lX G 0x%08lX B %08lX\n", t
+ first
, table
[0], table
[1], table
[2]));
92 } /* while (*table) */