1use std::fs::File;
2use std::env;
3
4use wgtk::space::CompiledSpace;
5use wgtk::space::section::{BWST, BWAL, BWCS, BWSG, BWT2};
6
7
8fn main() {
9
10 let path = env::var("WGT_SPACE_PATH").unwrap();
11 let file = File::open(path).unwrap();
12
13 let mut space = CompiledSpace::new(file).unwrap();
14
15 for section in &space.bwtb.sections {
16 println!("- {:?}", section);
17 }
18
19 let bwst: BWST = space.decode_section().unwrap();
20 let bwal: BWAL = space.decode_section().unwrap();
21 let bwcs: BWCS = space.decode_section().unwrap();
22 let bwsg: BWSG = space.decode_section().unwrap();
23 let bwt2: BWT2 = space.decode_section().unwrap();
24
25 for chunk in &bwt2.chunks {
26 println!("[{}/{}] {:?}", chunk.loc_x, chunk.loc_y, bwst.get_string(chunk.resource_fnv));
27 }
28
29}