extern crate sdl2;
extern crate serde;
extern crate serde_json;
extern crate rand;
extern crate rand_xoshiro;
extern crate rayon;
use std::process;
mod base;
mod fontset;
mod lingua;
mod master;
mod play;
mod precalc;
mod state;
mod sys;
use base::PrependErrorString;
fn run() -> Result<(), String> {
let mut sys = sys::System::init().pre_err("cannot init system")?;
play::play(&mut sys).pre_err("cannot play")?;
sys.shut().pre_err("cannot shut system")?;
Ok(())
}
fn main() {
process::exit(match run() {
Ok(_) => 0,
Err(s) => {
eprintln!("Error: {}", s);
1
}
});
}
#[cfg(all(target_os = "windows", target_arch = "x86"))]
#[no_mangle]
pub extern "C" fn _Unwind_Resume() {}
#[cfg(all(target_os = "windows", target_arch = "x86"))]
#[no_mangle]
pub extern "C" fn _Unwind_RaiseException() {}