Skip to main content

roxlap_formats/
lib.rs

1//! Voxlap on-disk formats and data manipulation.
2//!
3//! Parsers for `.vxl` (heightmap + slab voxel columns), `.kv6` / `.kvx`
4//! (sprite voxel data), and `.kfa` (kv6 transform / animation). Lands
5//! across the R2.* sub-substages of `PORTING-RUST.md`:
6//!
7//! - R2.1: `.kvx`
8//! - R2.2: `.kv6`
9//! - R2.3: `.vxl`
10//! - R2.4: `.kfa`
11//!
12//! [`edit`] hosts voxel-edit primitives (delslab/insslab/expandrle/
13//! compilerle/`ScumCtx`) and high-level wrappers (`set_spans`,
14//! `set_cube`, `set_sphere`, `set_rect`). They live with the data
15//! they manipulate; rendering stays in `roxlap-core`.
16
17mod bytes;
18
19pub mod edit;
20/// Voxlap's `univec[256]` surface-normal direction table + the
21/// `normal → dir` quantiser ([`equivec::nearest_dir`]). Lives here (not
22/// roxlap-core) so [`kv6`] model builders can fill per-voxel `dir`
23/// without a circular dependency; roxlap-core re-exports it.
24pub mod equivec;
25pub mod kfa;
26pub mod kv6;
27pub mod kvx;
28pub mod palette;
29pub mod sprite;
30pub mod vxl;
31
32pub use palette::Rgb6;