ddnet/src/game/mapitems_ex_types.h
Robert Müller 4ae0928b47 Support bezier envelope curves in maps and editor
Port map and editor support for `CURVETYPE_BEZIER` from upstream, i.e. support bezier curves with configurable in- and out-tangents for every envelope point.

The in- and out-tangents are represented by triangles and can be dragged in the envelope editor like the envelope points.

Support reading and writing the bezier information as a separate UUID-based map item. If the bezier information is not found, bezier will default to linear behavior. Old clients will still be able to read the new maps and ignore the unknown map item. The unknown curvetype will also be handled as linear by old clients.

Allow reading upstream maps that use `CMapItemEnvelope` version 3. On upstream, a different struct is used to store all envelope points including bezier information, which broke compatibility to old clients.

Fix holding Ctrl for slow envelope point editing not working for vertical movement.

Highlight the currently selected element (envelope point or bezier tangent marker) which is being used with the value/time edit boxes.

Hide the value/time edit boxes when no element is selected.
2023-07-16 12:46:34 +02:00

7 lines
308 B
C

// This file can be included several times.
UUID(MAPITEMTYPE_TEST, "mapitemtype-test@ddnet.tw")
UUID(MAPITEMTYPE_AUTOMAPPER_CONFIG, "mapitemtype-automapper-config@ddnet.tw")
UUID(MAPITEMTYPE_GROUP_EX, "mapitemtype-group@ddnet.tw")
UUID(MAPITEMTYPE_ENVPOINTS_BEZIER, "mapitemtype-envpoints-bezier@ddnet.tw")