CommonLibVR
MapMenu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSSoundHandle.h"
4 #include "RE/B/BSTArray.h"
5 #include "RE/B/BSTEvent.h"
6 #include "RE/B/BSTSmartPointer.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 #ifdef SKYRIMVR
13 # include "RE/W/WorldSpaceMenu.h"
14 #endif
15 
16 namespace RE
17 {
18  class BSAudioManager;
19  class MapLookHandler;
20  class MapMoveHandler;
21  class MapZoomHandler;
22  class MenuOpenCloseEvent;
23  class TESWorldSpace;
24 
25 #ifndef SKYRIMVR
26  // menuDepth = 3
27  // flags = kPausesGame | kUsesCursor | kRendersOffscreenTargets | kCustomRendering
28  // context = kMap
29  class MapMenu :
30  public IMenu, // 00000
31  public BSTEventSink<MenuOpenCloseEvent>, // 00030
32  public IMapCameraCallbacks // 00038
33  {
34  public:
35  inline static constexpr auto RTTI = RTTI_MapMenu;
36  constexpr static std::string_view MENU_NAME = "MapMenu";
37 
38  ~MapMenu() override; // 00
39 
40  // override (IMenu)
41  void Accept(CallbackProcessor* a_processor) override; // 01
42  UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
43  void AdvanceMovie(float a_interval, std::uint32_t a_currentTime) override; // 05
44  void RefreshPlatform() override; // 08
45 
46  // override (BSTEventSink<MenuOpenCloseEvent>)
48 
49  void PlaceMarker()
50  {
51  using func_t = decltype(&MapMenu::PlaceMarker);
52  static REL::Relocation<func_t> func{ RELOCATION_ID(52226, 53113) };
53  return func(this);
54  }
55 
56  // members
62  RefHandle unk30460; // 30460
66  MapCamera camera; // 304A0
67  std::uint64_t unk30530; // 30530
69  GFxValue mapMovie; // 30540
70  std::int32_t selectedMarker; // 30558
74  std::uint64_t unk30580; // 30580
75  std::uint32_t unk30588; // 30588
76  bool controlsReady; // 3058C
77  std::uint8_t unk3058D; // 3058D
78  std::uint16_t unk3058E; // 3058E
79  std::uint64_t unk30590; // 30590
80  private:
81  KEEP_FOR_RE()
82  };
83  static_assert(sizeof(MapMenu) == 0x30598);
84 #else
85  class MapClickHandler;
86  class MapTouchpadHandler;
87 
88  class MapMenu :
89  public WorldSpaceMenu, // 00
90  public BSTEventSink<MenuOpenCloseEvent> // 58
91  {
92  public:
93  inline static constexpr auto RTTI = RTTI_MapMenu;
94  constexpr static std::string_view MENU_NAME = "MapMenu";
95 
96  ~MapMenu() override; // 00
97 
98  // override (IMenu)
99  void Accept(CallbackProcessor* a_processor) override; // 01
100  UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 04
101  void AdvanceMovie(float a_interval, std::uint32_t a_currentTime) override; // 05
102  void RefreshPlatform() override; // 08
103 
104  // override (BSTEventSink<MenuOpenCloseEvent>)
105  BSEventNotifyControl ProcessEvent(const MenuOpenCloseEvent* a_event, BSTEventSource<MenuOpenCloseEvent>* a_eventSource) override; // 01
106 
107  void PlaceMarker()
108  {
109  using func_t = decltype(&MapMenu::PlaceMarker);
110  REL::Relocation<func_t> func{ RELOCATION_ID(52226, 53113) };
111  return func(this);
112  }
113 
114  // members
115  BSTSmartPointer<MapMoveHandler> moveHandler; // 00060
116  BSTSmartPointer<MapLookHandler> lookHandler; // 00068
117  BSTSmartPointer<MapZoomHandler> zoomHandler; // 00070
118  BSTSmartPointer<MapClickHandler> clickHandler; // 00078
119  BSTSmartPointer<MapTouchpadHandler> touchpadHandler; // 00080
120  BSTSmartPointer<void*> unk00088; // 00088
121  BSTSmartPointer<void*> unk00090; // 00090
122  BSTSmartPointer<void*> unk00098; // 00098
123  BSTSmartPointer<void*> unk000A0; // 000A0
124  ObjectRefHandle mapMarker; // 000A8
125  LocalMapMenu localMapMenu; // 000B0
126  RefHandle unk30530; // 30530
127  NiPoint3 unk30534; // 30534
128  BSTArray<void*> unk30540; // 30540
129  BSTArray<void*> unk30558; // 30558
130  NiPoint3 unk30570; // 30570
131  std::uint32_t unk3057C; // 3057C
132  std::uint64_t unk30580; // 30580
133  std::uint64_t unk30588; // 30588
134  TESWorldSpace* worldSpace; // 30590
135  GFxValue unk30598; // 30598
136  BSSoundHandle unk305B0; // 305B0
137  std::uint64_t unk305C0; // 305C0
138  std::uint64_t unk305C8; // 305C8
139  std::uint64_t unk305D0; // 305D0
140  std::uint64_t unk305D8; // 305D0
141  std::uint64_t unk305E0; // 305E0
142  std::uint64_t unk305E8; // 305E8
143  private:
144  KEEP_FOR_RE()
145  };
146  static_assert(sizeof(MapMenu) == 0x305F0);
147 #endif
148 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:702
Definition: Relocation.h:210
Definition: BSTArray.h:378
Definition: BSTEvent.h:143
Definition: BSTSmartPointer.h:37
Definition: FxDelegateHandler.h:20
Definition: GFxValue.h:92
Definition: IMenu.h:64
Definition: MapCamera.h:21
Definition: MapMenu.h:33
~MapMenu() override
MapCamera camera
Definition: MapMenu.h:66
NiPoint3 cameraPickOrigin
Definition: MapMenu.h:71
BSTArray< GFxValue > markerData
Definition: MapMenu.h:65
void Accept(CallbackProcessor *a_processor) override
constexpr static std::string_view MENU_NAME
Definition: MapMenu.h:36
LocalMapMenu localMapMenu
Definition: MapMenu.h:61
std::uint16_t unk3058E
Definition: MapMenu.h:78
std::uint64_t unk30590
Definition: MapMenu.h:79
BSTSmartPointer< MapZoomHandler > zoomHandler
Definition: MapMenu.h:59
BSTSmartPointer< MapLookHandler > lookHandler
Definition: MapMenu.h:58
NiPoint3 playerMarkerPosition
Definition: MapMenu.h:63
std::uint64_t unk30530
Definition: MapMenu.h:67
UI_MESSAGE_RESULTS ProcessMessage(UIMessage &a_message) override
BSTArray< MapMenuMarker > mapMarkers
Definition: MapMenu.h:64
bool controlsReady
Definition: MapMenu.h:76
GFxValue mapMovie
Definition: MapMenu.h:69
NiPoint3 cameraPickDirection
Definition: MapMenu.h:72
TESWorldSpace * worldSpace
Definition: MapMenu.h:68
std::uint8_t unk3058D
Definition: MapMenu.h:77
RefHandle unk30460
Definition: MapMenu.h:62
std::uint64_t unk30580
Definition: MapMenu.h:74
std::int32_t selectedMarker
Definition: MapMenu.h:70
std::uint32_t unk30588
Definition: MapMenu.h:75
BSSoundHandle unk30574
Definition: MapMenu.h:73
void AdvanceMovie(float a_interval, std::uint32_t a_currentTime) override
static constexpr auto RTTI
Definition: MapMenu.h:35
BSEventNotifyControl ProcessEvent(const MenuOpenCloseEvent *a_event, BSTEventSource< MenuOpenCloseEvent > *a_eventSource) override
void PlaceMarker()
Definition: MapMenu.h:49
ObjectRefHandle mapMarker
Definition: MapMenu.h:60
void RefreshPlatform() override
BSTSmartPointer< MapMoveHandler > moveHandler
Definition: MapMenu.h:57
Definition: MenuOpenCloseEvent.h:8
Definition: NiPoint3.h:6
Definition: TESWorldSpace.h:120
Definition: UIMessage.h:28
Definition: AbsorbEffect.h:6
UI_MESSAGE_RESULTS
Definition: IMenu.h:49
BSPointerHandle< TESObjectREFR > ObjectRefHandle
Definition: BSPointerHandle.h:192
constexpr REL::ID RTTI_MapMenu(static_cast< std::uint64_t >(688986))
std::uint32_t RefHandle
Definition: BSCoreTypes.h:6
BSEventNotifyControl
Definition: BSTEvent.h:12
Definition: BSSoundHandle.h:10
Definition: IMapCameraCallbacks.h:8
Definition: LocalMapMenu.h:21