Skip to content

Commit

Permalink
Merge pull request #23 from qudix/dev
Browse files Browse the repository at this point in the history
feat: misc
  • Loading branch information
shad0wshayd3 authored Jun 15, 2024
2 parents 5f218e5 + 0980acf commit bc22f17
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: 'false'
AlignConsecutiveBitFields: 'false'
AlignConsecutiveDeclarations: 'false'
AlignConsecutiveDeclarations: 'true'
AlignConsecutiveMacros: 'false'
AlignEscapedNewlines: Left
AlignOperands: Align
Expand Down
36 changes: 27 additions & 9 deletions CommonLibF4/include/RE/Bethesda/TESCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace RE

struct CameraStates
{
enum CameraState : unsigned
enum CameraState : std::uint32_t
{
kFirstPerson,
kAutoVanity,
Expand All @@ -50,14 +50,13 @@ namespace RE
};
using CameraState = CameraStates::CameraState;

class TESCameraState :
class __declspec(novtable) TESCameraState :
public BSIntrusiveRefCounted, // 10
public BSInputEventUser // 00
{
public:
static constexpr auto RTTI{ RTTI::TESCamera };
static constexpr auto VTABLE{ VTABLE::TESCamera };
static constexpr auto STATE{ CameraStates::k3rdPerson };
static constexpr auto RTTI{ RTTI::TESCameraState };
static constexpr auto VTABLE{ VTABLE::TESCameraState };

virtual ~TESCameraState(); // 00

Expand All @@ -77,12 +76,31 @@ namespace RE
};
static_assert(sizeof(TESCameraState) == 0x28);

class __declspec(novtable) FreeCameraState :
public TESCameraState
{
public:
static constexpr auto RTTI{ RTTI::FreeCameraState };
static constexpr auto VTABLE{ VTABLE::FreeCameraState };
static constexpr auto STATE{ CameraStates::kFree };

NiPoint3 translation;
BSTPoint2<float> rotation;
BSTPoint2<float> upDown;
BSTPoint2<float> leftThumbstick;
BSTPoint2<float> rightThumbstick;
std::int16_t worldZDirection;
bool runInput;
bool lockToZPlane;
};
static_assert(sizeof(FreeCameraState) == 0x58);

class __declspec(novtable) ThirdPersonState :
public TESCameraState // 000
{
public:
static constexpr auto RTTI{ RTTI::TESCamera };
static constexpr auto VTABLE{ VTABLE::TESCamera };
static constexpr auto RTTI{ RTTI::ThirdPersonState };
static constexpr auto VTABLE{ VTABLE::ThirdPersonState };
static constexpr auto STATE{ CameraStates::k3rdPerson };

// add
Expand Down Expand Up @@ -169,8 +187,8 @@ namespace RE
public BSTSingletonSDM<PlayerCamera> // 060
{
public:
static constexpr auto RTTI{ RTTI::TESCamera };
static constexpr auto VTABLE{ VTABLE::TESCamera };
static constexpr auto RTTI{ RTTI::PlayerCamera };
static constexpr auto VTABLE{ VTABLE::PlayerCamera };

[[nodiscard]] static PlayerCamera* GetSingleton()
{
Expand Down

0 comments on commit bc22f17

Please sign in to comment.