|
Porytiles
|
Provides a filesystem-based implementation for TilesetArtifactReader. More...
#include <project_tileset_artifact_reader.hpp>
Public Member Functions | |
| ProjectTilesetArtifactReader (gsl::not_null< PngRgbaImageLoader * > png_rgba_loader, gsl::not_null< PngIndexedImageLoader * > png_indexed_loader, gsl::not_null< FilePalLoader * > pal_loader) | |
| ChainableResult< void > | read (Tileset &dest, const ArtifactKey &src_key, const TilesetArtifact &artifact) const override |
| Reads an artifact from the backing store and updates the target Tileset. | |
Public Member Functions inherited from porytiles2::TilesetArtifactReader | |
| virtual | ~TilesetArtifactReader ()=default |
Provides a filesystem-based implementation for TilesetArtifactReader.
This class implements the TilesetArtifactReader interface to provide reading functionality for tileset artifacts. It operates within the context of a Pokémon Gen III decompilation project on the local filesystem.
Definition at line 23 of file project_tileset_artifact_reader.hpp.
|
inline |
Definition at line 25 of file project_tileset_artifact_reader.hpp.
|
overridevirtual |
Reads an artifact from the backing store and updates the target Tileset.
This method reads the specified artifact from the backing store location identified by the src_key and updates the appropriate fields or components within the destination Tileset object. The TilesetArtifact parameter specifies the type and metadata needed to determine how to read and where to store the data. The implementation should handle parsing the specific artifact format (PNG images, binary data, CSV files, etc.) and updating the correct Tileset components (Porymap or Porytiles components, palettes, animations, etc.).
Precondition: the TilesetRepo checks that src_key actually exists before performing a read. Thus, the TilesetArtifactReader's read method can assume the specified artifact really does exist. If the artifact does not exist, the result is implementation-defined but will probably panic.
| dest | The Tileset object to be updated with the read artifact data |
| src_key | The ArtifactKey identifying the artifact location in the backing store |
| artifact | The TilesetArtifact specification including type and optional metadata |
Implements porytiles2::TilesetArtifactReader.
Definition at line 181 of file project_tileset_artifact_reader.cpp.