4 some handy utilities used in several units
12 #include "../osal_preproc.h"
14 /* the following 3 functions are used to access the background color
15 // and the background image */
16 void InitBackground(void);
18 unsigned char *GetBackgroundColor(void);
20 struct BMGImageStruct *GetBackgroundImage(void);
22 /* creates a 24 bpp image from a 16 bpp image */
23 BMGError Convert16to24( struct BMGImageStruct *img );
25 /* converts an array of 1-bit scanlines to 8-bit scanlines */
26 void Convert1to8( struct BMGImageStruct img,
29 /* converts an array of 4-bit scanlines to 8-bit scanlines */
30 void Convert4to8( struct BMGImageStruct img,
33 unsigned char AlphaComp( unsigned char fg,
37 unsigned char InverseAlphaComp( unsigned char fg,
41 BITMAPINFO InternalCreateBMI( unsigned int dwWidth, /* width */
42 unsigned int dwHeight, /* height */
43 unsigned short wBitCount, /* bit count */
44 int compression ); /* compression type */
46 void SetLastBMGError( BMGError err );
48 /* the following 4 functions are for dealing with file formats
49 that store data in big endian format */
50 short SwapShort( short in );
51 unsigned short SwapUShort( unsigned short in );
52 int SwapLong( int in );
53 unsigned int SwapULong( unsigned int in );