From df75d1ce8cc173805ae7e3d246339c30e711d33d Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Sun, 23 Jul 2023 23:39:52 +0100 Subject: [PATCH] Fix build errors --- agb/examples/mixer_basic.rs | 2 +- examples/the-purple-night/src/sfx.rs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/agb/examples/mixer_basic.rs b/agb/examples/mixer_basic.rs index 97403e8b..ad29463c 100644 --- a/agb/examples/mixer_basic.rs +++ b/agb/examples/mixer_basic.rs @@ -25,7 +25,7 @@ fn main(mut gba: Gba) -> ! { { if let Some(channel) = mixer.channel(&channel_id) { - let half: Num = num!(0.5); + let half: Num = num!(0.5); let half_usize: Num = num!(0.5); match input.x_tri() { Tri::Negative => channel.panning(-half), diff --git a/examples/the-purple-night/src/sfx.rs b/examples/the-purple-night/src/sfx.rs index 445dd148..6c604f7b 100644 --- a/examples/the-purple-night/src/sfx.rs +++ b/examples/the-purple-night/src/sfx.rs @@ -1,4 +1,4 @@ -use agb::fixnum::Num; +use agb::fixnum::num; use agb::rng; use agb::sound::mixer::{ChannelId, Mixer, SoundChannel}; @@ -98,8 +98,7 @@ impl<'a> Sfx<'a> { pub fn slime_boing(&mut self) { let mut channel = SoundChannel::new(SLIME_BOING); - let one: Num = 1.into(); - channel.volume(one / 4); + channel.volume(num!(0.25)); self.mixer.play_sound(channel); }