08-10-2022, 05:02 PM
(08-10-2022, 03:28 PM)megamarc Wrote: To fully support per-tile palette, you should modify DrawLayerScanline(), DrawLayerScanlineScaling(), DrawLayerScanlineAffine() and DrawLayerScanlinePixelMapping(). Each one is responsible of the different "graphic modes": standard, scaling, affine transformations and pixel mapping.
I'd also implement the following functions:
Code:// Get pointer to one of slotted palettes:
TLN_Palette TLN_GetSlottedPalette(int index);
// Set slotted palette to specific tile:
void TLN_SetTilePalette(TLN_Tilemap tilemap, int row, int column, int index);
// Remove tile palette (use default one)
void TLN_DisableTilePalette(TLN_Tilemap tilemap, int row, int column);
As you can see, tiles belong to tilemaps, not to layers.
Alright, I'll try this. It shouldn't be that hard (except I'm pretty sure I'll have segfaults while devlopping this feature).
However, when you are talking about Pixel mapping, are you talking about bitmap mode? In this case, bitmaps normally doesn't use tiles, except if you are talking about this tiled mode where you can manipulate every pixel data?