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.
§Shape of the file
Four count-led sections between beginlayout and donelayout: rooms,
tracks, obstacles and doorhooks. Each declares its entry count and the
entries follow as whitespace-separated fields. Doorhooks are the odd one,
carrying a quaternion as well as a position.
This parser reads more loosely than the engine. The engine skips only the
preamble before beginlayout, while this ignores any line it does not
recognise as a known count section, wherever it sits. The tolerance runs
one way. Output is canonical.
Text is decoded and encoded as Windows-1252. The grammar and the per-section
field lists are in docs/src/formats/text/lyt.md, with the engine’s own
parse sequence and its ordering requirement.
Structs§
- Lyt
- In-memory LYT layout.
- LytDoor
Hook - 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.