GP32 Gp32converter Palette


Akuma no Houkon

Certified Guru
Joined
Mar 4, 2004
Messages
1,194
Age
44
Location
USA > Washington > Everett
Website
akuma.gp32news.com
Anyone who has used GP32Converter for images knows the palette data that is placed in the header file for that image. Does anyone know if this palette uses the same indexes as the original image? Because I try and use GPTransBlt using the same index for transparency, and it doesnt seem to work.

Also does GeePee emulate GPTransBlt ? That might be my problem
 
In my Cascade game I use a BMP file converted with GP32Converter.
I also use the generated pallete to create a GP32 palette:
Code:
GP_HPALETTE h_pal;

/* Create palette */
h_pal = GpPaletteCreate(256, (GP_PALETTEENTRY*)avatar_Pal);

/* Change palette */
GpPaletteSelect(h_pal);
GpPaletteRealize();

/* Release resource */
GpPaletteDelete(h_pal);
h_pal = NULL;

Generated palette:
Code:
GP_PALETTEENTRY avatar_Pal[256] = {
      0x1, 0x2843, 0x2943, 0x39C3, 0x1145, 0x19C5, 0x4245, 0x4885, 0x5085, 0x52C5, 0x5885, 0x6305, 0x18C7, 0x1A07, 0x2287, 0x60C7,
      0x70C7, 0x2309, 0x2B49, 0x8109, 0x8909, 0x9909, 0x10CB, 0x294B, 0x994B, 0xA94B, 0x318D, 0x190F, 0x300F, 0x39CF, 0x1951, 0x4211,
      0x2193, 0x29D7, 0x2A19, 0x2A1B, 0x2A5B, 0x325B, 0x325D, 0x329F, 0x3AE1, 0x3AE3, 0x4013, 0x4325, 0x4327, 0x4369, 0x4815, 0x4817,
      0x4A53, 0x5295, 0x5AD7, 0x6319, 0x581B, 0x6B5B, 0x7B5D, 0x685F, 0x7063, 0x7863, 0x7865, 0x8067, 0x906B, 0x986D, 0xA071, 0x7B5F,
      0x6B85, 0x73C5, 0x2B8B, 0x340B, 0x3C8D, 0x3CCD, 0x3D0F, 0x454F, 0x739D, 0x458F, 0x4591, 0x4DD1, 0x5613, 0x5615, 0x5E15, 0x6659,
      0x765D, 0x7BDF, 0x7C05, 0x839F, 0x83A1, 0x8421, 0x869F, 0x86A1, 0x8B9F, 0x8BA1, 0x8BE1, 0x8C21, 0x8C45, 0x8C85, 0x9D09, 0xA549,
      0x4B69, 0x4BAB, 0x53ED, 0x5C2F, 0x642F, 0x8BE3, 0x8C23, 0x8C63, 0x93E1, 0x93E3, 0x93E5, 0x9421, 0x9423, 0x9BE3, 0x9465, 0x9C25,
      0x6C71, 0x9465, 0x94A5, 0x9C65, 0x9C65, 0xA467, 0xA469, 0xAC67, 0x8CAD, 0xA4A7, 0xACA9, 0xACE9, 0x96E3, 0xA6E7, 0x94EF, 0x9DB1,
      0xB14B, 0xB94B, 0xB98D, 0xC18D, 0xC9CF, 0xD211, 0xD253, 0xBB59, 0xCB17, 0xDB19, 0xD399, 0xDB5B, 0xDBDB, 0xDB9D, 0xDC1D, 0xEBDB,
      0xCC63, 0xE4A1, 0xE4A1, 0xE4A5, 0xEC1D, 0xEC5F, 0xECE5, 0xED25, 0xFC5F, 0xF4E3, 0xF4E5, 0xFD23, 0xFD25, 0xED27, 0xF527, 0xFD65,
      0xF83F, 0xB075, 0xB877, 0xC079, 0xC8BD, 0xD0FD, 0xD13D, 0xD17D, 0xD1FD, 0xDA3D, 0xDA7D, 0xDAFD, 0xDB3D, 0xE3BD, 0xE43F, 0xE47F,
      0xAD2B, 0xB4A9, 0xB4E9, 0xB4EB, 0xBCE9, 0xE529, 0xFD27, 0xFD67, 0xB52B, 0xBCEB, 0xBD2B, 0xB4ED, 0xB52D, 0xBD2D, 0xBD2F, 0xECFF,
      0xAD89, 0xB5C9, 0xBE49, 0xC64D, 0xCE95, 0xCE99, 0xCE9B, 0xD6DF, 0xAD6B, 0xAF29, 0xD6E3, 0xDEE3, 0xFDA7, 0xFD69, 0xFDE9, 0xEEA9,
      0xBD6D, 0xBD6D, 0xC56F, 0xCD71, 0xB5AD, 0xC5AF, 0xC5B1, 0xC671, 0xDDEF, 0xF66F, 0xFDED, 0xFE6F, 0xE6F1, 0xFEB1, 0xFF33, 0xFF73,
      0xBE79, 0xD6B5, 0xDE75, 0xDEB9, 0xDEB9, 0xDEF7, 0xCEFB, 0xD779, 0xF679, 0xEEF9, 0xE73B, 0xF73B, 0xEFBB, 0xF7BD, 0xF7BF, 0xF7FD,
      0xFEF7, 0xFF35, 0xFF39, 0xFF3B, 0xFF75, 0xFFB5, 0xFF79, 0xFF7F, 0xFFB9, 0xFFBB, 0xFFFB, 0xFFBD, 0xFFFD, 0xF7FF, 0xFFBF, 0xFFFF

};
 
Yes I know how to use the palettes, load them, etc..., thats not the problem.

My problem is finding a specific index on the palette for example, on the original BMP color 224 0 128 is index 135 (my transparent color), I tried selecting index 135 as the transparent color for GPTransBlt but it didnt work. Does the converter modify in any way, the order of the palette? If not, does GeePee32 actually emulate transparencies?
 
I used the standard GpTransBlt function with the last parameter being the index to the correct color index which needs to be transparent.

I always use index 255 for transparent so I used:
Code:
GpTransBlt(NULL,
 &gpDraw[nflip],
 cursorcol * BALL_WIDTH, cursorrow * BALL_HEIGHT,
 BALL_WIDTH, BALL_HEIGHT,
 (unsigned char*)gpi.pImage,
 7 * BALL_WIDTH, 0,
 balls_width, balls_height,
 0xff);

And GeePee32 (version 0.40) doesn't have a problem with it.
 
I asume you know this, but the color pallete index is zero based. ;)
 
Back
Top