Expand description
MDL binary writer. MDL binary writer.
Serializes an Mdl struct back into the binary MDL+MDX format used by
the Odyssey engine. The writer uses a single-pass cursor approach: it
reserves placeholder space for headers and arrays, writes child data
forward, then backpatches pointers and counts using seek-back helpers.
MDX vertex data is written separately via write_mdl_with_mdx_to_vec or
deferred to a second buffer. Non-skin meshes are emitted first (DFS order),
then skin meshes (DFS order), matching the vanilla engine layout.
Functionsยง
- write_
mdl - Writes an MDL file structure to a writer.
- write_
mdl_ to_ vec - Writes an MDL file structure to a byte vector.
- write_
mdl_ with_ mdx_ to_ vec - Writes an MDL model and its companion MDX vertex data to byte vectors.