extern crate rand; extern crate sdl2; extern crate time; use game::app::*; mod game; #[macro_use] mod common; mod boll; mod sprites; const SCREEN_WIDTH: u32 = 1280; const SCREEN_HEIGHT: u32 = (SCREEN_WIDTH as f64 * (1440.0 / 2560.0)) as u32; fn main() { println!("starting..."); let mut app = App::new() .with_resolution(SCREEN_WIDTH as u16, SCREEN_HEIGHT as u16) .with_state(Box::new(ActiveState::new())) .with_title("SDL test") .build() .unwrap(); app.load_sprites(&[("block", "res/block.bmp"), ("mario", "res/mario-trans.png")]); app.start(); }