gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 51d53a62b3d6651b647d038b9879cb11b4f4b676 parent eeb1efc9ddc23d12fe59e747734cfd67e5ddd309 Author: bbbbbr <bbbbbr@users.noreply.github.com> Date: Wed, 8 May 2024 02:11:22 -0700 Merge pull request #660 from bbbbbr/tools/png2asset_use_structs_source_tileset png2asset: fix broken assumption in comma output for use_structs + source_tilesets Diffstat:
| M | gbdk-support/png2asset/export_c_file.cpp | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gbdk-support/png2asset/export_c_file.cpp b/gbdk-support/png2asset/export_c_file.cpp @@ -324,9 +324,9 @@ static void export_c_zgb_per_tile_palette_ids(PNG2AssetData* assetData, FILE* fi fprintf(file, "const uint8_t %s_tile_pals[%d] = {\n\t", assetData->args->data_name.c_str(), (unsigned int)exportOpt.tiles_count); for(vector< Tile >::iterator it = assetData->tiles.begin() + exportOpt.tiles_start; it != assetData->tiles.end(); ++it) { - if(it != assetData->tiles.begin()) - fprintf(file, ", "); fprintf(file, "%d", it->pal); + if (it + 1 != assetData->tiles.end()) + fprintf(file, ", "); } fprintf(file, "\n};\n"); }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.