diff --git a/src/components/fade.rs b/src/components/fade.rs index 0b16b45..e3acb4e 100644 --- a/src/components/fade.rs +++ b/src/components/fade.rs @@ -15,17 +15,18 @@ impl Fade { impl GameEntity<()> for Fade { fn tick(&mut self, state: &mut SharedGameState, _custom: ()) -> GameResult { + let fade_ticks = state.constants.textscript.fade_ticks; match state.fade_state { - FadeState::FadeOut(tick, direction) if tick < 15 => { + FadeState::FadeOut(tick, direction) if tick < fade_ticks => { state.fade_state = FadeState::FadeOut(tick + 1, direction); } - FadeState::FadeOut(tick, _) if tick == 15 => { + FadeState::FadeOut(tick, _) if tick == fade_ticks => { state.fade_state = FadeState::Hidden; } - FadeState::FadeIn(tick, direction) if tick > -15 => { + FadeState::FadeIn(tick, direction) if tick > -fade_ticks => { state.fade_state = FadeState::FadeIn(tick - 1, direction); } - FadeState::FadeIn(tick, _) if tick == -15 => { + FadeState::FadeIn(tick, _) if tick == -fade_ticks => { state.fade_state = FadeState::Visible; } _ => {} diff --git a/src/engine_constants/mod.rs b/src/engine_constants/mod.rs index 2c3f764..47b8eae 100644 --- a/src/engine_constants/mod.rs +++ b/src/engine_constants/mod.rs @@ -232,6 +232,7 @@ pub struct TextScriptConsts { pub text_shadow: bool, pub text_speed_normal: u8, pub text_speed_fast: u8, + pub fade_ticks: i8, } #[derive(Debug)] @@ -1499,6 +1500,7 @@ impl EngineConstants { text_shadow: false, text_speed_normal: 4, text_speed_fast: 1, + fade_ticks: 15, }, title: TitleConsts { intro_text: "Studio Pixel presents".to_owned(), @@ -1680,6 +1682,7 @@ impl EngineConstants { self.textscript.text_shadow = true; self.textscript.text_speed_normal = 1; self.textscript.text_speed_fast = 0; + self.textscript.fade_ticks = 21; self.soundtracks.insert("Famitracks".to_owned(), "/base/ogg17/".to_owned()); self.soundtracks.insert("Ridiculon".to_owned(), "/base/ogg_ridic/".to_owned()); self.game.tile_offset_x = 3; diff --git a/src/player/mod.rs b/src/player/mod.rs index f08d41a..e438ebf 100644 --- a/src/player/mod.rs +++ b/src/player/mod.rs @@ -414,7 +414,7 @@ impl Player { } } BoosterSwitch::Down if self.controller.trigger_jump() || self.booster_fuel % 3 == 1 => { - state.create_caret(self.x, self.y + 0xc00, CaretType::Exhaust, Direction::Up); + state.create_caret(self.x, self.y - 0xc00, CaretType::Exhaust, Direction::Up); state.sound_manager.play_sfx(113); } _ => {} diff --git a/src/shared_game_state.rs b/src/shared_game_state.rs index 6c21642..12b3f57 100644 --- a/src/shared_game_state.rs +++ b/src/shared_game_state.rs @@ -365,6 +365,8 @@ impl SharedGameState { next_scene.player1.y = pos_y as i32 * next_scene.stage.map.tile_size.as_int() * 0x200; self.reset_map_flags(); + self.control_flags.set_control_enabled(true); + self.control_flags.set_tick_world(true); self.fade_state = FadeState::Hidden; self.textscript_vm.state = TextScriptExecutionState::Running(self.constants.game.new_game_event, 0);