commonlibsse_ng\re\t/
TESWordOfPower.rs

1use crate::re::BSFixedString::BSFixedString;
2use crate::re::FormTypes::FormType;
3use crate::re::TESForm::TESForm;
4use crate::re::TESForm::TESFormVtbl;
5use crate::re::TESFullName::{TESFullName, TESFullNameVtbl};
6use crate::re::offsets_rtti::RTTI_TESWordOfPower;
7use crate::re::offsets_vtable::VTABLE_TESWordOfPower;
8use crate::rel::id::VariantID;
9
10#[repr(C)]
11#[derive(Debug)]
12pub struct TESWordOfPower {
13    pub __base: TESForm,            // 0x00
14    pub __base1: TESFullName,       // 0x20
15    pub translation: BSFixedString, // 0x30
16}
17const _: () = assert!(core::mem::size_of::<TESWordOfPower>() == 0x38);
18
19impl TESWordOfPower {
20    /// Address & offset of the runtime type information (RTTI) identifier.
21    pub const RTTI: VariantID = RTTI_TESWordOfPower;
22
23    /// Address & offset of the virtual function table.
24    ///
25    /// The number of tables is the same as the number of classes with inherited virtual functions.
26    pub const VTABLE: [VariantID; 2] = VTABLE_TESWordOfPower;
27
28    /// The `FormType` value for TESWordOfPower.
29    pub const FORM_TYPE: FormType = FormType::WordOfPower;
30}
31
32#[repr(C)]
33pub struct TESWordOfPowerVtbl {
34    pub __base: TESFormVtbl,
35    pub __base1: TESFullNameVtbl,
36}
37// const _: () = {
38//     const VTABLE_SIZE: usize = core::mem::size_of::<TESWordOfPowerVtbl>();
39//     const EXPECTED_SIZE: usize = (0x26 + 1) * core::mem::size_of::<usize>();
40//     assert!(VTABLE_SIZE == EXPECTED_SIZE);
41// };
42
43#[commonlibsse_ng_derive_internal::to_bitflags]
44#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
45#[repr(u32)]
46pub enum RecordFlag {
47    Deleted = 1 << 5,
48    Ignored = 1 << 12,
49}