From 55c754138641175d10ad6b4fbf1b891e439b027e Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Thu, 17 Nov 2022 21:00:51 +0000 Subject: [PATCH] backc is not a word --- agb/examples/wave.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/agb/examples/wave.rs b/agb/examples/wave.rs index f89cd6df..602b2ff8 100644 --- a/agb/examples/wave.rs +++ b/agb/examples/wave.rs @@ -32,10 +32,10 @@ fn main(mut gba: agb::Gba) -> ! { let back = Mutex::new(RefCell::new(BackCosines { cosines, row: 0 })); let _a = agb::interrupt::add_interrupt_handler(Interrupt::HBlank, |key: CriticalSection| { - let mut backc = back.borrow(key).borrow_mut(); - let deflection = backc.cosines[backc.row % 32]; + let mut back = back.borrow(key).borrow_mut(); + let deflection = back.cosines[back.row % 32]; unsafe { ((0x0400_0010) as *mut u16).write_volatile(deflection) } - backc.row += 1; + back.row += 1; }); let vblank = agb::interrupt::VBlank::get(); @@ -43,10 +43,10 @@ fn main(mut gba: agb::Gba) -> ! { loop { vblank.wait_for_vblank(); free(|key| { - let mut backc = back.borrow(key).borrow_mut(); - backc.row = 0; + let mut back = back.borrow(key).borrow_mut(); + back.row = 0; time += 1; - for (r, a) in backc.cosines.iter_mut().enumerate() { + for (r, a) in back.cosines.iter_mut().enumerate() { let n: FixedNum<8> = (FixedNum::new(r as i32) / 32 + FixedNum::new(time) / 128) .cos() * (256 * 4 - 1)