CommonLibSSE (powerof3)
SkyrimVM.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSAtomic.h"
4 #include "RE/B/BSTEvent.h"
5 #include "RE/B/BSTFreeList.h"
6 #include "RE/B/BSTHashMap.h"
7 #include "RE/B/BSTMessageQueue.h"
8 #include "RE/B/BSTSingleton.h"
9 #include "RE/B/BSTSmartPointer.h"
11 #include "RE/D/DelayFunctor.h"
12 #include "RE/F/FragmentSystem.h"
13 #include "RE/H/HandlePolicy.h"
14 #include "RE/I/IFreezeQuery.h"
16 #include "RE/L/Logger.h"
17 #include "RE/P/Profiler.h"
18 #include "RE/S/SavePatcher.h"
21 #include "RE/S/SkyrimScriptStore.h"
22 
23 namespace RE
24 {
25  namespace BSScript
26  {
27  class IVirtualMachine;
28  class IVMDebugInterface;
29  class IVMSaveLoadInterface;
30  struct StatsEvent;
31  }
32 
33  struct PositionPlayerEvent;
34  struct TESActivateEvent;
35  struct TESActiveEffectApplyRemoveEvent;
36  struct TESActorLocationChangeEvent;
37  struct TESBookReadEvent;
38  struct TESCellAttachDetachEvent;
39  struct TESCellFullyLoadedEvent;
40  struct TESCombatEvent;
41  struct TESContainerChangedEvent;
42  struct TESDeathEvent;
43  struct TESDestructionStageChangedEvent;
44  struct TESEnterBleedoutEvent;
45  struct TESEquipEvent;
46  struct TESFastTravelEndEvent;
47  struct TESFormDeleteEvent;
48  struct TESFurnitureEvent;
49  struct TESGrabReleaseEvent;
50  struct TESHitEvent;
51  struct TESInitScriptEvent;
52  struct TESLoadGameEvent;
53  struct TESLockChangedEvent;
54  struct TESMagicEffectApplyEvent;
55  struct TESMagicWardHitEvent;
56  struct TESMoveAttachDetachEvent;
57  struct TESObjectLoadedEvent;
58  struct TESObjectREFRTranslationEvent;
59  struct TESOpenCloseEvent;
60  struct TESPackageEvent;
61  struct TESPerkEntryRunEvent;
62  struct TESPlayerBowShotEvent;
63  struct TESQuestInitEvent;
64  struct TESQuestStageEvent;
65  struct TESResetEvent;
66  struct TESResolveNPCTemplatesEvent;
67  struct TESSceneActionEvent;
68  struct TESSceneEvent;
69  struct TESScenePhaseEvent;
70  struct TESSellEvent;
71  struct TESSleepStartEvent;
72  struct TESSleepStopEvent;
73  struct TESSpellCastEvent;
74  struct TESSwitchRaceCompleteEvent;
75  struct TESTopicInfoEvent;
76  struct TESTrackedStatsEvent;
77  struct TESTrapHitEvent;
78  struct TESTriggerEnterEvent;
79  struct TESTriggerEvent;
80  struct TESTriggerLeaveEvent;
81  struct TESUniqueIDChangeEvent;
82 
83  class SkyrimVM :
84  public BSTSingletonSDM<SkyrimVM>, // 01A0
85  public BSScript::IFreezeQuery, // 0000
87  public BSTEventSink<TESActivateEvent>, // 0010
88  public BSTEventSink<TESActiveEffectApplyRemoveEvent>, // 0018
89  public BSTEventSink<TESActorLocationChangeEvent>, // 0020
90  public BSTEventSink<TESBookReadEvent>, // 0028
91  public BSTEventSink<TESCellAttachDetachEvent>, // 0030
92  public BSTEventSink<TESCellFullyLoadedEvent>, // 0038
93  public BSTEventSink<TESCombatEvent>, // 0040
94  public BSTEventSink<TESContainerChangedEvent>, // 0048
95  public BSTEventSink<TESDeathEvent>, // 0050
96  public BSTEventSink<TESDestructionStageChangedEvent>, // 0058
97  public BSTEventSink<TESEnterBleedoutEvent>, // 0060
98  public BSTEventSink<TESEquipEvent>, // 0068
99  public BSTEventSink<TESFormDeleteEvent>, // 0070
100  public BSTEventSink<TESFurnitureEvent>, // 0078
101  public BSTEventSink<TESGrabReleaseEvent>, // 0080
102  public BSTEventSink<TESHitEvent>, // 0088
103  public BSTEventSink<TESInitScriptEvent>, // 0090
104  public BSTEventSink<TESLoadGameEvent>, // 0098
105  public BSTEventSink<TESLockChangedEvent>, // 00A0
106  public BSTEventSink<TESMagicEffectApplyEvent>, // 00A8
107  public BSTEventSink<TESMagicWardHitEvent>, // 00B0
108  public BSTEventSink<TESMoveAttachDetachEvent>, // 00B8
109  public BSTEventSink<TESObjectLoadedEvent>, // 00C0
110  public BSTEventSink<TESObjectREFRTranslationEvent>, // 00C8
111  public BSTEventSink<TESOpenCloseEvent>, // 00D0
112  public BSTEventSink<TESPackageEvent>, // 00D8
113  public BSTEventSink<TESPerkEntryRunEvent>, // 00E0
114  public BSTEventSink<TESQuestInitEvent>, // 00E8
115  public BSTEventSink<TESQuestStageEvent>, // 00F0
116  public BSTEventSink<TESResetEvent>, // 00F8
117  public BSTEventSink<TESResolveNPCTemplatesEvent>, // 0100
118  public BSTEventSink<TESSceneEvent>, // 0108
119  public BSTEventSink<TESSceneActionEvent>, // 0110
120  public BSTEventSink<TESScenePhaseEvent>, // 0118
121  public BSTEventSink<TESSellEvent>, // 0120
122  public BSTEventSink<TESSleepStartEvent>, // 0128
123  public BSTEventSink<TESSleepStopEvent>, // 0130
124  public BSTEventSink<TESSpellCastEvent>, // 0138
125  public BSTEventSink<TESTopicInfoEvent>, // 0140
126  public BSTEventSink<TESTrackedStatsEvent>, // 0148
127  public BSTEventSink<TESTrapHitEvent>, // 0150
128  public BSTEventSink<TESTriggerEvent>, // 0158
129  public BSTEventSink<TESTriggerEnterEvent>, // 0160
130  public BSTEventSink<TESTriggerLeaveEvent>, // 0168
131  public BSTEventSink<TESUniqueIDChangeEvent>, // 0170
132  public BSTEventSink<TESSwitchRaceCompleteEvent>, // 0178
133  public BSTEventSink<TESPlayerBowShotEvent>, // 0180
134  public BSTEventSink<TESFastTravelEndEvent>, // 0188
135  public BSTEventSink<PositionPlayerEvent>, // 0190
136  public BSTEventSink<BSScript::StatsEvent>, // 0198
137  public BSTEventSource<BSScript::StatsEvent> // 01A8
138  {
139  public:
140  inline static constexpr auto RTTI = RTTI_SkyrimVM;
141 
142  ~SkyrimVM() override; // 00
143 
145 
147 
148  // members
161  std::uint64_t unk0678; // 0678
162  std::uint64_t unk0680; // 0680
163  std::uint64_t unk0688; // 0688
164  std::uint64_t unk0690; // 0690
165  std::uint64_t unk0698; // 0698
166  std::uint64_t unk06A0; // 06A0
170  std::uint64_t unk06F0; // 06F0
172  std::uint64_t unk0710; // 0710
173  std::uint64_t unk0718; // 0718
176  std::uint64_t unk0750; // 0750
177  std::uint64_t unk0758; // 0758
179  std::uint64_t unk0790; // 0790
195  mutable BSSpinLock unk88F8; // 88F8
197  std::uint64_t unk8930; // 8930
198  std::uint64_t unk8938; // 8938
199  std::uint64_t unk8940; // 8940
201  };
202  static_assert(sizeof(SkyrimVM) == 0x8978);
203 }
Definition: CompiledScriptLoader.h:14
Definition: IFreezeQuery.h:8
Definition: IStackCallbackSaveInterface.h:8
Definition: IVMDebugInterface.h:8
Definition: IVMSaveLoadInterface.h:8
Definition: SimpleAllocMemoryPagePolicy.h:11
Definition: BSAtomic.h:49
Definition: BSTMessageQueue.h:63
Definition: BSTEvent.h:146
Definition: BSTEvent.h:28
Definition: BSTHashMap.h:21
Definition: BSTSmartPointer.h:37
Definition: BSTFreeList.h:28
Definition: FragmentSystem.h:11
Definition: HandlePolicy.h:11
Definition: Logger.h:11
Definition: SkyrimScriptObjectBindPolicy.h:11
Definition: Profiler.h:12
Definition: SavePatcher.h:10
Definition: SkyrimVM.h:138
BSTCommonLLMessageQueue< BSTSmartPointer< SkyrimScript::DelayFunctor > > postRenderFunctorQueue2
Definition: SkyrimVM.h:188
bool QueuePostRenderCall(const BSTSmartPointer< SkyrimScript::DelayFunctor > &a_functor)
std::uint64_t unk0678
Definition: SkyrimVM.h:161
std::uint64_t unk06F0
Definition: SkyrimVM.h:170
BSTArray< void * > unk06F8
Definition: SkyrimVM.h:171
BSScript::CompiledScriptLoader scriptLoader
Definition: SkyrimVM.h:153
SkyrimScript::Logger logger
Definition: SkyrimVM.h:154
BSTCommonLLMessageQueue< BSTSmartPointer< SkyrimScript::DelayFunctor > > renderSafeFunctorQueue2
Definition: SkyrimVM.h:184
SkyrimScript::ObjectBindPolicy objectBindPolicy
Definition: SkyrimVM.h:156
std::uint64_t unk0790
Definition: SkyrimVM.h:179
std::uint64_t unk06A0
Definition: SkyrimVM.h:166
~SkyrimVM() override
BSTArray< void * > unk06D8
Definition: SkyrimVM.h:169
BSTStaticFreeList< BSTSmartPointer< SkyrimScript::DelayFunctor >, 512 > postRenderFunctorPool2
Definition: SkyrimVM.h:187
std::uint64_t unk0718
Definition: SkyrimVM.h:173
BSScript::IVMDebugInterface * debugInterface
Definition: SkyrimVM.h:151
BSTCommonLLMessageQueue< BSTSmartPointer< SkyrimScript::DelayFunctor > > * postRenderQueueToReadFrom
Definition: SkyrimVM.h:193
SkyrimScript::FragmentSystem fragmentSystem
Definition: SkyrimVM.h:158
BSSpinLock renderSafeQueueLock
Definition: SkyrimVM.h:189
BSTArray< void * > unk06C0
Definition: SkyrimVM.h:168
SkyrimScript::HandlePolicy handlePolicy
Definition: SkyrimVM.h:155
std::uint64_t unk0690
Definition: SkyrimVM.h:164
BSTStaticFreeList< BSTSmartPointer< SkyrimScript::DelayFunctor >, 512 > renderSafeFunctorPool1
Definition: SkyrimVM.h:181
BSScript::SimpleAllocMemoryPagePolicy memoryPagePolicy
Definition: SkyrimVM.h:152
BSTArray< void * > unk0720
Definition: SkyrimVM.h:174
BSTHashMap< UnkKey, UnkValue > unk0798
Definition: SkyrimVM.h:180
BSTSmartPointer< SkyrimScript::Store > scriptStore
Definition: SkyrimVM.h:157
BSTArray< void * > unk06A8
Definition: SkyrimVM.h:167
BSTCommonLLMessageQueue< BSTSmartPointer< SkyrimScript::DelayFunctor > > * renderSafeQueueToWriteTo
Definition: SkyrimVM.h:191
std::uint64_t unk0680
Definition: SkyrimVM.h:162
BSTCommonLLMessageQueue< BSTSmartPointer< SkyrimScript::DelayFunctor > > renderSafeFunctorQueue1
Definition: SkyrimVM.h:182
BSSpinLock unk88F8
Definition: SkyrimVM.h:195
static SkyrimVM * GetSingleton()
BSTSmartPointer< BSScript::IVirtualMachine > impl
Definition: SkyrimVM.h:149
static constexpr auto RTTI
Definition: SkyrimVM.h:140
std::uint64_t unk0758
Definition: SkyrimVM.h:177
std::uint64_t unk0710
Definition: SkyrimVM.h:172
BSTStaticFreeList< BSTSmartPointer< SkyrimScript::DelayFunctor >, 512 > renderSafeFunctorPool2
Definition: SkyrimVM.h:183
std::uint64_t unk0750
Definition: SkyrimVM.h:176
BSTCommonLLMessageQueue< BSTSmartPointer< SkyrimScript::DelayFunctor > > postRenderFunctorQueue1
Definition: SkyrimVM.h:186
std::uint64_t unk0688
Definition: SkyrimVM.h:163
BSTStaticFreeList< BSTSmartPointer< SkyrimScript::DelayFunctor >, 512 > postRenderFunctorPool1
Definition: SkyrimVM.h:185
BSTArray< void * > unk0738
Definition: SkyrimVM.h:175
std::uint64_t unk0698
Definition: SkyrimVM.h:165
std::uint64_t unk8940
Definition: SkyrimVM.h:199
BSSpinLock postRenderQueueLock
Definition: SkyrimVM.h:192
SkyrimScript::Profiler profiler
Definition: SkyrimVM.h:159
BSTHashMap< UnkKey, UnkValue > unk8900
Definition: SkyrimVM.h:196
BSTCommonLLMessageQueue< BSTSmartPointer< SkyrimScript::DelayFunctor > > * postRenderQueueToWriteTo
Definition: SkyrimVM.h:194
BSTHashMap< UnkKey, UnkValue > unk0760
Definition: SkyrimVM.h:178
BSTHashMap< UnkKey, UnkValue > unk8948
Definition: SkyrimVM.h:200
BSTCommonLLMessageQueue< BSTSmartPointer< SkyrimScript::DelayFunctor > > * renderSafeQueueToReadFrom
Definition: SkyrimVM.h:190
BSScript::IVMSaveLoadInterface * saveLoadInterface
Definition: SkyrimVM.h:150
std::uint64_t unk8930
Definition: SkyrimVM.h:197
std::uint64_t unk8938
Definition: SkyrimVM.h:198
SkyrimScript::SavePatcher savePatcher
Definition: SkyrimVM.h:160
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_SkyrimVM
Definition: Offsets_RTTI.h:5922
Definition: BSTSingleton.h:50