ContentTileSetLibrary class
Tile set library of the game content.
Finds tile sets the same way the game does — in the user content, the content and the cache — and reads only what it's asked for.
Base classes
- class ITileSetLibrary
- Provides information about tile sets to a level being edited.
Public static functions
- static auto FindTileSetFile(StringView name) -> String
- Returns the path of a tile set file, or an empty string if it doesn't exist.
- static auto GetWritablePath(StringView name, bool create) -> String
- Returns the path a tile set made in the editor is saved to, in the user content.
- static auto IsValidName(StringView name) -> bool
- Returns
trueif a name can be the name of a tile set, lowercase letters, digits, dashes and underscores.
Public functions
-
auto GetTileCount(StringView name) -> std::
int32_t override - Returns the number of tiles of a tile set (a path relative to
Tilesets/), or -1 if it doesn't exist. -
auto ReadPalette(StringView name,
std::
uint32_t(&palette)[256]) -> bool - Reads the palette of a tile set, returns
falseif it doesn't exist or has none. - void Invalidate()
- Forgets everything read so far, so changed tile sets are read again.
Function documentation
static String Jazz2:: Editor:: ContentTileSetLibrary:: GetWritablePath(StringView name,
bool create)
Returns the path a tile set made in the editor is saved to, in the user content.
Creates its directory if create is true. Returns an empty string if there's no place to save to.