nw::Palette

struct Palette

Public Functions

Palette()
explicit Palette(const Gff &gff)
~Palette()
PaletteTreeNode *add_branch(String name, uint32_t strref)

Add branch node to root.

PaletteTreeNode *add_category(String name, uint32_t strref, int id = -1)

Add category to root.

PaletteTreeNode *make_node()

Makes a node and adds it to root.

bool is_skeleton() const noexcept
inline bool valid() const noexcept
void from_json(const nlohmann::json &archive)
nlohmann::json to_json() const

Public Members

Vector<PaletteTreeNode*> children
ResourceType::type resource_type = nw::ResourceType::invalid
Resref tileset
uint8_t next_id_ = 0
bool is_valid_ = false
ObjectPool<PaletteTreeNode> node_pool_
absl::flat_hash_map<uint8_t, PaletteTreeNode*> node_map_

Public Static Attributes

static constexpr int json_archive_version = 1
static constexpr ResourceType::type restype = ResourceType::utc
static constexpr StringView serial_id = {"ITP"}