2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
8 #include <aros/debug.h>
9 #include "graphics_intern.h"
11 /*****************************************************************************
14 #include <proto/graphics.h>
16 AROS_LH3(void, LoadRGB4
,
19 AROS_LHA(struct ViewPort
*, vp
, A0
),
20 AROS_LHA(UWORD
*, colors
, A1
),
21 AROS_LHA(WORD
, count
, D0
),
24 struct GfxBase
*, GfxBase
, 32, Graphics
)
27 Load RGB color values from table.
31 colors - pointer to table of RGB values (0...15)
36 count - number of UWORDs in the table
53 *****************************************************************************/
63 ASSERT_VALID_PTR(colors
);
65 /* TODO: Optimization */
67 for (t
= 0; t
< count
; t
++ )
69 ULONG red
= (colors
[t
] & 0xF00) >> 8;
70 ULONG green
= (colors
[t
] & 0x0F0) >> 4;
71 ULONG blue
= (colors
[t
] & 0x00F);
73 SetRGB32(vp
, t
, red
* 0x11111111,