2024-01-19 03:28:01 +00:00
|
|
|
use binrw::BinReaderExt;
|
|
|
|
|
2024-07-26 00:47:00 +00:00
|
|
|
#[derive(Debug)]
|
2024-01-16 03:09:34 +00:00
|
|
|
pub enum Error{
|
2024-01-19 00:39:58 +00:00
|
|
|
InvalidHeader,
|
2024-01-16 03:09:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
BLOCK_DEMO_HEADER:
|
2024-01-18 23:33:22 +00: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-16 03:09:34 +00:00
|
|
|
*/
|
|
|
|
|
2024-01-19 03:28:01 +00:00
|
|
|
pub struct StreamableDemo<R:BinReaderExt>{
|
|
|
|
map:Box<crate::map::StreamableMap<R>>,
|
|
|
|
bots:Vec<crate::bot::StreamableBot<R>>,
|
2024-01-19 00:39:58 +00:00
|
|
|
}
|
2024-01-19 03:28:01 +00:00
|
|
|
impl<R:BinReaderExt> StreamableDemo<R>{
|
|
|
|
pub(crate) fn new(file:crate::file::File<R>)->Result<Self,Error>{
|
2024-01-19 00:39:58 +00:00
|
|
|
Err(Error::InvalidHeader)
|
|
|
|
}
|
2024-07-26 00:47:00 +00:00
|
|
|
}
|