gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Kaleid help please

#62564 - iainprice - Fri Dec 02, 2005 12:33 pm

Hi,

I am using Kalied to convert a bmp to a mode 4 bin and pal.bin.

I would like to transfer the palette into an array 256 big but it does not seem to be as obvious as my_array[i] = image_pal_bin[i].

Is there any form of mask that needs to be &?
Is there 128 entries that need to be split to 256?
Any ideas?

Thanks

#63739 - t81b - Fri Dec 16, 2005 12:46 am

did you get this sorted yet?

If not, are you saving as binary files, and if so why not output as C source if your using C.

Also I think Kaleid only outputs the number of colours that are used in the bitmap, so the pal array may not be 256 long.

I think it should still work though. Maybe your reading a 32-bit number, while the palette values should be 16-bit?

#64151 - iainprice - Mon Dec 19, 2005 9:22 pm

Yes I am saving as a bin file, this is for a NDS game and the header file points to a palette, a beginning and an end but when I address the palette into an array to allow me to fade from one screen to another, the palette is not complete... I have still not sorted this problem...