This commit is contained in:
Robin Appelman 2020-01-31 21:58:00 +01:00
commit cf385c207d
4 changed files with 10 additions and 20 deletions

View file

@ -45,9 +45,9 @@ impl From<World> for WorldBoundaries {
#[wasm_bindgen]
pub struct FlatState {
player_count: usize,
pub player_count: usize,
pub boundaries: WorldBoundaries,
data: Box<[u8]>,
boundaries: WorldBoundaries,
}
impl FlatState {
@ -70,16 +70,6 @@ pub fn parse_demo(buffer: Box<[u8]>) -> Result<FlatState, JsValue> {
Ok(FlatState::new(parsed, world))
}
#[wasm_bindgen]
pub fn get_boundaries(state: &FlatState) -> WorldBoundaries {
state.boundaries.clone()
}
#[wasm_bindgen]
pub fn get_player_count(state: &FlatState) -> usize {
state.player_count
}
#[wasm_bindgen]
pub fn get_data(state: FlatState) -> Box<[u8]> {
state.data