mirror of
https://github.com/bvanroll/pokevault.git
synced 2025-08-28 11:32:47 +00:00
have to debug from_utf8 stuff. :/
This commit is contained in:
@@ -1 +1,7 @@
|
||||
# pokevault
|
||||
# pokevault
|
||||
|
||||
## save files
|
||||
|
||||
### yellow
|
||||
for pokemon yellow, this legend has created a bunch of save files and documented his journey doing so. Got it from him:
|
||||
https://www.youtube.com/watch?v=hdUopla7T1E
|
BIN
main/saves/yellow_surfing_test.sav
Normal file
BIN
main/saves/yellow_surfing_test.sav
Normal file
Binary file not shown.
4
main/src/saves.rs
Normal file
4
main/src/saves.rs
Normal file
@@ -0,0 +1,4 @@
|
||||
pub struct Save {
|
||||
pub(crate) trainer_name: String,
|
||||
pub(crate) playtime_hours: u8 //in seconds, biggest number should be like 4.3 mill, biggest available time (999:95) is like... 3.6 mill, maybe a little more. 3.7 max
|
||||
}
|
23
main/src/test.rs
Normal file
23
main/src/test.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use std::env;
|
||||
use std::path::Path;
|
||||
use crate::{read_save, Save};
|
||||
|
||||
#[test]
|
||||
fn basic_test() {
|
||||
assert!(true)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_name() {
|
||||
let path = env::current_dir().unwrap();
|
||||
println!("The current dir: {}", path.display());
|
||||
println!("testing the savegames name");
|
||||
let s: Save = read_save(Path::new("saves/yellow_surfing_test.sav")).unwrap();
|
||||
println!("{}", s.trainer_name);
|
||||
assert!(true);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user