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.

DS development > Grit shared palettes

#175417 - Massif - Wed Nov 17, 2010 2:13 pm

I've been having trouble getting the shared palette option in grit to work properly. I have several 8 bit indexed images with different palettes (each palette only has 7 or 8 colors) and I'm trying to create a shared tileset, shared palette and a separate map for each image. Here's the command I'm using:

grit ./*.png -ftc -gS -m -pS -OBG_OL_MINE

This generates a file containing the shared tileset/palette and a separate file for each map. However, the palette does not contain the colors from all of the images. It seems to only be outputting the colors from one image. The weird part is that it only outputs 12 short values instead of 256 and half of those values are 0x0000. If I remove the -pS option, I get 256 values but still only the colors from one image are filled in and the rest are 0x0000.

I've also tried using bmp instead of png, but I get the same result.
_________________
Massif - It means mountain.

#175430 - relminator - Fri Nov 19, 2010 6:22 am

If you are using 16 color images, you can use 16x palette at any time during rendering.

For an almost unlimited palette use at any time during rendering you could use the 3D hardware.

http://devkitpro.org/viewtopic.php?f=25&t=2333&p=6177#p6177
_________________
http://rel.betterwebber.com

#175439 - Massif - Fri Nov 19, 2010 4:26 pm

I'm not even talking about displaying the graphics. I'm talking about packing the images with grit. The output grit is producing does not contain all the colors from my images.
_________________
Massif - It means mountain.

#175441 - Massif - Sun Nov 21, 2010 5:48 pm

So I downloaded the grit source code and hacked shared palettes in myself. :)
_________________
Massif - It means mountain.

#175442 - headspin - Sun Nov 21, 2010 6:16 pm

I added a similar option to grit called -mp which specifies a palette offset. Then I used a program I wrote called PalEdit for editing the graphics to share a single palette.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game