nw::Tlk

struct Tlk

Public Functions

explicit Tlk(LanguageID language = LanguageID::english)
explicit Tlk(std::filesystem::path filename)
Tlk(const Tlk&) = delete
Tlk(Tlk&&) = default
String get(uint32_t strref) const

Get a localized string.

LanguageID language_id() const noexcept

Get language ID.

bool modified() const noexcept

Is Tlk modfied.

void save()

Write TLK to file.

void save_as(const std::filesystem::path &path)

Write TLK to file.

void set(uint32_t strref, StringView string)

Set a localized string.

size_t size() const noexcept

Get the number of tlk entries.

Note

This is equivalent to the highest string reference, not the number of actual strings

bool valid() const noexcept

Get if successfully parsed.

inline String operator[](uint32_t strref) const

Get a localized string.

Tlk &operator=(const Tlk&) = delete
Tlk &operator=(Tlk&&) = default

Public Static Attributes

static constexpr uint32_t custom_flag = 0x01000000