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.

Beginners > Palettes

#22803 - Jay Mattis - Tue Jun 29, 2004 7:51 pm

Can someone explain to me how you make one palette for all the images in an application? PCX2GBA for example, outputs a palette for each image. So, if I have a bunch of images how do I all get them so they're working off the same palette?
_________________
-Jay Mattis

#22805 - poslundc - Tue Jun 29, 2004 7:55 pm

Once conceivable way would be to combine all of your images into a single, larger image file.

Dan.

#22807 - jma - Tue Jun 29, 2004 9:33 pm

I typically use a very generic palette (like the netscape universal palette) and then convert all my images to use that. Works very well. But you do have to give up some colors...

Jeff
_________________
massung@gmail.com
http://www.retrobyte.org

#22834 - yaustar - Wed Jun 30, 2004 1:28 am

use a tool that combines all the palettes of all the images into one universal one... gif2sprite is probably the most user friendly one... gfx2gba is quite good as well but the huge number of options more put off the newer programmers.
_________________
[Blog] [Portfolio]

#22858 - Wriggler - Wed Jun 30, 2004 4:24 pm

Here's the method I use:

-Start up your image editor, and make a huge bitmap.
-Draw your sprites at the size you want them, say one in each corner (or whatever).
-When you're finished, decrease your image depth to 256 colours (or whatever you want to use). This will make one palette for all your images.
-Copy+paste each image into a new file. They will still have the palette for all images, but will be the size you want them to be.
-Convert each individually. You can then remove the palette arrays in each .h file, and simply load one palette into memory.

Hope that helps,

Ben

#22863 - Lupin - Wed Jun 30, 2004 4:54 pm

This tool should be able to do what you want (it's written by me, so don't expect too much =)):

http://www.gbadev.org/download.php?section=gfx&filename=bmp2gbaL.zip
_________________
Team Pokeme
My blog and PM ASM tutorials