debug stuff + switch to cranelift
This commit is contained in:
28
src/bin/client/debug.rs
Normal file
28
src/bin/client/debug.rs
Normal file
@@ -0,0 +1,28 @@
|
||||
use openworm::net::Msg;
|
||||
|
||||
use crate::Client;
|
||||
|
||||
pub fn debug(_client: &mut Client) {
|
||||
// let mut file = std::fs::OpenOptions::new()
|
||||
// .write(true)
|
||||
// .create(true)
|
||||
// .truncate(true)
|
||||
// .open("./old_msgs")
|
||||
// .unwrap();
|
||||
// bincode::encode_into_std_write(
|
||||
// self.msgs.clone(),
|
||||
// &mut file,
|
||||
// openworm::net::BINCODE_CONFIG,
|
||||
// )
|
||||
// .unwrap();
|
||||
let mut file = std::fs::OpenOptions::new()
|
||||
.read(true)
|
||||
.open("./old_msgs")
|
||||
.unwrap();
|
||||
let msgs: Vec<Msg> =
|
||||
bincode::decode_from_std_read(&mut file, openworm::net::BINCODE_CONFIG).unwrap();
|
||||
for msg in msgs {
|
||||
println!("{msg:?}");
|
||||
}
|
||||
// client.ui.debug_layers();
|
||||
}
|
||||
Reference in New Issue
Block a user