CommonLibSSE NG
Loading...
Searching...
No Matches
MapMenu.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/B/BSTArray.h"
5#include "RE/B/BSTEvent.h"
7#include "RE/G/GFxValue.h"
9#include "RE/I/IMenu.h"
10#include "RE/L/LocalMapMenu.h"
11#include "RE/M/MapCamera.h"
12#include "RE/W/WorldSpaceMenu.h"
13
14namespace RE
15{
16 class BSAudioManager;
17 class MapLookHandler;
18 class MapMoveHandler;
19 class MapZoomHandler;
20 class MenuOpenCloseEvent;
21 class TESWorldSpace;
22
23 // menuDepth = 3
24 // flags = kPausesGame | kUsesCursor | kRendersOffscreenTargets | kCustomRendering
25 // context = kMap
26 class MapMenu :
27#if !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
28 public WorldSpaceMenu, // 00000
29 public BSTEventSink<MenuOpenCloseEvent>, // 00058
30 public IMapCameraCallbacks // 00060
31#elif !defined(ENABLE_SKYRIM_VR)
32 public IMenu, // 00000
33 public BSTEventSink<MenuOpenCloseEvent>, // 00030
34 public IMapCameraCallbacks // 00038
35#else
36 public IMenu
37#endif
38 {
39 public:
40 inline static constexpr auto RTTI = RTTI_MapMenu;
41 constexpr static std::string_view MENU_NAME = "MapMenu";
42
44 {
46 std::uint32_t unk08;
47 std::uint32_t unk0C;
49 std::uint32_t unk18;
50 std::uint32_t unk1C;
51 std::uint32_t unk20;
52 std::uint32_t unk24;
53 std::uint32_t unk28;
54 std::uint32_t unk2C;
55 std::uint32_t unk30;
56 std::uint32_t unk34;
57 };
58 static_assert(sizeof(Unk30470Entry) == 0x38);
59
61 {
62 std::uint32_t unk00;
63 std::uint32_t unk04;
64 std::uint32_t unk08;
65 std::uint32_t unk0C;
66 const char* label;
67 std::uint32_t unk18;
68 std::uint32_t unk1C;
69 std::uint32_t unk20;
70 std::uint32_t unk24;
71 std::uint32_t unk28;
72 std::uint32_t unk2C;
73 std::uint32_t unk30;
74 std::uint32_t unk34;
75 std::uint32_t unk38;
76 std::uint32_t unk3C;
77 std::uint32_t unk40;
78 std::uint32_t unk44;
79 };
80 static_assert(sizeof(Unk30488Entry) == 0x48);
81
83 {
84#define RUNTIME_DATA_CONTENT \
85 BSTSmartPointer<MapMoveHandler> moveHandler; /* 00 */ \
86 BSTSmartPointer<MapLookHandler> lookHandler; /* 08 */ \
87 BSTSmartPointer<MapZoomHandler> zoomHandler; /* 10 */ \
88 ObjectRefHandle mapMarker; /* 18 */ \
89 LocalMapMenu localMapMenu; /* 20 */
90
92 };
93#ifndef ENABLE_SKYRIM_VR
94 static_assert(sizeof(RUNTIME_DATA) == 0x30420);
95#elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
96 static_assert(sizeof(RUNTIME_DATA) == 0x304A0);
97#endif
98
100 {
101#define RUNTIME_DATA2_CONTENT \
102 RefHandle unk30460; /* 000 */ \
103 std::uint32_t unk30464; /* 004 */ \
104 std::uint32_t unk30468; /* 008 */ \
105 std::uint32_t unk3046C; /* 00C */ \
106 BSTArray<Unk30470Entry*> unk30470; /* 010 */ \
107 BSTArray<Unk30488Entry*> unk30488; /* 028 */ \
108 MapCamera camera; /* 040 */ \
109 std::uint64_t unk30530; /* 0D0 */ \
110 TESWorldSpace* worldSpace; /* 0D8 */ \
111 GFxValue unk30540; /* 0E0 */ \
112 std::uint64_t unk30558; /* 0F8 */ \
113 std::uint64_t unk30560; /* 100 */ \
114 std::uint64_t unk30568; /* 108 */ \
115 std::uint32_t unk30570; /* 110 */ \
116 BSSoundHandle unk30574; /* 114 */ \
117 std::uint64_t unk30580; /* 120 */ \
118 std::uint64_t unk30588; /* 128 */ \
119 std::uint64_t unk30590; /* 130 */
121 };
122 static_assert(sizeof(RUNTIME_DATA2) == 0x138);
123
124 ~MapMenu() override; // 00
125
126 // override (IMenu)
127 void Accept(CallbackProcessor* a_processor) override; // 01
128 UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
129 void AdvanceMovie(float a_interval, std::uint32_t a_currentTime) override; // 05
130 void RefreshPlatform() override; // 08
131
132 // override (BSTEventSink<MenuOpenCloseEvent>)
133#ifndef SKYRIM_CROSS_VR
135#endif
136
138 {
139 using func_t = decltype(&MapMenu::PlaceMarker);
140 REL::Relocation<func_t> func{ RELOCATION_ID(52226, 53113) };
141 return func(this);
142 }
143
144 [[nodiscard]] WorldSpaceMenu* AsWorldSpaceMenu() noexcept
145 {
147 return nullptr;
148 }
149 return &REL::RelocateMember<WorldSpaceMenu>(this, 0, 0);
150 }
151
152 [[nodiscard]] const WorldSpaceMenu* AsWorldSpaceMenu() const noexcept
153 {
154 return const_cast<MapMenu*>(this)->AsWorldSpaceMenu();
155 }
156
158 {
159 return &REL::RelocateMember<BSTEventSink<MenuOpenCloseEvent>>(this, 0x30, 0x58);
160 }
161
162 [[nodiscard]] const BSTEventSink<MenuOpenCloseEvent>* AsMenuOpenCloseEventSink() const noexcept
163 {
164 return const_cast<MapMenu*>(this)->AsMenuOpenCloseEventSink();
165 }
166
168 {
169 return &REL::RelocateMember<IMapCameraCallbacks>(this, 0x38, 0x60);
170 }
171
172 [[nodiscard]] const IMapCameraCallbacks* AsIMapCameraCallbacks() const noexcept
173 {
174 return const_cast<MapMenu*>(this)->AsIMapCameraCallbacks();
175 }
176
177 [[nodiscard]] inline RUNTIME_DATA& GetRuntimeData() noexcept
178 {
179 return REL::RelocateMember<RUNTIME_DATA>(this, 0x40, 0x68);
180 }
181
182 [[nodiscard]] inline const RUNTIME_DATA& GetRuntimeData() const noexcept
183 {
184 return REL::RelocateMember<RUNTIME_DATA>(this, 0x40, 0x68);
185 }
186
187 [[nodiscard]] inline RUNTIME_DATA2& GetRuntimeData2() noexcept
188 {
189 return REL::RelocateMember<RUNTIME_DATA2>(this, 0x30460, 0x30508);
190 }
191
192 [[nodiscard]] inline const RUNTIME_DATA2& GetRuntimeData2() const noexcept
193 {
194 return REL::RelocateMember<RUNTIME_DATA2>(this, 0x30460, 0x30508);
195 }
196
197 // members
198#ifndef SKYRIM_CROSS_VR
199 RUNTIME_DATA_CONTENT // 40, 68
200 RUNTIME_DATA2_CONTENT // 30460, 30508
201#endif
202 };
203#ifndef ENABLE_SKYRIM_VR
204 static_assert(sizeof(MapMenu) == 0x30598);
205#elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
206 static_assert(sizeof(MapMenu) == 0x30640);
207#endif
208}
209
210#undef RUNTIME_DATA_CONTENT
211#undef RUNTIME_DATA2_CONTENT
#define RUNTIME_DATA_CONTENT
Definition Actor.h:633
#define RUNTIME_DATA2_CONTENT
Definition MapMenu.h:101
#define RELOCATION_ID(a_se, a_ae)
Definition PCH.h:794
#define SKYRIM_REL_CONSTEXPR
Definition Relocation.h:105
Definition BSTEvent.h:143
Definition BSTEvent.h:19
Definition FxDelegateHandler.h:19
Definition IMenu.h:55
Definition MapMenu.h:38
~MapMenu() override
const RUNTIME_DATA2 & GetRuntimeData2() const noexcept
Definition MapMenu.h:192
const WorldSpaceMenu * AsWorldSpaceMenu() const noexcept
Definition MapMenu.h:152
void Accept(CallbackProcessor *a_processor) override
RUNTIME_DATA2 & GetRuntimeData2() noexcept
Definition MapMenu.h:187
const RUNTIME_DATA & GetRuntimeData() const noexcept
Definition MapMenu.h:182
IMapCameraCallbacks * AsIMapCameraCallbacks() noexcept
Definition MapMenu.h:167
const IMapCameraCallbacks * AsIMapCameraCallbacks() const noexcept
Definition MapMenu.h:172
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
WorldSpaceMenu * AsWorldSpaceMenu() noexcept
Definition MapMenu.h:144
static constexpr std::string_view MENU_NAME
Definition MapMenu.h:41
void AdvanceMovie(float a_interval, std::uint32_t a_currentTime) override
static constexpr auto RTTI
Definition MapMenu.h:40
BSEventNotifyControl ProcessEvent(const MenuOpenCloseEvent *a_event, BSTEventSource< MenuOpenCloseEvent > *a_eventSource) override
void PlaceMarker()
Definition MapMenu.h:137
RUNTIME_DATA & GetRuntimeData() noexcept
Definition MapMenu.h:177
const BSTEventSink< MenuOpenCloseEvent > * AsMenuOpenCloseEventSink() const noexcept
Definition MapMenu.h:162
BSTEventSink< MenuOpenCloseEvent > * AsMenuOpenCloseEventSink() noexcept
Definition MapMenu.h:157
void RefreshPlatform() override
Definition MenuOpenCloseEvent.h:8
Definition TESForm.h:35
Definition TESFullName.h:9
Definition UIMessage.h:28
Definition WorldSpaceMenu.h:19
static SKYRIM_REL_VR bool IsVR() noexcept
Definition Relocation.h:821
Definition Relocation.h:1638
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_MapMenu(688986, 396841, 0x1f490d0)
UI_MESSAGE_RESULTS
Definition IMenu.h:48
BSEventNotifyControl
Definition BSTEvent.h:12
Definition IMapCameraCallbacks.h:6
Definition MapMenu.h:100
Definition MapMenu.h:83
Definition MapMenu.h:44
std::uint32_t unk0C
Definition MapMenu.h:47
std::uint32_t unk1C
Definition MapMenu.h:50
TESForm * unk10
Definition MapMenu.h:48
std::uint32_t unk20
Definition MapMenu.h:51
std::uint32_t unk30
Definition MapMenu.h:55
std::uint32_t unk2C
Definition MapMenu.h:54
TESFullName * unk00
Definition MapMenu.h:45
std::uint32_t unk18
Definition MapMenu.h:49
std::uint32_t unk34
Definition MapMenu.h:56
std::uint32_t unk28
Definition MapMenu.h:53
std::uint32_t unk08
Definition MapMenu.h:46
std::uint32_t unk24
Definition MapMenu.h:52
Definition MapMenu.h:61
std::uint32_t unk00
Definition MapMenu.h:62
std::uint32_t unk30
Definition MapMenu.h:73
std::uint32_t unk08
Definition MapMenu.h:64
const char * label
Definition MapMenu.h:66
std::uint32_t unk0C
Definition MapMenu.h:65
std::uint32_t unk40
Definition MapMenu.h:77
std::uint32_t unk28
Definition MapMenu.h:71
std::uint32_t unk24
Definition MapMenu.h:70
std::uint32_t unk04
Definition MapMenu.h:63
std::uint32_t unk34
Definition MapMenu.h:74
std::uint32_t unk3C
Definition MapMenu.h:76
std::uint32_t unk44
Definition MapMenu.h:78
std::uint32_t unk18
Definition MapMenu.h:67
std::uint32_t unk2C
Definition MapMenu.h:72
std::uint32_t unk20
Definition MapMenu.h:69
std::uint32_t unk1C
Definition MapMenu.h:68
std::uint32_t unk38
Definition MapMenu.h:75