Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: misc2 #29

Merged
merged 1 commit into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CommonLibF4/cmake/sourcelist.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ set(SOURCES
include/RE/Bethesda/Settings.h
include/RE/Bethesda/Sky.h
include/RE/Bethesda/SplineUtils.h
include/RE/Bethesda/TES.h
include/RE/Bethesda/TESBoundAnimObjects.h
include/RE/Bethesda/TESBoundObjects.h
include/RE/Bethesda/TESCamera.h
Expand Down
2 changes: 1 addition & 1 deletion CommonLibF4/include/RE/Bethesda/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ namespace RE
bool SetupSpecialIdle(Actor& a_actor, RE::DEFAULT_OBJECT a_defaultObject, TESIdleForm* a_idle, bool a_testConditions, TESObjectREFR* a_targetOverride)
{
using func_t = decltype(&AIProcess::SetupSpecialIdle);
static REL::Relocation<func_t> func{ REL::ID(1446774) };
static REL::Relocation<func_t> func{ REL::ID(2231704) };
return func(this, a_actor, a_defaultObject, a_idle, a_testConditions, a_targetOverride);
}

Expand Down
11 changes: 11 additions & 0 deletions CommonLibF4/include/RE/Bethesda/Archive2.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,4 +341,15 @@ namespace RE::BSResource::Archive2
BSFixedString nameText; // 30
};
static_assert(sizeof(AsyncReaderStream) == 0x38);

class StreamOpenedEvent
{
public:
// members
BSFixedString streamName; // 00
BSFixedString sourceName; // 08
std::uint64_t startOffset; // 10
std::uint32_t sizeInArchive; // 18
};
static_assert(sizeof(StreamOpenedEvent) == 0x20);
}
9 changes: 5 additions & 4 deletions CommonLibF4/include/RE/Bethesda/BSGraphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ namespace RE
public:
[[nodiscard]] static RendererData* GetSingleton()
{
static REL::Relocation<RendererData**> singleton{ REL::ID(1235449) };
static REL::Relocation<RendererData**> singleton{ REL::ID(2704429) };
return *singleton;
}

Expand Down Expand Up @@ -512,7 +512,7 @@ namespace RE
public:
[[nodiscard]] static State GetSingleton()
{
static REL::Relocation<State*> singleton{ REL::ID(600795) };
static REL::Relocation<State*> singleton{ REL::ID(2704621) };
return *singleton;
}

Expand Down Expand Up @@ -621,7 +621,7 @@ namespace RE

[[nodiscard]] static RenderTargetManager GetSingleton()
{
static REL::Relocation<RenderTargetManager*> singleton{ REL::ID(1508457) };
static REL::Relocation<RenderTargetManager*> singleton{ REL::ID(2666735) };
return *singleton;
}

Expand All @@ -636,6 +636,7 @@ namespace RE
RenderTargetProperties renderTargetData[100]; // 000
DepthStencilTargetProperties depthStencilTargetData[12]; // C80
CubeMapRenderTargetProperties cubeMapRenderTargetData[1]; // DA0
std::byte padDC4[0x30];
std::uint32_t renderTargetID[100]; // DC4
std::uint32_t depthStencilTargetID[12]; // F54
std::uint32_t cubeMapRenderTargetID[1]; // F84
Expand All @@ -656,7 +657,7 @@ namespace RE
BSTAtomicValue<std::uint32_t> dynamicResolutionDisabled; // FB4
Create_T create; // FB8
};
static_assert(sizeof(RenderTargetManager) == 0xFC0);
static_assert(sizeof(RenderTargetManager) == 0xFF0);
};

namespace BSShaderTechniqueIDMap
Expand Down
8 changes: 4 additions & 4 deletions CommonLibF4/include/RE/Bethesda/BSInputEnableManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ namespace RE

[[nodiscard]] static BSInputEnableManager* GetSingleton()
{
static REL::Relocation<BSInputEnableManager**> singleton{ REL::ID(781703) };
static REL::Relocation<BSInputEnableManager**> singleton{ REL::ID(2689007) };
return *singleton;
}

