added get_ardvoice macro to the crate

This commit is contained in:
Zenn 2023-09-12 19:20:12 +02:00
parent 928d1fae1c
commit 8792cc6bdd
3 changed files with 13 additions and 3 deletions

View file

@ -85,6 +85,14 @@ macro_rules! get_sprite_addr {
}
pub(super) use get_sprite_addr;
///Create a `const` raw pointer to a ardvoice tone as u8, without creating an intermediate reference.
#[macro_export]
macro_rules! get_ardvoice_tone_addr {
( $s:expr ) => {
unsafe { addr_of!($s) as *const u8 }
};
}
pub(super) use get_ardvoice_tone_addr;
///Create a `const` raw pointer to a sprite as u16, without creating an intermediate reference.
#[macro_export]
macro_rules! get_tones_addr {