there is a 8bpp and 24 bpp bmp loader include on gpfm, you can download gpfm's sources at
http://info2.info.tampere.fi/~teoarsa/Ratt...ff/gpfm_015.zip
and if someone is interested, here is my little example code for loading 24 bpp bmps...
unsigned short bmp[320][240];
unsigned short rvb(unsigned char r, unsigned char v, unsigned char b, unsigned char it)
{
return ( ( ® <<11) | ( (v) <<6) | ( (B) <<1) | it );
}
void loadbmp16(char *path)
{
F_HANDLE fbmp;
int x, y;
unsigned char tmp[3];
GpFileOpen(chemin, OPEN_R, &fbmp);
GpFileSeek(fbmp, FROM_CURRENT, 54, NULL); // skip the header
for (y = 0; y < 240; y++)
for (x = 0; x < 320; x++)
{
GpFileRead(fbmp, &tmp, 3, NULL);
bmp[x][y] = rvb(tmp[2]/8, tmp[1]/8, tmp[0]/8, 1);
}
GpFileClose(fbmp);
}