1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#![allow(warnings)]
mod _if;
mod data;
mod gens;
mod io;
mod lobby;
mod map;
mod server;
mod stats;
mod users;
mod wire;
pub(crate) use identity::Identity as Id;
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)
}
|