aboutsummaryrefslogtreecommitdiff
path: root/games/rstnode/rst-client/src/settings.rs
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2021-02-07 16:44:44 +0100
committerKatharina Fey <kookie@spacekookie.de>2021-02-07 16:44:44 +0100
commit79c8b9ab441493e3b3a37a59263f66896c9c90b3 (patch)
treeca111686fa202369a5730ff8151480b04e391cbb /games/rstnode/rst-client/src/settings.rs
parentf5b36ff6b99256030201c878608a07d163b4c802 (diff)
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
Diffstat (limited to 'games/rstnode/rst-client/src/settings.rs')
-rw-r--r--games/rstnode/rst-client/src/settings.rs7
1 files changed, 5 insertions, 2 deletions
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<PathBuf>,
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),
}
}