aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-assets/src/game_settings.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/fparkan-assets/src/game_settings.rs')
-rw-r--r--crates/fparkan-assets/src/game_settings.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/fparkan-assets/src/game_settings.rs b/crates/fparkan-assets/src/game_settings.rs
index 5bcf7084..eaa4b80b 100644
--- a/crates/fparkan-assets/src/game_settings.rs
+++ b/crates/fparkan-assets/src/game_settings.rs
@@ -65,6 +65,11 @@ impl GameSettings {
self.integer("RENDER_QUALITY") != Some(0)
}
+ /// The lowest native render quality omits software point lighting on surfaces.
+ pub fn emulate_point_lights(&self) -> bool {
+ self.integer("RENDER_QUALITY") != Some(0)
+ }
+
/// Reads separate wave and CD volume settings from the original profile.
pub fn audio(&self) -> AudioSettings {
let gain = |key| {
@@ -190,7 +195,7 @@ fn reads_water_reflections_independently_of_embm() {
#[cfg(test)]
#[test]
-fn only_low_render_quality_omits_clouds_and_terrain_microtextures() {
+fn only_low_render_quality_omits_clouds_microtextures_and_software_point_lights() {
for (profile, expected) in [
(&b"[CS]\nRENDER_QUALITY=0"[..], false),
(&b"[CS]\nRENDER_QUALITY=1"[..], true),
@@ -200,6 +205,7 @@ fn only_low_render_quality_omits_clouds_and_terrain_microtextures() {
let settings = GameSettings(Arc::from(profile));
assert_eq!(settings.sky_clouds(), expected);
assert_eq!(settings.terrain_microtexturing(), expected);
+ assert_eq!(settings.emulate_point_lights(), expected);
}
}