From 87a359725723b774f70764736568040186549671 Mon Sep 17 00:00:00 2001 From: Alula Date: Fri, 30 Oct 2020 02:32:18 +0100 Subject: [PATCH] Rename 'Enhanced Graphics' option to 'Lighting Effects' --- src/scene/game_scene.rs | 4 ++-- src/scene/title_scene.rs | 6 +++--- src/shared_game_state.rs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/scene/game_scene.rs b/src/scene/game_scene.rs index a779b04..97daa87 100644 --- a/src/scene/game_scene.rs +++ b/src/scene/game_scene.rs @@ -1140,7 +1140,7 @@ impl Scene for GameScene { fn draw(&self, state: &mut SharedGameState, ctx: &mut Context) -> GameResult { self.draw_background(state, ctx)?; self.draw_tiles(state, ctx, TileLayer::Background)?; - if state.settings.enhanced_graphics + if state.settings.lighting_efects && self.stage.data.background_type != BackgroundType::Black && self.stage.data.background_type != BackgroundType::Outside && self.stage.data.background_type != BackgroundType::OutsideWind { @@ -1166,7 +1166,7 @@ impl Scene for GameScene { self.draw_tiles(state, ctx, TileLayer::Foreground)?; self.draw_tiles(state, ctx, TileLayer::Snack)?; self.draw_carets(state, ctx)?; - if state.settings.enhanced_graphics + if state.settings.lighting_efects && self.stage.data.background_type == BackgroundType::Black { self.draw_light_map(state, ctx)?; } diff --git a/src/scene/title_scene.rs b/src/scene/title_scene.rs index 102b5d6..b4f22d7 100644 --- a/src/scene/title_scene.rs +++ b/src/scene/title_scene.rs @@ -94,7 +94,7 @@ impl Scene for TitleScene { self.option_menu.push_entry(MenuEntry::Toggle("50 FPS timing".to_string(), state.timing_mode == TimingMode::_50Hz)); self.option_menu.push_entry(MenuEntry::Toggle("Linear scaling".to_string(), ctx.filter_mode == FilterMode::Linear)); - self.option_menu.push_entry(MenuEntry::Toggle("Enhanced graphics".to_string(), state.settings.enhanced_graphics)); + self.option_menu.push_entry(MenuEntry::Toggle("Lighting effects".to_string(), state.settings.lighting_efects)); if state.constants.is_cs_plus { self.option_menu.push_entry(MenuEntry::Toggle("Original textures".to_string(), state.settings.original_textures)); } else { @@ -160,9 +160,9 @@ impl Scene for TitleScene { } MenuSelectionResult::Selected(2, toggle) => { if let MenuEntry::Toggle(_, value) = toggle { - state.settings.enhanced_graphics = !state.settings.enhanced_graphics; + state.settings.lighting_efects = !state.settings.lighting_efects; - *value = state.settings.enhanced_graphics; + *value = state.settings.lighting_efects; } } MenuSelectionResult::Selected(3, toggle) => { diff --git a/src/shared_game_state.rs b/src/shared_game_state.rs index a742e58..12919fa 100644 --- a/src/shared_game_state.rs +++ b/src/shared_game_state.rs @@ -44,7 +44,7 @@ pub struct Settings { pub god_mode: bool, pub speed: f64, pub original_textures: bool, - pub enhanced_graphics: bool, + pub lighting_efects: bool, pub debug_outlines: bool, pub touch_controls: bool, } @@ -135,7 +135,7 @@ impl SharedGameState { god_mode: false, speed: 1.0, original_textures: false, - enhanced_graphics: true, + lighting_efects: true, debug_outlines: false, touch_controls: cfg!(target_os = "android"), },