Skip to main content

Module outputs

Module outputs 

Source
Expand description

The named values a MilkDrop program hands back, as one table (Plan 0100 Phase 4).

§Why this is a macro

There are forty-odd of them, and each needs the same four things: a field on a struct the scene reads, an EEL2 name, a default the host seeds before the program runs, and whether it is a per-frame rate that has to be converted to this engine’s per-second vocabulary. Written by hand that is four parallel lists, and the failure mode of four parallel lists is a value that silently reads its neighbour — the exact defect expr.rs’s slot-base assertion exists to catch one axis of.

So the table below is the single source, and the macro derives all four from it. Adding an output is one line, in one place, and it cannot be half-added.

§What is not here

The nine warp outputs (zoom, rot, cx, cy, dx, dy, sx, sy, warp) are not, and deliberately: they are also read per vertex, where these are per frame only, and they are positionally tied to warp_mesh::PER_VERTEX_PARAMS in a way a struct of named fields would obscure rather than clarify.

Structs§

FrameOutputs
The values a program left in its output registers this frame, already converted out of MilkDrop’s per-frame vocabulary where that applies.
FrameSlots
The resolved register index of each field, or None for one the program never mentions. Built once at load.
ShapeInstance
The values a program left in its output registers this frame, already converted out of MilkDrop’s per-frame vocabulary where that applies.
ShapeInstanceSlots
The resolved register index of each field, or None for one the program never mentions. Built once at load.
WavePoint
The values a program left in its output registers this frame, already converted out of MilkDrop’s per-frame vocabulary where that applies.
WavePointSlots
The resolved register index of each field, or None for one the program never mentions. Built once at load.

Enums§

Rate
How a per-frame output converts to this engine’s per-second vocabulary.

Constants§

FRAME_OUTPUT_NAMES
Every field’s EEL2 name, in field order. Read by the converter’s roster check, so a name here and a name there cannot drift.
SHAPE_INSTANCE_NAMES
Every field’s EEL2 name, in field order. Read by the converter’s roster check, so a name here and a name there cannot drift.
WAVE_POINT_NAMES
Every field’s EEL2 name, in field order. Read by the converter’s roster check, so a name here and a name there cannot drift.