Jazz2/Editor/Tools/EventTools.h file

Namespaces

namespace Jazz2
Root namespace of Jazz² Resurrection.
namespace Jazz2::Editor

Classes

class Jazz2::Editor::EventSelection
Selected events, of the event grid by their tiles and off the grid by their indices.
class Jazz2::Editor::EventTool
Places, selects, moves and erases events.

Functions

auto RemapLinkedIds(EventStamp& stamp, const LevelDocument& document) -> std::int32_t
Gives links that an event stamp has whole, as warps and triggers, an identifier the level doesn't use yet.
auto CopyOffGridEvents(const LevelDocument& document) -> SmallVector<Formats::OffGridEventRecord, 0>
Returns a copy of the events off the grid of a level, to be changed and set back as one step.

Function documentation

std::int32_t RemapLinkedIds(EventStamp& stamp, const LevelDocument& document)

Gives links that an event stamp has whole, as warps and triggers, an identifier the level doesn't use yet.

Links are those of the channels of the catalog (see EventParamField::LinkChannel), of the events of the stamp and of those inside of them. A link is whole with both a source and a target in the stamp, as a warp with its origin and its target, or a trigger with what changes it and the tiles it changes, or with more peers. A pasted copy of it then works on its own, while a part of a link keeps its identifier and joins the one in the level. Only identifiers the level uses already change, so calling it before each placement gives each copy its own. Returns the number of identifiers changed.