48 lines
834 B
Rust
48 lines
834 B
Rust
|
extern crate memmap;
|
||
|
|
||
|
pub mod durandal;
|
||
|
pub mod marathon;
|
||
|
|
||
|
use std::{io, fs};
|
||
|
use memmap::Mmap;
|
||
|
|
||
|
fn main() -> io::Result<()>
|
||
|
{
|
||
|
let fp = fs::File::open("data/Rubicon Map.sceA")?;
|
||
|
let mm = unsafe{Mmap::map(&fp)?};
|
||
|
println!("{:?}", marathon::wad::Wad::new(&mm));
|
||
|
Ok(())
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
extern crate gtk;
|
||
|
use gtk::prelude::*;
|
||
|
use gtk::{Button, Window, WindowType};
|
||
|
|
||
|
fn main()
|
||
|
{
|
||
|
if gtk::init().is_err() {
|
||
|
println!("failed to initialize GTK");
|
||
|
return
|
||
|
}
|
||
|
|
||
|
let win = Window::new(WindowType::Toplevel);
|
||
|
win.set_title("GTK test");
|
||
|
win.set_default_size(350, 70);
|
||
|
let btn = Button::new_with_label("butts");
|
||
|
win.add(&btn);
|
||
|
win.show_all();
|
||
|
|
||
|
win.connect_delete_event(|_, _| {
|
||
|
gtk::main_quit();
|
||
|
Inhibit(false)
|
||
|
});
|
||
|
|
||
|
btn.connect_clicked(|_| {println!("clicc");});
|
||
|
|
||
|
gtk::main();
|
||
|
}
|
||
|
*/
|
||
|
|
||
|
// EOF
|