Minor fixes to comments.
[AROS.git] / rom / graphics / getrgb4.c
blob302a8e0a355d65b6a8689b89c4facc30309afef8
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function GetRGB4()
6 Lang: english
7 */
8 #include <graphics/view.h>
9 #include "graphics_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <proto/graphics.h>
16 AROS_LH2(ULONG, GetRGB4,
18 /* SYNOPSIS */
19 AROS_LHA(struct ColorMap *, colormap, A0),
20 AROS_LHA(LONG , entry , D0),
22 /* LOCATION */
23 struct GfxBase *, GfxBase, 97, Graphics)
25 /* FUNCTION
26 Read a value from the ColorMap. Use this function, as the colormap
27 is subject to change.
29 INPUTS
30 colormap - pointer to ColorMap structure
31 entry - index into colormap
33 RESULT
34 -1 : if no valid entry. (index to high)
35 other : UWORD RGB value, 4 bits per electron gun, right justified
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 GetColorMap(), FreeColorMap(), SetRGB4(), LoadRGB4(), graphics/view.h
46 INTERNALS
47 This function depends on the strcuture of ColorMap->ColorTable.
49 HISTORY
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
55 WORD * CT;
57 /* anything invalid? */
58 if ( (NULL == colormap) || (entry >= colormap->Count) )
59 return -1L;
61 /* All we`re currently doing is read the entry and return it. */
62 CT = colormap->ColorTable;
63 return CT[entry];
65 AROS_LIBFUNC_EXIT
67 } /* GetRGB4 */