git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit e4dae730cdd918a4d70e6e151ec1eab0a99ef8d5
parent 452c104697d521cc80b644fb33f0f14e43e92d8c
Author: Zal0 <cebolleto@gmail.com>
Date:   Mon, 23 Aug 2021 19:47:17 +0200

properly exporting tiles_info bank

Diffstat:
Mgbdk-support/png2asset/png2asset.cpp5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gbdk-support/png2asset/png2asset.cpp b/gbdk-support/png2asset/png2asset.cpp @@ -765,6 +765,7 @@ int main(int argc, char *argv[]) //Export Tiles Info fprintf(file, "\n"); fprintf(file, "#include \"TilesInfo.h\"\n"); + fprintf(file, "BANKREF(%s_tiles_info)\n", data_name.c_str()); fprintf(file, "const struct TilesInfo %s_tiles_info = {\n", data_name.c_str()); fprintf(file, "\t%d, //num tiles\n", tiles.size()); fprintf(file, "\t%s_tiles, //tiles\n", data_name.c_str()); @@ -815,6 +816,7 @@ int main(int argc, char *argv[]) //Export Map Info fprintf(file, "\n"); fprintf(file, "#include \"MapInfo.h\"\n"); + fprintf(file, "BANKREF_EXTERN(%s_tiles_info)\n", data_name.c_str()); fprintf(file, "const struct MapInfo %s = {\n", data_name.c_str()); fprintf(file, "\t%s_map, //map\n", data_name.c_str()); fprintf(file, "\t%d, //with\n", image.w >> 3); @@ -823,8 +825,7 @@ int main(int argc, char *argv[]) fprintf(file, "\t%s_map_attributes, //map attributes\n", data_name.c_str()); else fprintf(file, "\t%s, //map attributes\n", "0"); - //fprintf(file, "\tBANK(%s), //tiles bank\n", data_name.c_str()); - fprintf(file, "\t255, //tiles bank\n", data_name.c_str()); + fprintf(file, "\tBANK(%s_tiles_info), //tiles bank\n", data_name.c_str()); fprintf(file, "\t&%s_tiles_info, //tiles info\n", data_name.c_str()); fprintf(file, "};\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.