LOADPALETTE

Top  Previous  Next

Syntax

INT = LOADPALETTE(filename as STRING)

Description

Retrieves the palette in an 8 bit bitmap and stores it into the 8 bit screens palette.

Parameters

filename - Name of bitmap file with palette to load

Return value

0 on success or -1 if the palette could not be loaded.

Remarks

The bitmap itself is not loaded, only the palette contained within. This function will only work with an 8 bit (256 color) bitmap and an 8 bit screen. In order for 256 color bitmaps to display correctly the screen must be using the some colors as the bitmap. Use this function to realize the palette of a bitmap.

See Also: SETPALETTECOLOR

Example usage

LOADPALETTE GETSTARTPATH+"pal.bmp"