32 lines
565 B
Rust
Raw Normal View History

2024-01-18 19:28:01 -08:00
use binrw::BinReaderExt;
2024-07-25 17:47:00 -07:00
#[derive(Debug)]
2024-01-15 19:09:34 -08:00
pub enum Error{
2024-01-18 16:39:58 -08:00
InvalidHeader,
2024-01-15 19:09:34 -08:00
}
/*
BLOCK_DEMO_HEADER:
2024-01-18 15:33:22 -08:00
u128 map_resource_id
u64 map_header_block_id
u32 num_bots
for bot_id in 0..num_bots{
u128 bot_resource_id
u64 bot_header_block_id
}
//bot loading timeline
how to do worldstate for deathrun!?
2024-01-15 19:09:34 -08:00
*/
2024-01-18 19:28:01 -08:00
pub struct StreamableDemo<R:BinReaderExt>{
map:Box<crate::map::StreamableMap<R>>,
bots:Vec<crate::bot::StreamableBot<R>>,
2024-01-18 16:39:58 -08:00
}
2024-01-18 19:28:01 -08:00
impl<R:BinReaderExt> StreamableDemo<R>{
pub(crate) fn new(file:crate::file::File<R>)->Result<Self,Error>{
2024-01-18 16:39:58 -08:00
Err(Error::InvalidHeader)
}
2024-07-25 17:47:00 -07:00
}