Module lyt

Module lyt 

Source
Expand description

LYT ASCII layout support. LYT ASCII reader and writer.

LYT (layout) resources describe room placement and optional track/obstacle props for a module.

§Format Layout

beginlayout
  roomcount <N>
    <room_model> <x> <y> <z>
  trackcount <N>
    <track_model> <x> <y> <z>
  obstaclecount <N>
    <obstacle_model> <x> <y> <z>
  doorhookcount <N>
    <room_name> <door_name> <reserved> <x> <y> <z> <qx> <qy> <qz> <qw>
donelayout

The parser ignores non-section lines (such as comments and dependency metadata) and only consumes known count sections. Text is decoded/encoded as Windows-1252.

Structs§

Lyt
In-memory LYT layout.
LytDoorHook
One door-hook entry in a LYT layout.
LytObstacle
One obstacle entry in a LYT layout.
LytRoom
One room entry in a LYT layout.
LytTrack
One track entry in a LYT layout.
Quaternion
Quaternion value used by LYT door-hook orientation.
Vec3
Three-dimensional vector value used by LYT entries.

Enums§

LytError
Errors produced while parsing or serializing LYT ASCII data.

Functions§

read_lyt
Reads a LYT layout from a reader.
read_lyt_from_bytes
Reads a LYT layout from bytes.
write_lyt
Writes a LYT layout to a writer.
write_lyt_to_vec
Serializes a LYT layout to bytes.