Porytiles
Loading...
Searching...
No Matches
porytiles2::TilesetArtifact Class Reference

Represents a Pokémon Generation III decomp tileset artifact with type and optional metadata. More...

#include <tileset_artifact.hpp>

Public Types

enum class  Type {
  bottom_png , middle_png , top_png , attributes_csv ,
  porytiles_anim_frame , pal_override_n , metatiles_bin , metatile_attributes_bin ,
  tiles_png , porymap_anim_frame , pal_n , config ,
  local_config
}
 Enumeration of all supported tileset artifact types. More...
 

Public Member Functions

 TilesetArtifact (const Type type)
 Constructs a tileset artifact with only a type.
 
 TilesetArtifact (const Type type, std::string name)
 Constructs a tileset artifact with a type and name.
 
 TilesetArtifact (const Type type, unsigned int index)
 Constructs a tileset artifact with a type and index.
 
 TilesetArtifact (const Type type, std::string name, int index)
 Constructs a tileset artifact with a type, name, and index.
 
Type type () const
 Gets the artifact type.
 
std::optional< std::string > name () const
 Gets the artifact name if present.
 
std::optional< unsigned int > index () const
 Gets the artifact index if present.
 

Detailed Description

Represents a Pokémon Generation III decomp tileset artifact with type and optional metadata.

A tileset artifact is a file or data component that belongs to a tileset. Each artifact has a specific type (such as PNG images, binary data, or CSV files) and may have optional metadata like a name (for animations) or index (for palette overrides or animation frames).

Examples:

Definition at line 21 of file tileset_artifact.hpp.

Member Enumeration Documentation

◆ Type

Enumeration of all supported tileset artifact types.

These types represent the various file formats and data components that make up a complete tileset. The artifacts fall into several categories:

  • Input images: bottom_png, middle_png, top_png (Porytiles source layers)
  • Configuration: attributes_csv (metatile attribute overrides)
  • Animations: porytiles_anim_frame, porymap_anim_frame
  • Palette data: override_n, pal_n
  • Output binaries: metatiles_bin, metatile_attributes_bin, tiles_png (Porymap-compatible formats)
Enumerator
bottom_png 

Bottom layer PNG input image.

middle_png 

Middle layer PNG input image.

top_png 

Top layer PNG input image.

attributes_csv 

CSV file containing metatile attribute overrides.

porytiles_anim_frame 

Animation frame PNG for Porytiles-format animation.

pal_override_n 

JASC palette override file.

metatiles_bin 

Metatile data output for Porymap.

metatile_attributes_bin 

Metatile attributes output for Porymap.

tiles_png 

Combined tile sheet PNG output for Porymap.

porymap_anim_frame 

Animation frame PNG for Porymap-format animation.

pal_n 

JASC palette data file.

config 
local_config 

Tileset configuration YAML file.

Local tileset configuration YAML file

Definition at line 35 of file tileset_artifact.hpp.

Constructor & Destructor Documentation

◆ TilesetArtifact() [1/4]

porytiles2::TilesetArtifact::TilesetArtifact ( const Type  type)
inlineexplicit

Constructs a tileset artifact with only a type.

Parameters
typeThe artifact type

Definition at line 57 of file tileset_artifact.hpp.

◆ TilesetArtifact() [2/4]

porytiles2::TilesetArtifact::TilesetArtifact ( const Type  type,
std::string  name 
)
inlineexplicit

Constructs a tileset artifact with a type and name.

Typically used for animation artifacts where the name identifies the animation (e.g., "water", "flowers").

Parameters
typeThe artifact type
nameThe name associated with the artifact

Definition at line 68 of file tileset_artifact.hpp.

◆ TilesetArtifact() [3/4]

porytiles2::TilesetArtifact::TilesetArtifact ( const Type  type,
unsigned int  index 
)
inlineexplicit

Constructs a tileset artifact with a type and index.

Typically used for indexed artifacts like palette overrides or animation frames.

Parameters
typeThe artifact type
indexThe index associated with the artifact

Definition at line 82 of file tileset_artifact.hpp.

◆ TilesetArtifact() [4/4]

porytiles2::TilesetArtifact::TilesetArtifact ( const Type  type,
std::string  name,
int  index 
)
inlineexplicit

Constructs a tileset artifact with a type, name, and index.

Used for artifacts that require both identification by name and indexing, such as specific frames within a named animation.

Parameters
typeThe artifact type
nameThe name associated with the artifact
indexThe index associated with the artifact

Definition at line 95 of file tileset_artifact.hpp.

Member Function Documentation

◆ index()

std::optional< unsigned int > porytiles2::TilesetArtifact::index ( ) const
inline

Gets the artifact index if present.

Returns
Optional index value, or nullopt if the artifact has no associated index

Definition at line 125 of file tileset_artifact.hpp.

◆ name()

std::optional< std::string > porytiles2::TilesetArtifact::name ( ) const
inline

Gets the artifact name if present.

Returns
Optional name string, or nullopt if the artifact has no associated name

Definition at line 115 of file tileset_artifact.hpp.

◆ type()

Type porytiles2::TilesetArtifact::type ( ) const
inline

Gets the artifact type.

Returns
The type of this artifact

Definition at line 105 of file tileset_artifact.hpp.


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