diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a20873..c254e8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Implement fast travel (must be unlocked by getting phone number of FASTravel) - Implement factory reset - Chats don't automatically advance now, the player has to press "Continue" +- Add Outrun Radio, featuring "Outrun" BGM by Andrew Vice - Add sparkles to Jupiter's ring ✨😍✨ best visible from Farview Station - Add auroras to Jupiter and Saturn - Add setting to change pointer diff --git a/LICENSE.md b/LICENSE.md index c917bc6..0ac62a1 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -69,6 +69,7 @@ - powerdown.ogg: [Energy Drain by qubodup, CC0](https://freesound.org/people/qubodup/sounds/742835/) - spark.ogg: [Socket Connect Disconnect by JustHallowed, CC BY 4.0](https://freesound.org/people/JustHallowed/sounds/691007/), Tempo -40, Amplify 4 - Takeoff.ogg: [By Serat, CC BY 4.0](https://freemusicarchive.org/music/serat/route-remastered/takeoff-remastered/) + - Outrun.ogg: [by Andrew Vice, CC BY-SA 3.0](https://soundcloud.com/ncmfyt/andrew-vice-outrun) - JupiterRecording.ogg: An [actual Jupiter recording by NASA](https://archive.org/download/voyager-1-and-2-1990-jupiter-nasa-voyager-space-sounds-electronic), public domain. - Processed by cutting out min 1:47-3:47 and applying a 10s linear crossfade at the end. Exported as ogg with quality=3, see [.kdenlive file](src/audio/JupiterRecording.kdenlive). - The source file has been taken down, and generally, I can't find information on how exactly this was produced. Hoping it's not a hoax. diff --git a/assets/music/Outrun.ogg b/assets/music/Outrun.ogg new file mode 100644 index 0000000..e74aa1d Binary files /dev/null and b/assets/music/Outrun.ogg differ diff --git a/src/audio.rs b/src/audio.rs index 3b26ff5..1ae3922 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -53,6 +53,11 @@ const PATHS: &[(SfxType, Sfx, &str)] = &[ Sfx::BGMActualJupiterRecording, "music/JupiterRecording.ogg", ), + ( + SfxType::Radio, + Sfx::BGMOutrun, + "music/Outrun.ogg", + ), ( SfxType::LoopSfx, Sfx::ElectricMotor, @@ -88,11 +93,16 @@ const PATHS: &[(SfxType, Sfx, &str)] = &[ (SfxType::OneOff, Sfx::Zoom, "sounds/zoom.ogg"), ]; +const RADIO_VOLUMES: &[(Sfx, f32)] = &[ + (Sfx::BGMOutrun, 0.3) +]; + #[derive(Component, PartialEq, Hash, Eq, Copy, Clone)] pub enum Sfx { Achieve, BGMActualJupiterRecording, BGMTakeoff, + BGMOutrun, Cat, Click, Click3, @@ -176,6 +186,15 @@ pub fn setup( ew_respawnsinks.send(RespawnSinksEvent); } +fn get_radio_volume(radio: &Sfx) -> f32 { + for (sfx, volume) in RADIO_VOLUMES { + if radio == sfx { + return *volume; + } + } + return 1.0; +} + pub fn respawn_sinks( mut commands: Commands, asset_server: Res, @@ -196,6 +215,7 @@ pub fn respawn_sinks( settings: PlaybackSettings { mode: PlaybackMode::Loop, paused: !settings.is_radio_playing(*sfx).unwrap_or(true), + volume: Volume::new(get_radio_volume(sfx)), ..default() }, }, diff --git a/src/var.rs b/src/var.rs index 1a147ca..12c54ad 100644 --- a/src/var.rs +++ b/src/var.rs @@ -188,6 +188,7 @@ impl Default for Settings { // see also: settings.is_radio_playing() "Off".to_string(), "Space Wave Radio".to_string(), + "Outrun Radio".to_string(), "Amplify outside recordings".to_string(), ], volume_sfx: 1.0, @@ -351,7 +352,8 @@ impl Settings { let radio = self.radio_mode; match sfx { audio::Sfx::BGMTakeoff => Some(radio == 1), - audio::Sfx::BGMActualJupiterRecording => Some(radio == 2), + audio::Sfx::BGMOutrun => Some(radio == 2), + audio::Sfx::BGMActualJupiterRecording => Some(radio == 3), _ => None, } }