bool AllocateNewLayer(BSTSmartPointer<BSInputEnableLayer>& a_layer, const char* a_debugName)
{
using func_t = decltype(&BSInputEnableManager::AllocateNewLayer);
static REL::Relocation<func_t> func{ REL::ID(537494) };
static REL::Relocation<func_t> func{ REL::ID(2268244) };
return func(this, a_layer, a_debugName);
}

Expand All @@ -98,14 +98,14 @@ namespace RE
bool EnableUserEvent(std::uint32_t a_layerID, UEFlag a_userEventFlags, bool a_enable, UserEvents::SENDER_ID a_senderID)
{
using func_t = decltype(&BSInputEnableManager::EnableUserEvent);
static REL::Relocation<func_t> func{ REL::ID(1432984) };
static REL::Relocation<func_t> func{ REL::ID(2268263) };
return func(this, a_layerID, a_userEventFlags, a_enable, a_senderID);
}

bool EnableOtherEvent(std::uint32_t a_layerID, OEFlag a_otherEventFlags, bool a_enable, UserEvents::SENDER_ID a_senderID)
{
using func_t = decltype(&BSInputEnableManager::EnableOtherEvent);
static REL::Relocation<func_t> func{ REL::ID(1419268) };
static REL::Relocation<func_t> func{ REL::ID(2268265) };
return func(this, a_layerID, a_otherEventFlags, a_enable, a_senderID);
}

Expand Down
8 changes: 8 additions & 0 deletions CommonLibF4/include/RE/Bethesda/BSInputEventUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ namespace RE
};
static_assert(sizeof(DisconnectHandler) == 0x10);

struct __declspec(novtable) MenuOpenHandler :
public BSInputEventUser // 00
{
static constexpr auto RTTI{ RTTI::MenuOpenHandler };
static constexpr auto VTABLE{ VTABLE::MenuOpenHandler };
};
static_assert(sizeof(MenuOpenHandler) == 0x10);

