Porytiles
Loading...
Searching...
No Matches
porytiles::ProjectTilesetArtifactPaths Class Reference

Represents resolved filesystem paths for tileset artifacts from INCBIN declarations. More...

#include <project_tileset_artifact_paths.hpp>

Public Member Functions

 ProjectTilesetArtifactPaths (std::filesystem::path tiles_path, std::vector< std::filesystem::path > palette_paths, std::filesystem::path metatiles_path, std::filesystem::path metatile_attributes_path)
 Constructs TilesetArtifactPaths from resolved INCBIN paths.
 
const std::filesystem::path & tiles_path () const
 Returns the path to the tiles file.
 
const std::vector< std::filesystem::path > & palette_paths () const
 Returns all palette file paths.
 
const std::filesystem::path & metatiles_path () const
 Returns the path to the metatiles file.
 
const std::filesystem::path & metatile_attributes_path () const
 Returns the path to the metatile attributes file.
 

Detailed Description

Represents resolved filesystem paths for tileset artifacts from INCBIN declarations.

TilesetArtifactPaths holds the actual file paths extracted from INCBIN macro declarations in pokeemerald's graphics.h and metatiles.h files (and a few other assorted files):

// From graphics.h:
const u32 gTilesetTiles_General[] = INCBIN_U32("data/tilesets/primary/general/tiles.4bpp");
const u16 gTilesetPalettes_General[][16] = {
INCBIN_U16("data/tilesets/primary/general/palettes/00.gbapal"),
...
};
// From metatiles.h:
const u16 gMetatiles_General[] = INCBIN_U16("data/tilesets/primary/general/metatiles.bin");
const u16 gMetatileAttributes_General[] = INCBIN_U16("data/tilesets/primary/general/metatile_attributes.bin");

This domain model provides direct access to individual artifact paths.

Invariant
tiles_path_ is never empty
palette_paths_ contains at least one path
metatiles_path_ is never empty
metatile_attributes_path_ is never empty

Definition at line 34 of file project_tileset_artifact_paths.hpp.

Constructor & Destructor Documentation

◆ ProjectTilesetArtifactPaths()

porytiles::ProjectTilesetArtifactPaths::ProjectTilesetArtifactPaths ( std::filesystem::path  tiles_path,
std::vector< std::filesystem::path >  palette_paths,
std::filesystem::path  metatiles_path,
std::filesystem::path  metatile_attributes_path 
)
inline

Constructs TilesetArtifactPaths from resolved INCBIN paths.

Parameters
tiles_pathPath to tiles file (e.g., "data/tilesets/primary/general/tiles.4bpp")
palette_pathsPaths to palette files (e.g., [.../palettes/00.gbapal, ...])
metatiles_pathPath to metatiles file (e.g., "data/tilesets/primary/general/metatiles.bin")
metatile_attributes_pathPath to attributes file (e.g., ".../metatile_attributes.bin")

Definition at line 44 of file project_tileset_artifact_paths.hpp.

Member Function Documentation

◆ metatile_attributes_path()

const std::filesystem::path & porytiles::ProjectTilesetArtifactPaths::metatile_attributes_path ( ) const
inline

Returns the path to the metatile attributes file.

Returns
The attributes path (e.g., "data/tilesets/primary/general/metatile_attributes.bin")

Definition at line 89 of file project_tileset_artifact_paths.hpp.

◆ metatiles_path()

const std::filesystem::path & porytiles::ProjectTilesetArtifactPaths::metatiles_path ( ) const
inline

Returns the path to the metatiles file.

Returns
The metatiles path (e.g., "data/tilesets/primary/general/metatiles.bin")

Definition at line 79 of file project_tileset_artifact_paths.hpp.

◆ palette_paths()

const std::vector< std::filesystem::path > & porytiles::ProjectTilesetArtifactPaths::palette_paths ( ) const
inline

Returns all palette file paths.

Returns
Vector of palette paths (typically 16 entries)

Definition at line 69 of file project_tileset_artifact_paths.hpp.

◆ tiles_path()

const std::filesystem::path & porytiles::ProjectTilesetArtifactPaths::tiles_path ( ) const
inline

Returns the path to the tiles file.

Returns
The tiles path (e.g., "data/tilesets/primary/general/tiles.4bpp")

Definition at line 59 of file project_tileset_artifact_paths.hpp.


The documentation for this class was generated from the following file: