diff --git a/tracker/agb-tracker/Cargo.toml b/tracker/agb-tracker/Cargo.toml index 396cc477..94d51155 100644 --- a/tracker/agb-tracker/Cargo.toml +++ b/tracker/agb-tracker/Cargo.toml @@ -9,14 +9,18 @@ repository = "https://github.com/agbrs/agb" exclude = ["/examples"] [features] -default = ["xm", "midi"] +default = ["agb"] + +agb = ["dep:agb"] xm = ["dep:agb_xm"] midi = ["dep:agb_midi"] [dependencies] agb_midi = { version = "0.20.5", path = "../agb-midi", optional = true } agb_xm = { version = "0.20.5", path = "../agb-xm", optional = true } -agb = { version = "0.20.5", path = "../../agb" } +agb = { version = "0.20.5", path = "../../agb", optional = true } + +agb_fixnum = { version = "0.20.5", path = "../../agb-fixnum" } agb_tracker_interop = { version = "0.20.5", path = "../agb-tracker-interop", default-features = false } [profile.dev] diff --git a/tracker/agb-tracker/src/lib.rs b/tracker/agb-tracker/src/lib.rs index f389109b..3d1cf3d8 100644 --- a/tracker/agb-tracker/src/lib.rs +++ b/tracker/agb-tracker/src/lib.rs @@ -72,7 +72,7 @@ use alloc::vec::Vec; pub use mixer::{Mixer, SoundChannel}; -use agb::fixnum::Num; +use agb_fixnum::Num; /// Import an XM file. Only available if you have the `xm` feature enabled (enabled by default). #[cfg(feature = "xm")] @@ -87,7 +87,7 @@ pub use agb_midi::include_midi; #[doc(hidden)] pub mod __private { - pub use agb::fixnum::Num; + pub use agb_fixnum::Num; pub use agb_tracker_interop; } @@ -520,12 +520,13 @@ impl Default for TrackerChannel { } } -#[cfg(test)] +#[cfg(all(test, feature = "agb"))] #[agb::entry] fn main(gba: agb::Gba) -> ! { loop {} } +#[cfg(feature = "agb")] impl SoundChannel for agb::sound::mixer::SoundChannel { fn new(data: &'static [u8]) -> Self { Self::new(data) @@ -564,6 +565,7 @@ impl SoundChannel for agb::sound::mixer::SoundChannel { } } +#[cfg(feature = "agb")] impl<'gba> Mixer for agb::sound::mixer::Mixer<'gba> { type ChannelId = agb::sound::mixer::ChannelId; type SoundChannel = agb::sound::mixer::SoundChannel; diff --git a/tracker/agb-xm/Cargo.toml b/tracker/agb-xm/Cargo.toml index 20bc9e5d..5a03edbb 100644 --- a/tracker/agb-xm/Cargo.toml +++ b/tracker/agb-xm/Cargo.toml @@ -12,6 +12,7 @@ proc-macro = true [dependencies] agb_xm_core = { version = "0.20.5", path = "../agb-xm-core" } +agb_tracker_interop = { version = "0.20.2", path = "../agb-tracker-interop", features = ["quote"] } proc-macro-error = "1" proc-macro2 = "1"