Jazz2::Compatibility::AssetConverter class

Converts original Jazz Jackrabbit 2 data into the formats the game loads.

The same conversion the game performs on its first run, factored out so it can also be driven offline by the AssetPacker tool. Everything is expressed in terms of an input and an output directory, so it does not depend on the resource cache (and through it, on the renderer).

Public types

struct ConversionOptions
What is converted out of the source directory, and what of it is carried over.
enum class Result { Success, CannotWriteTarget, UnsupportedVersion }
Outcome of converting the source assets.

Public static functions

static auto ConvertSourceAssets(StringView animsPath, StringView sourcePath, StringView targetPath, JJ2Version& version) -> Result
Converts.
static void ConvertLevels(StringView sourcePath, StringView targetPath, bool recreateAll)
Converts every episode, level and used tileset into the output directory.
static void ConvertLevels(StringView sourcePath, StringView targetPath, bool recreateAll, const ConversionOptions& options)
Converts the episodes, levels and used tilesets that options allow into the output directory.

Enum documentation

enum class Jazz2::Compatibility::AssetConverter::Result

Outcome of converting the source assets.

Enumerators
Success

Everything was converted

CannotWriteTarget

The output .pak file could not be opened for writing

UnsupportedVersion

The provided Jazz Jackrabbit 2 version is not supported

Function documentation

static Result Jazz2::Compatibility::AssetConverter::ConvertSourceAssets(StringView animsPath, StringView sourcePath, StringView targetPath, JJ2Version& version)

Converts.

Anims.j2a (and Data.j2d, if present) into Source.pak