Skip to content

Commit

Permalink
misc defs
Browse files Browse the repository at this point in the history
  • Loading branch information
shad0wshayd3 committed Aug 5, 2023
1 parent de3768a commit 93a9806
Show file tree
Hide file tree
Showing 13 changed files with 487 additions and 28 deletions.
3 changes: 3 additions & 0 deletions CommonLibF4/cmake/sourcelist.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ set(SOURCES
include/RE/Bethesda/HUDModes.h
include/RE/Bethesda/IMenu.h
include/RE/Bethesda/IMovementInterface.h
include/RE/Bethesda/ImageSpaceData.h
include/RE/Bethesda/ImageSpaceEffect.h
include/RE/Bethesda/ImageSpaceManager.h
include/RE/Bethesda/ImageSpaceModifier.h
include/RE/Bethesda/InputDevice.h
include/RE/Bethesda/InputEvent.h
Expand Down
29 changes: 21 additions & 8 deletions CommonLibF4/include/RE/Bethesda/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,6 @@ namespace RE
struct PerkEntryUpdatedEvent;
}

enum class INTERACTING_STATE : std::uint32_t
{
kNotInteracting,
kWaitingToInteract,
kInteracting,
kWaitingToStopInteracting
};

enum class PTYPE : std::int32_t
{
kExplore = 0,
Expand Down Expand Up @@ -650,6 +642,19 @@ namespace RE
};
static_assert(sizeof(MagicTarget) == 0x18);

enum class LIFE_STATE : std::uint32_t
{
kAlive,
kDying,
kDead,
kUnconscious,
kReanimate,
kRecycle,
kRestrained,
kEssentialDown,
kBleedout
};

enum class WEAPON_STATE : std::uint32_t
{
kSheathed,
Expand All @@ -673,6 +678,14 @@ namespace RE
kFireSighted
};

enum class INTERACTING_STATE : std::uint32_t
{
kNotInteracting,
kWaitingToInteract,
kInteracting,
kWaitingToStopInteracting
};

