diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..ee455d9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,34 @@ +use anyhow::anyhow; +use rgb::RGBA; + +use std::io::prelude::*; +use std::io::BufReader; +use std::{fs::File, usize}; + +mod lowlevel; + +fn main1() -> anyhow::Result<()> { + let file = File::open("./testing_data/tiled_examples/desert.tmx")?; + let mut reader = BufReader::new(file); + + let mut string = "".to_owned(); + reader.read_to_string(&mut string)?; + + println!("{}", string); + + let doc = roxmltree::Document::parse(&string)?; + + for t in doc.root().children().enumerate() { + println!("{:?}", t); + } + + let map = lowlevel::map::Map::from_xml(doc); + + Ok(()) +} + +fn main() { + println!("{:?}", main1()); +} + +// https://doc.mapeditor.org/en/stable/reference/tmx-map-format/#tileset |