commonlibsse_ng\re\b/
BGSStoryTeller.rs1use crate::re::BSTArray::BSTArray;
2use crate::re::BSTEvent::BSTEventSink;
3use crate::re::BSTEvent::BSTEventSinkVtbl;
4use crate::re::BSTHashMap::BSTHashMap;
5use crate::re::TESQuest::TESQuest;
6use crate::re::TESQuestStageItemDoneEvent;
7use crate::re::offsets_rtti::RTTI_BGSStoryTeller;
8use crate::re::offsets_vtable::VTABLE_BGSStoryTeller;
9use crate::rel::id::VariantID;
10
11#[repr(C)]
12#[derive(Debug)]
13pub struct BGSStoryTeller {
14 pub __base: BSTEventSink<TESQuestStageItemDoneEvent>, pad09: u8, pad0A: u16, pad0C: u32, pub queuedStartQuests: BSTArray<*mut TESQuest>, pub runningQuests: BSTArray<*mut TESQuest>, pub queuedStopQuests: BSTArray<*mut TESQuest>, pub infoClearQuests: BSTArray<*mut TESQuest>, pub helloTopicQuests: BSTArray<*mut TESQuest>, pub greetingTopicQuests: BSTArray<*mut TESQuest>, pub startUpQuestsInitialized: bool, padA1: u8, padA2: u16, padA4: u32, pub questStageWaitMap: BSTHashMap<u32, *mut BSTArray<(u32, u32)>>, }
31const _: () = assert!(core::mem::size_of::<BGSStoryTeller>() == 0xD8);
32
33impl BGSStoryTeller {
34 pub const RTTI: VariantID = RTTI_BGSStoryTeller;
35 pub const VTABLE: [VariantID; 1] = VTABLE_BGSStoryTeller;
36
37 #[inline]
42 pub const fn vtable(&self) -> &BGSStoryTellerVtbl {
43 debug_assert!(self.__base.vtable.is_some(), "BGSStoryTellerVtbl ptr must not be null ptr");
44 unsafe { self.__base.vtable.unwrap().cast().as_ref() }
45 }
46
47 #[commonlibsse_ng_derive_internal::relocate(
49 cast_as = "*mut *mut BGSStoryTeller",
50 default = "None",
51 deref_once,
52 id(se = 514316, ae = 400476)
53 )]
54 pub fn get_singleton() -> Option<&'static BGSStoryTeller> {
55 |deref_type: DerefType| unsafe { deref_type.as_ref() }
56 }
57
58 #[commonlibsse_ng_derive_internal::relocate(
60 cast_as = "*mut *mut BGSStoryTeller",
61 default = "None",
62 deref_once,
63 id(se = 514316, ae = 400476)
64 )]
65 pub fn get_singleton_mut() -> Option<&'static mut BGSStoryTeller> {
66 |deref_type: DerefType| unsafe { deref_type.as_mut() }
67 }
68
69 #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 31718, ae_id = 32486)]
70 pub fn begin_shut_down_quest(&mut self, quest: *mut TESQuest) {}
71
72 #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 31717, ae_id = 32485)]
73 pub fn begin_start_up_quest(&mut self, quest: *mut TESQuest) {}
74}
75
76#[repr(C)]
77pub struct BGSStoryTellerVtbl {
78 pub __base: BSTEventSinkVtbl<TESQuestStageItemDoneEvent>, }
80const _: () = {
81 const VFUNC_COUNT: usize = 0x2;
82
83 const EXPECTED_SIZE: usize = VFUNC_COUNT * core::mem::size_of::<usize>();
84 assert!(core::mem::size_of::<BGSStoryTellerVtbl>() == EXPECTED_SIZE);
85};