APTR handle = AllocBitMap(int type, int width, int height, ULONG flags, struct hwTagList *tags);
type
parameter can be one of the following constants:
HWBMTYPE_RGB:
HWBMTYPE_ALPHA:
HWBMTYPE_MASK:
HWBMTYPE_CLUT:
HWSDAFLAGS_CLUTBITMAPADAPTER
in hw_SetDisplayAdapter().
In that case, you must allocate a bitmap that can store 1 byte per pixel. Note that
CLUT bitmaps in Hollywood always use 1 byte per pixel, no matter if the bit depth is 8
or less than that. (V9.0)
The flags
parameter can be a combination of the following flags:
HWABMFLAGS_CLEAR:
Hollywood also passes a taglist to this function. Your implementation has to handle the following tags:
HWABMTAG_FRIENDBITMAP:
type
is HWBMTYPE_MASK
, the pData
element of this tag item can contain a pointer
to a color bitmap that Hollywood wants to use this mask for. The mask can then be
allocated in a way that allows efficient blitting.
HWABMTAG_DATA:
AllocBitMap()
implementation must initialize the bitmap it
has just allocated with the bits provided in the pData
member of this tag. If this tag
is set, Hollywood will also always pass the HWABMTAG_DATABYTESPERROW
to inform your
implementation about the byte length of a single row of the pixel array that has been
passed to this function in the pData
member. HWABMTAG_DATA
is only used for types
HWBMTYPE_MASK
or HWBMTYPE_ALPHA
.
HWABMTAG_DATABYTESPERROW:
HWABMTAG_DATA
is set, this tag contains the byte width of a single row in its
iData
member. To find out the total size of the array passed to you in HWABMTAG_DATA
,
multiply this value with the height of the bitmap.
See Bitmap information for more information on Hollywood bitmaps.
AllocBitMap()
is an optional API and must only be implemented if HWSDAFLAGS_BITMAPADAPTER
has been passed to hw_SetDisplayAdapter(). See hw_SetDisplayAdapter for details.
NULL
in case of an error