gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit a713142f7945b9512f7bd1db02badf4faa72dd57 parent c08628fea7cbe8a023acb370da7a38d63a35ad92 Author: bbbbbr <bbbbbr@users.noreply.github.com> Date: Sat, 4 May 2024 03:18:16 -0700 Merge pull request #654 from bbbbbr/tools/png2asset_use_structs_source_tileset png2asset: use structs + source tileset changes, export code cleanup Diffstat:
62 files changed, 2538 insertions(+), 953 deletions(-)
diff --git a/gbdk-support/png2asset/Makefile b/gbdk-support/png2asset/Makefile @@ -41,7 +41,11 @@ endif TARGET = png2asset -SRCS := cmp_int_color.cpp image_data.cpp lodepng.cpp map_attributes.cpp metasprites.cpp png2asset.cpp rgb_to_nes_lut.cpp export.cpp image_utils.cpp main.cpp maps.cpp palettes.cpp process_arguments.cpp tiles.cpp +SRCS := cmp_int_color.cpp image_data.cpp lodepng.cpp map_attributes.cpp \ + metasprites.cpp png2asset.cpp \ + rgb_to_nes_lut.cpp \ + export.cpp export_h_file.cpp export_c_file.cpp export_binary.cpp \ + image_utils.cpp main.cpp maps.cpp palettes.cpp process_arguments.cpp tiles.cpp OBJS := $(SRCS:%.cpp=%.o) $(TARGET): $(OBJS) @@ -69,3 +73,6 @@ test-update: test-compare: $(MAKE) -C testing compare-output + +test-reset-ref: + $(MAKE) -C testing reset-ref diff --git a/gbdk-support/png2asset/export.cpp b/gbdk-support/png2asset/export.cpp @@ -30,11 +30,6 @@ using namespace std; -size_t export_color_count, export_color_start; -size_t export_tiles_count, export_tiles_start; -bool use_structs_with_source_tileset; -bool has_palette_data_to_export; - string extract_name(string const & name) { @@ -47,554 +42,28 @@ string extract_name(string const & name) // Calculate some shared export settings (.c, .h, binary) // This gets called at the start of each export output function -static void calc_palette_and_tileset_export_size(PNG2AssetData* assetData) { - - use_structs_with_source_tileset = (assetData->args->has_source_tilesets == true) && (assetData->args->use_structs == true); +void calc_palette_and_tileset_export_size(PNG2AssetData* assetData, exportOptions_t* exportOptions) { - // (source_tileset + use_structs is a special combination for ZGB - if (use_structs_with_source_tileset) { - // Export all colors and tiles, including those from source tileset - export_color_start = 0; - export_color_count = (unsigned int)assetData->image.total_color_count; - export_tiles_start = 0; - export_tiles_count = assetData->tiles.size(); - } else { - // Otherwise default behavior is to skip past/offset however many - // palettes and tiles were present in the source tileset - export_color_start = assetData->args->source_total_color_count; - export_color_count = assetData->image.total_color_count - assetData->args->source_total_color_count; - export_tiles_start = assetData->args->source_tileset_size; - export_tiles_count = assetData->tiles.size() - assetData->args->source_tileset_size; - } + // Default behavior is to skip past/offset however many + // palettes and tiles were present in the source tileset + // + // Note: source_tileset + use_structs for ZGB no longer has special source tile/palette inclusion behavior + exportOptions->color_start = assetData->args->source_total_color_count; + exportOptions->color_count = assetData->image.total_color_count - assetData->args->source_total_color_count; + exportOptions->tiles_start = assetData->args->source_tileset_size; + exportOptions->tiles_count = assetData->tiles.size() - assetData->args->source_tileset_size; // When to export palette data: // - Not using a source tileset : include all colors // - Using a source tileset and there are extra colors : include only colors not present in source tileset - // - Using a source tileset + zgb's use_structs mode : include all source tileset and colors not present in source tileset // // AND it's not turned off via include_palettes = false - has_palette_data_to_export = (assetData->args->include_palettes & - ((assetData->args->has_source_tilesets == false) || (export_color_count > 0) || (use_structs_with_source_tileset == true))); -} - - -bool export_h_file( PNG2AssetData* assetData) { - - FILE* file; - calc_palette_and_tileset_export_size(assetData); - - file = fopen(assetData->args->output_filename_h.c_str(), "w"); - if(!file) { - printf("Error writing file: %s", assetData->args->output_filename_h.c_str()); - return false; - } - - fprintf(file, "//AUTOGENERATED FILE FROM png2asset\n"); - fprintf(file, "#ifndef METASPRITE_%s_H\n", assetData->args->data_name.c_str()); - fprintf(file, "#define METASPRITE_%s_H\n", assetData->args->data_name.c_str()); - fprintf(file, "\n"); - fprintf(file, "#include <stdint.h>\n"); - fprintf(file, "#include <gbdk/platform.h>\n"); - fprintf(file, "#include <gbdk/metasprites.h>\n"); - fprintf(file, "\n"); - if(assetData->args->use_structs) - { - if(assetData->args->export_as_map) - { - fprintf(file, "#include \"TilesInfo.h\"\n"); - fprintf(file, "#include \"MapInfo.h\"\n"); - fprintf(file, "\n"); - fprintf(file, "extern const struct TilesInfo %s_tiles_info;\n", assetData->args->data_name.c_str()); - fprintf(file, "extern const struct MapInfo %s;\n", assetData->args->data_name.c_str()); - } - else - { - fprintf(file, "#include \"MetaSpriteInfo.h\"\n"); - fprintf(file, "\n"); - fprintf(file, "extern const struct MetaSpriteInfo %s;\n", assetData->args->data_name.c_str()); - } - } - else - { - fprintf(file, "#define %s_TILE_ORIGIN %d\n", assetData->args->data_name.c_str(), assetData->args->tile_origin); - fprintf(file, "#define %s_TILE_W %d\n", assetData->args->data_name.c_str(), assetData->image.tile_w); - fprintf(file, "#define %s_TILE_H %d\n", assetData->args->data_name.c_str(), assetData->image.tile_h); - fprintf(file, "#define %s_WIDTH %d\n", assetData->args->data_name.c_str(), (unsigned int)assetData->args->spriteSize.width); - fprintf(file, "#define %s_HEIGHT %d\n", assetData->args->data_name.c_str(), (unsigned int)assetData->args->spriteSize.height); - // The TILE_COUNT calc here is referring to number of 8x8 tiles, - // so the >> 3 for each sizes axis is to get a multiplier for larger hardware sprites such as 8x16 and 16x16 - fprintf(file, "#define %s_TILE_COUNT %d\n", assetData->args->data_name.c_str(), ((unsigned int)export_tiles_count) * (assetData->image.tile_h >> 3) * (assetData->image.tile_w >> 3)); - if(assetData->args->include_palettes) { - fprintf(file, "#define %s_PALETTE_COUNT %d\n", assetData->args->data_name.c_str(), (unsigned int)(assetData->image.total_color_count / assetData->image.colors_per_pal)); - fprintf(file, "#define %s_COLORS_PER_PALETTE %d\n", assetData->args->data_name.c_str(), (unsigned int)assetData->image.colors_per_pal); - fprintf(file, "#define %s_TOTAL_COLORS %d\n", assetData->args->data_name.c_str(), (unsigned int)assetData->image.total_color_count); - } - - if(assetData->args->includedMapOrMetaspriteData) { - - if(assetData->args->export_as_map) - { - fprintf(file, "#define %s_MAP_ATTRIBUTES ", assetData->args->data_name.c_str()); - if(assetData->args->use_map_attributes && assetData->map_attributes.size()) - fprintf(file, "%s_map_attributes\n", assetData->args->data_name.c_str()); - else - fprintf(file, "0\n"); - - if(assetData->args->use_map_attributes) - { - int scale = assetData->args->use_2x2_map_attributes ? 2 : 1; - fprintf(file, "#define %s_MAP_ATTRIBUTES_WIDTH %d\n", assetData->args->data_name.c_str(), (int)(scale * assetData->args->map_attributes_size.width)); - fprintf(file, "#define %s_MAP_ATTRIBUTES_HEIGHT %d\n", assetData->args->data_name.c_str(), (int)(scale * assetData->args->map_attributes_size.height)); - fprintf(file, "#define %s_MAP_ATTRIBUTES_PACKED_WIDTH %d\n", assetData->args->data_name.c_str(), (int)assetData->args->map_attributes_packed_size.width); - fprintf(file, "#define %s_MAP_ATTRIBUTES_PACKED_HEIGHT %d\n", assetData->args->data_name.c_str(), (int)assetData->args->map_attributes_packed_size.height); - } - - // TODO: FIXME: Based on above if statement, this code will never be reached if (assetData->args->use_structs) is true (despite being tested in code below) - if(assetData->args->use_structs) - { - fprintf(file, "#define %s_TILE_PALS ", assetData->args->data_name.c_str()); - if(assetData->args->use_map_attributes) - fprintf(file, "0\n"); - else - fprintf(file, "%s_tile_pals\n", assetData->args->data_name.c_str()); - } - } - else - { - fprintf(file, "#define %s_PIVOT_X %d\n", assetData->args->data_name.c_str(), assetData->args->pivot.x); - fprintf(file, "#define %s_PIVOT_Y %d\n", assetData->args->data_name.c_str(), assetData->args->pivot.y); - fprintf(file, "#define %s_PIVOT_W %d\n", assetData->args->data_name.c_str(), (unsigned int)assetData->args->pivot.width); - fprintf(file, "#define %s_PIVOT_H %d\n", assetData->args->data_name.c_str(), (unsigned int)assetData->args->pivot.height); - } - } - fprintf(file, "\n"); - fprintf(file, "BANKREF_EXTERN(%s)\n", assetData->args->data_name.c_str()); - fprintf(file, "\n"); - - if (has_palette_data_to_export) { - fprintf(file, "extern const palette_color_t %s_palettes[%d];\n", assetData->args->data_name.c_str(), (unsigned int)export_color_count); - } - if(assetData->args->includeTileData) { - fprintf(file, "extern const uint8_t %s_tiles[%d];\n", assetData->args->data_name.c_str(), (unsigned int)(export_tiles_count * (assetData->image.tile_w * assetData->image.tile_h * assetData->args->bpp / 8))); - } - - fprintf(file, "\n"); - if(assetData->args->includedMapOrMetaspriteData) { - if(assetData->args->export_as_map) - { - fprintf(file, "extern const unsigned char %s_map[%d];\n", assetData->args->data_name.c_str(), (unsigned int)(assetData->map).size()); - - if(assetData->args->use_map_attributes && assetData->map_attributes.size()) { - fprintf(file, "extern const unsigned char %s_map_attributes[%d];\n", assetData->args->data_name.c_str(), (unsigned int)(assetData->map_attributes).size()); - } - else - { - // Some platforms (like SMS/GG) encode attributes as part of map - // For compatibility, add a define that makes _map_attributes equal _map, - // so that set_bkg_attributes can work the same on these platforms - fprintf(file, "#define %s_map_attributes %s_map\n", assetData->args->data_name.c_str(), assetData->args->data_name.c_str()); - } - // TODO: FIXME: Based on above if statement, this code will never be reached if (assetData->args->use_structs) is true (despite being tested in code below) - if(!assetData->args->use_map_attributes && (assetData->args->includeTileData) && (assetData->args->use_structs)) { - fprintf(file, "extern const unsigned char* %s_tile_pals[%d];\n", assetData->args->data_name.c_str(), (unsigned int)(assetData->tiles).size()); - } - } - else - { - fprintf(file, "extern const metasprite_t* const %s_metasprites[%d];\n", assetData->args->data_name.c_str(), (unsigned int)(assetData->sprites.size())); - } - } - } - fprintf(file, "\n"); - fprintf(file, "#endif\n"); - - - fclose(file); - // END: Output .h FILE - - return true; // success -} - - - -bool export_c_file( PNG2AssetData* assetData) { - - FILE* file; - calc_palette_and_tileset_export_size(assetData); - - file = fopen(assetData->args->output_filename.c_str(), "w"); - if(!file) { - printf("Error writing file: %s", assetData->args->output_filename.c_str()); - return false; - } - - if(assetData->args->bank >= 0) fprintf(file, "#pragma bank %d\n\n", assetData->args->bank); - - fprintf(file, "//AUTOGENERATED FILE FROM png2asset\n\n"); - - fprintf(file, "#include <stdint.h>\n"); - fprintf(file, "#include <gbdk/platform.h>\n"); - fprintf(file, "#include <gbdk/metasprites.h>\n"); - fprintf(file, "\n"); - - fprintf(file, "BANKREF(%s)\n\n", assetData->args->data_name.c_str()); - - if (has_palette_data_to_export) { - - if (!(assetData->args->use_structs) || (assetData->args->includeTileData)) { - fprintf(file, "const palette_color_t %s_palettes[%d] = {\n", assetData->args->data_name.c_str(), (unsigned int)export_color_count); - for(size_t i = export_color_start / assetData->image.colors_per_pal; i < assetData->image.total_color_count / assetData->image.colors_per_pal; ++i) - { - if(i != 0) - fprintf(file, ",\n"); - fprintf(file, "\t"); - - unsigned char* pal_ptr = &assetData->image.palette[i * (assetData->image.colors_per_pal * RGBA32_SZ)]; - for(int c = 0; c < (int)assetData->image.colors_per_pal; ++c, pal_ptr += RGBA32_SZ) - { - size_t rgb222 = (((pal_ptr[2] >> 6) & 0x3) << 4) | - (((pal_ptr[1] >> 6) & 0x3) << 2) | - (((pal_ptr[0] >> 6) & 0x3) << 0); - if(assetData->args->convert_rgb_to_nes) { - fprintf(file, "0x%0X", rgb_to_nes[rgb222]); - } - else - fprintf(file, "RGB8(%3d,%3d,%3d)", pal_ptr[0], pal_ptr[1], pal_ptr[2]); - if(c != (int)assetData->image.colors_per_pal - 1) - fprintf(file, ", "); - // Line break every 4 color entries, to keep line width down - if(((c + 1) % 4) == 0) - fprintf(file, "\n\t"); - } - } - fprintf(file, "\n};\n"); - } - } - - if(assetData->args->includeTileData) { - fprintf(file, "\n"); - fprintf(file, "const uint8_t %s_tiles[%d] = {\n", assetData->args->data_name.c_str(), (unsigned int)(export_tiles_count * assetData->image.tile_w * assetData->image.tile_h * assetData->args->bpp / 8)); - fprintf(file, "\t"); - for(vector< Tile >::iterator it = assetData->tiles.begin() + export_tiles_start; it != assetData->tiles.end(); ++it) - { - - int line_break = 1; // Start with 1 to prevent line break on first iteration - vector< unsigned char > packed_data = (*it).GetPackedData(assetData->args->pack_mode, assetData->image.tile_w, assetData->image.tile_h, assetData->args->bpp); - for(vector< unsigned char >::iterator it2 = packed_data.begin(); it2 != packed_data.end(); ++it2) - { - fprintf(file, "0x%02x", (*it2)); - if((it + 1) != assetData->tiles.end() || (it2 + 1) != packed_data.end()) - fprintf(file, ","); - // Add a line break after each 8x8 tile - if(((line_break++) % (8 / assetData->args->bpp)) == 0) - fprintf(file, "\n\t"); - } + // exportOptions->has_palette_data_to_export = (assetData->args->include_palettes && + // ((assetData->args->has_source_tilesets == false) || (exportOptions->color_count > 0)) ); - if((!assetData->args->export_as_map) && (it != assetData->tiles.end())) - fprintf(file, "\n"); - } - fprintf(file, "};\n\n"); - } + bool use_structs_with_source_tileset = (assetData->args->has_source_tilesets == true) && (assetData->args->use_structs == true); - if(assetData->args->includedMapOrMetaspriteData) { + exportOptions->has_palette_data_to_export = (assetData->args->include_palettes & + ((assetData->args->has_source_tilesets == false) || (exportOptions->color_count > 0) || (use_structs_with_source_tileset == true))); - if(!assetData->args->export_as_map) - { - for(vector< MetaSprite >::iterator it = assetData->sprites.begin(); it != assetData->sprites.end(); ++it) - { - fprintf(file, "const metasprite_t %s_metasprite%d[] = {\n", assetData->args->data_name.c_str(), (int)(it - assetData->sprites.begin())); - for(MetaSprite::iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) - { - int pal_idx = (*it2).props & 0xF; - int dmg_pal = ((*it2).props >> 4) & 1; - int flip_x = ((*it2).props >> 5) & 1; - int flip_y = ((*it2).props >> 6) & 1; - int priority = ((*it2).props >> 7) & 1; - fprintf(file, - "\tMETASPR_ITEM(%d, %d, %d, S_PAL(%d)%s%s%s%s),\n", - (*it2).offset_y, - (*it2).offset_x, - (*it2).offset_idx, - pal_idx, - (dmg_pal) ? " | S_PALETTE" : "", - (flip_x) ? " | S_FLIPX" : "", - (flip_y) ? " | S_FLIPY" : "", - (priority) ? " | S_PRIORITY" : ""); - } - fprintf(file, "\tMETASPR_TERM\n"); - fprintf(file, "};\n\n"); - } - - fprintf(file, "const metasprite_t* const %s_metasprites[%d] = {\n\t", assetData->args->data_name.c_str(), (unsigned int)(assetData->sprites.size())); - for(vector< MetaSprite >::iterator it = assetData->sprites.begin(); it != assetData->sprites.end(); ++it) - { - fprintf(file, "%s_metasprite%d", assetData->args->data_name.c_str(), (int)(it - assetData->sprites.begin())); - if(it + 1 != assetData->sprites.end()) - fprintf(file, ", "); - } - fprintf(file, "\n};\n"); - - if(assetData->args->use_structs) - { - fprintf(file, "\n"); - fprintf(file, "#include \"MetaSpriteInfo.h\"\n"); - fprintf(file, "const struct MetaSpriteInfo %s = {\n", assetData->args->data_name.c_str()); - fprintf(file, "\t%d, //width\n", (unsigned int)assetData->args->pivot.width); - fprintf(file, "\t%d, //height\n", (unsigned int)assetData->args->pivot.height); - fprintf(file, "\t%d, //num tiles\n", (unsigned int)assetData->tiles.size() * (assetData->image.tile_h >> 3)); - fprintf(file, "\t%s_tiles, //tiles\n", assetData->args->data_name.c_str()); - fprintf(file, "\t%d, //num palettes\n", (unsigned int)(assetData->image.total_color_count / assetData->image.colors_per_pal)); - fprintf(file, "\t%s_palettes, //CGB palette\n", assetData->args->data_name.c_str()); - fprintf(file, "\t%d, //num sprites\n", (unsigned int)assetData->sprites.size()); - fprintf(file, "\t%s_metasprites, //metasprites\n", assetData->args->data_name.c_str()); - fprintf(file, "};\n"); - } - } - else - { - if(assetData->args->includeTileData) { - if(assetData->args->use_structs) - { - //Export tiles pals (if any) - if(!assetData->args->use_map_attributes) - { - fprintf(file, "\n"); - fprintf(file, "const uint8_t %s_tile_pals[%d] = {\n\t", assetData->args->data_name.c_str(), (unsigned int)export_tiles_count); - for(vector< Tile >::iterator it = assetData->tiles.begin() + export_tiles_start; it != assetData->tiles.end(); ++it) - { - if(it != assetData->tiles.begin()) - fprintf(file, ", "); - fprintf(file, "%d", it->pal); - } - fprintf(file, "\n};\n"); - } - //Export Tiles Info - fprintf(file, "\n"); - fprintf(file, "#include \"TilesInfo.h\"\n"); - fprintf(file, "BANKREF(%s_tiles_info)\n", assetData->args->data_name.c_str()); - fprintf(file, "const struct TilesInfo %s_tiles_info = {\n", assetData->args->data_name.c_str()); - fprintf(file, "\t.num_frames=%d, //num tiles\n", (unsigned int)assetData->tiles.size() * (assetData->image.tile_h >> 3)); - fprintf(file, "\t.data=%s_tiles, //tiles\n", assetData->args->data_name.c_str()); - fprintf(file, "\t.num_pals=%d, //num palettes\n", (unsigned int)(assetData->image.total_color_count / assetData->image.colors_per_pal)); - fprintf(file, "\t.pals=%s_palettes, //palettes\n", assetData->args->data_name.c_str()); - if(!assetData->args->use_map_attributes) - fprintf(file, "\t.color_data=%s_tile_pals, //tile palettes\n", assetData->args->data_name.c_str()); - else - fprintf(file, "\t.color_data=0 //tile palettes\n"); - fprintf(file, "};\n"); - } - } else { - if((assetData->args->use_structs) && (assetData->args->source_tilesets.size())) { - fprintf(file, "\n"); - fprintf(file, "#include \"TilesInfo.h\"\n"); - fprintf(file, "extern const void __bank_%s;\n", extract_name(assetData->args->source_tilesets[0]).c_str()); - fprintf(file, "extern const struct TilesInfo %s;\n", extract_name(assetData->args->source_tilesets[0]).c_str()); - } - } - - //Export map - fprintf(file, "\n"); - fprintf(file, "const unsigned char %s_map[%d] = {\n", assetData->args->data_name.c_str(), (unsigned int)(assetData->map.size())); - // TODO: These hardwired "/ 8" should be using " / assetData->image.tile_w" and "_h" - // TODO: Should also be converted to using args.map_entry_size_bytes - size_t line_size = assetData->map.size() / (assetData->image.h / 8); - if(assetData->args->output_transposed) { - - for(size_t i = 0; i < line_size; ++i) - { - fprintf(file, "\t"); - for(size_t j = 0; j < assetData->image.h / 8; ++j) - { - fprintf(file, "0x%02x,", assetData->map[j * line_size + i]); - } - fprintf(file, "\n"); - } - } - else { - - for(size_t j = 0; j < assetData->image.h / 8; ++j) - { - fprintf(file, "\t"); - for(size_t i = 0; i < line_size; ++i) - { - fprintf(file, "0x%02x,", assetData->map[j * line_size + i]); - } - fprintf(file, "\n"); - } - } - fprintf(file, "};\n"); - - - //Export map attributes (if any) - if(assetData->args->use_map_attributes && assetData->map_attributes.size()) - { - fprintf(file, "\n"); - fprintf(file, "const unsigned char %s_map_attributes[%d] = {\n", assetData->args->data_name.c_str(), (unsigned int)(assetData->map_attributes.size())); - if(assetData->args->output_transposed) { - for(size_t i = 0; i < assetData->args->map_attributes_packed_size.width; ++i) - { - fprintf(file, "\t"); - for(size_t j = 0; j < assetData->args->map_attributes_packed_size.height; ++j) - { - fprintf(file, "0x%02x,", assetData->map_attributes[j * assetData->args->map_attributes_packed_size.width + i]); - } - fprintf(file, "\n"); - } - } - else { - for(size_t j = 0; j < assetData->args->map_attributes_packed_size.height; ++j) - { - fprintf(file, "\t"); - for(size_t i = 0; i < assetData->args->map_attributes_packed_size.width; ++i) - { - fprintf(file, "0x%02x,", assetData->map_attributes[j * assetData->args->map_attributes_packed_size.width + i]); - } - fprintf(file, "\n"); - } - } - - fprintf(file, "};\n"); - } - - if(assetData->args->use_structs) - { - //Export Map Info - fprintf(file, "\n"); - fprintf(file, "#include \"MapInfo.h\"\n"); - if(assetData->args->includeTileData) { - fprintf(file, "BANKREF_EXTERN(%s_tiles_info)\n", assetData->args->data_name.c_str()); - } - fprintf(file, "const struct MapInfo %s = {\n", assetData->args->data_name.c_str()); - fprintf(file, "\t.data=%s_map, //map\n", assetData->args->data_name.c_str()); - fprintf(file, "\t.width=%d, //with\n", assetData->image.w >> 3); - fprintf(file, "\t.height=%d, //height\n", assetData->image.h >> 3); - if(assetData->args->use_map_attributes && assetData->map_attributes.size()) - fprintf(file, "\t.attributes=%s_map_attributes, //map attributes\n", assetData->args->data_name.c_str()); - else - fprintf(file, "\t.attributes=0, //map attributes\n"); - - if(assetData->args->includeTileData) { - fprintf(file, "\t.tiles_bank=BANK(%s_tiles_info), //tiles bank\n", assetData->args->data_name.c_str()); - fprintf(file, "\t.tiles=&%s_tiles_info, //tiles info\n", assetData->args->data_name.c_str()); - } else { - if (assetData->args->source_tilesets.size()) { - fprintf(file, "\t.tiles_bank=BANK(%s), //tiles bank\n", extract_name(assetData->args->source_tilesets[0]).c_str()); - fprintf(file, "\t.tiles=&%s, //tiles info\n", extract_name(assetData->args->source_tilesets[0]).c_str()); - } - } - fprintf(file, "};\n"); - } - } - } else { - // "-use_structs -tiles_only" case - if(assetData->args->includeTileData) { - if(assetData->args->use_structs) - { - //Export tiles pals (if any) - if(!assetData->args->use_map_attributes) - { - fprintf(file, "\n"); - fprintf(file, "const uint8_t %s_tile_pals[%d] = {\n\t", assetData->args->data_name.c_str(), (unsigned int)export_tiles_count); - for(vector< Tile >::iterator it = assetData->tiles.begin() + export_tiles_start; it != assetData->tiles.end(); ++it) - { - if(it != assetData->tiles.begin()) - fprintf(file, ", "); - fprintf(file, "%d", it->pal); - } - fprintf(file, "\n};\n"); - } - //Export Tiles Info - fprintf(file, "\n"); - fprintf(file, "#include \"TilesInfo.h\"\n"); - fprintf(file, "const struct TilesInfo %s = {\n", assetData->args->data_name.c_str()); - fprintf(file, "\t.num_frames=%d, //num tiles\n", (unsigned int)assetData->tiles.size() * (assetData->image.tile_h >> 3)); - fprintf(file, "\t.data=%s_tiles, //tiles\n", assetData->args->data_name.c_str()); - fprintf(file, "\t.num_pals=%d, //num palettes\n", (unsigned int)(assetData->image.total_color_count / assetData->image.colors_per_pal)); - fprintf(file, "\t.pals=%s_palettes, //palettes\n", assetData->args->data_name.c_str()); - if(!assetData->args->use_map_attributes) - fprintf(file, "\t.color_data=%s_tile_pals, //tile palettes\n", assetData->args->data_name.c_str()); - else - fprintf(file, "\t.color_data=0 //tile palettes\n"); - fprintf(file, "};\n"); - } - } - } - - fclose(file); - - return true; // success -} - - -bool export_map_binary( PNG2AssetData* assetData) { - - std::ofstream mapBinaryFile, mapAttributesBinaryfile, tilesBinaryFile; - calc_palette_and_tileset_export_size(assetData); - - if (assetData->args->includeTileData) { - tilesBinaryFile.open(assetData->args->output_filename_tiles_bin, std::ios_base::binary); - - for(vector< Tile >::iterator it = assetData->tiles.begin() + export_tiles_start; it != assetData->tiles.end(); ++it) - { - - vector< unsigned char > packed_data = (*it).GetPackedData(assetData->args->pack_mode, assetData->image.tile_w, assetData->image.tile_h, assetData->args->bpp); - for(vector< unsigned char >::iterator it2 = packed_data.begin(); it2 != packed_data.end(); ++it2) - { - - const char chars[] = { (const char)(*it2) }; - tilesBinaryFile.write(chars, 1); - } - - } - // Finalize the files - tilesBinaryFile.close(); - } - - if (assetData->args->includedMapOrMetaspriteData) { - mapBinaryFile.open(assetData->args->output_filename_bin, std::ios_base::binary); - - // Open our file for writing attributes if specified - if (assetData->args->use_map_attributes && assetData->map_attributes.size()) { - mapAttributesBinaryfile.open(assetData->args->output_filename_attributes_bin, std::ios_base::binary); - } - - int columns = assetData->image.w >> 3; - int rows = assetData->image.h >> 3; - - // If we want the values to be column-by-column - if(assetData->args->output_transposed) { - - int map_entry_size = assetData->args->map_entry_size_bytes; - // Swap the column/row for loops - for(int column = 0; column < columns; column++) { - for(int row = 0; row < rows; ++row) { - - int tile = (column + row * columns) * map_entry_size; - - // Write map items column-by-column - mapBinaryFile.write( (const char *) &(assetData->map[tile]), map_entry_size); - - if (assetData->args->use_map_attributes && assetData->map_attributes.size()) { - mapAttributesBinaryfile.write( (const char*) &(assetData->map_attributes[tile]), map_entry_size); - } - } - } - } - else { - // Write the arrays as-is, row-by-row - mapBinaryFile.write((const char*)(&assetData->map[0]), assetData->map.size()); - - if (assetData->args->use_map_attributes && assetData->map_attributes.size()) { - mapAttributesBinaryfile.write((const char*)(&assetData->map_attributes[0]), assetData->map_attributes.size()); - } - } - // Finalize the files - mapBinaryFile.close(); - if (assetData->args->use_map_attributes && assetData->map_attributes.size()) { - mapAttributesBinaryfile.close(); - } - } - - - return true; // success -} +} + diff --git a/gbdk-support/png2asset/export.h b/gbdk-support/png2asset/export.h @@ -1,12 +1,16 @@ #pragma once - - #include "process_arguments.h" #include "png2asset.h" using namespace std; -bool export_h_file( PNG2AssetData* assetData); -bool export_c_file( PNG2AssetData* assetData); -bool export_map_binary( PNG2AssetData* assetData); +struct exportOptions_t { + + size_t color_count, color_start; + size_t tiles_count, tiles_start; + bool has_palette_data_to_export; +}; + +string extract_name(string const & name); +void calc_palette_and_tileset_export_size(PNG2AssetData* assetData, exportOptions_t* exportOptions); diff --git a/gbdk-support/png2asset/export_binary.cpp b/gbdk-support/png2asset/export_binary.cpp @@ -0,0 +1,120 @@ +// This prevents windows build errors regarding the 'fopen' function +// Example: 'fopen': This function or variable may be unsafe.Consider using fopen_s instead.To disable deprecation, use _CRT_SECURE_NO_WARNINGS.See online help for details. +// More info: https://stackoverflow.com/questions/14386/fopen-deprecated-warning +// From bbbbbr: `Looks like some of the benefits are concurrency protection, but that probably isn't an issue for png2asset` +#ifdef _WIN32 +#define _CRT_SECURE_NO_DEPRECATE +#endif + +#include <vector> +#include <string> +#include <algorithm> +#include <cstring> +#include <set> +#include <stdio.h> +#include <fstream> +#include <cstdint> + +#include "lodepng.h" +#include "mttile.h" + +#include "cmp_int_color.h" +#include "metasprites.h" + +#include "png2asset.h" +#include "png_image.h" +#include "export.h" +#include "image_utils.h" +#include "process_arguments.h" +#include "rgb_to_nes_lut.h" + +using namespace std; + +static exportOptions_t exportOpt; + +static void export_map_binary_tile_data(PNG2AssetData* assetData); +static void export_map_binary_map_data(PNG2AssetData* assetData); + + +bool export_map_binary(PNG2AssetData* assetData) { + + calc_palette_and_tileset_export_size(assetData, &exportOpt); + + if (assetData->args->includeTileData) + export_map_binary_tile_data(assetData); + + if (assetData->args->includedMapOrMetaspriteData) + export_map_binary_map_data(assetData); + + return true; // success +} + + +static void export_map_binary_tile_data(PNG2AssetData* assetData) { + + std::ofstream tilesBinaryFile; + tilesBinaryFile.open(assetData->args->output_filename_tiles_bin, std::ios_base::binary); + + for(vector< Tile >::iterator it = assetData->tiles.begin() + exportOpt.tiles_start; it != assetData->tiles.end(); ++it) + { + + vector< unsigned char > packed_data = (*it).GetPackedData(assetData->args->pack_mode, assetData->image.tile_w, assetData->image.tile_h, assetData->args->bpp); + for(vector< unsigned char >::iterator it2 = packed_data.begin(); it2 != packed_data.end(); ++it2) + { + + const char chars[] = { (const char)(*it2) }; + tilesBinaryFile.write(chars, 1); + } + + } + // Finalize the files + tilesBinaryFile.close(); +} + + +static void export_map_binary_map_data(PNG2AssetData* assetData) { + + std::ofstream mapBinaryFile, mapAttributesBinaryfile; + mapBinaryFile.open(assetData->args->output_filename_bin, std::ios_base::binary); + + // Open our file for writing attributes if specified + if (assetData->args->use_map_attributes && assetData->map_attributes.size()) { + mapAttributesBinaryfile.open(assetData->args->output_filename_attributes_bin, std::ios_base::binary); + } + + int columns = assetData->image.w >> 3; + int rows = assetData->image.h >> 3; + + // If we want the values to be column-by-column + if(assetData->args->output_transposed) { + + int map_entry_size = assetData->args->map_entry_size_bytes; + // Swap the column/row for loops + for(int column = 0; column < columns; column++) { + for(int row = 0; row < rows; ++row) { + + int tile = (column + row * columns) * map_entry_size; + + // Write map items column-by-column + mapBinaryFile.write( (const char *) &(assetData->map[tile]), map_entry_size); + + if (assetData->args->use_map_attributes && assetData->map_attributes.size()) { + mapAttributesBinaryfile.write( (const char*) &(assetData->map_attributes[tile]), map_entry_size); + } + } + } + } + else { + // Write the arrays as-is, row-by-row + mapBinaryFile.write((const char*)(&assetData->map[0]), assetData->map.size()); + + if (assetData->args->use_map_attributes && assetData->map_attributes.size()) { + mapAttributesBinaryfile.write((const char*)(&assetData->map_attributes[0]), assetData->map_attributes.size()); + } + } + // Finalize the files + mapBinaryFile.close(); + if (assetData->args->use_map_attributes && assetData->map_attributes.size()) { + mapAttributesBinaryfile.close(); + } +} diff --git a/gbdk-support/png2asset/export_binary.h b/gbdk-support/png2asset/export_binary.h @@ -0,0 +1,8 @@ +#pragma once + +#include "process_arguments.h" +#include "png2asset.h" + +using namespace std; + +bool export_map_binary( PNG2AssetData* assetData); diff --git a/gbdk-support/png2asset/export_c_file.cpp b/gbdk-support/png2asset/export_c_file.cpp @@ -0,0 +1,402 @@ +// This prevents windows build errors regarding the 'fopen' function +// Example: 'fopen': This function or variable may be unsafe.Consider using fopen_s instead.To disable deprecation, use _CRT_SECURE_NO_WARNINGS.See online help for details. +// More info: https://stackoverflow.com/questions/14386/fopen-deprecated-warning +// From bbbbbr: `Looks like some of the benefits are concurrency protection, but that probably isn't an issue for png2asset` +#ifdef _WIN32 +#define _CRT_SECURE_NO_DEPRECATE +#endif + +#include <vector> +#include <string> +#include <algorithm> +#include <cstring> +#include <set> +#include <stdio.h> +#include <fstream> +#include <cstdint> + +#include "lodepng.h" +#include "mttile.h" + +#include "cmp_int_color.h" +#include "metasprites.h" + +#include "png2asset.h" +#include "png_image.h" +#include "export.h" +#include "image_utils.h" +#include "process_arguments.h" +#include "rgb_to_nes_lut.h" + +using namespace std; + +enum { + ZGB_TILES_MODE_NORMAL, + ZGB_TILES_MODE_TILESONLY +}; + +static exportOptions_t exportOpt; + +static void export_c_palette_data(PNG2AssetData* assetData, FILE* file); +static void export_c_tile_data(PNG2AssetData* assetData, FILE* file); +static void export_c_metasprite_mode(PNG2AssetData* assetData, FILE* file); +static void export_c_map_mode(PNG2AssetData* assetData, FILE* file); + +static void export_c_zgb_metasprite_struct(PNG2AssetData* assetData, FILE* file); +static void export_c_zgb_palette_data(PNG2AssetData* assetData, FILE* file); +static void export_c_zgb_tiles_struct(PNG2AssetData* assetData, FILE* file, int output_mode); +static void export_c_zgb_map_struct(PNG2AssetData* assetData, FILE* file); + + +bool export_c_file( PNG2AssetData* assetData) { + + FILE* file; + calc_palette_and_tileset_export_size(assetData, &exportOpt); + + file = fopen(assetData->args->output_filename.c_str(), "w"); + if(!file) { + printf("Error writing file: %s", assetData->args->output_filename.c_str()); + return false; + } + + if(assetData->args->bank >= 0) fprintf(file, "#pragma bank %d\n\n", assetData->args->bank); + + fprintf(file, "//AUTOGENERATED FILE FROM png2asset\n\n"); + + fprintf(file, "#include <stdint.h>\n"); + fprintf(file, "#include <gbdk/platform.h>\n"); + fprintf(file, "#include <gbdk/metasprites.h>\n"); + fprintf(file, "\n"); + + fprintf(file, "BANKREF(%s)\n\n", assetData->args->data_name.c_str()); + + if (exportOpt.has_palette_data_to_export) + export_c_palette_data(assetData, file); + + if (assetData->args->includeTileData) + export_c_tile_data(assetData, file); + + if (assetData->args->includedMapOrMetaspriteData) { + + if (assetData->args->export_as_map) { + export_c_map_mode(assetData, file); + } + else { + export_c_metasprite_mode(assetData, file); + } + } + else { + // "-use_structs -tiles_only" case + if ((assetData->args->includeTileData) && (assetData->args->use_structs)) { + export_c_zgb_palette_data(assetData, file); + export_c_zgb_tiles_struct(assetData, file, ZGB_TILES_MODE_TILESONLY); + } + } + + fclose(file); + return true; // success +} + + +static void export_c_palette_data(PNG2AssetData* assetData, FILE* file) { + + if (!(assetData->args->use_structs) || (assetData->args->includeTileData)) { + fprintf(file, "const palette_color_t %s_palettes[%d] = {\n", assetData->args->data_name.c_str(), (unsigned int)exportOpt.color_count); + for(size_t i = exportOpt.color_start / assetData->image.colors_per_pal; i < assetData->image.total_color_count / assetData->image.colors_per_pal; ++i) + { + if(i != 0) + fprintf(file, ",\n"); + fprintf(file, "\t"); + + unsigned char* pal_ptr = &assetData->image.palette[i * (assetData->image.colors_per_pal * RGBA32_SZ)]; + for(int c = 0; c < (int)assetData->image.colors_per_pal; ++c, pal_ptr += RGBA32_SZ) + { + size_t rgb222 = (((pal_ptr[2] >> 6) & 0x3) << 4) | + (((pal_ptr[1] >> 6) & 0x3) << 2) | + (((pal_ptr[0] >> 6) & 0x3) << 0); + if(assetData->args->convert_rgb_to_nes) { + fprintf(file, "0x%0X", rgb_to_nes[rgb222]); + } + else + fprintf(file, "RGB8(%3d,%3d,%3d)", pal_ptr[0], pal_ptr[1], pal_ptr[2]); + if(c != (int)assetData->image.colors_per_pal - 1) + fprintf(file, ", "); + // Line break every 4 color entries, to keep line width down + if(((c + 1) % 4) == 0) + fprintf(file, "\n\t"); + } + } + fprintf(file, "\n};\n"); + } +} + + +static void export_c_tile_data(PNG2AssetData* assetData, FILE* file) { + + fprintf(file, "\n"); + fprintf(file, "const uint8_t %s_tiles[%d] = {\n", assetData->args->data_name.c_str(), (unsigned int)(exportOpt.tiles_count * assetData->image.tile_w * assetData->image.tile_h * assetData->args->bpp / 8)); + fprintf(file, "\t"); + for(vector< Tile >::iterator it = assetData->tiles.begin() + exportOpt.tiles_start; it != assetData->tiles.end(); ++it) + { + + int line_break = 1; // Start with 1 to prevent line break on first iteration + vector< unsigned char > packed_data = (*it).GetPackedData(assetData->args->pack_mode, assetData->image.tile_w, assetData->image.tile_h, assetData->args->bpp); + for(vector< unsigned char >::iterator it2 = packed_data.begin(); it2 != packed_data.end(); ++it2) + { + fprintf(file, "0x%02x", (*it2)); + if((it + 1) != assetData->tiles.end() || (it2 + 1) != packed_data.end()) + fprintf(file, ","); + // Add a line break after each 8x8 tile + if(((line_break++) % (8 / assetData->args->bpp)) == 0) + fprintf(file, "\n\t"); + } + + if((!assetData->args->export_as_map) && (it != assetData->tiles.end())) + fprintf(file, "\n"); + } + fprintf(file, "};\n\n"); + +} + + +static void export_c_metasprite_mode(PNG2AssetData* assetData, FILE* file) { + + for(vector< MetaSprite >::iterator it = assetData->sprites.begin(); it != assetData->sprites.end(); ++it) + { + fprintf(file, "const metasprite_t %s_metasprite%d[] = {\n", assetData->args->data_name.c_str(), (int)(it - assetData->sprites.begin())); + for(MetaSprite::iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) + { + int pal_idx = (*it2).props & 0xF; + int dmg_pal = ((*it2).props >> 4) & 1; + int flip_x = ((*it2).props >> 5) & 1; + int flip_y = ((*it2).props >> 6) & 1; + int priority = ((*it2).props >> 7) & 1; + fprintf(file, + "\tMETASPR_ITEM(%d, %d, %d, S_PAL(%d)%s%s%s%s),\n", + (*it2).offset_y, + (*it2).offset_x, + (*it2).offset_idx, + pal_idx, + (dmg_pal) ? " | S_PALETTE" : "", + (flip_x) ? " | S_FLIPX" : "", + (flip_y) ? " | S_FLIPY" : "", + (priority) ? " | S_PRIORITY" : ""); + } + fprintf(file, "\tMETASPR_TERM\n"); + fprintf(file, "};\n\n"); + } + + fprintf(file, "const metasprite_t* const %s_metasprites[%d] = {\n\t", assetData->args->data_name.c_str(), (unsigned int)(assetData->sprites.size())); + for(vector< MetaSprite >::iterator it = assetData->sprites.begin(); it != assetData->sprites.end(); ++it) + { + fprintf(file, "%s_metasprite%d", assetData->args->data_name.c_str(), (int)(it - assetData->sprites.begin())); + if(it + 1 != assetData->sprites.end()) + fprintf(file, ", "); + } + fprintf(file, "\n};\n"); + + if(assetData->args->use_structs) + export_c_zgb_metasprite_struct(assetData, file); + +} + +static void export_c_zgb_metasprite_struct(PNG2AssetData* assetData, FILE* file) { + // Export ZGB Metasprite Struct + fprintf(file, "\n"); + fprintf(file, "#include \"MetaSpriteInfo.h\"\n"); + fprintf(file, "const struct MetaSpriteInfo %s = {\n", assetData->args->data_name.c_str()); + fprintf(file, "\t%d," " // width\n", (unsigned int)assetData->args->pivot.width); + fprintf(file, "\t%d," " // height\n", (unsigned int)assetData->args->pivot.height); + fprintf(file, "\t%d," " // num tiles\n", (unsigned int)assetData->tiles.size() * (assetData->image.tile_h >> 3)); + fprintf(file, "\t%s_tiles," " // tiles\n", assetData->args->data_name.c_str()); + fprintf(file, "\t%d," " // num palettes\n", (unsigned int)(assetData->image.total_color_count / assetData->image.colors_per_pal)); + fprintf(file, "\t%s_palettes," " // CGB palette\n", assetData->args->data_name.c_str()); + fprintf(file, "\t%d," " // num sprites\n", (unsigned int)assetData->sprites.size()); + fprintf(file, "\t%s_metasprites," " // metasprites\n", assetData->args->data_name.c_str()); + fprintf(file, "};\n"); +} + + +static void export_c_map_mode(PNG2AssetData* assetData, FILE* file) { + + if(assetData->args->includeTileData) { + + // ZGB export mode + if(assetData->args->use_structs) + { + export_c_zgb_palette_data(assetData, file); + export_c_zgb_tiles_struct(assetData, file, ZGB_TILES_MODE_NORMAL); + } + } else { + // For ZGB Structs with source_tileset enabled, the tile data points to the EXTERNAL source tileset + // so add the required externs used to reference them in the struct + if((assetData->args->use_structs) && (assetData->args->source_tilesets.size())) { + fprintf(file, "\n"); + fprintf(file, "#include \"TilesInfo.h\"\n"); + fprintf(file, "extern const void __bank_%s;\n", extract_name(assetData->args->source_tilesets[0]).c_str()); + fprintf(file, "extern const struct TilesInfo %s;\n", extract_name(assetData->args->source_tilesets[0]).c_str()); + } + } + + //Export map + fprintf(file, "\n"); + fprintf(file, "const unsigned char %s_map[%d] = {\n", assetData->args->data_name.c_str(), (unsigned int)(assetData->map.size())); + // TODO: These hardwired "/ 8" should be using " / assetData->image.tile_w" and "_h" + // TODO: Should also be converted to using args.map_entry_size_bytes + size_t line_size = assetData->map.size() / (assetData->image.h / 8); + if(assetData->args->output_transposed) { + + for(size_t i = 0; i < line_size; ++i) + { + fprintf(file, "\t"); + for(size_t j = 0; j < assetData->image.h / 8; ++j) + { + fprintf(file, "0x%02x,", assetData->map[j * line_size + i]); + } + fprintf(file, "\n"); + } + } + else { + + for(size_t j = 0; j < assetData->image.h / 8; ++j) + { + fprintf(file, "\t"); + for(size_t i = 0; i < line_size; ++i) + { + fprintf(file, "0x%02x,", assetData->map[j * line_size + i]); + } + fprintf(file, "\n"); + } + } + fprintf(file, "};\n"); + + + //Export map attributes (if any) + if(assetData->args->use_map_attributes && assetData->map_attributes.size()) + { + fprintf(file, "\n"); + fprintf(file, "const unsigned char %s_map_attributes[%d] = {\n", assetData->args->data_name.c_str(), (unsigned int)(assetData->map_attributes.size())); + if(assetData->args->output_transposed) { + for(size_t i = 0; i < assetData->args->map_attributes_packed_size.width; ++i) + { + fprintf(file, "\t"); + for(size_t j = 0; j < assetData->args->map_attributes_packed_size.height; ++j) + { + fprintf(file, "0x%02x,", assetData->map_attributes[j * assetData->args->map_attributes_packed_size.width + i]); + } + fprintf(file, "\n"); + } + } + else { + for(size_t j = 0; j < assetData->args->map_attributes_packed_size.height; ++j) + { + fprintf(file, "\t"); + for(size_t i = 0; i < assetData->args->map_attributes_packed_size.width; ++i) + { + fprintf(file, "0x%02x,", assetData->map_attributes[j * assetData->args->map_attributes_packed_size.width + i]); + } + fprintf(file, "\n"); + } + } + + fprintf(file, "};\n"); + } + + if(assetData->args->use_structs) + export_c_zgb_map_struct(assetData, file); +} + + +static void export_c_zgb_palette_data(PNG2AssetData* assetData, FILE* file) { + //Export tiles pals (if any) + if(!assetData->args->use_map_attributes) + { + fprintf(file, "\n"); + 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); + } + fprintf(file, "\n};\n"); + } +} + + +static void export_c_zgb_tiles_struct(PNG2AssetData* assetData, FILE* file, int output_mode) { + // Export Tiles Info + fprintf(file, "\n"); + fprintf(file, "#include \"TilesInfo.h\"\n"); + + // ZGB Tiles-only mode doesn't append "_tiles_info" to the struct name and lacks a BANKREF output. + if (output_mode == ZGB_TILES_MODE_TILESONLY) { + fprintf(file, "const struct TilesInfo %s = {\n", assetData->args->data_name.c_str()); + } + else { // implied (output_mode == ZGB_TILES_MODE_NORMAL) + fprintf(file, "BANKREF(%s_tiles_info)\n", assetData->args->data_name.c_str()); + fprintf(file, "const struct TilesInfo %s_tiles_info = {\n", assetData->args->data_name.c_str()); + } + + fprintf(file, "\t.num_frames=%d," " // num tiles\n", (unsigned int)assetData->tiles.size() * (assetData->image.tile_h >> 3)); + fprintf(file, "\t.data=%s_tiles," " // tiles\n", assetData->args->data_name.c_str()); + fprintf(file, "\t.num_pals=%d," " // num palettes\n", (unsigned int)(assetData->image.total_color_count / assetData->image.colors_per_pal)); + fprintf(file, "\t.pals=%s_palettes," " // palettes\n", assetData->args->data_name.c_str()); + + if(!assetData->args->use_map_attributes) + fprintf(file, "\t.color_data=%s_tile_pals, // tile palettes\n", assetData->args->data_name.c_str()); + else + fprintf(file, "\t.color_data=0 " " // tile palettes\n"); + fprintf(file, "};\n"); +} + + +// "-use_structs" map output behavior +// +// "-source_tileset" NOT enabled: +// - tile data -> TileInfo struct, point .tiles to it +// - .tiles points to TileInfo struct, .extra_tiles is NULL +// +// "-source_tileset" IS enabled +// - .tiles -> the external source tileset +// - .extra_tiles -> map TileInfo +// - contains unique tiles not found in source tileset (not in entity tiles) +// - if none of those tiles were found then +// - map TileInfo will not be emitted +// - .extra_tiles == NULL then +// +static void export_c_zgb_map_struct(PNG2AssetData* assetData, FILE* file) { + //Export Map Info + fprintf(file, "\n"); + fprintf(file, "#include \"MapInfo.h\"\n"); + if(assetData->args->includeTileData) { + fprintf(file, "BANKREF_EXTERN(%s_tiles_info)\n", assetData->args->data_name.c_str()); + } + + fprintf(file, "const struct MapInfo %s = {\n", assetData->args->data_name.c_str()); + fprintf(file, "\t.data=%s_map," " // map\n", assetData->args->data_name.c_str()); + fprintf(file, "\t.width=%d," " // width\n", assetData->image.w >> 3); + fprintf(file, "\t.height=%d," " // height\n", assetData->image.h >> 3); + + if(assetData->args->use_map_attributes && assetData->map_attributes.size()) + fprintf(file, "\t.attributes=%s_map_attributes," " // map attributes\n", assetData->args->data_name.c_str()); + else + fprintf(file, "\t.attributes=0," " // map attributes\n"); + + if(assetData->args->includeTileData) { + fprintf(file, "\t.tiles_bank=BANK(%s_tiles_info), // tiles bank\n", assetData->args->data_name.c_str()); + fprintf(file, "\t.tiles=&%s_tiles_info," " // tiles info\n", assetData->args->data_name.c_str()); + } else { + // For ZGB Structs with source_tileset enabled, the tile data points to the EXTERNAL source tileset + if (assetData->args->source_tilesets.size()) { + fprintf(file, "\t.tiles_bank=BANK(%s)," " // source tiles bank\n", extract_name(assetData->args->source_tilesets[0]).c_str()); + fprintf(file, "\t.tiles=&%s," " // source tiles info\n", extract_name(assetData->args->source_tilesets[0]).c_str()); + + if (exportOpt.color_count > 0) + fprintf(file, "\t.extra_tiles=&%s_tiles_info," " // map tiles info (for map tiles not found in the source tileset) \n", assetData->args->data_name.c_str()); + else + fprintf(file, "\t.extra_tiles=0," " // map tiles info (no map tiles were found that were not in the source tileset)\n"); + } + } + fprintf(file, "};\n"); +} diff --git a/gbdk-support/png2asset/export_c_file.h b/gbdk-support/png2asset/export_c_file.h @@ -0,0 +1,8 @@ +#pragma once + +#include "process_arguments.h" +#include "png2asset.h" + +using namespace std; + +bool export_c_file( PNG2AssetData* assetData); diff --git a/gbdk-support/png2asset/export_h_file.cpp b/gbdk-support/png2asset/export_h_file.cpp @@ -0,0 +1,176 @@ +// This prevents windows build errors regarding the 'fopen' function +// Example: 'fopen': This function or variable may be unsafe.Consider using fopen_s instead.To disable deprecation, use _CRT_SECURE_NO_WARNINGS.See online help for details. +// More info: https://stackoverflow.com/questions/14386/fopen-deprecated-warning +// From bbbbbr: `Looks like some of the benefits are concurrency protection, but that probably isn't an issue for png2asset` +#ifdef _WIN32 +#define _CRT_SECURE_NO_DEPRECATE +#endif + +#include <vector> +#include <string> +#include <algorithm> +#include <cstring> +#include <set> +#include <stdio.h> +#include <fstream> +#include <cstdint> + +#include "lodepng.h" +#include "mttile.h" + +#include "cmp_int_color.h" +#include "metasprites.h" + +#include "png2asset.h" +#include "png_image.h" +#include "export.h" +#include "image_utils.h" +#include "process_arguments.h" +#include "rgb_to_nes_lut.h" + +using namespace std; + +static exportOptions_t exportOpt; + +static void export_h_use_structs(PNG2AssetData* assetData, FILE* file); +static void export_h_map_and_metasprite_shared_defines(PNG2AssetData* assetData, FILE* file); +static void export_h_map_and_metasprite_shared_externs(PNG2AssetData* assetData, FILE* file); +static void export_h_map_mode(PNG2AssetData* assetData, FILE* file); +static void export_h_metasprite_mode(PNG2AssetData* assetData, FILE* file); + + +bool export_h_file( PNG2AssetData* assetData) { + + FILE* file; + calc_palette_and_tileset_export_size(assetData, &exportOpt); + + file = fopen(assetData->args->output_filename_h.c_str(), "w"); + if (!file) { + printf("Error writing file: %s", assetData->args->output_filename_h.c_str()); + return false; + } + + fprintf(file, "//AUTOGENERATED FILE FROM png2asset\n"); + fprintf(file, "#ifndef METASPRITE_%s_H\n", assetData->args->data_name.c_str()); + fprintf(file, "#define METASPRITE_%s_H\n", assetData->args->data_name.c_str()); + fprintf(file, "\n"); + fprintf(file, "#include <stdint.h>\n"); + fprintf(file, "#include <gbdk/platform.h>\n"); + fprintf(file, "#include <gbdk/metasprites.h>\n"); + fprintf(file, "\n"); + + if (assetData->args->use_structs) { + export_h_use_structs(assetData, file); + } + else { + export_h_map_and_metasprite_shared_defines(assetData, file); + + if (assetData->args->includedMapOrMetaspriteData) { + if (assetData->args->export_as_map) + export_h_map_mode(assetData, file); + else + export_h_metasprite_mode(assetData, file); + } + + export_h_map_and_metasprite_shared_externs(assetData, file); + } + fprintf(file, "\n"); + fprintf(file, "#endif\n"); + + + fclose(file); + // END: Output .h FILE + + return true; // success +} + + +static void export_h_use_structs(PNG2AssetData* assetData, FILE* file) { + + if (assetData->args->export_as_map) { + fprintf(file, "#include \"TilesInfo.h\"\n"); + fprintf(file, "#include \"MapInfo.h\"\n"); + fprintf(file, "\n"); + fprintf(file, "extern const struct TilesInfo %s_tiles_info;\n", assetData->args->data_name.c_str()); + fprintf(file, "extern const struct MapInfo %s;\n", assetData->args->data_name.c_str()); + } + else { + fprintf(file, "#include \"MetaSpriteInfo.h\"\n"); + fprintf(file, "\n"); + fprintf(file, "extern const struct MetaSpriteInfo %s;\n", assetData->args->data_name.c_str()); + } + +} + + +static void export_h_map_and_metasprite_shared_defines(PNG2AssetData* assetData, FILE* file) { + + // Non use-structs output mode + fprintf(file, "#define %s_TILE_ORIGIN %d\n", assetData->args->data_name.c_str(), assetData->args->tile_origin); + fprintf(file, "#define %s_TILE_W %d\n", assetData->args->data_name.c_str(), assetData->image.tile_w); + fprintf(file, "#define %s_TILE_H %d\n", assetData->args->data_name.c_str(), assetData->image.tile_h); + fprintf(file, "#define %s_WIDTH %d\n", assetData->args->data_name.c_str(), (unsigned int)assetData->args->spriteSize.width); + fprintf(file, "#define %s_HEIGHT %d\n", assetData->args->data_name.c_str(), (unsigned int)assetData->args->spriteSize.height); + // The TILE_COUNT calc here is referring to number of 8x8 tiles, + fprintf(file, "#define %s_TILE_COUNT %d\n", assetData->args->data_name.c_str(), ((unsigned int)exportOpt.tiles_count) * (assetData->image.tile_h >> 3) * (assetData->image.tile_w >> 3)); + if (assetData->args->include_palettes) { + fprintf(file, "#define %s_PALETTE_COUNT %d\n", assetData->args->data_name.c_str(), (unsigned int)(assetData->image.total_color_count / assetData->image.colors_per_pal)); + fprintf(file, "#define %s_COLORS_PER_PALETTE %d\n", assetData->args->data_name.c_str(), (unsigned int)assetData->image.colors_per_pal); + fprintf(file, "#define %s_TOTAL_COLORS %d\n", assetData->args->data_name.c_str(), (unsigned int)assetData->image.total_color_count); + } +} + +static void export_h_map_and_metasprite_shared_externs(PNG2AssetData* assetData, FILE* file) { + + fprintf(file, "\n"); + fprintf(file, "BANKREF_EXTERN(%s)\n", assetData->args->data_name.c_str()); + fprintf(file, "\n"); + + if (exportOpt.has_palette_data_to_export) { + fprintf(file, "extern const palette_color_t %s_palettes[%d];\n", assetData->args->data_name.c_str(), (unsigned int)exportOpt.color_count); + } + if (assetData->args->includeTileData) { + fprintf(file, "extern const uint8_t %s_tiles[%d];\n", assetData->args->data_name.c_str(), (unsigned int)(exportOpt.tiles_count * (assetData->image.tile_w * assetData->image.tile_h * assetData->args->bpp / 8))); + } +} + + +static void export_h_map_mode(PNG2AssetData* assetData, FILE* file) { + + fprintf(file, "#define %s_MAP_ATTRIBUTES ", assetData->args->data_name.c_str()); + if (assetData->args->use_map_attributes && assetData->map_attributes.size()) + fprintf(file, "%s_map_attributes\n", assetData->args->data_name.c_str()); + else + fprintf(file, "0\n"); + + if (assetData->args->use_map_attributes) { + int scale = assetData->args->use_2x2_map_attributes ? 2 : 1; + fprintf(file, "#define %s_MAP_ATTRIBUTES_WIDTH %d\n", assetData->args->data_name.c_str(), (int)(scale * assetData->args->map_attributes_size.width)); + fprintf(file, "#define %s_MAP_ATTRIBUTES_HEIGHT %d\n", assetData->args->data_name.c_str(), (int)(scale * assetData->args->map_attributes_size.height)); + fprintf(file, "#define %s_MAP_ATTRIBUTES_PACKED_WIDTH %d\n", assetData->args->data_name.c_str(), (int)assetData->args->map_attributes_packed_size.width); + fprintf(file, "#define %s_MAP_ATTRIBUTES_PACKED_HEIGHT %d\n", assetData->args->data_name.c_str(), (int)assetData->args->map_attributes_packed_size.height); + } + + fprintf(file, "extern const unsigned char %s_map[%d];\n", assetData->args->data_name.c_str(), (unsigned int)(assetData->map).size()); + + if (assetData->args->use_map_attributes && assetData->map_attributes.size()) { + fprintf(file, "extern const unsigned char %s_map_attributes[%d];\n", assetData->args->data_name.c_str(), (unsigned int)(assetData->map_attributes).size()); + } + else { + // Some platforms (like SMS/GG) encode attributes as part of map + // For compatibility, add a define that makes _map_attributes equal _map, + // so that set_bkg_attributes can work the same on these platforms + fprintf(file, "#define %s_map_attributes %s_map\n", assetData->args->data_name.c_str(), assetData->args->data_name.c_str()); + } +} + + +static void export_h_metasprite_mode(PNG2AssetData* assetData, FILE* file) { + + fprintf(file, "#define %s_PIVOT_X %d\n", assetData->args->data_name.c_str(), assetData->args->pivot.x); + fprintf(file, "#define %s_PIVOT_Y %d\n", assetData->args->data_name.c_str(), assetData->args->pivot.y); + fprintf(file, "#define %s_PIVOT_W %d\n", assetData->args->data_name.c_str(), (unsigned int)assetData->args->pivot.width); + fprintf(file, "#define %s_PIVOT_H %d\n", assetData->args->data_name.c_str(), (unsigned int)assetData->args->pivot.height); + + fprintf(file, "extern const metasprite_t* const %s_metasprites[%d];\n", assetData->args->data_name.c_str(), (unsigned int)(assetData->sprites.size())); +} diff --git a/gbdk-support/png2asset/export_h_file.h b/gbdk-support/png2asset/export_h_file.h @@ -0,0 +1,8 @@ +#pragma once + +#include "process_arguments.h" +#include "png2asset.h" + +using namespace std; + +bool export_h_file( PNG2AssetData* assetData); diff --git a/gbdk-support/png2asset/png2asset.cpp b/gbdk-support/png2asset/png2asset.cpp @@ -11,6 +11,9 @@ #include "lodepng.h" #include "mttile.h" #include "export.h" +#include "export_h_file.h" +#include "export_c_file.h" +#include "export_binary.h" #include "map_attributes.h" #include "palettes.h" diff --git a/gbdk-support/png2asset/process_arguments.cpp b/gbdk-support/png2asset/process_arguments.cpp @@ -290,6 +290,9 @@ int processPNG2AssetArguments(int argc, char* argv[], PNG2AssetArguments* args) } else if(!strcmp(argv[i], "-source_tileset")) { + // Warning / TODO:FIXME + // includeTileData gets overridden back to TRUE if any tiles not present in the source tileset are found. + // This makes understanding it's full export behavior much harder. Would be better to remove it and try to simplify logic. args->includeTileData = false; args->source_tilesets.push_back(argv[++i]); } diff --git a/gbdk-support/png2asset/testing/Makefile b/gbdk-support/png2asset/testing/Makefile @@ -26,6 +26,9 @@ compare-output: clean: rm -rf $(OUTDIR) +reset-ref: + git checkout $(REF)/* + generate-assets: rm -rf $(OUTDIR) mkdir -p $(OUTDIR) @@ -46,6 +49,12 @@ generate-assets: $(PNG2ASSET) $(RES)/largemap.png -c $(OUTDIR)/zgb_largemap_2.c -b 255 -map -use_structs -noflip -pack_mode sms -bpp 4 -keep_palette_order + # gb/duck = -noflip + # gg/sms = -noflip -pack_mode sms -bpp 4 -keep_palette_order + $(PNG2ASSET) $(RES)/SMS/sushi_level07.png -c $(OUTDIR)/zgb_sushi_level07.c -b 255 -map -noflip -pack_mode sms -bpp 4 -keep_palette_order -use_structs -keep_palette_order -rel_paths -keep_duplicate_tiles -source_tileset sushi_tiles.png -entity_tileset sushi_objects.png + $(PNG2ASSET) $(RES)/SMS/sushi_tiles.png -c $(OUTDIR)/zgb_sushi_tiles.c -b 255 -map -noflip -pack_mode sms -bpp 4 -keep_palette_order -use_structs -keep_palette_order -keep_duplicate_tiles -tiles_only + + # Entity and Source tileset interaction $(PNG2ASSET) $(RES)/nums8x8_map_0_to_39.png -o $(OUTDIR)/nums_map_1.c -map $(PNG2ASSET) $(RES)/nums8x8_map_0_to_39.png -o $(OUTDIR)/nums_map_2.c -map -source_tileset $(RES)/nums8x8_9_to_0.png diff --git a/gbdk-support/png2asset/testing/ref/apaimage_1.h b/gbdk-support/png2asset/testing/ref/apaimage_1.h @@ -21,5 +21,4 @@ BANKREF_EXTERN(apaimage_1) extern const palette_color_t apaimage_1_palettes[4]; extern const uint8_t apaimage_1_tiles[5760]; - #endif diff --git a/gbdk-support/png2asset/testing/ref/binout.h b/gbdk-support/png2asset/testing/ref/binout.h @@ -16,10 +16,9 @@ #define binout_PIVOT_Y 48 #define binout_PIVOT_W 56 #define binout_PIVOT_H 96 +extern const metasprite_t* const binout_metasprites[1]; BANKREF_EXTERN(binout) -extern const metasprite_t* const binout_metasprites[1]; - #endif diff --git a/gbdk-support/png2asset/testing/ref/gbdklogo_1.h b/gbdk-support/png2asset/testing/ref/gbdklogo_1.h @@ -16,13 +16,12 @@ #define gbdklogo_1_COLORS_PER_PALETTE 4 #define gbdklogo_1_TOTAL_COLORS 4 #define gbdklogo_1_MAP_ATTRIBUTES 0 +extern const unsigned char gbdklogo_1_map[360]; +#define gbdklogo_1_map_attributes gbdklogo_1_map BANKREF_EXTERN(gbdklogo_1) extern const palette_color_t gbdklogo_1_palettes[4]; extern const uint8_t gbdklogo_1_tiles[624]; -extern const unsigned char gbdklogo_1_map[360]; -#define gbdklogo_1_map_attributes gbdklogo_1_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/gbdklogo_2.h b/gbdk-support/png2asset/testing/ref/gbdklogo_2.h @@ -20,13 +20,12 @@ #define gbdklogo_2_MAP_ATTRIBUTES_HEIGHT 18 #define gbdklogo_2_MAP_ATTRIBUTES_PACKED_WIDTH 20 #define gbdklogo_2_MAP_ATTRIBUTES_PACKED_HEIGHT 18 +extern const unsigned char gbdklogo_2_map[360]; +extern const unsigned char gbdklogo_2_map_attributes[360]; BANKREF_EXTERN(gbdklogo_2) extern const palette_color_t gbdklogo_2_palettes[16]; extern const uint8_t gbdklogo_2_tiles[656]; -extern const unsigned char gbdklogo_2_map[360]; -extern const unsigned char gbdklogo_2_map_attributes[360]; - #endif diff --git a/gbdk-support/png2asset/testing/ref/gbdklogo_3.h b/gbdk-support/png2asset/testing/ref/gbdklogo_3.h @@ -20,13 +20,12 @@ #define gbdklogo_3_MAP_ATTRIBUTES_HEIGHT 32 #define gbdklogo_3_MAP_ATTRIBUTES_PACKED_WIDTH 5 #define gbdklogo_3_MAP_ATTRIBUTES_PACKED_HEIGHT 8 +extern const unsigned char gbdklogo_3_map[360]; +extern const unsigned char gbdklogo_3_map_attributes[40]; BANKREF_EXTERN(gbdklogo_3) extern const palette_color_t gbdklogo_3_palettes[12]; extern const uint8_t gbdklogo_3_tiles[640]; -extern const unsigned char gbdklogo_3_map[360]; -extern const unsigned char gbdklogo_3_map_attributes[40]; - #endif diff --git a/gbdk-support/png2asset/testing/ref/gbdklogo_4.h b/gbdk-support/png2asset/testing/ref/gbdklogo_4.h @@ -20,13 +20,12 @@ #define gbdklogo_4_MAP_ATTRIBUTES_HEIGHT 18 #define gbdklogo_4_MAP_ATTRIBUTES_PACKED_WIDTH 20 #define gbdklogo_4_MAP_ATTRIBUTES_PACKED_HEIGHT 18 +extern const unsigned char gbdklogo_4_map[720]; +#define gbdklogo_4_map_attributes gbdklogo_4_map BANKREF_EXTERN(gbdklogo_4) extern const palette_color_t gbdklogo_4_palettes[16]; extern const uint8_t gbdklogo_4_tiles[1312]; -extern const unsigned char gbdklogo_4_map[720]; -#define gbdklogo_4_map_attributes gbdklogo_4_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/hblankcopy_1.h b/gbdk-support/png2asset/testing/ref/hblankcopy_1.h @@ -21,5 +21,4 @@ BANKREF_EXTERN(hblankcopy_1) extern const palette_color_t hblankcopy_1_palettes[4]; extern const uint8_t hblankcopy_1_tiles[2016]; - #endif diff --git a/gbdk-support/png2asset/testing/ref/largemap_1.h b/gbdk-support/png2asset/testing/ref/largemap_1.h @@ -16,13 +16,12 @@ #define largemap_1_COLORS_PER_PALETTE 4 #define largemap_1_TOTAL_COLORS 16 #define largemap_1_MAP_ATTRIBUTES 0 +extern const unsigned char largemap_1_map[10296]; +#define largemap_1_map_attributes largemap_1_map BANKREF_EXTERN(largemap_1) extern const palette_color_t largemap_1_palettes[16]; extern const uint8_t largemap_1_tiles[3744]; -extern const unsigned char largemap_1_map[10296]; -#define largemap_1_map_attributes largemap_1_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/largemap_2.h b/gbdk-support/png2asset/testing/ref/largemap_2.h @@ -20,13 +20,12 @@ #define largemap_2_MAP_ATTRIBUTES_HEIGHT 66 #define largemap_2_MAP_ATTRIBUTES_PACKED_WIDTH 156 #define largemap_2_MAP_ATTRIBUTES_PACKED_HEIGHT 66 +extern const unsigned char largemap_2_map[10296]; +extern const unsigned char largemap_2_map_attributes[10296]; BANKREF_EXTERN(largemap_2) extern const palette_color_t largemap_2_palettes[16]; extern const uint8_t largemap_2_tiles[3360]; -extern const unsigned char largemap_2_map[10296]; -extern const unsigned char largemap_2_map_attributes[10296]; - #endif diff --git a/gbdk-support/png2asset/testing/ref/largemap_3.h b/gbdk-support/png2asset/testing/ref/largemap_3.h @@ -16,13 +16,12 @@ #define largemap_3_COLORS_PER_PALETTE 4 #define largemap_3_TOTAL_COLORS 16 #define largemap_3_MAP_ATTRIBUTES 0 +extern const unsigned char largemap_3_map[10296]; +#define largemap_3_map_attributes largemap_3_map BANKREF_EXTERN(largemap_3) extern const palette_color_t largemap_3_palettes[16]; extern const uint8_t largemap_3_tiles[3744]; -extern const unsigned char largemap_3_map[10296]; -#define largemap_3_map_attributes largemap_3_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/largemap_4.h b/gbdk-support/png2asset/testing/ref/largemap_4.h @@ -16,13 +16,12 @@ #define largemap_4_COLORS_PER_PALETTE 4 #define largemap_4_TOTAL_COLORS 16 #define largemap_4_MAP_ATTRIBUTES 0 +extern const unsigned char largemap_4_map[10296]; +#define largemap_4_map_attributes largemap_4_map BANKREF_EXTERN(largemap_4) extern const palette_color_t largemap_4_palettes[16]; extern const uint8_t largemap_4_tiles[3744]; -extern const unsigned char largemap_4_map[10296]; -#define largemap_4_map_attributes largemap_4_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/largemap_5.h b/gbdk-support/png2asset/testing/ref/largemap_5.h @@ -20,13 +20,12 @@ #define largemap_5_MAP_ATTRIBUTES_HEIGHT 66 #define largemap_5_MAP_ATTRIBUTES_PACKED_WIDTH 156 #define largemap_5_MAP_ATTRIBUTES_PACKED_HEIGHT 66 +extern const unsigned char largemap_5_map[20592]; +#define largemap_5_map_attributes largemap_5_map BANKREF_EXTERN(largemap_5) extern const palette_color_t largemap_5_palettes[16]; extern const uint8_t largemap_5_tiles[6944]; -extern const unsigned char largemap_5_map[20592]; -#define largemap_5_map_attributes largemap_5_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/largemap_6.h b/gbdk-support/png2asset/testing/ref/largemap_6.h @@ -20,13 +20,12 @@ #define largemap_6_MAP_ATTRIBUTES_HEIGHT 66 #define largemap_6_MAP_ATTRIBUTES_PACKED_WIDTH 156 #define largemap_6_MAP_ATTRIBUTES_PACKED_HEIGHT 66 +extern const unsigned char largemap_6_map[20592]; +#define largemap_6_map_attributes largemap_6_map BANKREF_EXTERN(largemap_6) extern const palette_color_t largemap_6_palettes[16]; extern const uint8_t largemap_6_tiles[6944]; -extern const unsigned char largemap_6_map[20592]; -#define largemap_6_map_attributes largemap_6_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/largemap_7.h b/gbdk-support/png2asset/testing/ref/largemap_7.h @@ -20,13 +20,12 @@ #define largemap_7_MAP_ATTRIBUTES_HEIGHT 96 #define largemap_7_MAP_ATTRIBUTES_PACKED_WIDTH 39 #define largemap_7_MAP_ATTRIBUTES_PACKED_HEIGHT 24 +extern const unsigned char largemap_7_map[10296]; +extern const unsigned char largemap_7_map_attributes[936]; BANKREF_EXTERN(largemap_7) extern const palette_color_t largemap_7_palettes[16]; extern const uint8_t largemap_7_tiles[3600]; -extern const unsigned char largemap_7_map[10296]; -extern const unsigned char largemap_7_map_attributes[936]; - #endif diff --git a/gbdk-support/png2asset/testing/ref/nums_map_1.h b/gbdk-support/png2asset/testing/ref/nums_map_1.h @@ -16,13 +16,12 @@ #define nums_map_1_COLORS_PER_PALETTE 4 #define nums_map_1_TOTAL_COLORS 4 #define nums_map_1_MAP_ATTRIBUTES 0 +extern const unsigned char nums_map_1_map[50]; +#define nums_map_1_map_attributes nums_map_1_map BANKREF_EXTERN(nums_map_1) extern const palette_color_t nums_map_1_palettes[4]; extern const uint8_t nums_map_1_tiles[640]; -extern const unsigned char nums_map_1_map[50]; -#define nums_map_1_map_attributes nums_map_1_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/nums_map_2.h b/gbdk-support/png2asset/testing/ref/nums_map_2.h @@ -16,12 +16,11 @@ #define nums_map_2_COLORS_PER_PALETTE 4 #define nums_map_2_TOTAL_COLORS 4 #define nums_map_2_MAP_ATTRIBUTES 0 +extern const unsigned char nums_map_2_map[50]; +#define nums_map_2_map_attributes nums_map_2_map BANKREF_EXTERN(nums_map_2) extern const uint8_t nums_map_2_tiles[480]; -extern const unsigned char nums_map_2_map[50]; -#define nums_map_2_map_attributes nums_map_2_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/nums_map_3.h b/gbdk-support/png2asset/testing/ref/nums_map_3.h @@ -16,13 +16,12 @@ #define nums_map_3_COLORS_PER_PALETTE 4 #define nums_map_3_TOTAL_COLORS 4 #define nums_map_3_MAP_ATTRIBUTES 0 +extern const unsigned char nums_map_3_map[50]; +#define nums_map_3_map_attributes nums_map_3_map BANKREF_EXTERN(nums_map_3) extern const palette_color_t nums_map_3_palettes[4]; extern const uint8_t nums_map_3_tiles[480]; -extern const unsigned char nums_map_3_map[50]; -#define nums_map_3_map_attributes nums_map_3_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/nums_map_4.h b/gbdk-support/png2asset/testing/ref/nums_map_4.h @@ -16,12 +16,11 @@ #define nums_map_4_COLORS_PER_PALETTE 4 #define nums_map_4_TOTAL_COLORS 4 #define nums_map_4_MAP_ATTRIBUTES 0 +extern const unsigned char nums_map_4_map[50]; +#define nums_map_4_map_attributes nums_map_4_map BANKREF_EXTERN(nums_map_4) extern const uint8_t nums_map_4_tiles[320]; -extern const unsigned char nums_map_4_map[50]; -#define nums_map_4_map_attributes nums_map_4_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/nums_map_5.h b/gbdk-support/png2asset/testing/ref/nums_map_5.h @@ -16,13 +16,12 @@ #define nums_map_5_COLORS_PER_PALETTE 4 #define nums_map_5_TOTAL_COLORS 4 #define nums_map_5_MAP_ATTRIBUTES 0 +extern const unsigned char nums_map_5_map[50]; +#define nums_map_5_map_attributes nums_map_5_map BANKREF_EXTERN(nums_map_5) extern const palette_color_t nums_map_5_palettes[4]; extern const uint8_t nums_map_5_tiles[640]; -extern const unsigned char nums_map_5_map[50]; -#define nums_map_5_map_attributes nums_map_5_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/nums_map_6.h b/gbdk-support/png2asset/testing/ref/nums_map_6.h @@ -16,12 +16,11 @@ #define nums_map_6_COLORS_PER_PALETTE 4 #define nums_map_6_TOTAL_COLORS 4 #define nums_map_6_MAP_ATTRIBUTES 0 +extern const unsigned char nums_map_6_map[50]; +#define nums_map_6_map_attributes nums_map_6_map BANKREF_EXTERN(nums_map_6) extern const uint8_t nums_map_6_tiles[480]; -extern const unsigned char nums_map_6_map[50]; -#define nums_map_6_map_attributes nums_map_6_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/nums_map_7.h b/gbdk-support/png2asset/testing/ref/nums_map_7.h @@ -16,13 +16,12 @@ #define nums_map_7_COLORS_PER_PALETTE 4 #define nums_map_7_TOTAL_COLORS 4 #define nums_map_7_MAP_ATTRIBUTES 0 +extern const unsigned char nums_map_7_map[50]; +#define nums_map_7_map_attributes nums_map_7_map BANKREF_EXTERN(nums_map_7) extern const palette_color_t nums_map_7_palettes[4]; extern const uint8_t nums_map_7_tiles[640]; -extern const unsigned char nums_map_7_map[50]; -#define nums_map_7_map_attributes nums_map_7_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/nums_map_8.h b/gbdk-support/png2asset/testing/ref/nums_map_8.h @@ -16,12 +16,11 @@ #define nums_map_8_COLORS_PER_PALETTE 4 #define nums_map_8_TOTAL_COLORS 4 #define nums_map_8_MAP_ATTRIBUTES 0 +extern const unsigned char nums_map_8_map[50]; +#define nums_map_8_map_attributes nums_map_8_map BANKREF_EXTERN(nums_map_8) extern const uint8_t nums_map_8_tiles[320]; -extern const unsigned char nums_map_8_map[50]; -#define nums_map_8_map_attributes nums_map_8_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/remote.h b/gbdk-support/png2asset/testing/ref/remote.h @@ -16,13 +16,12 @@ #define remote_COLORS_PER_PALETTE 4 #define remote_TOTAL_COLORS 4 #define remote_MAP_ATTRIBUTES 0 +extern const unsigned char remote_map[360]; +#define remote_map_attributes remote_map BANKREF_EXTERN(remote) extern const palette_color_t remote_palettes[4]; extern const uint8_t remote_tiles[2256]; -extern const unsigned char remote_map[360]; -#define remote_map_attributes remote_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/remote_down.h b/gbdk-support/png2asset/testing/ref/remote_down.h @@ -16,12 +16,11 @@ #define remote_down_COLORS_PER_PALETTE 4 #define remote_down_TOTAL_COLORS 4 #define remote_down_MAP_ATTRIBUTES 0 +extern const unsigned char remote_down_map[360]; +#define remote_down_map_attributes remote_down_map BANKREF_EXTERN(remote_down) extern const uint8_t remote_down_tiles[528]; -extern const unsigned char remote_down_map[360]; -#define remote_down_map_attributes remote_down_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/sgb_border_1.h b/gbdk-support/png2asset/testing/ref/sgb_border_1.h @@ -20,13 +20,12 @@ #define sgb_border_1_MAP_ATTRIBUTES_HEIGHT 28 #define sgb_border_1_MAP_ATTRIBUTES_PACKED_WIDTH 32 #define sgb_border_1_MAP_ATTRIBUTES_PACKED_HEIGHT 28 +extern const unsigned char sgb_border_1_map[1792]; +#define sgb_border_1_map_attributes sgb_border_1_map BANKREF_EXTERN(sgb_border_1) extern const palette_color_t sgb_border_1_palettes[16]; extern const uint8_t sgb_border_1_tiles[3424]; -extern const unsigned char sgb_border_1_map[1792]; -#define sgb_border_1_map_attributes sgb_border_1_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/sgb_border_2.h b/gbdk-support/png2asset/testing/ref/sgb_border_2.h @@ -17,12 +17,11 @@ #define sgb_border_2_MAP_ATTRIBUTES_HEIGHT 28 #define sgb_border_2_MAP_ATTRIBUTES_PACKED_WIDTH 32 #define sgb_border_2_MAP_ATTRIBUTES_PACKED_HEIGHT 28 +extern const unsigned char sgb_border_2_map[1792]; +#define sgb_border_2_map_attributes sgb_border_2_map BANKREF_EXTERN(sgb_border_2) extern const uint8_t sgb_border_2_tiles[3424]; -extern const unsigned char sgb_border_2_map[1792]; -#define sgb_border_2_map_attributes sgb_border_2_map - #endif diff --git a/gbdk-support/png2asset/testing/ref/sprite_slon_1.h b/gbdk-support/png2asset/testing/ref/sprite_slon_1.h @@ -19,12 +19,11 @@ #define sprite_slon_1_PIVOT_Y 24 #define sprite_slon_1_PIVOT_W 64 #define sprite_slon_1_PIVOT_H 48 +extern const metasprite_t* const sprite_slon_1_metasprites[5]; BANKREF_EXTERN(sprite_slon_1) extern const palette_color_t sprite_slon_1_palettes[4]; extern const uint8_t sprite_slon_1_tiles[768]; -extern const metasprite_t* const sprite_slon_1_metasprites[5]; - #endif diff --git a/gbdk-support/png2asset/testing/ref/sprite_slon_2.h b/gbdk-support/png2asset/testing/ref/sprite_slon_2.h @@ -19,12 +19,11 @@ #define sprite_slon_2_PIVOT_Y 24 #define sprite_slon_2_PIVOT_W 64 #define sprite_slon_2_PIVOT_H 48 +extern const metasprite_t* const sprite_slon_2_metasprites[5]; BANKREF_EXTERN(sprite_slon_2) extern const palette_color_t sprite_slon_2_palettes[4]; extern const uint8_t sprite_slon_2_tiles[960]; -extern const metasprite_t* const sprite_slon_2_metasprites[5]; - #endif diff --git a/gbdk-support/png2asset/testing/ref/sprite_slon_3.h b/gbdk-support/png2asset/testing/ref/sprite_slon_3.h @@ -19,11 +19,10 @@ #define sprite_slon_3_PIVOT_Y 24 #define sprite_slon_3_PIVOT_W 64 #define sprite_slon_3_PIVOT_H 48 +extern const metasprite_t* const sprite_slon_3_metasprites[5]; BANKREF_EXTERN(sprite_slon_3) extern const palette_color_t sprite_slon_3_palettes[4]; -extern const metasprite_t* const sprite_slon_3_metasprites[5]; - #endif diff --git a/gbdk-support/png2asset/testing/ref/sprite_slon_4.h b/gbdk-support/png2asset/testing/ref/sprite_slon_4.h @@ -21,5 +21,4 @@ BANKREF_EXTERN(sprite_slon_4) extern const palette_color_t sprite_slon_4_palettes[4]; extern const uint8_t sprite_slon_4_tiles[960]; - #endif diff --git a/gbdk-support/png2asset/testing/ref/zgb_largemap_1.c b/gbdk-support/png2asset/testing/ref/zgb_largemap_1.c @@ -966,11 +966,11 @@ const uint8_t zgb_largemap_1_tile_pals[234] = { #include "TilesInfo.h" BANKREF(zgb_largemap_1_tiles_info) const struct TilesInfo zgb_largemap_1_tiles_info = { - .num_frames=234, //num tiles - .data=zgb_largemap_1_tiles, //tiles - .num_pals=4, //num palettes - .pals=zgb_largemap_1_palettes, //palettes - .color_data=zgb_largemap_1_tile_pals, //tile palettes + .num_frames=234, // num tiles + .data=zgb_largemap_1_tiles, // tiles + .num_pals=4, // num palettes + .pals=zgb_largemap_1_palettes, // palettes + .color_data=zgb_largemap_1_tile_pals, // tile palettes }; const unsigned char zgb_largemap_1_map[10296] = { @@ -1045,10 +1045,10 @@ const unsigned char zgb_largemap_1_map[10296] = { #include "MapInfo.h" BANKREF_EXTERN(zgb_largemap_1_tiles_info) const struct MapInfo zgb_largemap_1 = { - .data=zgb_largemap_1_map, //map - .width=156, //with - .height=66, //height - .attributes=0, //map attributes - .tiles_bank=BANK(zgb_largemap_1_tiles_info), //tiles bank - .tiles=&zgb_largemap_1_tiles_info, //tiles info + .data=zgb_largemap_1_map, // map + .width=156, // width + .height=66, // height + .attributes=0, // map attributes + .tiles_bank=BANK(zgb_largemap_1_tiles_info), // tiles bank + .tiles=&zgb_largemap_1_tiles_info, // tiles info }; diff --git a/gbdk-support/png2asset/testing/ref/zgb_largemap_2.c b/gbdk-support/png2asset/testing/ref/zgb_largemap_2.c @@ -3851,11 +3851,11 @@ const uint8_t zgb_largemap_2_tile_pals[239] = { #include "TilesInfo.h" BANKREF(zgb_largemap_2_tiles_info) const struct TilesInfo zgb_largemap_2_tiles_info = { - .num_frames=239, //num tiles - .data=zgb_largemap_2_tiles, //tiles - .num_pals=1, //num palettes - .pals=zgb_largemap_2_palettes, //palettes - .color_data=zgb_largemap_2_tile_pals, //tile palettes + .num_frames=239, // num tiles + .data=zgb_largemap_2_tiles, // tiles + .num_pals=1, // num palettes + .pals=zgb_largemap_2_palettes, // palettes + .color_data=zgb_largemap_2_tile_pals, // tile palettes }; const unsigned char zgb_largemap_2_map[10296] = { @@ -3930,10 +3930,10 @@ const unsigned char zgb_largemap_2_map[10296] = { #include "MapInfo.h" BANKREF_EXTERN(zgb_largemap_2_tiles_info) const struct MapInfo zgb_largemap_2 = { - .data=zgb_largemap_2_map, //map - .width=156, //with - .height=66, //height - .attributes=0, //map attributes - .tiles_bank=BANK(zgb_largemap_2_tiles_info), //tiles bank - .tiles=&zgb_largemap_2_tiles_info, //tiles info + .data=zgb_largemap_2_map, // map + .width=156, // width + .height=66, // height + .attributes=0, // map attributes + .tiles_bank=BANK(zgb_largemap_2_tiles_info), // tiles bank + .tiles=&zgb_largemap_2_tiles_info, // tiles info }; diff --git a/gbdk-support/png2asset/testing/ref/zgb_nums_map_1.c b/gbdk-support/png2asset/testing/ref/zgb_nums_map_1.c @@ -182,11 +182,11 @@ const uint8_t zgb_nums_map_1_tile_pals[40] = { #include "TilesInfo.h" BANKREF(zgb_nums_map_1_tiles_info) const struct TilesInfo zgb_nums_map_1_tiles_info = { - .num_frames=40, //num tiles - .data=zgb_nums_map_1_tiles, //tiles - .num_pals=1, //num palettes - .pals=zgb_nums_map_1_palettes, //palettes - .color_data=zgb_nums_map_1_tile_pals, //tile palettes + .num_frames=40, // num tiles + .data=zgb_nums_map_1_tiles, // tiles + .num_pals=1, // num palettes + .pals=zgb_nums_map_1_palettes, // palettes + .color_data=zgb_nums_map_1_tile_pals, // tile palettes }; const unsigned char zgb_nums_map_1_map[50] = { @@ -200,10 +200,10 @@ const unsigned char zgb_nums_map_1_map[50] = { #include "MapInfo.h" BANKREF_EXTERN(zgb_nums_map_1_tiles_info) const struct MapInfo zgb_nums_map_1 = { - .data=zgb_nums_map_1_map, //map - .width=10, //with - .height=5, //height - .attributes=0, //map attributes - .tiles_bank=BANK(zgb_nums_map_1_tiles_info), //tiles bank - .tiles=&zgb_nums_map_1_tiles_info, //tiles info + .data=zgb_nums_map_1_map, // map + .width=10, // width + .height=5, // height + .attributes=0, // map attributes + .tiles_bank=BANK(zgb_nums_map_1_tiles_info), // tiles bank + .tiles=&zgb_nums_map_1_tiles_info, // tiles info }; diff --git a/gbdk-support/png2asset/testing/ref/zgb_nums_map_2.c b/gbdk-support/png2asset/testing/ref/zgb_nums_map_2.c @@ -6,52 +6,11 @@ BANKREF(zgb_nums_map_2) -const palette_color_t zgb_nums_map_2_palettes[4] = { - RGB8(255,255,255), RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0) - +const palette_color_t zgb_nums_map_2_palettes[0] = { + }; -const uint8_t zgb_nums_map_2_tiles[640] = { - 0x00,0x00,0x3c,0x00, - 0x24,0x00,0x24,0x00, - 0x1c,0x00,0x04,0x00, - 0x04,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x24,0x00,0x18,0x00, - 0x24,0x00,0x24,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x04,0x00,0x08,0x00, - 0x08,0x00,0x10,0x00, - 0x20,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x20,0x00,0x38,0x00, - 0x24,0x00,0x24,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x20,0x00,0x3c,0x00, - 0x04,0x00,0x04,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x24,0x00, - 0x24,0x00,0x3c,0x00, - 0x04,0x00,0x04,0x00, - 0x04,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x04,0x00,0x18,0x00, - 0x04,0x00,0x04,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x04,0x00,0x08,0x00, - 0x10,0x00,0x20,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x30,0x00, - 0x10,0x00,0x10,0x00, - 0x10,0x00,0x10,0x00, - 0x38,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x24,0x00,0x24,0x00, - 0x24,0x00,0x24,0x00, - 0x3c,0x00,0x00,0x00, +const uint8_t zgb_nums_map_2_tiles[480] = { 0x00,0x00,0x00,0x00, 0x4c,0x00,0x52,0x00, 0x52,0x00,0x52,0x00, @@ -175,18 +134,18 @@ const uint8_t zgb_nums_map_2_tiles[640] = { }; -const uint8_t zgb_nums_map_2_tile_pals[40] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +const uint8_t zgb_nums_map_2_tile_pals[30] = { + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; #include "TilesInfo.h" BANKREF(zgb_nums_map_2_tiles_info) const struct TilesInfo zgb_nums_map_2_tiles_info = { - .num_frames=40, //num tiles - .data=zgb_nums_map_2_tiles, //tiles - .num_pals=1, //num palettes - .pals=zgb_nums_map_2_palettes, //palettes - .color_data=zgb_nums_map_2_tile_pals, //tile palettes + .num_frames=40, // num tiles + .data=zgb_nums_map_2_tiles, // tiles + .num_pals=1, // num palettes + .pals=zgb_nums_map_2_palettes, // palettes + .color_data=zgb_nums_map_2_tile_pals, // tile palettes }; const unsigned char zgb_nums_map_2_map[50] = { @@ -200,10 +159,10 @@ const unsigned char zgb_nums_map_2_map[50] = { #include "MapInfo.h" BANKREF_EXTERN(zgb_nums_map_2_tiles_info) const struct MapInfo zgb_nums_map_2 = { - .data=zgb_nums_map_2_map, //map - .width=10, //with - .height=5, //height - .attributes=0, //map attributes - .tiles_bank=BANK(zgb_nums_map_2_tiles_info), //tiles bank - .tiles=&zgb_nums_map_2_tiles_info, //tiles info + .data=zgb_nums_map_2_map, // map + .width=10, // width + .height=5, // height + .attributes=0, // map attributes + .tiles_bank=BANK(zgb_nums_map_2_tiles_info), // tiles bank + .tiles=&zgb_nums_map_2_tiles_info, // tiles info }; diff --git a/gbdk-support/png2asset/testing/ref/zgb_nums_map_3.c b/gbdk-support/png2asset/testing/ref/zgb_nums_map_3.c @@ -142,11 +142,11 @@ const uint8_t zgb_nums_map_3_tile_pals[30] = { #include "TilesInfo.h" BANKREF(zgb_nums_map_3_tiles_info) const struct TilesInfo zgb_nums_map_3_tiles_info = { - .num_frames=30, //num tiles - .data=zgb_nums_map_3_tiles, //tiles - .num_pals=1, //num palettes - .pals=zgb_nums_map_3_palettes, //palettes - .color_data=zgb_nums_map_3_tile_pals, //tile palettes + .num_frames=30, // num tiles + .data=zgb_nums_map_3_tiles, // tiles + .num_pals=1, // num palettes + .pals=zgb_nums_map_3_palettes, // palettes + .color_data=zgb_nums_map_3_tile_pals, // tile palettes }; const unsigned char zgb_nums_map_3_map[50] = { @@ -160,10 +160,10 @@ const unsigned char zgb_nums_map_3_map[50] = { #include "MapInfo.h" BANKREF_EXTERN(zgb_nums_map_3_tiles_info) const struct MapInfo zgb_nums_map_3 = { - .data=zgb_nums_map_3_map, //map - .width=10, //with - .height=5, //height - .attributes=0, //map attributes - .tiles_bank=BANK(zgb_nums_map_3_tiles_info), //tiles bank - .tiles=&zgb_nums_map_3_tiles_info, //tiles info + .data=zgb_nums_map_3_map, // map + .width=10, // width + .height=5, // height + .attributes=0, // map attributes + .tiles_bank=BANK(zgb_nums_map_3_tiles_info), // tiles bank + .tiles=&zgb_nums_map_3_tiles_info, // tiles info }; diff --git a/gbdk-support/png2asset/testing/ref/zgb_nums_map_4.c b/gbdk-support/png2asset/testing/ref/zgb_nums_map_4.c @@ -6,52 +6,11 @@ BANKREF(zgb_nums_map_4) -const palette_color_t zgb_nums_map_4_palettes[4] = { - RGB8(255,255,255), RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0) - +const palette_color_t zgb_nums_map_4_palettes[0] = { + }; -const uint8_t zgb_nums_map_4_tiles[480] = { - 0x00,0x00,0x3c,0x00, - 0x24,0x00,0x24,0x00, - 0x1c,0x00,0x04,0x00, - 0x04,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x24,0x00,0x18,0x00, - 0x24,0x00,0x24,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x04,0x00,0x08,0x00, - 0x08,0x00,0x10,0x00, - 0x20,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x20,0x00,0x38,0x00, - 0x24,0x00,0x24,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x20,0x00,0x3c,0x00, - 0x04,0x00,0x04,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x24,0x00, - 0x24,0x00,0x3c,0x00, - 0x04,0x00,0x04,0x00, - 0x04,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x04,0x00,0x18,0x00, - 0x04,0x00,0x04,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x04,0x00,0x08,0x00, - 0x10,0x00,0x20,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x30,0x00, - 0x10,0x00,0x10,0x00, - 0x10,0x00,0x10,0x00, - 0x38,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x24,0x00,0x24,0x00, - 0x24,0x00,0x24,0x00, - 0x3c,0x00,0x00,0x00, +const uint8_t zgb_nums_map_4_tiles[320] = { 0x00,0x00,0x00,0x00, 0x4c,0x00,0x52,0x00, 0x52,0x00,0x52,0x00, @@ -135,18 +94,18 @@ const uint8_t zgb_nums_map_4_tiles[480] = { }; -const uint8_t zgb_nums_map_4_tile_pals[30] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +const uint8_t zgb_nums_map_4_tile_pals[20] = { + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; #include "TilesInfo.h" BANKREF(zgb_nums_map_4_tiles_info) const struct TilesInfo zgb_nums_map_4_tiles_info = { - .num_frames=30, //num tiles - .data=zgb_nums_map_4_tiles, //tiles - .num_pals=1, //num palettes - .pals=zgb_nums_map_4_palettes, //palettes - .color_data=zgb_nums_map_4_tile_pals, //tile palettes + .num_frames=30, // num tiles + .data=zgb_nums_map_4_tiles, // tiles + .num_pals=1, // num palettes + .pals=zgb_nums_map_4_palettes, // palettes + .color_data=zgb_nums_map_4_tile_pals, // tile palettes }; const unsigned char zgb_nums_map_4_map[50] = { @@ -160,10 +119,10 @@ const unsigned char zgb_nums_map_4_map[50] = { #include "MapInfo.h" BANKREF_EXTERN(zgb_nums_map_4_tiles_info) const struct MapInfo zgb_nums_map_4 = { - .data=zgb_nums_map_4_map, //map - .width=10, //with - .height=5, //height - .attributes=0, //map attributes - .tiles_bank=BANK(zgb_nums_map_4_tiles_info), //tiles bank - .tiles=&zgb_nums_map_4_tiles_info, //tiles info + .data=zgb_nums_map_4_map, // map + .width=10, // width + .height=5, // height + .attributes=0, // map attributes + .tiles_bank=BANK(zgb_nums_map_4_tiles_info), // tiles bank + .tiles=&zgb_nums_map_4_tiles_info, // tiles info }; diff --git a/gbdk-support/png2asset/testing/ref/zgb_nums_map_5.c b/gbdk-support/png2asset/testing/ref/zgb_nums_map_5.c @@ -182,11 +182,11 @@ const uint8_t zgb_nums_map_5_tile_pals[40] = { #include "TilesInfo.h" BANKREF(zgb_nums_map_5_tiles_info) const struct TilesInfo zgb_nums_map_5_tiles_info = { - .num_frames=40, //num tiles - .data=zgb_nums_map_5_tiles, //tiles - .num_pals=1, //num palettes - .pals=zgb_nums_map_5_palettes, //palettes - .color_data=zgb_nums_map_5_tile_pals, //tile palettes + .num_frames=40, // num tiles + .data=zgb_nums_map_5_tiles, // tiles + .num_pals=1, // num palettes + .pals=zgb_nums_map_5_palettes, // palettes + .color_data=zgb_nums_map_5_tile_pals, // tile palettes }; const unsigned char zgb_nums_map_5_map[50] = { @@ -200,10 +200,10 @@ const unsigned char zgb_nums_map_5_map[50] = { #include "MapInfo.h" BANKREF_EXTERN(zgb_nums_map_5_tiles_info) const struct MapInfo zgb_nums_map_5 = { - .data=zgb_nums_map_5_map, //map - .width=10, //with - .height=5, //height - .attributes=0, //map attributes - .tiles_bank=BANK(zgb_nums_map_5_tiles_info), //tiles bank - .tiles=&zgb_nums_map_5_tiles_info, //tiles info + .data=zgb_nums_map_5_map, // map + .width=10, // width + .height=5, // height + .attributes=0, // map attributes + .tiles_bank=BANK(zgb_nums_map_5_tiles_info), // tiles bank + .tiles=&zgb_nums_map_5_tiles_info, // tiles info }; diff --git a/gbdk-support/png2asset/testing/ref/zgb_nums_map_6.c b/gbdk-support/png2asset/testing/ref/zgb_nums_map_6.c @@ -6,52 +6,11 @@ BANKREF(zgb_nums_map_6) -const palette_color_t zgb_nums_map_6_palettes[4] = { - RGB8(255,255,255), RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0) - +const palette_color_t zgb_nums_map_6_palettes[0] = { + }; -const uint8_t zgb_nums_map_6_tiles[640] = { - 0x00,0x00,0x3c,0x00, - 0x24,0x00,0x24,0x00, - 0x1c,0x00,0x04,0x00, - 0x04,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x24,0x00,0x18,0x00, - 0x24,0x00,0x24,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x04,0x00,0x08,0x00, - 0x08,0x00,0x10,0x00, - 0x20,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x20,0x00,0x38,0x00, - 0x24,0x00,0x24,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x20,0x00,0x3c,0x00, - 0x04,0x00,0x04,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x24,0x00, - 0x24,0x00,0x3c,0x00, - 0x04,0x00,0x04,0x00, - 0x04,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x04,0x00,0x18,0x00, - 0x04,0x00,0x04,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x04,0x00,0x08,0x00, - 0x10,0x00,0x20,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x30,0x00, - 0x10,0x00,0x10,0x00, - 0x10,0x00,0x10,0x00, - 0x38,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x24,0x00,0x24,0x00, - 0x24,0x00,0x24,0x00, - 0x3c,0x00,0x00,0x00, +const uint8_t zgb_nums_map_6_tiles[480] = { 0x00,0x00,0x00,0x00, 0x4c,0x00,0x52,0x00, 0x52,0x00,0x52,0x00, @@ -175,18 +134,18 @@ const uint8_t zgb_nums_map_6_tiles[640] = { }; -const uint8_t zgb_nums_map_6_tile_pals[40] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +const uint8_t zgb_nums_map_6_tile_pals[30] = { + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; #include "TilesInfo.h" BANKREF(zgb_nums_map_6_tiles_info) const struct TilesInfo zgb_nums_map_6_tiles_info = { - .num_frames=40, //num tiles - .data=zgb_nums_map_6_tiles, //tiles - .num_pals=1, //num palettes - .pals=zgb_nums_map_6_palettes, //palettes - .color_data=zgb_nums_map_6_tile_pals, //tile palettes + .num_frames=40, // num tiles + .data=zgb_nums_map_6_tiles, // tiles + .num_pals=1, // num palettes + .pals=zgb_nums_map_6_palettes, // palettes + .color_data=zgb_nums_map_6_tile_pals, // tile palettes }; const unsigned char zgb_nums_map_6_map[50] = { @@ -200,10 +159,10 @@ const unsigned char zgb_nums_map_6_map[50] = { #include "MapInfo.h" BANKREF_EXTERN(zgb_nums_map_6_tiles_info) const struct MapInfo zgb_nums_map_6 = { - .data=zgb_nums_map_6_map, //map - .width=10, //with - .height=5, //height - .attributes=0, //map attributes - .tiles_bank=BANK(zgb_nums_map_6_tiles_info), //tiles bank - .tiles=&zgb_nums_map_6_tiles_info, //tiles info + .data=zgb_nums_map_6_map, // map + .width=10, // width + .height=5, // height + .attributes=0, // map attributes + .tiles_bank=BANK(zgb_nums_map_6_tiles_info), // tiles bank + .tiles=&zgb_nums_map_6_tiles_info, // tiles info }; diff --git a/gbdk-support/png2asset/testing/ref/zgb_nums_map_7.c b/gbdk-support/png2asset/testing/ref/zgb_nums_map_7.c @@ -182,11 +182,11 @@ const uint8_t zgb_nums_map_7_tile_pals[40] = { #include "TilesInfo.h" BANKREF(zgb_nums_map_7_tiles_info) const struct TilesInfo zgb_nums_map_7_tiles_info = { - .num_frames=40, //num tiles - .data=zgb_nums_map_7_tiles, //tiles - .num_pals=1, //num palettes - .pals=zgb_nums_map_7_palettes, //palettes - .color_data=zgb_nums_map_7_tile_pals, //tile palettes + .num_frames=40, // num tiles + .data=zgb_nums_map_7_tiles, // tiles + .num_pals=1, // num palettes + .pals=zgb_nums_map_7_palettes, // palettes + .color_data=zgb_nums_map_7_tile_pals, // tile palettes }; const unsigned char zgb_nums_map_7_map[50] = { @@ -200,10 +200,10 @@ const unsigned char zgb_nums_map_7_map[50] = { #include "MapInfo.h" BANKREF_EXTERN(zgb_nums_map_7_tiles_info) const struct MapInfo zgb_nums_map_7 = { - .data=zgb_nums_map_7_map, //map - .width=10, //with - .height=5, //height - .attributes=0, //map attributes - .tiles_bank=BANK(zgb_nums_map_7_tiles_info), //tiles bank - .tiles=&zgb_nums_map_7_tiles_info, //tiles info + .data=zgb_nums_map_7_map, // map + .width=10, // width + .height=5, // height + .attributes=0, // map attributes + .tiles_bank=BANK(zgb_nums_map_7_tiles_info), // tiles bank + .tiles=&zgb_nums_map_7_tiles_info, // tiles info }; diff --git a/gbdk-support/png2asset/testing/ref/zgb_nums_map_8.c b/gbdk-support/png2asset/testing/ref/zgb_nums_map_8.c @@ -6,52 +6,11 @@ BANKREF(zgb_nums_map_8) -const palette_color_t zgb_nums_map_8_palettes[4] = { - RGB8(255,255,255), RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0) - +const palette_color_t zgb_nums_map_8_palettes[0] = { + }; -const uint8_t zgb_nums_map_8_tiles[480] = { - 0x00,0x00,0x3c,0x00, - 0x24,0x00,0x24,0x00, - 0x1c,0x00,0x04,0x00, - 0x04,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x24,0x00,0x18,0x00, - 0x24,0x00,0x24,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x04,0x00,0x08,0x00, - 0x08,0x00,0x10,0x00, - 0x20,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x20,0x00,0x38,0x00, - 0x24,0x00,0x24,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x20,0x00,0x3c,0x00, - 0x04,0x00,0x04,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x24,0x00, - 0x24,0x00,0x3c,0x00, - 0x04,0x00,0x04,0x00, - 0x04,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x04,0x00,0x18,0x00, - 0x04,0x00,0x04,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x04,0x00,0x08,0x00, - 0x10,0x00,0x20,0x00, - 0x3c,0x00,0x00,0x00, - 0x00,0x00,0x30,0x00, - 0x10,0x00,0x10,0x00, - 0x10,0x00,0x10,0x00, - 0x38,0x00,0x00,0x00, - 0x00,0x00,0x3c,0x00, - 0x24,0x00,0x24,0x00, - 0x24,0x00,0x24,0x00, - 0x3c,0x00,0x00,0x00, +const uint8_t zgb_nums_map_8_tiles[320] = { 0x00,0x00,0x00,0x00, 0x4c,0x00,0x52,0x00, 0x52,0x00,0x52,0x00, @@ -135,18 +94,18 @@ const uint8_t zgb_nums_map_8_tiles[480] = { }; -const uint8_t zgb_nums_map_8_tile_pals[30] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +const uint8_t zgb_nums_map_8_tile_pals[20] = { + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; #include "TilesInfo.h" BANKREF(zgb_nums_map_8_tiles_info) const struct TilesInfo zgb_nums_map_8_tiles_info = { - .num_frames=30, //num tiles - .data=zgb_nums_map_8_tiles, //tiles - .num_pals=1, //num palettes - .pals=zgb_nums_map_8_palettes, //palettes - .color_data=zgb_nums_map_8_tile_pals, //tile palettes + .num_frames=30, // num tiles + .data=zgb_nums_map_8_tiles, // tiles + .num_pals=1, // num palettes + .pals=zgb_nums_map_8_palettes, // palettes + .color_data=zgb_nums_map_8_tile_pals, // tile palettes }; const unsigned char zgb_nums_map_8_map[50] = { @@ -160,10 +119,10 @@ const unsigned char zgb_nums_map_8_map[50] = { #include "MapInfo.h" BANKREF_EXTERN(zgb_nums_map_8_tiles_info) const struct MapInfo zgb_nums_map_8 = { - .data=zgb_nums_map_8_map, //map - .width=10, //with - .height=5, //height - .attributes=0, //map attributes - .tiles_bank=BANK(zgb_nums_map_8_tiles_info), //tiles bank - .tiles=&zgb_nums_map_8_tiles_info, //tiles info + .data=zgb_nums_map_8_map, // map + .width=10, // width + .height=5, // height + .attributes=0, // map attributes + .tiles_bank=BANK(zgb_nums_map_8_tiles_info), // tiles bank + .tiles=&zgb_nums_map_8_tiles_info, // tiles info }; diff --git a/gbdk-support/png2asset/testing/ref/zgb_sgb_border_1.c b/gbdk-support/png2asset/testing/ref/zgb_sgb_border_1.c @@ -1735,11 +1735,11 @@ const uint8_t zgb_sgb_border_1_tiles[3424] = { #include "TilesInfo.h" BANKREF(zgb_sgb_border_1_tiles_info) const struct TilesInfo zgb_sgb_border_1_tiles_info = { - .num_frames=107, //num tiles - .data=zgb_sgb_border_1_tiles, //tiles - .num_pals=1, //num palettes - .pals=zgb_sgb_border_1_palettes, //palettes - .color_data=0 //tile palettes + .num_frames=107, // num tiles + .data=zgb_sgb_border_1_tiles, // tiles + .num_pals=1, // num palettes + .pals=zgb_sgb_border_1_palettes, // palettes + .color_data=0 // tile palettes }; const unsigned char zgb_sgb_border_1_map[1792] = { @@ -1776,10 +1776,10 @@ const unsigned char zgb_sgb_border_1_map[1792] = { #include "MapInfo.h" BANKREF_EXTERN(zgb_sgb_border_1_tiles_info) const struct MapInfo zgb_sgb_border_1 = { - .data=zgb_sgb_border_1_map, //map - .width=32, //with - .height=28, //height - .attributes=0, //map attributes - .tiles_bank=BANK(zgb_sgb_border_1_tiles_info), //tiles bank - .tiles=&zgb_sgb_border_1_tiles_info, //tiles info + .data=zgb_sgb_border_1_map, // map + .width=32, // width + .height=28, // height + .attributes=0, // map attributes + .tiles_bank=BANK(zgb_sgb_border_1_tiles_info), // tiles bank + .tiles=&zgb_sgb_border_1_tiles_info, // tiles info }; diff --git a/gbdk-support/png2asset/testing/ref/zgb_sprite_1.c b/gbdk-support/png2asset/testing/ref/zgb_sprite_1.c @@ -393,12 +393,12 @@ const metasprite_t* const zgb_sprite_1_metasprites[5] = { #include "MetaSpriteInfo.h" const struct MetaSpriteInfo zgb_sprite_1 = { - 32, //width - 24, //height - 56, //num tiles - zgb_sprite_1_tiles, //tiles - 1, //num palettes - zgb_sprite_1_palettes, //CGB palette - 5, //num sprites - zgb_sprite_1_metasprites, //metasprites + 32, // width + 24, // height + 56, // num tiles + zgb_sprite_1_tiles, // tiles + 1, // num palettes + zgb_sprite_1_palettes, // CGB palette + 5, // num sprites + zgb_sprite_1_metasprites, // metasprites }; diff --git a/gbdk-support/png2asset/testing/ref/zgb_sprite_2.c b/gbdk-support/png2asset/testing/ref/zgb_sprite_2.c @@ -1223,12 +1223,12 @@ const metasprite_t* const zgb_sprite_2_metasprites[5] = { #include "MetaSpriteInfo.h" const struct MetaSpriteInfo zgb_sprite_2 = { - 32, //width - 24, //height - 62, //num tiles - zgb_sprite_2_tiles, //tiles - 8, //num palettes - zgb_sprite_2_palettes, //CGB palette - 5, //num sprites - zgb_sprite_2_metasprites, //metasprites + 32, // width + 24, // height + 62, // num tiles + zgb_sprite_2_tiles, // tiles + 8, // num palettes + zgb_sprite_2_palettes, // CGB palette + 5, // num sprites + zgb_sprite_2_metasprites, // metasprites }; diff --git a/gbdk-support/png2asset/testing/ref/zgb_sushi_level07.c b/gbdk-support/png2asset/testing/ref/zgb_sushi_level07.c @@ -0,0 +1,73 @@ +#pragma bank 255 + +//AUTOGENERATED FILE FROM png2asset + +#include <stdint.h> +#include <gbdk/platform.h> +#include <gbdk/metasprites.h> + +BANKREF(zgb_sushi_level07) + + +#include "TilesInfo.h" +extern const void __bank_sushi_tiles; +extern const struct TilesInfo sushi_tiles; + +const unsigned char zgb_sushi_level07_map[4185] = { + 0x05,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x05, + 0x07,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2b,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x07, + 0x05,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x2b,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2b,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x2b,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2b,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x05, + 0x07,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x07, + 0x05,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x05, + 0x07,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x07, + 0x05,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x05, + 0x07,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2b,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x31,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x07, + 0x07,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2e,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x07, + 0x05,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2b,0x02,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x2b,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x2b,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2b,0x02,0x02,0x02,0x02,0x02,0x2e,0x31,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x05, + 0x07,0x02,0x02,0x02,0x02,0x2b,0x02,0x02,0x02,0x02,0x30,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x30,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x02,0x31,0x02,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2e,0x2e,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x07, + 0x05,0x2b,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0xfb,0x02,0x02,0x02,0x02,0x02,0x02,0x2c,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2e,0x30,0x02,0x02,0x02,0x02,0x2b,0x02,0x02,0x02,0x2e,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0xfb,0x02,0x02,0x02,0x02,0x02,0x2b,0x02,0x02,0x02,0x05, + 0x07,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2e,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2b,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x30,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0xfc,0x2e,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2e,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x31,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x2e,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x07, + 0x05,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x05,0x07,0x05,0x07,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x30,0x02,0x2e,0x02,0x02,0x02,0x02,0x02,0x02,0x05,0x07,0x05,0x07,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x05,0x07,0x05,0x07,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2e,0x02,0x02,0x02,0x02,0x02,0x02,0x05,0x07,0x05,0x07,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x05, + 0x07,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2e,0x02,0x30,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2e,0x02,0x2e,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2e,0x2e,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2e,0x02,0x02,0x31,0x02,0x02,0x02,0x02,0x31,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x2e,0x2e,0x02,0x02,0x30,0x02,0x02,0x30,0x02,0x02,0x02,0x07, + 0x05,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x05, + 0x07,0x02,0x02,0x30,0x02,0x02,0x02,0x02,0x30,0x02,0x2e,0x30,0x2e,0x02,0x30,0x02,0x30,0x02,0x31,0x02,0x02,0x30,0x02,0x02,0x02,0x02,0x30,0x02,0x2e,0x30,0x2e,0x02,0x30,0x02,0x30,0x02,0x31,0x02,0x02,0x2e,0x02,0x02,0x2e,0x02,0x02,0x02,0x02,0x02,0x02,0x30,0x02,0x02,0x2e,0x2e,0x2e,0x02,0x30,0x02,0x30,0x02,0x31,0x02,0x02,0x2e,0x02,0x02,0x2e,0x02,0x02,0x02,0x02,0x2e,0x30,0x2e,0x02,0x30,0x02,0x30,0x02,0x31,0x02,0x00,0x2e,0x02,0x02,0x2e,0x02,0x02,0x2e,0x02,0x02,0x02,0x07, + 0x05,0x37,0x37,0x2e,0x31,0x37,0x37,0x37,0x2e,0x37,0x00,0x2e,0x00,0x37,0x2e,0x37,0x2e,0x37,0x2e,0x37,0x00,0x2e,0x31,0x37,0x37,0x37,0x2e,0x37,0x00,0x2e,0x00,0x37,0x2e,0x37,0x2e,0x37,0x2e,0x37,0x00,0x00,0x37,0x37,0x00,0x37,0x37,0x05,0x07,0x05,0x37,0x2e,0x37,0x37,0x00,0x2e,0x00,0x37,0x2e,0x37,0x2e,0x37,0x2e,0x37,0x00,0x00,0x37,0x37,0x00,0x37,0x37,0x37,0x37,0x00,0x2e,0x00,0x37,0x2e,0x37,0x2e,0x37,0x2e,0x37,0x2f,0x00,0x37,0x37,0x00,0x37,0x37,0x00,0x37,0x37,0x37,0x05, + 0x07,0x0d,0x38,0x2f,0x2e,0x38,0x38,0x38,0x2e,0x38,0x2e,0x2e,0x2e,0x38,0x2e,0x38,0x2e,0x38,0x00,0x2f,0x2f,0x2f,0x2e,0x38,0x38,0x38,0x2e,0x38,0x2e,0x2e,0x2e,0x38,0x2e,0x38,0x2e,0x38,0x00,0x2f,0x2f,0x2e,0x38,0x38,0x2e,0x38,0x38,0x38,0x38,0x38,0x38,0x2e,0x38,0x38,0x2e,0x2e,0x2e,0x38,0x2e,0x38,0x2e,0x38,0x00,0x2f,0x2f,0x2e,0x38,0x38,0x2e,0x38,0x38,0x38,0x38,0x2e,0x2e,0x2e,0x38,0x2e,0x38,0x2e,0x38,0x00,0x2f,0x2f,0x2e,0x38,0x38,0x2e,0x38,0x38,0x2e,0x38,0x38,0x0d,0x07, + 0x05,0x0d,0x0d,0x00,0x00,0x3a,0x3a,0x3a,0x2e,0x3a,0x00,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x3a,0x2e,0x00,0x00,0x00,0x00,0x3a,0x3a,0x3a,0x2e,0x3a,0x00,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x3a,0x2e,0x00,0x00,0x2e,0x00,0x3a,0x2e,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x2e,0x3a,0x3a,0x00,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x3a,0x2e,0x00,0x00,0x2e,0x00,0x3a,0x2e,0x3a,0x3a,0x3a,0x3a,0x00,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x3a,0x2e,0x00,0x00,0x2e,0x00,0x3a,0x2e,0x00,0x3a,0x2e,0x00,0x0d,0x0d,0x05, + 0x07,0x0d,0x0d,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfb,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x0d,0x0d,0x07, + 0x05,0x14,0x14,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x14,0x14,0x05, + 0x07,0x14,0x14,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x14,0x14,0x07, + 0x07,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x0d,0x0d,0x0d,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x07, + 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x21,0x21,0x21,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05, + 0x07,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x07, + 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x07, + 0x05,0x0d,0x0d,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x0d,0x05, + 0x07,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x07, + 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07, + 0x05,0x0d,0x0d,0x0d,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x0d,0x0d,0x0d,0x05, + 0x07,0x14,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x07,0x05,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x07,0x05,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x14,0x07, + 0x05,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x14,0x14,0x14,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x14,0x14,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x05, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x21,0x21,0x21,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x21,0x21,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07, + 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x07,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x07,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x07,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07, + 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x07,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x07,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x07,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05, + 0x07,0x00,0x00,0x03,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x00,0x03,0x03,0x03,0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07, + 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0xff,0x03,0x03,0x03,0x00,0x00,0x00,0x05,0x07,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x05,0x07,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x03,0x03,0x03,0x00,0x00,0x00,0x05,0x07,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x00,0x05, + 0x07,0x0f,0x0d,0x0f,0x0d,0x0f,0x0d,0x0d,0x0f,0x0d,0x0f,0x0d,0x0f,0x0d,0x0d,0x0d,0x05,0x07,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x05,0x07,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x05,0x07,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07, + 0x05,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x05,0x07,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x14,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x14,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x21,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x21,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07, + 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05, +}; + +#include "MapInfo.h" +const struct MapInfo zgb_sushi_level07 = { + .data=zgb_sushi_level07_map, // map + .width=93, // width + .height=45, // height + .attributes=0, // map attributes + .tiles_bank=BANK(sushi_tiles), // source tiles bank + .tiles=&sushi_tiles, // source tiles info + .extra_tiles=0, // map tiles info (no map tiles were found that were not in the source tileset) +}; diff --git a/gbdk-support/png2asset/testing/ref/zgb_sushi_level07.h b/gbdk-support/png2asset/testing/ref/zgb_sushi_level07.h @@ -0,0 +1,15 @@ +//AUTOGENERATED FILE FROM png2asset +#ifndef METASPRITE_zgb_sushi_level07_H +#define METASPRITE_zgb_sushi_level07_H + +#include <stdint.h> +#include <gbdk/platform.h> +#include <gbdk/metasprites.h> + +#include "TilesInfo.h" +#include "MapInfo.h" + +extern const struct TilesInfo zgb_sushi_level07_tiles_info; +extern const struct MapInfo zgb_sushi_level07; + +#endif diff --git a/gbdk-support/png2asset/testing/ref/zgb_sushi_tiles.c b/gbdk-support/png2asset/testing/ref/zgb_sushi_tiles.c @@ -0,0 +1,1458 @@ +#pragma bank 255 + +//AUTOGENERATED FILE FROM png2asset + +#include <stdint.h> +#include <gbdk/platform.h> +#include <gbdk/metasprites.h> + +BANKREF(zgb_sushi_tiles) + +const palette_color_t zgb_sushi_tiles_palettes[16] = { + RGB8( 24, 32, 40), RGB8( 48, 32, 56), RGB8( 80, 40, 56), RGB8(112, 48, 64), + RGB8(120, 64, 88), RGB8(232,104,112), RGB8(248,168,112), RGB8(248,248,200), + RGB8(200,168,112), RGB8(152,104, 56), RGB8(104, 72, 48), RGB8( 48, 40, 32), + RGB8( 8, 32, 64), RGB8( 48, 40, 32), RGB8( 0,128, 0), RGB8( 0,192, 0) + +}; + +const uint8_t zgb_sushi_tiles_tiles[2848] = { + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xcf,0xef, + 0x00,0xff, + 0xc3,0xe3, + 0x00,0xff, + 0x00,0xff, + 0x00,0xff, + 0xfb,0xff, + 0x00,0xff, + 0xf9,0xfd, + 0x00,0xff, + 0x78,0x7c, + 0x00,0xff, + 0x00,0xff, + 0x00,0xff, + 0xdf,0xff, + 0x00,0xff, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0x53,0x2f, + 0x00,0xff, + 0xe9,0x17, + 0x00,0xff, + 0xd1,0x2f, + 0x00,0xff, + 0xa3,0x5f, + 0x00,0xff, + 0x45,0xbf, + 0x00,0xff, + 0x8b,0x7f, + 0x00,0xff, + 0x57,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0x7f,0x00, + 0x00,0xff, + 0x55,0x2a, + 0x00,0xff, + 0xaa,0x55, + 0x00,0xff, + 0x54,0xab, + 0x00,0xff, + 0xa1,0x5e, + 0x00,0xff, + 0x55,0xbf, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0x7e,0x00, + 0x00,0xff, + 0xae,0x50, + 0x00,0xff, + 0x56,0xa8, + 0x00,0xff, + 0x2e,0xd0, + 0x00,0xff, + 0x56,0xe8, + 0x00,0xff, + 0xae,0xf0, + 0x00,0xff, + 0x46,0xf8, + 0x00,0xff, + 0xf9,0xfe, + 0x00,0xff, + 0x07,0x01, + 0x00,0xff, + 0xf3,0x0f, + 0x00,0xff, + 0x45,0xbf, + 0x00,0xff, + 0x8b,0x7f, + 0x00,0xff, + 0x55,0xff, + 0x00,0xff, + 0xab,0xff, + 0x00,0xff, + 0x55,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xbf,0xff, + 0x00,0xff, + 0x5f,0xff, + 0x00,0xff, + 0x2f,0xff, + 0x00,0xff, + 0x57,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0x06,0xff, + 0x00,0xff, + 0x03,0xff, + 0x00,0xff, + 0x81,0x7f, + 0x00,0xff, + 0x40,0xbf, + 0x00,0xff, + 0xa0,0x5f, + 0x00,0xff, + 0x10,0xff, + 0x00,0xff, + 0x2a,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xfe,0xfe, + 0x00,0xff, + 0xfd,0xff, + 0x00,0xff, + 0xdd,0xff, + 0x00,0xff, + 0x2b,0xff, + 0x00,0xff, + 0x55,0xff, + 0x00,0xff, + 0x2b,0xff, + 0x00,0xff, + 0xd5,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xc3,0x42, + 0xff,0xff, + 0x83,0x8a, + 0xff,0xff, + 0x07,0x04, + 0xff,0xff, + 0x0f,0x1a, + 0xff,0xff, + 0x1f,0x54, + 0xff,0xff, + 0x7f,0x68, + 0xff,0xff, + 0xff,0xd0, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0x55,0xaa, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0xaa,0xff, + 0xff,0xff, + 0xd5,0xff, + 0xff,0xff, + 0xef,0xff, + 0xff,0xff, + 0xaa,0xff, + 0xff,0xff, + 0xff,0xff, + 0xff,0xff, + 0xc3,0x42, + 0xff,0xff, + 0xc1,0x51, + 0xff,0xff, + 0xe0,0x60, + 0xff,0xff, + 0xd0,0x78, + 0xff,0xff, + 0xe8,0x3a, + 0xff,0xff, + 0xf6,0x1e, + 0xff,0xff, + 0xff,0x0b, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0x56,0xa9, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0xaa,0xff, + 0xff,0xff, + 0x54,0xff, + 0xff,0xff, + 0xee,0xff, + 0xff,0xff, + 0xab,0xff, + 0xff,0xff, + 0xff,0xff, + 0xff,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xfb,0xff, + 0x00,0xff, + 0xf7,0xfb, + 0x00,0xff, + 0xe9,0xf7, + 0x00,0xff, + 0xd3,0xef, + 0x00,0xff, + 0xa7,0xdf, + 0x00,0xff, + 0x4e,0xbf, + 0x00,0xff, + 0x9f,0x7f, + 0x00,0xff, + 0x3f,0xff, + 0x00,0xff, + 0x7f,0xff, + 0x00,0xff, + 0x00,0xea, + 0x00,0xff, + 0xd5,0xff, + 0x00,0xff, + 0xaa,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xfd,0xff, + 0x00,0xff, + 0xfe,0xff, + 0x00,0xff, + 0x7f,0xff, + 0x00,0xff, + 0x3f,0xff, + 0x00,0xff, + 0x5e,0xbf, + 0x00,0xff, + 0xad,0xde, + 0x00,0xff, + 0xc0,0xff, + 0x00,0xff, + 0x00,0xeb, + 0x00,0xff, + 0x5d,0xf7, + 0x00,0xff, + 0xaa,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0x41,0xff, + 0x00,0xff, + 0xfb,0xff, + 0x00,0xff, + 0xf5,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0x90,0xff, + 0x00,0xff, + 0xda,0xff, + 0x00,0xff, + 0xd5,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xc3,0x52, + 0xff,0xff, + 0xc3,0x66, + 0xff,0xff, + 0xc3,0x52, + 0xff,0xff, + 0xc3,0x66, + 0xff,0xff, + 0xc3,0x52, + 0xff,0xff, + 0xc3,0x66, + 0xff,0xff, + 0xc3,0x52, + 0xff,0xff, + 0xc3,0x66, + 0xff,0xff, + 0x01,0xff, + 0x00,0xff, + 0x0b,0xff, + 0x00,0xff, + 0x05,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0x10,0xff, + 0x00,0xff, + 0xb0,0xff, + 0x00,0xff, + 0x55,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0xff, + 0xff,0xff, + 0x00,0x55, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0xaa, + 0xff,0xff, + 0xaa,0x55, + 0xff,0xff, + 0xff,0xaa, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xfe,0xfe, + 0x00,0xff, + 0xfe,0xfc, + 0x00,0xff, + 0xfc,0xfc, + 0x00,0xff, + 0xfc,0xf8, + 0x00,0xff, + 0xf8,0xf8, + 0x00,0xff, + 0xf8,0xf0, + 0x00,0xff, + 0xf0,0xf0, + 0x00,0xff, + 0xf0,0xe0, + 0x00,0xff, + 0xe0,0xe0, + 0x00,0xff, + 0xe0,0xc0, + 0x00,0xff, + 0xc0,0xc0, + 0x00,0xff, + 0xc0,0x80, + 0x00,0xff, + 0x80,0x80, + 0x00,0xff, + 0x80,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0x7f,0x7f, + 0x00,0xff, + 0x7f,0x3f, + 0x00,0xff, + 0x3f,0x3f, + 0x00,0xff, + 0x3f,0x1f, + 0x00,0xff, + 0x1f,0x1f, + 0x00,0xff, + 0x1f,0x0f, + 0x00,0xff, + 0x0f,0x0f, + 0x00,0xff, + 0x0f,0x07, + 0x00,0xff, + 0x07,0x07, + 0x00,0xff, + 0x07,0x03, + 0x00,0xff, + 0x03,0x03, + 0x00,0xff, + 0x03,0x01, + 0x00,0xff, + 0x01,0x01, + 0x00,0xff, + 0x01,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xf9,0xf6, + 0x00,0xff, + 0xd4,0xff, + 0x00,0xff, + 0xa8,0xff, + 0x00,0xff, + 0xd0,0x7f, + 0x00,0xff, + 0xea,0x35, + 0x00,0xff, + 0x57,0xa8, + 0x00,0xff, + 0xf8,0x50, + 0x00,0xff, + 0x3c,0xe8, + 0x00,0xff, + 0xfe,0xfe, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xbf,0x3f, + 0x00,0xff, + 0xef,0x0f, + 0x00,0xff, + 0x7f,0x87, + 0x00,0xff, + 0x3f,0xc3, + 0x00,0xff, + 0x3f,0xc3, + 0x00,0xff, + 0xff,0x03, + 0x00,0xff, + 0x1f,0x0f, + 0x00,0xff, + 0x3f,0x1f, + 0x00,0xff, + 0x7f,0x7f, + 0x00,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0xf0, + 0xff,0xff, + 0x0f,0xac, + 0xff,0xff, + 0x03,0x0a, + 0xff,0xff, + 0x33,0x32, + 0xff,0xff, + 0xd3,0xd6, + 0xff,0xff, + 0xeb,0xea, + 0xff,0xff, + 0xf3,0x76, + 0xff,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0x9b,0xff, + 0x00,0xff, + 0xf5,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x0f, + 0xff,0xff, + 0xfc,0x14, + 0xff,0xff, + 0xf8,0x2a, + 0xff,0xff, + 0xf0,0x58, + 0xff,0xff, + 0xe0,0x20, + 0xff,0xff, + 0xe1,0x71, + 0xff,0xff, + 0xc3,0x42, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xbf,0x40, + 0xff,0xff, + 0xe5,0x1a, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x54, + 0xff,0xff, + 0xff,0x2a, + 0xff,0xff, + 0xff,0x7c, + 0xff,0xff, + 0xe7,0x6e, + 0xff,0xff, + 0xc3,0x42, + 0xff,0xff, + 0xe3,0x6a, + 0xff,0xff, + 0xc3,0x42, + 0xff,0xff, + 0xe3,0x6a, + 0xff,0xff, + 0xe3,0x6a, + 0xff,0xff, + 0xc3,0x42, + 0xff,0xff, + 0xe3,0x6a, + 0xff,0xff, + 0xc3,0x42, + 0xff,0xff, + 0xe7,0x6e, + 0xff,0xff, + 0xff,0x7c, + 0xff,0xff, + 0xff,0x2a, + 0xff,0xff, + 0xff,0x54, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xd5,0x2a, + 0xff,0xff, + 0xbf,0x40, + 0xff,0xff, + 0xe5,0x1a, + 0xff,0xff, + 0xbb,0x44, + 0xff,0xff, + 0xfd,0x02, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xf9,0x06, + 0xff,0xff, + 0xbd,0x42, + 0xff,0xff, + 0xef,0x10, + 0xff,0xff, + 0xaf,0x50, + 0xff,0xff, + 0xf5,0x0a, + 0xff,0xff, + 0xbf,0x40, + 0xff,0xff, + 0x9f,0x60, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0x87,0x78, + 0xff,0xff, + 0x7f,0x80, + 0xff,0xff, + 0xbd,0x42, + 0xff,0xff, + 0x1d,0xe2, + 0xff,0xff, + 0x2d,0xd2, + 0xff,0xff, + 0x97,0x68, + 0xff,0xff, + 0x05,0xfa, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0x9f,0x60, + 0xff,0xff, + 0x45,0xba, + 0xff,0xff, + 0xa5,0x5a, + 0xff,0xff, + 0x57,0xa8, + 0xff,0xff, + 0xaf,0x50, + 0xff,0xff, + 0xfd,0x02, + 0xff,0xff, + 0x31,0xce, + 0xff,0xff, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x02, + 0x00,0x00, + 0xdf,0x20, + 0x00,0x00, + 0xaf,0x70, + 0x00,0x00, + 0xdf,0x20, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x04, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x02, + 0x00,0x00, + 0xfd,0x07, + 0x00,0x00, + 0xff,0x02, + 0x00,0x00, + 0xdf,0x20, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xdf,0x20, + 0x00,0x00, + 0xfb,0x04, + 0x00,0x00, + 0xf5,0x0a, + 0x00,0x00, + 0xfb,0x04, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0xff, + 0x00,0xff, + 0xbb,0x99, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0x9f, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xbf,0x9f, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xbb,0x99, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xf9, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xe7,0x00, + 0x00,0x00, + 0xe7,0x00, + 0x00,0x00, + 0xc3,0x00, + 0x00,0x00, + 0xc3,0x00, + 0x00,0x00, + 0x81,0x00, + 0x00,0x00, + 0x81,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xef,0x00, + 0x00,0x00, + 0xc3,0x00, + 0x00,0x00, + 0xc3,0x00, + 0x00,0x00, + 0xc3,0x00, + 0x00,0x00, + 0x81,0x00, + 0x00,0x00, + 0xa1,0x10, + 0x00,0x00, + 0x00,0x00, + 0x00,0x00, + 0xff,0xff, + 0xff,0xff, + 0xaa,0xff, + 0xff,0xff, + 0xef,0xff, + 0xff,0xff, + 0xd5,0xff, + 0xff,0xff, + 0xaa,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x55,0xaa, + 0xff,0xff, + 0x80,0x00, + 0xff,0xff, + 0x9f,0x7f, + 0xff,0xff, + 0x4d,0x3f, + 0xff,0xff, + 0x17,0x7f, + 0xff,0xff, + 0x49,0x3f, + 0xff,0xff, + 0x17,0x7f, + 0xff,0xff, + 0x4d,0x3f, + 0xff,0xff, + 0x17,0x7f, + 0xff,0xff, + 0x4d,0x3f, + 0xff,0xff, + 0xff,0xff, + 0xff,0xff, + 0xab,0xff, + 0xff,0xff, + 0xee,0xff, + 0xff,0xff, + 0x54,0xff, + 0xff,0xff, + 0xaa,0xff, + 0xff,0xff, + 0x00,0xff, + 0xff,0xff, + 0x56,0xa9, + 0xff,0xff, + 0xff,0x00, + 0xff,0xff, + 0xf9,0xfe, + 0xff,0x00, + 0xb2,0xfc, + 0xff,0x00, + 0xe8,0xfe, + 0xff,0x00, + 0x92,0xfc, + 0xff,0x00, + 0xe8,0xfe, + 0xff,0x00, + 0xb2,0xfc, + 0xff,0x00, + 0xe8,0xfe, + 0xff,0x00, + 0xb2,0xfc, + 0xff,0x00, + 0x00,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0x00, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0x3c,0x3c, + 0xff,0x00, + 0x42,0x7e, + 0xff,0x00, + 0xbd,0xd3, + 0xff,0x00, + 0xff,0x91, + 0xff,0x00, + 0xff,0x99, + 0xff,0x00, + 0xff,0x81, + 0xff,0x00, + 0x7e,0x42, + 0xff,0x00, + 0x3c,0x3c, + 0xff,0x00, + 0xff,0xff, + 0x00,0x00, + 0xc0,0xc0, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x9f,0x9f, + 0x00,0x00, + 0x9f,0x9f, + 0x00,0x00, + 0x9f,0x9f, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0xc0,0xc0, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0x03,0x03, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x03,0x03, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0xc0,0xc0, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0x81,0x81, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x03,0x03, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0xc3,0xc3, + 0x00,0x00, + 0xc3,0xc3, + 0x00,0x00, + 0xc3,0xc3, + 0x00,0x00, + 0xc3,0xc3, + 0x00,0x00, + 0xc3,0xc3, + 0x00,0x00, + 0xc3,0xc3, + 0x00,0x00, + 0xc3,0xc3, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0x00,0x00, + 0x00,0x00, + 0x7e,0x7e, + 0x00,0x00, + 0x42,0x7e, + 0x00,0x00, + 0x42,0x7e, + 0x00,0x00, + 0x42,0x7e, + 0x00,0x00, + 0x42,0x7e, + 0x00,0x00, + 0x7e,0x7e, + 0x00,0x00, + 0x00,0x00, + 0x00,0x00, + 0x01,0x00, + 0x00,0x00, + 0x7e,0x7c, + 0x00,0x00, + 0x45,0x38, + 0x00,0x00, + 0xaa,0x10, + 0x00,0x00, + 0x56,0x02, + 0x00,0x00, + 0x6a,0x46, + 0x00,0x00, + 0x7e,0x6e, + 0x00,0x00, + 0x00,0x00, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x8c,0x8c, + 0x00,0x00, + 0x8c,0x8c, + 0x00,0x00, + 0x8e,0x8e, + 0x00,0x00, + 0x8e,0x8e, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0x41,0x41, + 0x00,0x00, + 0x41,0x41, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x81,0x81, + 0x00,0x00, + 0x81,0x81, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xc0,0xc0, + 0x00,0x00, + 0x87,0x87, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x8f,0x8f, + 0x00,0x00, + 0x87,0x87, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0x80,0x80, + 0x00,0x00, + 0xc0,0xc0, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0x03,0x03, + 0x00,0x00, + 0x81,0x81, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0x81,0x81, + 0x00,0x00, + 0x81,0x81, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0xc1,0xc1, + 0x00,0x00, + 0x81,0x81, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x01,0x01, + 0x00,0x00, + 0x03,0x03, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0x00,0x00, + 0x00,0x00, + 0x00,0x00, + 0x00,0x00, + 0x00,0x00, + 0x00,0x00, + 0xc7,0xc7, + 0x00,0x00, + 0xc7,0xc7, + 0x00,0x00, + 0xc7,0xc7, + 0x00,0x00, + 0xc7,0xc7, + 0x00,0x00, + 0xc7,0xc7, + 0x00,0x00, + 0xc7,0xc7, + 0x00,0x00, + 0xc7,0xc7, + 0x00,0x00, + 0xc7,0xc7, + 0x00,0x00, + 0xc7,0xc7, + 0x00,0x00, + 0xc7,0xc7, + 0x00,0x00, + 0xc7,0xc7, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0x1c,0xff, + 0x00,0x00, + 0x3a,0xe7, + 0x00,0x00, + 0x79,0xf9, + 0x00,0x00, + 0xed,0x9d, + 0x00,0x00, + 0x05,0xe5, + 0x00,0x00, + 0x86,0x87, + 0x00,0x00, + 0x4c,0xcf, + 0x00,0x00, + 0x38,0xff, + 0x00,0x00, + 0xc3,0xff, + 0x00,0x00, + 0x81,0xff, + 0x00,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0x00,0x00, + 0x00,0xff, + 0x00,0x00, + 0x81,0xff, + 0x00,0x00, + 0xc3,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00, + 0xff,0xff, + 0x00,0x00 + }; + + +const uint8_t zgb_sushi_tiles_tile_pals[89] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +#include "TilesInfo.h" +const struct TilesInfo zgb_sushi_tiles = { + .num_frames=89, // num tiles + .data=zgb_sushi_tiles_tiles, // tiles + .num_pals=1, // num palettes + .pals=zgb_sushi_tiles_palettes, // palettes + .color_data=zgb_sushi_tiles_tile_pals, // tile palettes +}; diff --git a/gbdk-support/png2asset/testing/ref/zgb_sushi_tiles.h b/gbdk-support/png2asset/testing/ref/zgb_sushi_tiles.h @@ -0,0 +1,15 @@ +//AUTOGENERATED FILE FROM png2asset +#ifndef METASPRITE_zgb_sushi_tiles_H +#define METASPRITE_zgb_sushi_tiles_H + +#include <stdint.h> +#include <gbdk/platform.h> +#include <gbdk/metasprites.h> + +#include "TilesInfo.h" +#include "MapInfo.h" + +extern const struct TilesInfo zgb_sushi_tiles_tiles_info; +extern const struct MapInfo zgb_sushi_tiles; + +#endif diff --git a/gbdk-support/png2asset/testing/res/SMS/sushi_level07.png b/gbdk-support/png2asset/testing/res/SMS/sushi_level07.png Binary files differ. diff --git a/gbdk-support/png2asset/testing/res/SMS/sushi_objects.png b/gbdk-support/png2asset/testing/res/SMS/sushi_objects.png Binary files differ. diff --git a/gbdk-support/png2asset/testing/res/SMS/sushi_tiles.png b/gbdk-support/png2asset/testing/res/SMS/sushi_tiles.png Binary files differ.
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.