Formats namespace
The game's own level and tile set formats.
The only places that know the layout of a level or a tile set file — the converter of the original files, the game and the level editor all read and write them through these (see Level and tile set formats). The preview of a level is made here too (Jazz2::
Classes
- struct AnimatedTileRecord
- An animated tile.
- struct ChunkRecord
- Optional tagged data at the end of the body.
- struct EventRecord
- An event placed in a level.
- struct ExtraTileSetRecord
- Extra tile set used by a level.
- struct LayerPropertiesChunk
- Chunk with what the records of the layers have no room for.
- struct LayerRecord
- Description of a layer.
- struct LevelFile
- Layout of the game's own level format.
- struct LevelHeader
- Uncompressed header of a level file.
- struct LevelPreview
- Preview of a level shown in the list of custom levels, see LevelFile::
PreviewChunk. - struct LevelProperties
- Level properties, the first section of the body.
- class LevelReader
- Reads the body of a level, section by section.
- struct LevelSettingsChunk
- Chunk with the settings of a level that its properties have no room for.
- struct LevelTextsChunk
- Chunk with the texts of a level translated to other languages.
- class LevelWriter
- Writes a level, section by section.
- struct OffGridEventRecord
- An event placed at any position, not aligned to the tile grid.
- struct PaletteRecord
- Named palette of a level.
- struct ScriptDataChunk
- Chunk with the data of a level for its script.
- struct TexturedLayerParams
- Parameters of a textured layer that the color of its record has no room for.
- struct TileDiffuseOverride
- Tile with a diffuse overridden by the level.
- struct TileMaskOverride
- Tile with a collision mask overridden by the level.
- struct TileRecord
- A tile of a layer, or a frame of an animated tile.
- struct TileSetData
- A whole tile set as its file stores it.
- struct TileSetFile
- Layout of the game's own tile set format.
- struct TileSetHeader
- Uncompressed header of a tile set file.
- struct WeaponsChunk
- Chunk with the weapons of a level.
Enums
-
enum class LayerKind : std::
uint8_t { Other, Sky, Sprite } - Kind of a layer.
Functions
-
void WriteVarUint(SmallVectorImpl<std::
uint8_t>& data, std:: uint32_t value) - Appends a variable-length unsigned integer, as the chunks of a level store them.
-
auto ReadVarUint(const std::
uint8_t*& p, const std:: uint8_t* end, std:: uint32_t& value) -> bool - Reads a variable-length unsigned integer written by WriteVarUint() and moves past it.
Enum documentation
enum class Jazz2:: Formats:: LayerKind : std:: uint8_t
#include <Jazz2/Formats/LevelFile.h>
Kind of a layer.
| Enumerators | |
|---|---|
| Other |
Any other layer |
| Sky |
Sky layer of an original level (informational only) |
| Sprite |
The sprite (main) layer, where objects live and events are placed |
Function documentation
void Jazz2:: Formats:: WriteVarUint(SmallVectorImpl<std:: uint8_t>& data,
std:: uint32_t value)
#include <Jazz2/Formats/VarUint.h>
Appends a variable-length unsigned integer, as the chunks of a level store them.
7 bits a byte, the lowest ones first, the highest bit of a byte set if another byte follows.
bool Jazz2:: Formats:: ReadVarUint(const std:: uint8_t*& p,
const std:: uint8_t* end,
std:: uint32_t& value)
#include <Jazz2/Formats/VarUint.h>
Reads a variable-length unsigned integer written by WriteVarUint() and moves past it.
Returns false if it doesn't end before end, it's longer than 5 bytes, or its value doesn't fit 32 bits, as LevelReader rejects such a number in the body.