CommonLibSSE NG
Inventory3DManager.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSTArray.h"
4 #include "RE/B/BSTSingleton.h"
5 #include "RE/B/BSTSmartPointer.h"
6 #include "RE/E/ExtraDataList.h"
8 #include "RE/N/NiPoint3.h"
9 #include "RE/N/NiSmartPointer.h"
10 #include "SKSE/Version.h"
11 
12 namespace RE
13 {
14  class InventoryEntryData;
15  class NewInventoryMenuItemLoadTask;
16  class NiAVObject;
17  class TESBoundObject;
18  class TESObjectREFR;
19 
21  {
22  public:
23  // members
24  TESForm* itemBase; // 00 - smart ptr
27  std::uint64_t unk18; // 18
28  };
29  static_assert(sizeof(LoadedInventoryModel) == 0x20);
30 
32  public BSTSingletonSDM<Inventory3DManager>, // 10
33  public MenuEventHandler // 00
34  {
35  public:
36  ~Inventory3DManager() override; // 00
37 
39 
40  void UpdateItem3D(InventoryEntryData* a_objDesc);
41  void UpdateMagic3D(TESForm* a_form, std::uint32_t a_arg2);
42  void Clear3D();
43  std::uint32_t Render();
44 
45  struct RUNTIME_DATA
46  {
47 #define RUNTIME_DATA_CONTENT \
48  BSTSmallArray<LoadedInventoryModel, 7> loadedModels; /* 058, 060 */ \
49  std::uint32_t unk148; /* 148, 150 */ \
50  float zoomProgress; /* 14C, 154 - 1 if zoomed in, 0 if not, in-between during transition */ \
51  BSTSmartPointer<NewInventoryMenuItemLoadTask> loadTask; /* 150, 158 */ \
52  std::uint8_t unk158; /* 158, 160 */ \
53  std::uint8_t unk159; /* 159, 161 */ \
54  std::uint8_t unk15A; /* 15A, 162 */ \
55  std::uint8_t pad15B; /* 15B, 163 */ \
56  std::uint32_t pad15C; /* 15C, 164 */
57 
59  };
60  static_assert(sizeof(RUNTIME_DATA) == 0x108);
61 
62  [[nodiscard]] inline RUNTIME_DATA& GetRuntimeData() noexcept
63  {
64  return REL::RelocateMemberIfNewer<RUNTIME_DATA>(SKSE::RUNTIME_SSE_1_6_629, this, 0x58, 0x60);
65  }
66 
67  [[nodiscard]] inline const RUNTIME_DATA& GetRuntimeData() const noexcept
68  {
69  return REL::RelocateMemberIfNewer<RUNTIME_DATA>(SKSE::RUNTIME_SSE_1_6_629, this, 0x58, 0x60);
70  }
71 
72  // members
73  std::uint8_t unk011; // 011
74  std::uint16_t unk012; // 012
76  NiPoint3 itemPos; // 020
77  float itemScaleCopy; // 02C
78  float itemScale; // 030
79  std::uint32_t unk034; // 034
82 
83 #ifndef ENABLE_SKYRIM_AE
85 #endif
86  };
87 #ifndef ENABLE_SKYRIM_AE
88  static_assert(sizeof(Inventory3DManager) == 0x160);
89 #endif
90 }
91 #undef RUNTIME_DATA_CONTENT
#define RUNTIME_DATA_CONTENT
Definition: Inventory3DManager.h:47
Definition: ExtraDataList.h:53
Definition: Inventory3DManager.h:34
~Inventory3DManager() override
float itemScaleCopy
Definition: Inventory3DManager.h:77
static Inventory3DManager * GetSingleton()
NiPoint3 itemPos
Definition: Inventory3DManager.h:76
RUNTIME_DATA & GetRuntimeData() noexcept
Definition: Inventory3DManager.h:62
ExtraDataList originalExtra
Definition: Inventory3DManager.h:81
std::uint16_t unk012
Definition: Inventory3DManager.h:74
TESObjectREFR * tempRef
Definition: Inventory3DManager.h:80
std::uint32_t Render()
void UpdateMagic3D(TESForm *a_form, std::uint32_t a_arg2)
std::uint32_t unk034
Definition: Inventory3DManager.h:79
NiPoint3 itemPosCopy
Definition: Inventory3DManager.h:75
float itemScale
Definition: Inventory3DManager.h:78
const RUNTIME_DATA & GetRuntimeData() const noexcept
Definition: Inventory3DManager.h:67
void UpdateItem3D(InventoryEntryData *a_objDesc)
std::uint8_t unk011
Definition: Inventory3DManager.h:73
Definition: InventoryEntryData.h:15
Definition: MenuEventHandler.h:14
Definition: NiPoint3.h:6
Definition: NiSmartPointer.h:9
Definition: TESBoundObject.h:24
Definition: TESForm.h:36
Definition: TESObjectREFR.h:113
Definition: AbsorbEffect.h:6
constexpr REL::Version RUNTIME_SSE_1_6_629(1, 6, 629, 0)
Definition: BSTSingleton.h:50
Definition: Inventory3DManager.h:46
Definition: Inventory3DManager.h:21
std::uint64_t unk18
Definition: Inventory3DManager.h:27
TESBoundObject * modelObj
Definition: Inventory3DManager.h:25
NiPointer< NiAVObject > spModel
Definition: Inventory3DManager.h:26
TESForm * itemBase
Definition: Inventory3DManager.h:24