class __declspec(novtable) ActorState :
public IMovementState // 00
{
Expand Down
96 changes: 96 additions & 0 deletions CommonLibF4/include/RE/Bethesda/BSGraphics.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include "RE/Bethesda/Atomic.h"
#include "RE/Bethesda/BSTHashMap.h"
#include "RE/NetImmerse/NiRect.h"
#include "RE/NetImmerse/NiSmartPointer.h"
Expand Down Expand Up @@ -39,6 +40,7 @@ namespace RE

namespace BSGraphics
{
enum class Format;
enum class TextureAddressMode;

class RendererShadowState;
Expand Down Expand Up @@ -473,6 +475,100 @@ namespace RE
bool immediateTextureLoads; // 3B1
};
static_assert(sizeof(State) == 0x3C0);

struct RenderTargetProperties
{
public:
// members
std::uint32_t width; // 00
std::uint32_t height; // 04
Format format; // 08
std::uint32_t multiSample; // 0C
bool copyable; // 10
bool supportUnorderedAccess; // 11
bool allowMipGeneration; // 12
bool forceLinear; // 13
std::int32_t mipLevel; // 14
std::uint32_t textureTarget; // 18
bool enableFastClear; // 1C
};
static_assert(sizeof(RenderTargetProperties) == 0x20);

struct DepthStencilTargetProperties
{
public:
// members
std::uint32_t width; // 00
std::uint32_t height; // 04
std::uint32_t arraySize; // 08
std::uint32_t multiSample; // 0C
std::int32_t alias; // 10
bool sampleable; // 14
bool htile; // 15
bool stencil; // 16
bool use16BitsDepth; // 17
};
static_assert(sizeof(DepthStencilTargetProperties) == 0x18);

struct CubeMapRenderTargetProperties
{
public:
// members
std::uint32_t width; // 00
std::uint32_t height; // 04
Format format; // 08
std::uint32_t multiSample; // 0C
bool sampleable; // 10
std::int32_t alias; // 14
std::int32_t _360Alias; // 18
std::int32_t _360Group; // 1C
std::int32_t _360TileHeight; // 20
};
static_assert(sizeof(CubeMapRenderTargetProperties) == 0x24);

class RenderTargetManager
{
public:
using Create_T = void(*)();

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

void SetEnableDynamicResolution(bool a_enableDynamicResolution)
{
using func_t = decltype(&RenderTargetManager::SetEnableDynamicResolution);
REL::Relocation<func_t> func{ REL::ID(116947) };
return func(this, a_enableDynamicResolution);
}

// members
RenderTargetProperties renderTargetData[100]; // 000
DepthStencilTargetProperties depthStencilTargetData[12]; // C80
CubeMapRenderTargetProperties cubeMapRenderTargetData[1]; // DA0
std::uint32_t renderTargetID[100]; // DC4
std::uint32_t depthStencilTargetID[12]; // F54
std::uint32_t cubeMapRenderTargetID[1]; // F84
float dynamicWidthRatio; // F88
float dynamicHeightRatio; // F8C
float lowestWidthRatio; // F90
float lowestHeightRatio; // F94
float ratioIncreasePerSeconds; // F98
float ratioDecreasePerSeconds; // F9C
float movementDelta; // FA0
bool increaseResolution; // FA4
bool freezeResolution; // FA5
bool updateResolutionOnlyWhenMoving; // FA6
bool useDynamicResolutionViewportAsDefaultViewport; // FA7
bool isDynamicResolutionCurrentlyActivated; // FA8
std::uint32_t nbFramePause; // FAC
std::uint32_t nbFramesSinceLastIncrease; // FB0
BSTAtomicValue<std::uint32_t> dynamicResolutionDisabled; // FB4
Create_T create; // FB8
};
static_assert(sizeof(RenderTargetManager) == 0xFC0);
};

namespace BSShaderTechniqueIDMap
Expand Down
7 changes: 7 additions & 0 deletions CommonLibF4/include/RE/Bethesda/IMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,13 @@ namespace RE
return func(this);
}

void End3D()
{
using func_t = decltype(&Inventory3DManager::End3D);
REL::Relocation<func_t> func{ REL::ID(1512675) };
return func(this);
}

// members
bool useBoundForScale: 1; // 010:0
bool startedZoomThisFrame: 1; // 010:1
Expand Down
54 changes: 54 additions & 0 deletions CommonLibF4/include/RE/Bethesda/ImageSpaceData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#pragma once

#include "RE/Bethesda/BSFixedString.h"
#include "RE/NetImmerse/NiSmartPointer.h"
#include "RE/NetImmerse/NiTexture.h"

namespace RE
{
namespace BSGraphics
{
class Texture;
}

struct ImageSpaceBaseData
{
public:
// members
float hdrData[9]; // 00
float cinematicData[3]; // 24
float tintData[4]; // 30
float dofData[6]; // 40
};
static_assert(sizeof(ImageSpaceBaseData) == 0x58);

struct ImageSpaceLUTData
{
public:
// members
BSFixedString filename[4]; // 00
float weight[4]; // 20
NiPointer<NiTexture> niTexture[4]; // 30
BSGraphics::Texture* texture[4]; // 50
};
static_assert(sizeof(ImageSpaceLUTData) == 0x70);

struct ImageSpaceModData
{
public:
// members
float data[20]; // 00
};
static_assert(sizeof(ImageSpaceModData) == 0x50);

struct ImageSpaceData
{
public:
// members
ImageSpaceBaseData baseData; //00
ImageSpaceModData modData; //58
float highestTintAmount; //A8
float highestFadeAmount; //AC
};
static_assert(sizeof(ImageSpaceData) == 0xB0);
}
Loading

0 comments on commit 93a9806

Please sign in to comment.