revert - libatomic is still needed for target code.
[AROS.git] / rom / graphics / initbitmap.c
blobc99545ac5f19ba0714748045018d3c11e5e96297
1 /*
2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include <proto/graphics.h>
11 /*****************************************************************************
13 NAME */
15 #include <graphics/gfx.h>
17 AROS_LH4I(VOID, InitBitMap,
19 /* SYNOPSIS */
21 AROS_LHA(struct BitMap *, bm, A0),
22 AROS_LHA(BYTE , depth, D0),
23 AROS_LHA(UWORD , width, D1),
24 AROS_LHA(UWORD , height, D2),
26 /* LOCATION */
28 struct Library *, GfxBase, 65, Graphics)
30 /* FUNCTION
32 Initialize BitMap structure. A bitmap MUST be initialized before it's
33 used in any (other) graphics library function.
35 INPUTS
37 bm -- pointer to BitMap structure
38 depth -- number of bitplanes
39 width -- width in pixels of this bitmap
40 height -- height in pixels of this bitmap
42 RESULT
44 NOTES
46 The Planes[] is not affected and must be set up the caller.
48 EXAMPLE
50 BUGS
52 SEE ALSO
54 <graphics/gfx.h>
56 INTERNALS
58 HISTORY
60 ******************************************************************************/
63 AROS_LIBFUNC_INIT
65 bm->Depth = depth;
66 bm->Rows = height;
67 bm->Flags = BMF_STANDARD;
68 bm->pad = 0;
69 bm->BytesPerRow = ((width + 15) >> 3) & ~0x1;
71 AROS_LIBFUNC_EXIT
72 } /* InitBitMap */