#![windows_subsystem = "windows"]
use clap::{App, Arg};
use romy_wasmer::{load, load_bytes};
use romy_window::run;
fn main() {
let homescreen = include_bytes!("roms/homescreen.wasm");
let matches = App::new("romy")
.version(clap::crate_version!())
.arg(
Arg::with_name("input")
.help("the game file to load")
.index(1)
.required(false),
)
.get_matches();
if let Some(path) = matches.value_of("input") {
run(load(&path).or_else(|| load_bytes(homescreen)).unwrap(), |path| load(path));
} else {
run(load_bytes(homescreen).unwrap(), |path| load(path));
}
}