Rice GLES2 (from mupen64plus-ae) plugin. Compile but doesn't works well on the OpenPa...
[mupen64plus-pandora.git] / source / gles2rice / src / liblinux / BMGUtils.h
CommitLineData
292f9317 1#ifndef _BMG_UTILS_H_
2#define _BMG_UTILS_H_
3/*
4 some handy utilities used in several units
5
6 Copyright 2001
7 M. Scott Heiman
8 All Rights Reserved
9*/
10
11#include "BMGImage.h"
12#include "../osal_preproc.h"
13
14/* the following 3 functions are used to access the background color
15// and the background image */
16void InitBackground(void);
17
18unsigned char *GetBackgroundColor(void);
19
20struct BMGImageStruct *GetBackgroundImage(void);
21
22/* creates a 24 bpp image from a 16 bpp image */
23BMGError Convert16to24( struct BMGImageStruct *img );
24
25/* converts an array of 1-bit scanlines to 8-bit scanlines */
26void Convert1to8( struct BMGImageStruct img,
27 unsigned char *out );
28
29/* converts an array of 4-bit scanlines to 8-bit scanlines */
30void Convert4to8( struct BMGImageStruct img,
31 unsigned char *out );
32
33unsigned char AlphaComp( unsigned char fg,
34 unsigned char alpha,
35 unsigned char bg );
36
37unsigned char InverseAlphaComp( unsigned char fg,
38 unsigned char alpha,
39 unsigned char bg );
40
41BITMAPINFO InternalCreateBMI( unsigned int dwWidth, /* width */
42 unsigned int dwHeight, /* height */
43 unsigned short wBitCount, /* bit count */
44 int compression ); /* compression type */
45
46void SetLastBMGError( BMGError err );
47
48/* the following 4 functions are for dealing with file formats
49 that store data in big endian format */
50short SwapShort( short in );
51unsigned short SwapUShort( unsigned short in );
52int SwapLong( int in );
53unsigned int SwapULong( unsigned int in );
54
55#endif
56