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