Expand description
A parser for Goldsource demo files (this includes Half-Life and its mods) written in Rust using nom.
Supports parsing demos completely as well as just header and directory when the frame data isn’t needed. Exports both raw nom parsing functions and wrappers which hide all nom-related types and provide convenient errors.
§Examples
Check the examples
folder for more complete program examples which output various data from
demos.
extern crate hldemo;
use std::fs::File;
use std::io::Read;
let mut bytes = Vec::new();
let mut f = File::open("demo.dem")?;
f.read_to_end(&mut bytes);
let demo = hldemo::Demo::parse(&bytes)?;
Modules§
- errors
- An error type wrapping nom’s parsing errors and some glue between the two.
- parse
- Nom parsing functions for demo parsing.
Structs§
- Client
Data Data - Console
Command Data - Demo
- A Goldsource demo.
- Demo
Buffer Data - Directory
- Directory
Entry - Event
Args - Event
Data - Frame
- Header
- Move
Vars - NetMsg
Data - NetMsg
Info - RefParams
- Sound
Data - UserCmd
- Weapon
Anim Data