Jazz2::Formats::LayerPropertiesChunk::Entry struct

Properties of one layer.

Public static functions

static auto FromRecord(std::uint32_t layer, const LayerRecord& record, StringView name, ArrayView<const std::uint8_t> texture) -> Entry
Makes the entry of a layer of the given index in file order.

Public functions

void ApplyTo(LayerRecord& record) const
Puts the properties the record keeps into it, how the sprite layer is drawn only into a record of the sprite layer.
auto IsDefault() const -> bool
Returns true if every property has its default, such an entry isn't written.

Public variables

std::uint32_t Layer
Index of the layer in file order.
String Name
Name of the layer, empty if it has none.
std::uint8_t OriginalNumber
See LayerRecord::OriginalNumber.
bool HasSpriteLook
Whether RendererType and Color are stored, only for the sprite layer drawn otherwise than as ordinary tiles.
std::uint8_t RendererType
See LayerRecord::RendererType.
std::uint8_t Color
See LayerRecord::Color.
TexturedLayerParams Textured
See LayerRecord::Textured.
SmallVector<std::uint8_t, 0> Texture
Texture of its own, TextureSize × TextureSize palette indices row by row.
std::uint8_t Blend
See LayerRecord::Blend.
std::uint8_t BlendParam
See LayerRecord::BlendParam.

Variable documentation

SmallVector<std::uint8_t, 0> Jazz2::Formats::LayerPropertiesChunk::Entry::Texture

Texture of its own, TextureSize × TextureSize palette indices row by row.

The 8×8 tiles at the top left of the layer are its texture if it's empty, as TEXTURE::FROMTILES of JJ2+. A layer of JJ2+ with one of its own textures, or with an image of its own, has it here. It stays indexed, so it follows changes of the palette as the tiles do.