aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 1b6a5773d25d..647fec9b18b2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2,9 +2,35 @@
mod data;
mod gens;
+mod io;
mod map;
mod stats;
+mod wire;
-fn main() {
- println!("Hello, world!");
+use ggez::{
+ self, conf,
+ event::{self, EventHandler},
+ Context, ContextBuilder, GameResult,
+};
+
+struct GameState;
+
+impl EventHandler for GameState {
+ fn update(&mut self, _: &mut Context) -> GameResult {
+ Ok(())
+ }
+
+ fn draw(&mut self, _: &mut Context) -> GameResult {
+ Ok(())
+ }
+}
+
+fn main() -> GameResult {
+ let cb = ContextBuilder::new("RstNode", "Katharina Fey")
+ .window_setup(conf::WindowSetup::default().title("RstNode").vsync(true))
+ .window_mode(conf::WindowMode::default().dimensions(800.0, 600.0));
+
+ let (ctx, el) = &mut cb.build()?;
+ let mut game = GameState; // smash the state
+ event::run(ctx, el, &mut game)
}