Jazz2::Compatibility::JJ2Strings class

Parses original .j2s localization files.

Reads an original localization file containing the shared and per-level text strings, recodes them from the original encoding, and writes the converted localization to the target path. Level names can be remapped through the supplied conversion callback.

Public types

struct LevelEntry
Texts for specific level.

Public static functions

static auto RecodeString(StringView text, bool stripFormatting = false, bool escaped = false) -> String
Recodes a string from the original encoding, optionally stripping formatting or escaping it.

Constructors, destructors, conversion operators

JJ2Strings()
Creates a new instance.
JJ2Strings(StringView name)
Creates a new instance with the specified name.

Public functions

auto Open(StringView path) -> bool
Opens and parses the specified localization file.
void Convert(StringView targetPath, Function<JJ2Level::LevelToken(StringView)>&& levelTokenConversion)
Converts the localization and writes the result to the specified target path.

Public variables

String Name
Name of the localization.
SmallVector<String, 0> CommonTexts
Texts shared across all levels.
SmallVector<LevelEntry, 0> LevelTexts
Per-level texts.