1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! TCM format parser for Geometry Dash bot replays.
//!
//! This library supports both TCM v1 and v2 formats with auto-detection capabilities.
//!
//! # Quick Start
//!
//! ## Auto-Detection (Recommended)
//!
//! ```rust
//! use tcm::{DynamicReplay, meta::Meta};
//! use std::fs::File;
//! use std::io::BufReader;
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let file = File::open("examples/data/restartv1.tcm")?;
//! let mut reader = BufReader::new(file);
//! let replay = DynamicReplay::from_reader(&mut reader)?;
//!
//! println!("TCM v{} - TPS: {}", replay.meta.version_instance(), replay.meta.tps());
//! # Ok(())
//! # }
//! ```
//!
//! ## Type-Specific Usage
//!
//! ```rust
//! use tcm::{meta::{Meta, MetaV2}, replay::{Replay, ReplayDeserializer}};
//!
//! let replay = Replay::<MetaV2>::new_empty(240.0);
//! println!("TPS: {}", replay.meta.tps());
//! ```
pub type Frame = u64;
// Re-export key types for convenience
pub use ;