blob: aa86de26c952568a97ece0a72bf7e997e2721979 (
plain)
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
|
//! RST Node game client
#[macro_use]
extern crate tracing;
mod assets;
mod cli;
mod color;
mod constants;
mod ctx;
mod error;
mod graphics;
mod input;
mod log;
mod settings;
mod state;
mod window;
#[allow(unused)]
pub(crate) use settings::{GameSettings, GraphicsSettings, WindowSettings};
pub(crate) use state::*;
fn main() {
// Initialise logging mechanism
log::initialise();
// Initialise default game settings
let mut settings = settings::default();
// Parse commandline arguments
cli::parse(&mut settings);
// Initialise window context
let mut window = window::create(&settings);
// Load assets tree
let assets =
assets::load_tree(window.ctx(), &settings).unwrap_or_else(|e| fatal!("LoadError: {}!", e));
let state = ClientState::new(settings, assets);
window.run(state)
}
|