track caller for palbank fns

This commit is contained in:
Lokathor 2023-01-01 18:04:00 -07:00
parent be91260b33
commit f9fe8b07f7

View file

@ -203,12 +203,14 @@ def_mmio!(0x0500_0200 = OBJ_PALETTE: VolBlock<Color, Safe, Safe, 256>; "Object t
#[inline] #[inline]
#[must_use] #[must_use]
#[cfg_attr(feature="track_caller", track_caller)]
pub const fn bg_palbank(bank: usize) -> VolBlock<Color, Safe, Safe, 16> { pub const fn bg_palbank(bank: usize) -> VolBlock<Color, Safe, Safe, 16> {
let u = BG_PALETTE.index(bank * 16).as_usize(); let u = BG_PALETTE.index(bank * 16).as_usize();
unsafe { VolBlock::new(u) } unsafe { VolBlock::new(u) }
} }
#[inline] #[inline]
#[must_use] #[must_use]
#[cfg_attr(feature="track_caller", track_caller)]
pub const fn obj_palbank(bank: usize) -> VolBlock<Color, Safe, Safe, 16> { pub const fn obj_palbank(bank: usize) -> VolBlock<Color, Safe, Safe, 16> {
let u = OBJ_PALETTE.index(bank * 16).as_usize(); let u = OBJ_PALETTE.index(bank * 16).as_usize();
unsafe { VolBlock::new(u) } unsafe { VolBlock::new(u) }