//! RST Node game client // Remove the warning spam #![allow(warnings)] #[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 viewport; mod window; #[allow(unused)] pub(crate) use settings::{GameSettings, GraphicsSettings, WindowSettings}; pub(crate) use state::*; #[async_std::main] async 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)); // Create the client state let mut state = ClientState::new(settings, assets); // Initialise the viewport first! state.viewport().init(window.ctx()); // Window goes brrrr window.run(state) }