commonlibsse_ng\re\b/
BSISoundCategory.rs

1use crate::re::offsets_rtti::RTTI_BSISoundCategory;
2use crate::re::offsets_vtable::VTABLE_BSISoundCategory;
3use crate::rel::id::VariantID;
4
5#[repr(C)]
6#[derive(Debug)]
7pub struct BSISoundCategory {
8    pub vtable: *const BSISoundCategoryVtbl,
9}
10
11impl BSISoundCategory {
12    pub const RTTI: VariantID = RTTI_BSISoundCategory;
13    pub const VTABLE: [VariantID; 1] = VTABLE_BSISoundCategory;
14}
15
16#[repr(C)]
17pub struct BSISoundCategoryVtbl {
18    /// C++ Destructor. `~BSISoundCategory`
19    pub CxxDrop: extern "C" fn(this: *mut BSISoundCategory), // 0x00
20
21    pub Matches:
22        extern "C" fn(this: *const BSISoundCategory, category: *const BSISoundCategory) -> bool, // 0x01
23    pub GetCategoryVolume: extern "C" fn(this: *const BSISoundCategory) -> f32, // 0x02
24    pub SetCategoryVolume: extern "C" fn(this: *mut BSISoundCategory, value: f32), // 0x03
25    pub GetCategoryFrequency: extern "C" fn(this: *const BSISoundCategory) -> f32, // 0x04
26    pub SetCategoryFrequency: extern "C" fn(this: *mut BSISoundCategory, value: f32), // 0x05
27    pub GetCategoryAttenuation: extern "C" fn(this: *const BSISoundCategory) -> u16, // 0x06
28    pub SetCategoryAttenuation: extern "C" fn(this: *mut BSISoundCategory, value: u16), // 0x07
29    pub Unk_08: extern "C" fn(this: *mut BSISoundCategory),                     // 0x08
30    pub Unk_09: extern "C" fn(this: *mut BSISoundCategory),                     // 0x09
31    pub Unk_0a: extern "C" fn(this: *mut BSISoundCategory),                     // 0x0A
32    pub Unk_0b: extern "C" fn(this: *mut BSISoundCategory),                     // 0x0B
33}
34const _: () = {
35    const ACTUAL_SIZE: usize = core::mem::size_of::<BSISoundCategoryVtbl>();
36    const EXPECTED_SIZE: usize = (0x0B + 1) * core::mem::size_of::<usize>();
37    assert!(ACTUAL_SIZE == EXPECTED_SIZE);
38};