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

Deleteme/mistake #127

Closed
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
50 changes: 50 additions & 0 deletions CommonLibSF/include/RE/B/BSInputDeviceManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#pragma once

#include "REL/Relocation.h"
#include "RE/B/BSTSingleton.h"

namespace RE
{
class BSInputDevice;

class BSInputDeviceManager :
public BSTSingletonSDM<BSInputDeviceManager> // 00
{
public:
enum class BS_DEVICES
{
kKeyboard,
kMouse,
kGamepad,
kDebugGamepad,
kVirtualKeyboard,

kTotal
};

static BSInputDeviceManager* GetSingleton()
{
REL::Relocation<BSInputDeviceManager**> singleton{ REL::Offset(0x56F44B8) };//REL::ID(878418) };
return *singleton;
}

BSInputDevice* GetGamepad() const noexcept
{
return devices[stl::to_underlying(INPUT_DEVICE::kGamepad)];
}

bool IsGamepadConnected() const
{
const auto gamepad = GetGamepad();
return gamepad && gamepad->IsConnected();
}

// members
BSInputDevice* devices[stl::to_underlying(INPUT_DEVICE::kTotal)]; // 08
bool deviceLightStates[3]; // 30
bool queuedGamepadEnableValue; // 33
bool valueQueued; // 34
bool pollingEnabled; // 35
};
static_assert(sizeof(BSInputDeviceManager) == 0x38);
}
28 changes: 28 additions & 0 deletions CommonLibSF/include/RE/B/BSInputEventUser.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#pragma once

namespace RE
{
class BSInputEventUser
{
public:
SF_RTTI_VTABLE(BSInputEventUser);

virtual ~BSInputEventUser() = default; // 00

// add
virtual void Unk_01(void); // 01
virtual void Unk_02(void); // 02
virtual void Unk_03(void); // 03
virtual void Unk_04(void); // 04
virtual void Unk_05(void); // 05
virtual void Unk_06(void); // 06
virtual void Unk_07(void); // 07
virtual void Unk_08(void); // 08
virtual void Unk_09(void); // 09

// members
std::uint8_t pad08[0x30]; // 08
bool inputEventHandlingEnabled{ true }; // 38
};
static_assert(sizeof(BSInputEventUser) == 0x40);
}
61 changes: 61 additions & 0 deletions CommonLibSF/include/RE/B/BSTArray.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#pragma once

namespace RE
{
template <class T, class Allocator = void /* BSTArrayHeapAllocator? */>
class BSTArray
{
public:
//using allocator_type = Allocator
using value_type = T;
using size_type = std::uint32_t;
using difference_type = std::ptrdiff_t;
using pointer = value_type*;
using const_pointer = const value_type*;
using reference = value_type&;
using const_reference = const value_type&;
using iterator = pointer;
using const_iterator = const_pointer;

[[nodiscard]] constexpr pointer data() noexcept
{
return static_cast<pointer>(_data);
}

[[nodiscard]] constexpr iterator begin() noexcept
{
return data();
}

[[nodiscard]] constexpr const_iterator begin() const noexcept
{
return data();
}

[[nodiscard]] constexpr iterator end() noexcept
{
return begin() + size();
}

[[nodiscard]] constexpr const_iterator end() const noexcept
{
return begin() + size();
}

[[nodiscard]] constexpr bool empty() const noexcept
{
return _size == 0;
}

[[nodiscard]] constexpr size_type size() const noexcept
{
return _size;
}

private:
// members
std::uint32_t _size;
std::uint32_t _capacity;
void* _data;
};
}
13 changes: 13 additions & 0 deletions CommonLibSF/include/RE/C/Console.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include "RE/G/GameMenuBase.h"

namespace RE
{
class Console :
public GameMenuBase // 00
{
public:
SF_RTTI_VTABLE(Console);
};
}
17 changes: 17 additions & 0 deletions CommonLibSF/include/RE/G/GameMenuBase.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once

#include "RE/I/IMenu.h"

