some fixes to accented characters
[tangerine.git] / rom / graphics / loadrgb4.c
blob581d0cd9fe5d6e4daaa5780e975ece8065f8cf4f
1 /*
2 Copyright © 1995-2007, 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"
11 /*****************************************************************************
13 NAME */
14 #include <proto/graphics.h>
16 AROS_LH3(void, LoadRGB4,
18 /* SYNOPSIS */
19 AROS_LHA(struct ViewPort *, vp, A0),
20 AROS_LHA(UWORD *, colors, A1),
21 AROS_LHA(LONG , count, D0),
23 /* LOCATION */
24 struct GfxBase *, GfxBase, 32, Graphics)
26 /* FUNCTION
27 Load RGB color values from table.
29 INPUTS
30 vp - ViewPort
31 colors - pointer to table of RGB values (0...15)
32 background-- 0x0RGB
33 color1 -- 0x0RGB
34 color2 -- 0x0RGB
35 ...
36 count - number of UWORDs in the table
38 RESULT
40 NOTES
42 EXAMPLE
44 BUGS
46 SEE ALSO
47 LoadRGB32()
49 INTERNALS
51 HISTORY
53 *****************************************************************************/
55 AROS_LIBFUNC_INIT
57 LONG t;
59 ASSERT_VALID_PTR(vp);
60 ASSERT_VALID_PTR(colors);
62 for (t = 0; t < count; t ++ )
64 ULONG red = (colors[t] & 0xF00) >> 8;
65 ULONG green = (colors[t] & 0x0F0) >> 4;
66 ULONG blue = (colors[t] & 0x00F);
68 SetRGB32(vp, t, red * 0x11111111,
69 green * 0x11111111,
70 blue * 0x11111111);
73 AROS_LIBFUNC_EXIT
75 } /* LoadRGB4 */