.OPTION directive

.option option_name[=option_value] [,option_name[=option_value]]

The option directive is used to specific how other parts of the assembler function. It is possible to specify multiple options with a single directive.

All of the following enable mask generation when include a bitmap image:

.option BM_MSK=TRUE
.option BM_MSK=1
.option BM_MSK
Either of the two following statements disable mask generation:
.option BM_MSK=FALSE
.option BM_MSK=0

Options

#include "*.BMP"

BM_MSK

Set to TRUE if #include needs to generate mask. Default is AND style mask. Default = FALSE

BM_MSK_RGB

Specify the color of the mask. Use the RGB macro to generate an RGB value. Default: RGB(0, 255, 0) (bright green).

BM_MSK_INV

Set to TRUE if generated mask is OR style. Default = FALSE.

BM_SHD

Set to amount of shades for output. Output is 1-bit layers, darkest to lightest. Color images are converted to BM_SHD shades of grayscale when included. Default = 2.

BM_HDR

Set to TRUE to generate a header for the included image. Default = FALSE

BM_HDR_FMT

Header to prepend to the image data. Recognized tokens output values based on image properties. The tokens are:

"W"width in pixels of actual image
"H"height in pixels of actual image
"C"width in bytes of output image
"B"height of output image
"S"output size of image data in bytes

By default each token creates a corresponding 8-bit value in the image header, but doubling the token character create a 16-bit value.

For example, where "test.bmp" is a 16x32 bitmap:

.option BM_HDR_FMT="W,H,S"
#include "test.bmp"
would produce as output
$10, $20, $40, ... 64 bytes of image data ...

For example, a 16x256 pixel tileset "tiles.bmp":

.option BM_HDR_FMT="WW,HH,SS"
#include "tiles.bmp"
would produce as output
$10, $00, $00, $01, $00, $02, ... 512 bytes of image data ...

BM_MAP

Set to horizontal by vertical count of images to be included. Based on the dimensions of the given image and padding settings, BM_MAP will determine the dimensions of individual images and output them appropriate to headers if required.

By default the images are output in a top to bottom, left to right order. Unlike other options, B_MAP will set itself to FALSE after including one bitmap. Default = FALSE

BM_PAD

Amount of pixel padding in the input bitmap for each of the images in BM_MAP. Does not apply to images included without the BM_MAP option. A border of BM_PAD pixels is marked as the brightest color and given a CLEAR mask (regardless of what the input bitmap contains). Default = 0