2023-07-13 00:38:09 +10:00
|
|
|
#![no_std]
|
|
|
|
#![no_main]
|
|
|
|
|
|
|
|
use agb::sound::mixer::Frequency;
|
|
|
|
use agb::Gba;
|
2023-07-13 02:36:41 +10:00
|
|
|
use agb_tracker::{import_xm, Track, Tracker};
|
2023-07-13 00:38:09 +10:00
|
|
|
|
2023-07-13 03:52:29 +10:00
|
|
|
const AJOJ: Track = import_xm!("examples/db_toffe.xm");
|
2023-07-13 00:38:09 +10:00
|
|
|
|
|
|
|
#[agb::entry]
|
|
|
|
fn main(mut gba: Gba) -> ! {
|
|
|
|
let vblank_provider = agb::interrupt::VBlank::get();
|
|
|
|
|
|
|
|
let mut mixer = gba.mixer.mixer(Frequency::Hz18157);
|
|
|
|
mixer.enable();
|
|
|
|
|
2023-07-13 02:36:41 +10:00
|
|
|
let mut tracker = Tracker::new(&AJOJ);
|
|
|
|
|
2023-07-13 00:38:09 +10:00
|
|
|
loop {
|
2023-07-13 02:36:41 +10:00
|
|
|
tracker.step(&mut mixer);
|
2023-07-13 00:38:09 +10:00
|
|
|
mixer.frame();
|
|
|
|
vblank_provider.wait_for_vblank();
|
|
|
|
}
|
|
|
|
}
|