|
Porytiles
|
Stores manifest metadata for Porytiles-managed tilesets. More...
#include <tileset_manifest.hpp>
Public Member Functions | |
| TilesetManifest ()=default | |
| TilesetManifest (std::uint32_t version, std::string tiles, std::string palettes, std::string metatiles, std::string metatile_attributes, std::string callback) | |
| Constructs a TilesetManifest for an imported tileset with all original field values. | |
| std::uint32_t | version () const |
| Returns the schema version for format migration support. | |
| bool | imported () const |
| Returns whether this tileset was imported from vanilla pokeemerald. | |
| const std::string & | tiles () const |
Returns the original .tiles field value. | |
| const std::string & | palettes () const |
Returns the original .palettes field value. | |
| const std::string & | metatiles () const |
Returns the original .metatiles field value. | |
| const std::string & | metatile_attributes () const |
Returns the original .metatileAttributes field value. | |
| const std::string & | callback () const |
Returns the original .callback field value. | |
Static Public Member Functions | |
| static TilesetManifest | for_created_tileset (std::uint32_t version) |
| Creates a TilesetManifest for a tileset created from scratch by Porytiles. | |
Stores manifest metadata for Porytiles-managed tilesets.
This class represents the contents of tileset-manifest.json, which is the source of truth for whether a tileset is Porytiles-managed. The presence of this file in porytiles/tilesets/{tileset_name}/ indicates the tileset is managed by Porytiles.
Two cases are supported:
imported()==true): The tileset was imported from vanilla pokeemerald. The original field values from src/data/tilesets/headers.h are stored, enabling the restore-tileset command to revert to vanilla.imported()==false): The tileset was created from scratch by Porytiles. There are no original values to restore, so restore-tileset will error with a clear message.imported()==true, all original field values (tiles, palettes, etc.) are non-empty imported()==false, original field values are empty strings and should not be used Definition at line 25 of file tileset_manifest.hpp.
|
default |
|
inline |
Constructs a TilesetManifest for an imported tileset with all original field values.
| version | Schema version for future format migrations |
| tiles | Original .tiles field value (e.g., "gTilesetTiles_General") |
| palettes | Original .palettes field value (e.g., "gTilesetPalettes_General") |
| metatiles | Original .metatiles field value (e.g., "gMetatiles_General") |
| metatile_attributes | Original .metatileAttributes field value |
| callback | Original .callback field value (e.g., "InitTilesetAnim_General") |
imported() returns true Definition at line 40 of file tileset_manifest.hpp.
|
inline |
Returns the original .callback field value.
imported() should be true for this value to be meaningful Definition at line 136 of file tileset_manifest.hpp.
|
inlinestatic |
Creates a TilesetManifest for a tileset created from scratch by Porytiles.
Use this factory method when creating a new tileset that doesn't originate from vanilla pokeemerald. The resulting object will have imported()==false and empty original field values.
| version | Schema version for future format migrations |
imported()==false Definition at line 63 of file tileset_manifest.hpp.
|
inline |
Returns whether this tileset was imported from vanilla pokeemerald.
When true, the original field values are meaningful and can be used for restoration. When false, the tileset was created by Porytiles and cannot be restored to vanilla.
Definition at line 86 of file tileset_manifest.hpp.
|
inline |
Returns the original .metatileAttributes field value.
imported() should be true for this value to be meaningful Definition at line 126 of file tileset_manifest.hpp.
|
inline |
Returns the original .metatiles field value.
imported() should be true for this value to be meaningful Definition at line 116 of file tileset_manifest.hpp.
|
inline |
Returns the original .palettes field value.
imported() should be true for this value to be meaningful Definition at line 106 of file tileset_manifest.hpp.
|
inline |
Returns the original .tiles field value.
imported() should be true for this value to be meaningful Definition at line 96 of file tileset_manifest.hpp.
|
inline |
Returns the schema version for format migration support.
Definition at line 74 of file tileset_manifest.hpp.