Moved geometry to root level
[kaka/rust-sdl-test.git] / src / main.rs
index 877d367..4a88954 100644 (file)
@@ -1,23 +1,27 @@
 extern crate rand;
 extern crate sdl2;
 extern crate time;
+extern crate noise;
 
-use game::app::*;
+use core::game::GameState;
+use core::app::*;
 
-mod game;
-#[macro_use]
-mod common;
 mod boll;
+mod common;
+mod core;
+mod geometry;
 mod sprites;
+mod teststate;
 
-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();