struct __declspec(novtable) ScreenshotHandler :
public BSInputEventUser // 00
{
Expand Down
2 changes: 1 addition & 1 deletion CommonLibF4/include/RE/Bethesda/BSScaleformManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace RE

[[nodiscard]] static BSScaleformManager* GetSingleton()
{
static REL::Relocation<BSScaleformManager**> singleton{ REL::ID(106578) };
static REL::Relocation<BSScaleformManager**> singleton{ REL::ID(2689600) };
return *singleton;
}

Expand Down
2 changes: 1 addition & 1 deletion CommonLibF4/include/RE/Bethesda/ControlMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ namespace RE
void SetTextEntryMode(bool a_enable)
{
using func_t = decltype(&ControlMap::SetTextEntryMode);
static REL::Relocation<func_t> func{ REL::ID(0) };
static REL::Relocation<func_t> func{ REL::ID(2268339) };
return func(this, a_enable);
}

Expand Down
95 changes: 91 additions & 4 deletions CommonLibF4/include/RE/Bethesda/IMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
namespace RE
{
enum class ContainerMenuMode;
enum class DIFFICULTY_LEVEL;
enum class EQUIP_TYPE;

namespace Workshop
Expand Down Expand Up @@ -629,14 +630,14 @@ namespace RE

void CreateAndSetFiltersToColor(const NiColor& a_color, float a_brightness)
{
using func_t = void (BSGFxShaderFXTarget::*)(const NiColor&, float);
using func_t = void (BSGFxShaderFXTarget::*)(const NiColor&, float);
static REL::Relocation<func_t> func{ REL::ID(2287028) };
func(this, a_color, a_brightness);
}

void CreateAndSetFiltersToColor(std::uint8_t a_r, std::uint8_t a_g, std::uint8_t a_b, float a_brightness)
{
using func_t = void (BSGFxShaderFXTarget::*)(std::uint8_t, std::uint8_t, std::uint8_t, float);
using func_t = void (BSGFxShaderFXTarget::*)(std::uint8_t, std::uint8_t, std::uint8_t, float);
static REL::Relocation<func_t> func{ REL::ID(783104) };
func(this, a_r, a_g, a_b, a_brightness);
}
Expand Down Expand Up @@ -794,6 +795,65 @@ namespace RE
};
static_assert(sizeof(GameMenuBase) == 0xE0);

struct __declspec(novtable) StartMenuBase :
public GameMenuBase // 00
{
public:
static constexpr auto RTTI{ RTTI::StartMenuBase };
static constexpr auto VTABLE{ VTABLE::StartMenuBase };

virtual ~StartMenuBase(); // 00

// add
virtual void DoLoadGame(std::int32_t a_saveIndex); // 14
virtual void InitMainList(); // 15
virtual bool GetIsMenuReady(); // 16
virtual void SaveSettings_Derived(); // 17
virtual void SetMenuColor(); // 18

// members
msvc::unique_ptr<BSGFxShaderFXTarget> mainPanel; // 0E0
msvc::unique_ptr<BSGFxShaderFXTarget> versionText; // 0E8
msvc::unique_ptr<BSGFxShaderFXTarget> mainPanelBackground; // 0F0
msvc::unique_ptr<BSGFxShaderFXTarget> loadPanelBackground; // 0F8
msvc::unique_ptr<BSGFxShaderFXTarget> loadPanelBrackets; // 100
msvc::unique_ptr<BSGFxShaderFXTarget> loadPanelList; // 108
msvc::unique_ptr<BSGFxShaderFXTarget> loadPanelPlayerInfo; // 110
msvc::unique_ptr<BSGFxShaderFXTarget> confirmText; // 118
msvc::unique_ptr<BSGFxShaderFXTarget> levelText; // 120
msvc::unique_ptr<BSGFxShaderFXTarget> playtimeText; // 128
msvc::unique_ptr<BSGFxShaderFXTarget> locationText; // 130
msvc::unique_ptr<BSGFxShaderFXTarget> levelMeter; // 138
msvc::unique_ptr<BSGFxShaderFXTarget> modsLoadedText; // 140
msvc::unique_ptr<BSGFxShaderFXTarget> settingsCategoryList; // 148
msvc::unique_ptr<BSGFxShaderFXTarget> settingsList; // 150
msvc::unique_ptr<BSGFxShaderFXTarget> DLCList; // 158
msvc::unique_ptr<BSGFxShaderFXTarget> loadingIcon; // 160
msvc::unique_ptr<BSGFxShaderFXTarget> colorReference; // 168
msvc::unique_ptr<BSGFxShaderFXTarget> splashScreenText; // 170
msvc::unique_ptr<BSGFxShaderFXTarget> controlsPanel; // 178
msvc::unique_ptr<BSGFxShaderFXTarget> helpPanelBackground; // 180
msvc::unique_ptr<BSGFxShaderFXTarget> helpListBackground; // 188
msvc::unique_ptr<BSGFxShaderFXTarget> gamerTagPanel; // 190
msvc::unique_ptr<BSGFxShaderFXTarget> gamerTagText; // 198
msvc::unique_ptr<BSGFxShaderFXTarget> gamerTagIcon; // 1A0
msvc::unique_ptr<BSGFxShaderFXTarget> bethesdaLogo; // 1A8
msvc::unique_ptr<BSGFxShaderFXTarget> characterSelectList; // 1B0
msvc::unique_ptr<BSGFxShaderFXTarget> remapPrompt; // 1B8
msvc::unique_ptr<BSGFxShaderFXTarget> settingGuideText; // 1C0
msvc::unique_ptr<BSGFxShaderFXTarget> blackBackground; // 1C8
msvc::unique_ptr<BSGFxShaderFXTarget> modManager; // 1D0
msvc::unique_ptr<BSGFxShaderFXTarget> DLCImageSizer; // 1D8
msvc::unique_ptr<BSGFxShaderFXTarget> DLCPanelBrackets; // 1E0
msvc::unique_ptr<BSGFxShaderFXTarget> loginObj; // 1E8
msvc::unique_ptr<BSGFxShaderFXTarget> motD; // 1F0
BSTOptional<DIFFICULTY_LEVEL> currentDisplayDifficultyLevel; // 1F8
Scaleform::GFx::Value saveLoadPanelObj; // 218
bool gameDataReady; // 220
bool controlsChanged; // 221
};
static_assert(sizeof(StartMenuBase) == 0x228);

struct Rumble
{
public:
Expand Down Expand Up @@ -828,13 +888,13 @@ namespace RE

[[nodiscard]] static decltype(auto) GetPickRef()
{
static REL::Relocation<ObjectRefHandle*> ref{ REL::ID(170742) };
static REL::Relocation<ObjectRefHandle*> ref{ REL::ID(2701395) };
return *ref;
}

[[nodiscard]] static decltype(auto) GetPickRefs()
{
static REL::Relocation<BSTArray<ObjectRefHandle>*> pickRefs{ REL::ID(875116) };
static REL::Relocation<BSTArray<ObjectRefHandle>*> pickRefs{ REL::ID(2701391) };
return *pickRefs;
}

Expand Down Expand Up @@ -2180,6 +2240,33 @@ namespace RE
};
static_assert(sizeof(LockpickingMenu) == 0x1C0);

class __declspec(novtable) PauseMenu :
public StartMenuBase // 00
{
public:
static constexpr auto RTTI{ RTTI::PauseMenu };
static constexpr auto VTABLE{ VTABLE::PauseMenu };
static constexpr auto MENU_NAME{ "PauseMenu"sv };

// members
msvc::unique_ptr<BSGFxShaderFXTarget> helpTopicList; // 228
msvc::unique_ptr<BSGFxShaderFXTarget> helpPanelBrackets; // 230
msvc::unique_ptr<BSGFxShaderFXTarget> helpListBrackets; // 238
msvc::unique_ptr<BSGFxShaderFXTarget> helpText; // 240
msvc::unique_ptr<BSGFxShaderFXTarget> helpTitleText; // 248
msvc::unique_ptr<BSGFxShaderFXTarget> helpScrollUp; // 250
msvc::unique_ptr<BSGFxShaderFXTarget> helpScrollDown; // 258
Rumble::AutoRumblePause rumbleLock; // 260
bool hideScreen3D; // 261
bool modMenuShaderWasEnabled; // 262
bool vatsWasEnabled; // 263
bool vatsDepthTestMask; // 264
bool quitToMainMenuQueued; // 265
bool quitToDesktopQueued; // 266
bool noProfileSelected; // 267
};
static_assert(sizeof(PauseMenu) == 0x268);

class __declspec(novtable) SitWaitMenu :
public GameMenuBase // 00
{
Expand Down
37 changes: 32 additions & 5 deletions CommonLibF4/include/RE/Bethesda/ImageSpaceData.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,24 @@ namespace RE
};
static_assert(sizeof(Tint) == 0x10);

struct DepthOfField // DNAM
{
public:
// members
float strength; // 00
float distance; // 04
float range; // 08
float vignetteRadius; // 0C
float vignetteStrength; // 10
float mode; // 14
};
static_assert(sizeof(DepthOfField) == 0x18);

// members
HDR hdrData; // 00
Cinematic cinematicData; // 24
Tint tintData; // 30
float dofData[6]; // 40
HDR hdrData; // 00
Cinematic cinematicData; // 24
Tint tintData; // 30
DepthOfField dofData; // 40
};
static_assert(sizeof(ImageSpaceBaseData) == 0x58);

Expand All @@ -82,7 +95,21 @@ namespace RE
{
public:
// members
float data[20]; // 00
float fadeAmount; // 00
float fadeR; // 04
float fadeG; // 08
float fadeB; // 0C
float blurRadius; // 10
float doubleVisionStrength; // 14
float radiusBlurStrength; // 18
float radiusBlurRampUp; // 1C
float radiusBlurStart; // 20
float radiusBlurRampDown; // 24
float radiusBlurDownStart; // 28
float radiusBlurCenterX; // 2C
float radiusBlurCenterY; // 30
ImageSpaceBaseData::DepthOfField depthOfField; // 34
float motionBlurStrength; // 4C
};
static_assert(sizeof(ImageSpaceModData) == 0x50);

Expand Down
Loading
Loading