diff --git a/src/gd.rs b/src/gd.rs index 65dd1e2..7c134f7 100644 --- a/src/gd.rs +++ b/src/gd.rs @@ -3,17 +3,13 @@ use std::fs::File; use std::io::Read; use base64::engine::{general_purpose::URL_SAFE, Engine}; use flate2::read::GzDecoder; -use quick_xml::Reader; +use quick_xml::{Reader, events::Event}; struct User { name: String, id: Option, } -struct InnerLevel; // TODO: write this - -type Difficulty = u8; - enum Song { Official{id: i32 /*k8*/}, Newgrounds{id: i32 /*k45*/}, @@ -36,7 +32,6 @@ pub fn gd_path() -> PathBuf { path_buf } - struct LevelBuilder { name: Option, song: Option, @@ -82,9 +77,13 @@ fn get_levels() -> Vec { } plist }; - let reader = Reader::from_str(plist.as_ref()); + let mut reader = Reader::from_str(plist.as_ref()); let mut out = vec![]; loop { + let token = reader.read_event().unwrap(); + match token { + + } break out; } }