EventParamField struct
#include <Jazz2/Editor/Events/EventCatalog.h>
Parameter of an event, a value stored in the 16 bytes of parameters of the event.
A value takes Bits bits, starting at the bit Shift of the little-endian value at the byte Offset. A value of up to 8 bits is in one byte, up to 16 bits in two bytes, and up to 32 bits in four bytes.
Public functions
- auto WithUnit(ParamUnit unit) const -> EventParamField constexpr
- Returns the field with a unit.
- auto WithDescription(CatalogText description) const -> EventParamField constexpr
- Returns the field with a description.
-
auto WithDefault(std::
int32_t defaultValue) const -> EventParamField constexpr - Returns the field with a default value.
-
auto ShowIf(std::
int8_t field, std:: int32_t value) const -> EventParamField constexpr - Returns the field shown only while another one, by its index, has a value.
-
auto ShowIfNot(std::
int8_t field, std:: int32_t value) const -> EventParamField constexpr - Returns the field shown only while another one, by its index, doesn't have a value.
- auto Hide() const -> EventParamField constexpr
- Returns the field never shown, its value is kept.
- auto AsWeapon() const -> EventParamField constexpr
- Returns the field whose value is a weapon, see IsWeapon.
-
auto WithScale(std::
int32_t scale) const -> EventParamField constexpr - Returns the field shown multiplied by a scale.
-
auto MirroredX(MirrorMode mode,
std::
int8_t otherField = -1) const -> EventParamField constexpr - Returns the field changed by mirroring the event horizontally.
-
template<std::auto MirroredXPairs(const std::
size_t N> int32_t(&pairs)[N]) const -> EventParamField constexpr - Returns the field whose values are swapped in pairs by mirroring the event horizontally.
-
auto MirroredY(MirrorMode mode,
std::
int8_t otherField = -1) const -> EventParamField constexpr - Returns the field changed by mirroring the event vertically.
-
template<std::auto MirroredYPairs(const std::
size_t N> int32_t(&pairs)[N]) const -> EventParamField constexpr - Returns the field whose values are swapped in pairs by mirroring the event vertically.
- auto AsTeam() const -> EventParamField constexpr
- Returns the field marked as a team.
-
auto WithGizmo(FieldGizmo gizmo,
std::
int16_t step = 1) const -> EventParamField constexpr - Returns the field with a handle in the level,
steppixels for a unit. - auto WithLink(const char* channel, EventLinkRole role) const -> EventParamField constexpr
- Returns the field linking the event to others with the same value in a channel.
-
auto WithDirection(DirectionAxis axis,
bool negative = false,
std::
uint8_t group = 0) const -> EventParamField constexpr - Returns the field pointing an arrow along an axis, values of the same group are summed.
Public variables
- const char* Name
- Name shown to the user, see CatalogText.
- ParamType Type
- How the value is edited.
-
std::
uint8_t Offset - Byte the value starts at.
-
std::
uint8_t Bits - Number of bits of the value.
-
std::
uint8_t Shift - First bit of the value.
- bool Signed
- Whether the value is signed.
-
std::
int32_t Min - Smallest value.
-
std::
int32_t Max - Largest value.
-
std::
int32_t Default - Value of a new event.
- const ParamOption* Options
- Options of an enumeration or flags.
-
std::
uint8_t OptionCount - Number of options.
- ParamUnit Unit
- Unit.
- const char* Description
- Description shown as a tooltip, see CatalogText, may be
nullptr. -
std::
int8_t VisibleIfField - Index of the field whose value decides whether this one is shown, -1 for always, see EventCatalog::
IsFieldVisible(). - FieldCondition VisibleIfMode
- How the value of VisibleIfField is compared with VisibleIfValue.
-
std::
int32_t VisibleIfValue - Value the one of VisibleIfField is compared with, a mask of bits for FieldCondition::AnyBits.
- bool Hidden
- Never shown, the value is only kept as it is.
-
std::
int32_t DisplayScale - The value is shown multiplied by this, the steps of a bridge as pixels, see EventCatalog::
ToDisplayValue(). -
std::
int8_t ContentsTypeField - Of ParamType::Contents, index of the field with the type of the event inside.
- FieldMirror MirrorX
- What mirroring the event horizontally does to the value.
- FieldMirror MirrorY
- What mirroring the event vertically does to the value.
- bool IsTeam
- The value is a team, see EventCatalog::
SwapTeamParams(). - FieldGizmo Gizmo
- Handle in the level that changes the value.
-
std::
int16_t GizmoStep - Pixels of the level a unit of the value takes for its handle.
- const char* LinkChannel
- Events with the same value of a field of the same channel are linked,
nullptrfor none. - EventLinkRole LinkRole
- What the event is in its links.
- DirectionAxis Direction
- Axis the value points an arrow along.
- bool DirectionNegative
- Whether a positive value points the other way along the axis.
-
std::
uint8_t DirectionGroup - Arrow the value adds to, the values of an arrow are summed up — a belt, an accelerating belt and a wind.
- bool IsWeapon
- The value is a WeaponType, its options are shown by the names the level gives its weapons.