Skip to main content

plasma_prp/
lib.rs

1//! plasma-prp — Parser library for Plasma engine files (Myst Online: Uru Live).
2//!
3//! Reads and writes `.prp` (Plasma Resource Page), `.age`, `.sdl`, and `.fni` files.
4//! Zero engine dependencies — no GPU, audio, or physics.
5//!
6//! # Quick Start
7//! ```no_run
8//! use plasma_prp::resource::prp::{PrpPage, class_types};
9//! use plasma_prp::age::description::AgeDescription;
10//!
11//! // Load an age description
12//! let age = AgeDescription::from_file("Cleft.age".as_ref()).unwrap();
13//! println!("Age: {} ({} pages)", age.age_name, age.pages.len());
14//!
15//! // Load a PRP page
16//! let page = PrpPage::from_file("Cleft_District_Cleft.prp".as_ref()).unwrap();
17//! println!("{} objects", page.keys.len());
18//!
19//! // Access objects by type
20//! let drawables = page.keys_of_type(class_types::PL_DRAWABLE_SPANS);
21//! println!("{} drawable spans", drawables.len());
22//! ```
23
24pub mod age;
25pub mod animation;
26pub mod camera;
27pub mod core;
28pub mod lighting;
29pub mod material;
30pub mod rendering;
31pub mod resource;
32pub mod sdl;
33
34#[cfg(feature = "python")]
35mod python;
36
37// Re-export key types at crate root for convenience
38pub use core::class_index::ClassIndex;
39pub use core::load_mask::LoadMask;
40pub use core::location::Location;
41pub use core::uoid::Uoid;
42pub use resource::prp::{PlasmaRead, PlasmaWrite, PrpPage, PageHeader, ObjectKey};
43pub use age::description::AgeDescription;