Jazz2::Formats::EventRecord struct

An event placed in a level.

Public static variables

static std::uint8_t NoParams constexpr
The parameters are all zero and aren't stored, derived by the writer.
static std::uint8_t Generator constexpr
The event is spawned by a generator, GeneratorFlags and GeneratorDelay are stored.
static std::uint8_t Illuminated constexpr
The object is illuminated.
static std::uint8_t Reserved constexpr
Reserved, 3.9.0 could write it with any meaning, so a reader drops it and a writer never sets it (see LevelFile).
static std::uint8_t Easy constexpr
The event is present in the easy difficulty.
static std::uint8_t Normal constexpr
The event is present in the normal difficulty.
static std::uint8_t Hard constexpr
The event is present in the hard difficulty.
static std::uint8_t DifficultyMask constexpr
Mask of all difficulties — an event of none of them is present in all of them.
static std::uint8_t MultiplayerOnly constexpr
The event is present only in multiplayer.
static std::int32_t OriginalParamsOffset constexpr
First of the last three bytes of Params, which a converted level keeps the 20 bits of parameters of the original event in.

Public functions

auto HasParams() const -> bool
Returns true if any parameter is non-zero.

Public variables

std::uint16_t Type
Event type (see EventType), raw so unknown types are kept.
std::uint8_t Flags
Event flags.
std::uint8_t GeneratorFlags
Generator flags, bit 0 means the first object is spawned only after the delay.
std::uint8_t GeneratorDelay
Generator delay in seconds.
std::uint8_t Params
Event parameters.

Variable documentation

static std::int32_t Jazz2::Formats::EventRecord::OriginalParamsOffset constexpr

First of the last three bytes of Params, which a converted level keeps the 20 bits of parameters of the original event in.

The game reads them of no event, only scripts of JJ2+ do, which keep data of their own in the bits of the parameters the game ignores. Not kept for an event that uses the bytes itself (see Compatibility::EventConverter::KeepOriginalParams()), nor by a level converted before 4.0.0.