2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Graphics function GetRGB4()
8 #include <graphics/view.h>
9 #include "graphics_intern.h"
11 /*****************************************************************************
14 #include <proto/graphics.h>
16 AROS_LH2(ULONG
, GetRGB4
,
19 AROS_LHA(struct ColorMap
*, colormap
, A0
),
20 AROS_LHA(LONG
, entry
, D0
),
23 struct GfxBase
*, GfxBase
, 97, Graphics
)
26 Read a value from the ColorMap. Use this function, as the colormap
30 colormap - pointer to ColorMap structure
31 entry - index into colormap
34 -1 : if no valid entry. (index to high)
35 other : UWORD RGB value, 4 bits per electron gun, right justified
44 GetColorMap(), FreeColorMap(), SetRGB4(), LoadRGB4(), graphics/view.h
47 This function depends on the strcuture of ColorMap->ColorTable.
51 *****************************************************************************/
57 /* anything invalid? */
58 if ( (NULL
== colormap
) || (entry
>= colormap
->Count
) )
61 /* All we`re currently doing is read the entry and return it. */
62 CT
= colormap
->ColorTable
;