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 > Using shared palettes with grit

#165843 - headspin - Fri Jan 09, 2009 12:04 pm

I'm looking for a way to tell grit to use a palette starting at a palette entry offset. So when I write the palette I can simply use (BG_PALETTE + offset), (BG_PALETTE_SUB + offset) etc. That way I can have one map use x number of colors and the next use x number of colors and just offset them in grit. But I have tried these two options and they both don't seem to do anything.

Code:
-ga <n>
Pixel offset for non-zero pixels. Useful if the associated palette is at an offset.

-ps <n>
Starting palette entry. -ps 16 would start the export at color 16. Works together with -pe and -pn.


Is there a bug or am I using the wrong command line options to do this? The only way I can currently get it to work is to use a shared palette across every map but it would be much easier if I could just tell grit to start at a palette offset instead.

Here are the full list of options being used

Code:
#-------------------------------------------------------
# graphics in tile format
#-------------------------------------------------------

-gt

#-------------------------------------------------------
# Our background color is magenta
#-------------------------------------------------------

-gT 7c1f

#-------------------------------------------------------
# Use an offset
#-------------------------------------------------------

-ga 16

#-------------------------------------------------------
# We only need this number of entries
#-------------------------------------------------------

-pn 16

#-------------------------------------------------------
# tile reduction
#-------------------------------------------------------
-mRtf

#-------------------------------------------------------
# map output
#-------------------------------------------------------
-m

#-------------------------------------------------------
# graphics bit depth is 4 (16 color)
#-------------------------------------------------------
-gB 4

#-------------------------------------------------------
# Map layout for regular backgrounds. 16-bit entries, broken down into screenblocks.
#-------------------------------------------------------
-mLs

_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game