BMAP* name = "filename";

BMAP* name = "#(width)x(height)x(bits)";

Defines a bitmap pointer with the given name. The pointer is set to an image file (see file formats for valid image files) or to a black bitmap with a given width, height, and color depth. Empty bitmaps can then set to a certain color by bmap_fill. Bitmaps are mostly used for 2D elements or for render targets.

Parameters:

filename Name of an image file (without path).
#(width)x(height)x(bits)  LC  A '#' character followed by the bitmap width, height and color depth separated by 'x' characters. For the color depth, the number of bits per pixel can be given. Valid values are 8, 12, 14, 16, 24, 32, 64, or 128. Color depth 32 creates a 32 bit alpha channel image.  A7.07  Color depth 12 creates a 16 bit floating point texture, and color depth 14 creates a 32 bit floating point texture.

The BMAP struct is defined in include\atypes.h. Use bmap_create() for creating a bmap object at runtime.

Examples:

BMAP* bTest = "test.pcx"; // define a bitmap from the image test.pcx
BMAP* bBlack = "#200x100x32"; // define a 200x100 pixel bitmap of 32 bits per pixel

See also:

FONT, file formats, bmap_fill, bmap_create

► latest version online