A tileset bundle: graphics + palette + color depth. More...
#include <asset.h>
Public Attributes | |
| u16 | color_mode |
| Color depth selector. Use one of: BG_4COLORS, BG_4COLORS0 (Mode 0), BG_16COLORS, BG_256COLORS. Determines how the runtime computes the CGRAM destination from palette_slot. | |
| u8 * | palette |
| Pointer to BGR555 palette data. | |
| u8 * | palette_end |
| One past the end of the palette data. | |
| u8 * | tiles |
| Pointer to tile graphics data. | |
| u8 * | tiles_end |
| One past the end of tile graphics. Size is computed at load time as tiles_end - tiles. | |
A tileset bundle: graphics + palette + color depth.
Use cases: runtime-built tilemaps, BGs that only ship a tileset without a static map, or any "load tiles + palette" call where you want the asset to be a first-class value (passed to a function, stored in a level table, etc.).
The struct stores begin/end pointer pairs rather than precomputed sizes because pointer subtraction between two extern symbols is not a compile-time constant in C — sizes are computed at load time by gfxLoad(). This keeps the struct usable in static const storage.
Field stability: this struct is part of the public API. New fields may be added at the END only — keep the first five fields where they are. Callers SHOULD use designated initialisers.
| u16 GfxAsset::color_mode |
Color depth selector. Use one of: BG_4COLORS, BG_4COLORS0 (Mode 0), BG_16COLORS, BG_256COLORS. Determines how the runtime computes the CGRAM destination from palette_slot.
| u8* GfxAsset::palette |
Pointer to BGR555 palette data.
| u8* GfxAsset::palette_end |
One past the end of the palette data.
| u8* GfxAsset::tiles |
Pointer to tile graphics data.
| u8* GfxAsset::tiles_end |