Skip to content

Commit

Permalink
Merge branch 'shad0wshayd3-FO4:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutCascadia authored Nov 2, 2024
2 parents 1fbc8eb + 0f3969d commit f5f8562
Show file tree
Hide file tree
Showing 37 changed files with 857 additions and 53 deletions.
3 changes: 3 additions & 0 deletions CommonLibF4/cmake/sourcelist.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,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 All @@ -244,6 +245,7 @@ set(SOURCES
include/RE/Bethesda/TESRace.h
include/RE/Bethesda/TESWaterForm.h
include/RE/Bethesda/TESWorldSpace.h
include/RE/Bethesda/TLS.h
include/RE/Bethesda/TaskQueueInterface.h
include/RE/Bethesda/UI.h
include/RE/Bethesda/UIMessage.h
Expand Down Expand Up @@ -404,6 +406,7 @@ set(SOURCES
include/REX/W32/DXGI_5.h
include/REX/W32/DXGI_6.h
include/REX/W32/KERNEL32.h
include/REX/W32/NT.h
include/REX/W32/OLE32.h
include/REX/W32/SHELL32.h
include/REX/W32/USER32.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 @@ -624,7 +624,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);
}
15 changes: 8 additions & 7 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 @@ -633,9 +633,10 @@ namespace RE
}

// members
RenderTargetProperties renderTargetData[100]; // 000
DepthStencilTargetProperties depthStencilTargetData[12]; // C80
CubeMapRenderTargetProperties cubeMapRenderTargetData[1]; // DA0
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: 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
91 changes: 89 additions & 2 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 @@ -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 @@ -2286,6 +2346,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
58 changes: 58 additions & 0 deletions CommonLibF4/include/RE/Bethesda/ImageSpaceEffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,45 @@ namespace RE
};
static_assert(sizeof(ImageSpaceEffectOption) == 0xC8);

class __declspec(novtable) ImageSpaceEffectBokehDepthOfField :
public ImageSpaceEffectOption // 00
{
public:
static constexpr auto RTTI{ RTTI::ImageSpaceEffectBokehDepthOfField };
static constexpr auto VTABLE{ VTABLE::ImageSpaceEffectBokehDepthOfField };

virtual ~ImageSpaceEffectBokehDepthOfField() override; // 00

// override (ImageSpaceEffect)
virtual void Render(BSTriShape* a_geometry, ImageSpaceEffectParam* a_param) override; // 01
virtual void Setup(ImageSpaceManager* a_manager, ImageSpaceEffectParam* a_param) override; // 03
virtual bool IsActive() override; // 08
};
static_assert(sizeof(ImageSpaceEffectBokehDepthOfField) == 0xC8);

class __declspec(novtable) ImageSpaceEffectDepthOfField :
public ImageSpaceEffectOption // 00
{
public:
static constexpr auto RTTI{ RTTI::ImageSpaceEffectDepthOfField };
static constexpr auto VTABLE{ VTABLE::ImageSpaceEffectDepthOfField };

virtual ~ImageSpaceEffectDepthOfField() override; // 00

// override (ImageSpaceEffect)
virtual void Setup(ImageSpaceManager* a_manager, ImageSpaceEffectParam* a_param) override; // 03
virtual void BorrowTextures(ImageSpaceEffectParam* a_param) override; // 05
virtual void ReturnTextures() override; // 06
virtual bool IsActive() override; // 08
virtual bool UpdateParams(ImageSpaceEffectParam* a_param) override; // 09

// members
ImageSpaceTexture maskBuffer; // B0
ImageSpaceTexture buffer[3]; // F0
bool useFog; // 168
};
static_assert(sizeof(ImageSpaceEffectDepthOfField) == 0x170);

class __declspec(novtable) ImageSpaceEffectFullScreenBlur :
public ImageSpaceEffect // 00
{
Expand Down Expand Up @@ -149,6 +188,25 @@ namespace RE
};
static_assert(sizeof(ImageSpaceEffectGetHit) == 0x108);

class __declspec(novtable) ImageSpaceEffectHDR :
public ImageSpaceEffect // 00
{
public:
static constexpr auto RTTI{ RTTI::ImageSpaceEffectHDR };
static constexpr auto VTABLE{ VTABLE::ImageSpaceEffectHDR };

virtual ~ImageSpaceEffectHDR(); // 00

// override (ImageSpaceEffect)
virtual void Render(BSTriShape* a_geometry, ImageSpaceEffectParam* a_param) override; // 01
virtual void Setup(ImageSpaceManager* a_manager, ImageSpaceEffectParam* a_param) override; // 03
virtual void Shutdown() override; // 04
virtual bool UpdateParams(ImageSpaceEffectParam* a_param) override; // 09

inline static REL::Relocation<bool*> UsePipboyScreenMask{ REL::ID(2678029) };
};
static_assert(sizeof(ImageSpaceEffectHDR) == 0xB0);

class __declspec(novtable) ImageSpaceEffectMotionBlur :
public ImageSpaceEffect // 00
{
Expand Down
Loading

0 comments on commit f5f8562

Please sign in to comment.