diff --git a/Cargo.lock b/Cargo.lock index 90ae730d02..666abb157e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2779,7 +2779,8 @@ dependencies = [ [[package]] name = "old_school_gfx_glutin_ext" version = "0.23.0" -source = "git+https://github.com/Imberflur/old-school-gfx-glutin-ext.git#e128e187a81d1fa15409db38bc93e6677fc09288" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7cf32ddfed46b511150abb23d3193d38ec71ffafa561e6c2d82ad06eb51072e" dependencies = [ "gfx_core", "gfx_device_gl", diff --git a/voxygen/Cargo.toml b/voxygen/Cargo.toml index 7adb1ce97c..18488e16ae 100644 --- a/voxygen/Cargo.toml +++ b/voxygen/Cargo.toml @@ -25,7 +25,7 @@ anim = { package = "veloren-voxygen-anim", path = "src/anim", default-features = # Graphics gfx = "0.18.2" gfx_device_gl = { version = "0.16.2", optional = true } -old_school_gfx_glutin_ext = { git = "https://github.com/Imberflur/old-school-gfx-glutin-ext.git" } +old_school_gfx_glutin_ext = "0.23" glutin = "0.23.0" winit = { version = "0.21.0", features = ["serde"] } conrod_core = { git = "https://gitlab.com/veloren/conrod.git" } diff --git a/voxygen/src/lib.rs b/voxygen/src/lib.rs index ad05364972..058d61c901 100644 --- a/voxygen/src/lib.rs +++ b/voxygen/src/lib.rs @@ -63,6 +63,7 @@ impl GlobalState { pub fn maintain(&mut self, dt: f32) { self.audio.maintain(dt); } } +// TODO: appears to be currently unused by playstates pub enum Direction { Forwards, Backwards, @@ -86,7 +87,6 @@ pub enum PlayStateResult { /// A trait representing a playable game state. This may be a menu, a game /// session, the title screen, etc. pub trait PlayState { - /// Get a descriptive name for this state type. /// Called when entering this play state from another fn enter(&mut self, global_state: &mut GlobalState, direction: Direction); diff --git a/voxygen/src/main.rs b/voxygen/src/main.rs index 1820be77fd..6cc09a3406 100644 --- a/voxygen/src/main.rs +++ b/voxygen/src/main.rs @@ -15,7 +15,7 @@ use veloren_voxygen::{ }; use common::{ - assets::{load_watched, watch}, + assets::{load, load_expect, load_watched, watch}, clock::Clock, }; use std::panic; diff --git a/voxygen/src/run.rs b/voxygen/src/run.rs index 7105f15b2f..0898cbdeea 100644 --- a/voxygen/src/run.rs +++ b/voxygen/src/run.rs @@ -73,7 +73,7 @@ pub fn run(mut global_state: GlobalState, event_loop: EventLoop) { global_state.on_play_state_changed(); }); states.last_mut().map(|new_state| { - new_state.enter(&mut global_state, Direction::Forwards); + new_state.enter(&mut global_state, Direction::Backwards); }); }, PlayStateResult::Push(mut new_state) => { @@ -115,17 +115,7 @@ pub fn run(mut global_state: GlobalState, event_loop: EventLoop) { .swap_buffers() .expect("Failed to swap window buffers!"); } - //global_state.window.request_redraw(); }, - /*winit::event::Event::WindowEvent { - event: WindowEvent::RedrawRequested, - .. - } => { - // render here - } - .. - *control_flow = ControlFlow::Exit; - }*/ winit::event::Event::WindowEvent { event, .. } => global_state .window .handle_window_event(event, &mut global_state.settings), diff --git a/voxygen/src/session.rs b/voxygen/src/session.rs index 2fdd831c1b..456ce050a1 100644 --- a/voxygen/src/session.rs +++ b/voxygen/src/session.rs @@ -705,7 +705,6 @@ impl PlayState for SessionState { }, ); - // TODO: dont // Look for changes in the localization files if global_state.localization_watcher.reloaded() { hud_events.push(HudEvent::ChangeLanguage(self.voxygen_i18n.metadata.clone()));