X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fmain.rs;h=18a29b6f9d4b204e65fd599ceea814c99861eff7;hb=9c06350b0eb8603683b73f3863cd0095b55b4df5;hp=4c399c62a56f1ded337ac3de533a9bebdab6bafb;hpb=55eb2b7d14ed296940a375f1561209ec78ac5b46;p=kaka%2Frust-sdl-test.git diff --git a/src/main.rs b/src/main.rs index 4c399c6..18a29b6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,10 +13,10 @@ use sdl2::rect::Rect; use sdl2::video::FullscreenType; use time::PreciseTime; -use app::*; +use game::app::*; use common::Point2D; -mod app; +mod game; #[macro_use] mod common; mod boll; mod sprites; @@ -61,7 +61,12 @@ fn main() { let radius = 110.0 + size as f32 * 0.5; let angle = (mario_angle as f32 - 90.0) * PI / 180.0; let offset2 = point!((angle.cos() * radius) as i32, (angle.sin() * radius) as i32); - app.canvas.copy_ex(app.sprites.get("mario"), None, Rect::new(offset.x + offset2.x, offset.y + offset2.y, size as u32, size as u32), mario_angle, sdl2::rect::Point::new(size / 2, size / 2), false, false).unwrap(); + app.canvas.copy_ex( + app.sprites.get("mario"), + None, Rect::new(offset.x + offset2.x, offset.y + offset2.y, size as u32, size as u32), + mario_angle, + sdl2::rect::Point::new(size / 2, size / 2), + false, false).unwrap(); mario_angle += 1.0; if mario_angle >= 360.0 { mario_angle -= 360.0 } }