From 79c8b9ab441493e3b3a37a59263f66896c9c90b3 Mon Sep 17 00:00:00 2001 From: Katharina Fey Date: Sun, 7 Feb 2021 16:44:44 +0100 Subject: rstnode: basic asset loading and prototype sprite rendering * restructure assets directory * implement asset loading and dynamic conversion to sprites * reload sprites with unique URIs to load at runtime * provide an updated renderer API to give access to client state * use new APIs to draw a single node frame on screen * use colour APIs to dynamically change node frame colour --- games/rstnode/rst-client/src/settings.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'games/rstnode/rst-client/src/settings.rs') diff --git a/games/rstnode/rst-client/src/settings.rs b/games/rstnode/rst-client/src/settings.rs index a339c4106da5..cb44eacca3a3 100644 --- a/games/rstnode/rst-client/src/settings.rs +++ b/games/rstnode/rst-client/src/settings.rs @@ -1,16 +1,18 @@ //! Configuration structures for the game client use ggez::conf::{FullscreenType, NumSamples}; +use std::path::PathBuf; pub fn default() -> GameSettings { GameSettings { + assets: None, window: WindowSettings { width: 1280, height: 720, window_mode: WindowMode::Windowed, }, graphics: GraphicsSettings { - samples: Samples(16), + samples: Samples(8), vsync: true, }, } @@ -18,6 +20,7 @@ pub fn default() -> GameSettings { /// Complete tree of basic game client settings pub struct GameSettings { + pub assets: Option, pub window: WindowSettings, pub graphics: GraphicsSettings, } @@ -45,7 +48,7 @@ impl<'s> From<&'s Samples> for NumSamples { 2 => Self::Two, 4 => Self::Four, 8 => Self::Eight, - 16 => Self::Sixteen, + // 16 => Self::Sixteen, // currently broken _ => panic!("Invalid multisampling value: {}", s.0), } } -- cgit v1.2.3