My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/games/rstnode/rst-client/src/main.rs

40 lines
821 B

//! RST Node game client
#[macro_use]
extern crate tracing;
mod assets;
mod cli;
mod constants;
mod ctx;
mod error;
mod graphics;
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)
}