commonlibsse_ng\re\b/
BGSLoadFormData.rs

1use crate::re::BSCoreTypes::FormID;
2use crate::re::TESForm::TESForm;
3use crate::re::offsets_rtti::RTTI_BGSLoadFormData;
4use crate::rel::id::VariantID;
5
6#[commonlibsse_ng_derive_internal::to_bitflags]
7#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
8#[repr(u32)]
9pub enum Flags {
10    SkipForm = 1 << 0,
11    FormPending = 1 << 1,
12    RevertOnly = 1 << 2,
13    ConstructedForm = 1 << 3,
14    CellChanged = 1 << 4,
15    LoadingPackageFromExtraData = 1 << 5,
16}
17
18#[repr(C)]
19#[derive(Debug)]
20pub struct BGSLoadFormData {
21    pub formID: FormID,        // 0x00
22    pub size: u32,             // 0x04
23    pub uncompressedSize: u32, // 0x08
24    pub pad0C: u32,            // 0x0C
25    pub form: *mut TESForm,    // 0x10
26    pub changeFlags: u32,      // 0x18
27    pub oldChangeFlags: u32,   // 0x1C
28    pub flags: Flags,          // 0x20
29    pub pad22: u8,             // 0x22
30    pub version: u8,           // 0x23
31}
32const _: () = assert!(std::mem::size_of::<BGSLoadFormData>() == 0x28);
33
34impl BGSLoadFormData {
35    /// Address & offset of the runtime type information (RTTI) identifier.
36    pub const RTTI: VariantID = RTTI_BGSLoadFormData;
37}