1use std::collections::HashMap;
2
3#[derive(Clone, Debug, Default, Deserialize, Serialize)]
4#[serde(default)]
5pub struct Tileset {
6 pub name: String,
7 pub firstgid: u32,
8 pub tilecount: u32,
9 pub tileheight: u32,
10 pub tilewidth: u32,
11
12 pub columns: u32,
13 pub image: String,
14 pub imageheight: u32,
15 pub imagewidth: u32,
16 pub margin: u32,
17 pub spacing: u32,
18
19 pub properties: Option<HashMap<String, String>>,
20 pub terrains: Option<Vec<Terrain>>,
21 pub tileproperties: HashMap<u32, HashMap<String, String>>,
22 pub tiles: HashMap<u32, [u32; 4]>,
23}
24
25#[derive(Clone, Debug, Deserialize, Serialize)]
26pub struct Terrain {
27 pub name: String,
28 pub tile: u32,
29}