|
Porytiles
|
Infra-layer implementation of PrimaryTilesetImporter for pokeemerald project structure. More...
#include <project_primary_tileset_importer.hpp>
Public Member Functions | |
| ProjectPrimaryTilesetImporter (std::filesystem::path project_root, std::size_t metatile_attr_size, gsl::not_null< const DomainConfig * > config, gsl::not_null< const TextFormatter * > format, gsl::not_null< const UserDiagnostics * > diag, gsl::not_null< const TilePrinter * > tile_printer, gsl::not_null< const PalettePrinter * > pal_printer, gsl::not_null< const ProjectTilesetMetadataProvider * > metadata_provider, gsl::not_null< const PngIndexedImageLoader * > png_loader, gsl::not_null< const FilePalLoader * > pal_loader) | |
| Constructs a ProjectPrimaryTilesetImporter with required dependencies. | |
| ChainableResult< std::unique_ptr< PorymapTilesetComponent > > | import_porymap_component_from_vanilla (const std::string &tileset_name) const override |
| Reads vanilla Porymap artifacts from a pokeemerald project into a PorymapTilesetComponent. | |
Public Member Functions inherited from porytiles::PrimaryTilesetImporter | |
| virtual | ~PrimaryTilesetImporter ()=default |
Infra-layer implementation of PrimaryTilesetImporter for pokeemerald project structure.
This class provides the pokeemerald-specific implementation for importing vanilla tilesets. It reads tileset artifacts from the standard pokeemerald project directory structure:
src/data/tilesets/headers.h - Tileset struct declarations with INCBIN variable referencessrc/data/tilesets/graphics.h - INCBIN declarations for tiles and palettessrc/data/tilesets/metatiles.h - INCBIN declarations for metatiles and attributessrc/tileset_anims.c - Animation callback implementations and frame INCBIN declarationsdata/tilesets/{primary,secondary}/{name}/ - Actual PNG/binary assetsThe import process parses C header files to discover asset locations (which may be scattered across different paths due to INCBIN flexibility), then reads and populates a PorymapTilesetComponent with all the data needed for decompilation.
Definition at line 37 of file project_primary_tileset_importer.hpp.
|
inlineexplicit |
Constructs a ProjectPrimaryTilesetImporter with required dependencies.
| project_root | Path to the pokeemerald project root directory |
| metatile_attr_size | Bytes per metatile attribute entry (2 for Emerald-family, 4 for FireRed) |
| config | Domain configuration containing tileset parameters and paths |
| format | Text formatter for error message styling |
| diag | User diagnostics for warnings and informational messages |
| tile_printer | Tile visualization service for diagnostic output |
| pal_printer | Palette visualization service for diagnostic output |
| metadata_provider | Provider for resolving tileset metadata and artifact paths |
| png_loader | Loader for indexed PNG files (tiles.png) |
| pal_loader | Loader for palette files |
Definition at line 53 of file project_primary_tileset_importer.hpp.
|
overridevirtual |
Reads vanilla Porymap artifacts from a pokeemerald project into a PorymapTilesetComponent.
This implementation:
src/data/tilesets/headers.h to get tileset metadata (isSecondary, INCBIN variable names)src/data/tilesets/graphics.h and metatiles.h to resolve INCBIN paths to actual filestiles.png, palettes, metatiles.bin, and metatile_attributes.bin from discovered pathstileset_anims.c INCBIN declarations| tileset_name | The name of the tileset to import (e.g., "gTileset_General") |
Implements porytiles::PrimaryTilesetImporter.
Definition at line 14 of file project_primary_tileset_importer.cpp.