namespace RE
{
class GameMenuBase :
public IMenu // 00
{
public:
SF_RTTI_VTABLE(GameMenuBase);

GameMenuBase() = default;

virtual ~GameMenuBase() = default; // 00
};
}
80 changes: 80 additions & 0 deletions CommonLibSF/include/RE/I/IMenu.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#pragma once

#include "RE/B/BSInputEventUser.h"
#include "RE/B/BSTEvent.h"
#include "RE/S/ScaleformGFxMovie.h"
#include "RE/S/ScaleformGFxValue.h"
#include "RE/S/SWFToCodeFunctionHandler.h"

namespace RE
{
struct UpdateSceneRectEvent;

class IMenu :
public SWFToCodeFunctionHandler, // 00
public BSInputEventUser, // 10
public BSTEventSink<UpdateSceneRectEvent> // 50
{
public:
SF_RTTI_VTABLE(IMenu);

virtual ~IMenu() = default; // 00

// add
virtual const char* GetName() const; // 03
virtual const char* GetRootPath() const; // 04
virtual void Unk_05(void); // 05
virtual void Unk_06(void); // 06
virtual bool LoadMovie(bool a_addEventDispatcher, bool a_arg2); // 07
virtual void Unk_08(void); // 08
virtual void Unk_09(void); // 09
virtual void Unk_0A(void); // 0A
virtual void Unk_0B(void); // 0B
virtual void Unk_0C(void); // 0C
virtual void Unk_0D(void); // 0D
virtual void Unk_0E(void); // 0E
virtual void Unk_0F(void); // 0F
virtual void Unk_10(void); // 10
virtual void Unk_11(void); // 11
virtual void Unk_12(void); // 12
virtual void Unk_13(void); // 13
virtual void Unk_14(void); // 14
virtual void Unk_15(void); // 15
virtual void Unk_16(void); // 16
virtual void Unk_17(void); // 17
virtual void Unk_18(void); // 18
virtual void Unk_19(void); // 19
virtual void Unk_1A(void); // 1A

std::int64_t unk058; // 058
std::int64_t unk060; // 060
Scaleform::GFx::Value menuObj; // 080
Scaleform::Ptr<Scaleform::GFx::Movie> uiMovie; // 088
std::uint64_t unk090; // 090
std::uint64_t unk098; // 098
std::uint64_t unk0A0; // 0A0
std::uint32_t unk0A8; // 0A8
std::uint32_t unk0AC; // 0AC
BSFixedString menuName; // 0B0
BSFixedString unk0B8; // 0B8
std::uint64_t unk0C0; // 0C0
std::uint32_t unk0C8; // 0C8
std::uint32_t unk0CC; // 0CC
std::uint32_t unk0D0; // 0D0
std::uint32_t unk0D4; // 0D4
std::uint64_t unk0D8; // 0D8
std::uint64_t unk0E0; // 0E0
std::uint64_t unk0E8; // 0E8
std::uint64_t unk0F0; // 0F0
std::uint64_t unk0F8; // 0F8
std::uint64_t unk100; // 100
std::uint32_t unk108; // 108
std::uint32_t unk10C; // 10C
std::uint64_t unk110; // 110
std::uint64_t unk118; // 118
std::uint64_t unk120; // 120
std::uint64_t unk128; // 128
};
static_assert(offsetof(IMenu, uiMovie) == 0x088);
static_assert(offsetof(IMenu, menuName) == 0x0B0);
}
22 changes: 22 additions & 0 deletions CommonLibSF/include/RE/S/SWFToCodeFunctionHandler.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once

#include "RE/S/ScaleformGFxFunctionHandler.h"

namespace RE
{
class SWFToCodeFunctionHandler :
public Scaleform::GFx::FunctionHandler // 00
{
public:
SF_RTTI_VTABLE(SWFToCodeFunctionHandler);

virtual ~SWFToCodeFunctionHandler() = default; // 00

// override
void Call(const Params&) override { return; } // 01

// add
virtual void MapCodeObjectFunctions() { return; } // 02
};
static_assert(sizeof(SWFToCodeFunctionHandler) == 0x10);
}
Loading
Loading