Dolda2000 GitWeb
/
kaka
/
rust-sdl-test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Collide with the walls instead of the grid
[kaka/rust-sdl-test.git]
/
src
/
main.rs
diff --git
a/src/main.rs
b/src/main.rs
index
26ceadb
..
d60ad55
100644
(file)
--- a/
src/main.rs
+++ b/
src/main.rs
@@
-1,14
+1,17
@@
extern crate rand;
extern crate sdl2;
extern crate time;
extern crate rand;
extern crate sdl2;
extern crate time;
+extern crate noise;
+use core::game::GameState;
use core::app::*;
use core::app::*;
-mod core;
-#[macro_use]
-mod common;
mod boll;
mod boll;
+mod core;
+mod geometry;
mod sprites;
mod sprites;
+mod teststate;
+mod util;
const SCREEN_WIDTH: u16 = 1280;
const SCREEN_HEIGHT: u16 = (SCREEN_WIDTH as f64 * (1440.0 / 2560.0)) as u16;
const SCREEN_WIDTH: u16 = 1280;
const SCREEN_HEIGHT: u16 = (SCREEN_WIDTH as f64 * (1440.0 / 2560.0)) as u16;
@@
-17,7
+20,8
@@
fn main() {
println!("starting...");
let mut app = App::new()
.with_resolution(SCREEN_WIDTH, SCREEN_HEIGHT)
println!("starting...");
let mut app = App::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(ActiveState::new((SCREEN_WIDTH as u32, SCREEN_HEIGHT as u32))))
+ .with_state(Box::new(GameState::new()))
.with_title("SDL test")
.build()
.unwrap();
.with_title("SDL test")
.build()
.unwrap();