For example, a town can have a few different color doors, like: brown, red, green.
(http://i.imgur.com/9Xflciy.png)
How does Golden Sun store the data for a door that allows it to shift between colors?
How does the palette shift work?
Depends on which maps/doors you are talking about... Even though it's possible some things may swap palettes.. there are cases where separate tiles may be used instead... Like Lunpa....
Am I the only one who doesn't quite understand what's being asked here?
Speaking in very general terms, every pixel corresponds to a palette entry rather than actual color values. The colors depend on which palette is being used to draw the graphics. Does that answer the question?
Um, yeah... that's kinda what were trying to figure out... What they want to know...
Even in the event that tiles in the tile viewer are shared, there'd be separate entries in the mini-tiles section. (0x02020000)...One set of four mini-tiles being for one palette version, and the other set being for the other palette version. It's about the same either way. Shared or not, I think....?
Mini tiles are like this: (May help to look in binary.)
F000 = Palette used bits...
0C00 = 2 flip bits.... (Vertical and Horizontal.)
03FF = Tile index bits... (From layer's char base starting address.)
That would be VRAM map base data formatting as well....
Are you guys saying that every pixel for every tile is actually just a pointer to an offset within a palette? And depending on the palette that is being set it determines what color is returned? If so, holy crap.
Yeah.
The Palette section of VBA can hold 256 colors for Background Palette, and 256 colors for Sprite Palette (The first color is always transparent... except in the case that it is used for the backdrop.) You can see VBA's Tools>Palette Viewer for the palette info for where-ever you are in-game.
I think GBA does support a normal bitmap mode, i I recall correctly... but I think it is rarely used for most games(?)
Anyway... I know that Golden Sun's battle backgrounds use 128 colors and is using the 8bpp indexed format.
However, field maps themselves are probably 256-32=224 colors.. and using 4bpp indexed format. since the last two rows in the palette may be used for something else.
(In 4bpp, tiles index which palette in Background Palette... that's unused with the 8bpp one.)
--
But anyway, whether you choose to copy them, or do your own thing is up to you... depends on how much compression you want/how editable it should be.
(Although, my opinion would be to allow for any color you want to be used... even beyond 256 color limit.... I'm sure one could still go about automated compression techniques if one decided to. Like detecting number of colors used, and repeated tiles... even those that use a different palette. Compression through automated means may be better than manual(?), but both are important, me thinks. -- I can imagine some huffman compression as well, maybe... So I'm curious if it could be compressed even better than Golden Sun's data...(?) No idea....)