X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fmain.rs;h=9195583d443f20fd831ec9ee9adfde9f37598bf5;hb=e58a1769e81c5fa8019a75f7292f534021e9565d;hp=877d367becfe2520751991f789e777eb2ba22fa3;hpb=6ba7aef184300a81cb7fb9533e926f663c0f806f;p=kaka%2Frust-sdl-test.git diff --git a/src/main.rs b/src/main.rs index 877d367..9195583 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,22 +2,24 @@ extern crate rand; extern crate sdl2; extern crate time; -use game::app::*; +use core::game::GameState; +use core::app::*; -mod game; +mod core; #[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; +const SCREEN_WIDTH: u16 = 1280; +const SCREEN_HEIGHT: u16 = (SCREEN_WIDTH as f64 * (1440.0 / 2560.0)) as u16; 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_resolution(SCREEN_WIDTH, SCREEN_HEIGHT) +// .with_state(Box::new(ActiveState::new((SCREEN_WIDTH as u32, SCREEN_HEIGHT as u32)))) + .with_state(Box::new(GameState::new())) .with_title("SDL test") .build() .unwrap();