gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 2eceac2218ff886ceb96e3b87baf04788c1849f4 parent 6e1716a175bec5b7114dc9b96f802cdc813a93bf Author: Toxa <untoxa@mail.ru> Date: Tue, 27 Feb 2024 10:51:23 +0300 PNG2ASSET: take into account bpp when converting metasprites Diffstat:
| M | gbdk-support/png2asset/metasprites.cpp | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gbdk-support/png2asset/metasprites.cpp b/gbdk-support/png2asset/metasprites.cpp @@ -34,7 +34,7 @@ void GetMetaSprite(int _x, int _y, int _w, int _h, int pivot_x, int pivot_y, PNG { size_t idx; unsigned char props; - unsigned char pal_idx = assetData->image.data[y * assetData->image.w + x] >> 2; //We can pick the palette from the first pixel of this tile + unsigned char pal_idx = assetData->image.data[y * assetData->image.w + x] >> assetData->args->bpp; //We can pick the palette from the first pixel of this tile // When both -keep_duplicate_tiles and source tilesets are used then // keep_duplicate_tiles should only apply to source tilesets, not the main image
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.