commonlibsse_ng\re\b/
BGSStoryManagerTreeForm.rs

1use crate::re::BSTArray::BSTArray;
2use crate::re::TESForm::{TESForm, TESFormVtbl};
3use crate::re::offsets_rtti::{RTTI_BGSStoryManagerTreeForm, RTTI_BGSStoryManagerTreeVisitor};
4use crate::re::offsets_vtable::{
5    VTABLE_BGSStoryManagerTreeForm, VTABLE_BGSStoryManagerTreeVisitor,
6};
7use crate::re::{BGSStoryManagerQuestNode, PeriodicUpdateTimer, VisitControl_CEnum};
8use crate::rel::id::VariantID;
9
10#[repr(C)]
11#[derive(Debug)]
12pub struct BGSStoryManagerTreeVisitor {
13    pub vtable: *const BGSStoryManagerTreeVisitorVtbl, // 0x00
14    pub timer: *mut PeriodicUpdateTimer,               // 0x08
15    pub currentCursorDepth: i32,                       // 0x10
16    pub pad14: u32,                                    // 0x14
17    pub lastQuestParent: *mut BGSStoryManagerQuestNode, // 0x18
18    pub cursorAncestry: BSTArray<*mut BGSStoryManagerTreeForm>, // 0x20
19    pub queryID: u32,                                  // 0x38
20    pub pad3C: u32,                                    // 0x3C
21}
22const _: () = assert!(core::mem::size_of::<BGSStoryManagerTreeVisitor>() == 0x40);
23
24impl BGSStoryManagerTreeVisitor {
25    pub const RTTI: VariantID = RTTI_BGSStoryManagerTreeVisitor;
26    pub const VTABLE: [VariantID; 1] = VTABLE_BGSStoryManagerTreeVisitor;
27}
28
29#[repr(C)]
30#[derive(Debug)]
31pub struct BGSStoryManagerTreeVisitorVtbl {
32    pub __base: TESFormVtbl, // 0x00
33}
34
35#[repr(C)]
36#[derive(Debug)]
37pub struct BGSStoryManagerTreeForm {
38    pub __base: TESForm,    // 0x00
39    pub lastVisitorID: u32, // 0x20
40    pub pad14: u32,         // 0x24
41}
42const _: () = assert!(core::mem::size_of::<BGSStoryManagerTreeForm>() == 0x28);
43
44impl BGSStoryManagerTreeForm {
45    pub const RTTI: VariantID = RTTI_BGSStoryManagerTreeForm;
46    pub const VTABLE: [VariantID; 1] = VTABLE_BGSStoryManagerTreeForm;
47}
48
49#[repr(C)]
50#[derive(Debug)]
51pub struct BGSStoryManagerTreeFormVtbl {
52    pub __base: TESFormVtbl,                                    // 0x00
53    pub QChildCount: fn(this: &BGSStoryManagerTreeForm) -> u32, // 0x38
54    pub GetChild: fn(this: &BGSStoryManagerTreeForm, index: u32) -> *mut BGSStoryManagerTreeForm, // 0x3C
55    pub QConditions: fn(this: &mut BGSStoryManagerTreeForm) -> u32,
56    pub AcceptVisitor: fn(
57        this: &mut BGSStoryManagerTreeForm,
58        visitor: &BGSStoryManagerTreeVisitor,
59    ) -> VisitControl_CEnum,
60}
61const _: () = {
62    const VFUNC_COUNT: usize = 0x3E + 1;
63
64    const EXPECTED_SIZE: usize = VFUNC_COUNT * core::mem::size_of::<usize>();
65    assert!(core::mem::size_of::<BGSStoryManagerTreeFormVtbl>() == EXPECTED_SIZE);
66};