docs: add plugin setup guide
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class SCENE_ACTION_PLAYER_RESPONSE_TYPE : std::uint32_t
|
||||
{
|
||||
kPositive = 0x0,
|
||||
kNegative = 0x1,
|
||||
kNeutral = 0x2,
|
||||
kQuestion = 0x3,
|
||||
kTotal = 0x4,
|
||||
kNone = 0x5
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class SCENE_ACTION_TYPE : std::uint32_t
|
||||
{
|
||||
kDialogue = 0x0,
|
||||
kPackage = 0x1,
|
||||
kTimer = 0x2,
|
||||
kPlayerDialogue = 0x3,
|
||||
kStartScene = 0x4,
|
||||
kNPCResponse = 0x5,
|
||||
kRadio = 0x6,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class SCENE_ACTOR_FLAG : std::uint32_t
|
||||
{
|
||||
kNoPlayerActivation = 0x0,
|
||||
kOption = 0x1,
|
||||
kRunOnlyScenePackages = 0x2,
|
||||
kNoCommandState = 0x3,
|
||||
kCount = 0x4
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SCRIPT_EFFECT_DATA
|
||||
{
|
||||
public:
|
||||
// members
|
||||
bool scriptEffectStart; // 0
|
||||
bool scriptEffectFinish; // 1
|
||||
float secondsElapsed; // 4
|
||||
};
|
||||
static_assert(sizeof(SCRIPT_EFFECT_DATA) == 0x8);
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class SCRIPT_OUTPUT;
|
||||
class ConditionCheckParams;
|
||||
class SCRIPT_LINE;
|
||||
class SCRIPT_PARAMETER;
|
||||
class ScriptCompileData;
|
||||
class ScriptLocals;
|
||||
|
||||
class SCRIPT_FUNCTION
|
||||
{
|
||||
public:
|
||||
using ConditionFunction_t = bool(ConditionCheckParams& a_data, void* a_param2, void* a_param1, float& a_returnValue);
|
||||
using CompileFunction_t = bool(const std::uint16_t a_paramCount, const SCRIPT_PARAMETER* a_parameters, SCRIPT_LINE* a_scriptLine, ScriptCompileData* a_compileData);
|
||||
using ExecuteFunction_t = bool(const SCRIPT_PARAMETER* a_parameters, const char* a_compiledParams, TESObjectREFR* a_refObject, TESObjectREFR* a_container, Script* a_script, ScriptLocals* a_scriptLocals, float& a_returnValue, std::uint32_t& a_offset);
|
||||
|
||||
[[nodiscard]] static auto GetConsoleFunctions()
|
||||
{
|
||||
static REL::Relocation<SCRIPT_FUNCTION(*)[523]> functions{ ID::SCRIPT_FUNCTION::ConsoleFunctions };
|
||||
return std::span{ *functions };
|
||||
}
|
||||
|
||||
static SCRIPT_FUNCTION* LocateConsoleCommand(const std::string_view a_longName)
|
||||
{
|
||||
for (auto& command : GetConsoleFunctions()) {
|
||||
if (command.functionName && std::strlen(command.functionName) == a_longName.size())
|
||||
if (_strnicmp(command.functionName, a_longName.data(), a_longName.size()) == 0)
|
||||
return std::addressof(command);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
[[nodiscard]] static auto GetScriptFunctions()
|
||||
{
|
||||
static REL::Relocation<SCRIPT_FUNCTION(*)[818]> functions{ ID::SCRIPT_FUNCTION::ScriptFunctions };
|
||||
return std::span{ *functions };
|
||||
}
|
||||
|
||||
static SCRIPT_FUNCTION* LocateScriptCommand(const std::string_view a_longName)
|
||||
{
|
||||
for (auto& command : GetScriptFunctions()) {
|
||||
if (command.functionName && std::strlen(command.functionName) == a_longName.size())
|
||||
if (_strnicmp(command.functionName, a_longName.data(), a_longName.size()) == 0)
|
||||
return std::addressof(command);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
template <std::uint16_t SIZE>
|
||||
inline void SetParameters(SCRIPT_PARAMETER (&a_params)[SIZE])
|
||||
{
|
||||
paramCount = SIZE;
|
||||
parameters = a_params;
|
||||
}
|
||||
|
||||
void SetParameters();
|
||||
|
||||
// members
|
||||
const char* functionName{ "" }; // 00
|
||||
const char* shortName{ "" }; // 08
|
||||
REX::TEnumSet<SCRIPT_OUTPUT, std::int32_t> output; // 10
|
||||
const char* helpString{ "" }; // 18
|
||||
bool referenceFunction{ false }; // 20
|
||||
std::uint16_t paramCount{ 0 }; // 22
|
||||
SCRIPT_PARAMETER* parameters{ nullptr }; // 28
|
||||
ExecuteFunction_t* executeFunction{ nullptr }; // 30
|
||||
CompileFunction_t* compileFunction{ GetCompileFunction() }; // 38
|
||||
ConditionFunction_t* conditionFunction{ nullptr }; // 40
|
||||
bool editorFilter{ false }; // 48
|
||||
bool invalidatesCellList{ false }; // 49
|
||||
|
||||
private:
|
||||
[[nodiscard]] inline static CompileFunction_t* GetCompileFunction()
|
||||
{
|
||||
static REL::Relocation<CompileFunction_t*> value{ ID::SCRIPT_FUNCTION::CompileFunction };
|
||||
return value.get();
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(SCRIPT_FUNCTION) == 0x50);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SCRIPT_HEADER
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::uint32_t variableCount; // 00
|
||||
std::uint32_t refObjectCount; // 04
|
||||
std::uint32_t dataSize; // 08
|
||||
std::uint32_t lastID; // 0C
|
||||
bool isQuestScript; // 10
|
||||
bool isMagicEffectScript; // 11
|
||||
bool isCompiled; // 12
|
||||
};
|
||||
static_assert(sizeof(SCRIPT_HEADER) == 0x14);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class SCRIPT_ERROR;
|
||||
enum class SCRIPT_OUTPUT;
|
||||
|
||||
class SCRIPT_LINE
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::uint32_t lineNumber; // 000
|
||||
char line[512]; // 004
|
||||
std::uint32_t size; // 204
|
||||
std::uint32_t offset; // 208
|
||||
char output[512]; // 20C
|
||||
std::uint32_t outputSize; // 40C
|
||||
SCRIPT_OUTPUT expression; // 410
|
||||
std::uint32_t refObjectIndex; // 414
|
||||
REX::TEnumSet<SCRIPT_ERROR, std::int32_t> scriptError; // 418
|
||||
};
|
||||
static_assert(sizeof(SCRIPT_LINE) == 0x41C);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SCRIPT_LOCAL
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::uint32_t id; // 0
|
||||
float value; // 4
|
||||
bool isInteger; // 8
|
||||
};
|
||||
static_assert(sizeof(SCRIPT_LOCAL) == 0xC);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class SCRIPT_PARAM_TYPE;
|
||||
|
||||
class SCRIPT_PARAMETER
|
||||
{
|
||||
public:
|
||||
// members
|
||||
const char* paramName{ "" }; // 00
|
||||
REX::TEnumSet<SCRIPT_PARAM_TYPE, std::int32_t> paramType; // 08
|
||||
bool optional{ false }; // 0C
|
||||
};
|
||||
static_assert(sizeof(SCRIPT_PARAMETER) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class SCRIPT_PARAM_TYPE : std::int32_t
|
||||
{
|
||||
kChar = 0x0,
|
||||
kInt = 0x1,
|
||||
kFloat = 0x2,
|
||||
kInventoryObject = 0x3,
|
||||
kObjectRef = 0x4,
|
||||
kActorValue = 0x5,
|
||||
kActor = 0x6,
|
||||
kSpellItem = 0x7,
|
||||
kAxis = 0x8,
|
||||
kCell = 0x9,
|
||||
kAnimGroup = 0xA,
|
||||
kMagicItem = 0xB,
|
||||
kSound = 0xC,
|
||||
kTopic = 0xD,
|
||||
kQuest = 0xE,
|
||||
kRace = 0xF,
|
||||
kClass = 0x10,
|
||||
kFaction = 0x11,
|
||||
kSex = 0x12,
|
||||
kGlobal = 0x13,
|
||||
kFurnitureOrFormList = 0x14,
|
||||
kObject = 0x15,
|
||||
kScriptVar = 0x16,
|
||||
kStage = 0x17,
|
||||
kMapMarker = 0x18,
|
||||
kActorBase = 0x19,
|
||||
kContainerRef = 0x1A,
|
||||
kWorlOrList = 0x1B,
|
||||
kCrimeType = 0x1C,
|
||||
kPackage = 0x1D,
|
||||
kCombatStyle = 0xE,
|
||||
kMagicEffect = 0x1F,
|
||||
kFormType = 0x20,
|
||||
kWeather = 0x21,
|
||||
kNPC = 0x22,
|
||||
kOwner = 0x23,
|
||||
kShaderEffect = 0x24,
|
||||
kFormList = 0x25,
|
||||
kMenuIcon = 0x26,
|
||||
kPerk = 0x27,
|
||||
kNote = 0x28,
|
||||
kMiscStat = 0x29,
|
||||
kImageSpaceMod = 0x2A,
|
||||
kImageSpace = 0x2B,
|
||||
kVATSValue = 0x2C,
|
||||
kVATSValueData = 0x2D,
|
||||
kEventFunction = 0x2E,
|
||||
kEventFunctionMember = 0x2F,
|
||||
kEventFunctionData = 0x30,
|
||||
kVoiceType = 0x31,
|
||||
kEncounterZone = 0x32,
|
||||
kIdleForm = 0x33,
|
||||
kMessage = 0x34,
|
||||
kInvObjectOrFormList = 0x35,
|
||||
kAlignment = 0x36,
|
||||
kEquipType = 0x37,
|
||||
kObjectOrFormList = 0x38,
|
||||
kMusic = 0x39,
|
||||
kCritStage = 0x3A,
|
||||
kKeyword = 0x3B,
|
||||
kRefType = 0x3C,
|
||||
kLocation = 0x3D,
|
||||
kForm = 0x3E,
|
||||
kAlias = 0x3F,
|
||||
kShout = 0x40,
|
||||
kWordOfPower = 0x41,
|
||||
kRelationshipRank = 0x42,
|
||||
kBGSScene = 0x43,
|
||||
kCastingSource = 0x44,
|
||||
kAssociationType = 0x45,
|
||||
kWardState = 0x46,
|
||||
kPackageDataCanBeNull = 0x47,
|
||||
kPackageDataNumeric = 0x48,
|
||||
kPackageDataReference = 0x49,
|
||||
kVMScriptVar = 0x4A,
|
||||
kReferenceEffect = 0x4B,
|
||||
kPackageDataLocation = 0x4C,
|
||||
kSoundCategory = 0x4D,
|
||||
kKnowableForm = 0x4E,
|
||||
kRegion = 0x4F,
|
||||
kAction = 0x50,
|
||||
kMovementIdleFromState = 0x51,
|
||||
kMovementIdleToState = 0x52,
|
||||
kVMRefOrAliasScript = 0x53,
|
||||
kDamageType = 0x54,
|
||||
kSceneAction = 0x55,
|
||||
kKeywordOrFormlist = 0x56,
|
||||
kFurnEntryType = 0x57
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSStringT.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SCRIPT_REFERENCED_OBJECT
|
||||
{
|
||||
public:
|
||||
// members
|
||||
BSString editorID; // 00
|
||||
TESForm* form; // 10
|
||||
std::uint32_t variableID; // 18
|
||||
};
|
||||
static_assert(sizeof(SCRIPT_REFERENCED_OBJECT) == 0x20);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class SEX : std::uint32_t
|
||||
{
|
||||
kNone = static_cast<std::underlying_type_t<SEX>>(-1),
|
||||
kMale = 0x0,
|
||||
kFemale = 0x1,
|
||||
|
||||
kTotal = 0x2
|
||||
};
|
||||
}
|
||||
|
||||
template <>
|
||||
struct std::formatter<RE::SEX>
|
||||
{
|
||||
template <class ParseContext>
|
||||
constexpr auto parse(ParseContext& a_ctx)
|
||||
{
|
||||
return a_ctx.begin();
|
||||
}
|
||||
|
||||
template <class FormatContext>
|
||||
constexpr auto format(const RE::SEX& a_sex, FormatContext& a_ctx) const
|
||||
{
|
||||
switch (a_sex) {
|
||||
case RE::SEX::kNone:
|
||||
return format_to(a_ctx.out(), "None");
|
||||
case RE::SEX::kMale:
|
||||
return format_to(a_ctx.out(), "Male");
|
||||
case RE::SEX::kFemale:
|
||||
return format_to(a_ctx.out(), "Female");
|
||||
}
|
||||
|
||||
return format_to(a_ctx.out(), "Unknown");
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SFRendererInitializedEvent
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<SFRendererInitializedEvent>);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class SHAPE_TYPES
|
||||
{
|
||||
kCapsule = 0x0,
|
||||
kCustom = 0x0,
|
||||
kConvex = 0x1,
|
||||
kNumTypes = 0x2,
|
||||
kInvalid = 0x2
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class SIT_SLEEP_STATE : std::int32_t
|
||||
{
|
||||
kNormal = 0x0,
|
||||
kWantToSit = 0x1,
|
||||
kWaitingForSitAnim = 0x2,
|
||||
kIsSitting = 0x3,
|
||||
kWantToStand = 0x4,
|
||||
kWantToSleep = 0x5,
|
||||
kWaitingForSleepAnim = 0x6,
|
||||
kIsSleeping = 0x7,
|
||||
kWantToWake = 0x8
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class SOUND_LEVEL : std::int32_t
|
||||
{
|
||||
kLoud = 0x0,
|
||||
kNormal = 0x1,
|
||||
kSilent = 0x2,
|
||||
kVeryLoud = 0x3,
|
||||
kQuiet = 0x4,
|
||||
kCount = 0x5
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
namespace SPECIALMenuEvent
|
||||
{
|
||||
class NameChangedEvent
|
||||
{
|
||||
public:
|
||||
// members
|
||||
const char* fullName; // 00
|
||||
bool committed; // 08
|
||||
};
|
||||
static_assert(sizeof(NameChangedEvent) == 0x10);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class STAGGER_MAGNITUDE : std::int32_t
|
||||
{
|
||||
kNone = 0x0,
|
||||
kMagnitudeMin = 0x0,
|
||||
kSmall = 0x1,
|
||||
kMedium = 0x2,
|
||||
kLarge = 0x3,
|
||||
kExtraLarge = 0x4,
|
||||
kMagnitudeMax = 0x4,
|
||||
kCount = 0x5
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class SUBTITLE_PRIORITY : std::int32_t
|
||||
{
|
||||
kLow = 0x0,
|
||||
kNormal = 0x1,
|
||||
kHigh = 0x2,
|
||||
kForce = 0x3,
|
||||
kTotal = 0x4
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include "Scaleform/G/GFx_FunctionHandler.h"
|
||||
#include "Scaleform/G/GFx_Movie.h"
|
||||
#include "Scaleform/G/GFx_Value.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SWFToCodeFunctionHandler :
|
||||
public Scaleform::GFx::FunctionHandler // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::SWFToCodeFunctionHandler };
|
||||
static constexpr auto VTABLE{ VTABLE::SWFToCodeFunctionHandler };
|
||||
|
||||
// NOLINTNEXTLINE(modernize-use-override)
|
||||
virtual ~SWFToCodeFunctionHandler() = default; // 00
|
||||
|
||||
// override (Scaleform::GFx::FunctionHandler)
|
||||
void Call(const Params&) override { return; } // 01
|
||||
|
||||
// add
|
||||
virtual void MapCodeObjectFunctions() { return; } // 02
|
||||
|
||||
void MapCodeMethodToASFunction(const char* a_functionName, std::int32_t a_functionID)
|
||||
{
|
||||
using func_t = decltype(&SWFToCodeFunctionHandler::MapCodeMethodToASFunction);
|
||||
static REL::Relocation<func_t> func{ ID::SWFToCodeFunctionHandler::MapCodeMethodToASFunction };
|
||||
return func(this, a_functionName, a_functionID);
|
||||
}
|
||||
|
||||
void RegisterCodeObject(Scaleform::GFx::Movie& a_movie, Scaleform::GFx::Value& a_menuObj)
|
||||
{
|
||||
using func_t = decltype(&SWFToCodeFunctionHandler::RegisterCodeObject);
|
||||
static REL::Relocation<func_t> func{ ID::SWFToCodeFunctionHandler::RegisterCodeObject };
|
||||
return func(this, a_movie, a_menuObj);
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(SWFToCodeFunctionHandler) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class __declspec(novtable) SavefileMetadata
|
||||
{
|
||||
public:
|
||||
void FillDataFromFileName(const char* a_saveName)
|
||||
{
|
||||
using func_t = decltype(&SavefileMetadata::FillDataFromFileName);
|
||||
REL::Relocation<func_t> func{ ID::SavefileMetadata::FillDataFromFileName };
|
||||
return func(this, a_saveName);
|
||||
}
|
||||
|
||||
// members
|
||||
char fileNameA[260]; // 00
|
||||
REX::W32::FILETIME creationTimeStamp; // 104
|
||||
std::uint64_t playerLevel; // 110
|
||||
std::uint32_t filenameVersion; // 118
|
||||
std::uint32_t saveGameNumber; // 11C
|
||||
std::uint64_t playerID; // 120
|
||||
BSString playerName; // 128
|
||||
BSString playerLocID; // 138
|
||||
BSString playTime; // 148
|
||||
bool isValid; // 158
|
||||
bool hasSaveNumber; // 159
|
||||
bool needsSync; // 15A
|
||||
bool modded; // 15B
|
||||
bool survival; // 15C
|
||||
};
|
||||
static_assert(sizeof(SavefileMetadata) == 0x160);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SayOnceTimeStampStruct
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::uint32_t date; // 0
|
||||
float hour; // 4
|
||||
};
|
||||
static_assert(sizeof(SayOnceTimeStampStruct) == 0x8);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class TESTopicInfo;
|
||||
|
||||
class SayOnceTopicInfos
|
||||
{
|
||||
public:
|
||||
// members
|
||||
TESTopicInfo* info; // 00
|
||||
std::int32_t dateStamp; // 08
|
||||
float hourStamp; // 0C
|
||||
};
|
||||
static_assert(sizeof(SayOnceTopicInfos) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class __declspec(novtable) SceneGraph :
|
||||
public BSSceneGraph // 000
|
||||
{
|
||||
static constexpr auto RTTI{ RTTI::SceneGraph };
|
||||
static constexpr auto VTABLE{ VTABLE::SceneGraph };
|
||||
static constexpr auto Ni_RTTI{ Ni_RTTI::SceneGraph };
|
||||
|
||||
// members
|
||||
float customNearDistance; // 160
|
||||
float customFarDistance; // 164
|
||||
bool customNearDistanceActive; // 168
|
||||
bool customFarDistanceActive; // 169
|
||||
};
|
||||
static_assert(sizeof(SceneGraph) == 0x170);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/I/IMemoryStore.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class __declspec(novtable) ScrapHeap :
|
||||
public IMemoryStore // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::ScrapHeap };
|
||||
static constexpr auto VTABLE{ VTABLE::ScrapHeap };
|
||||
|
||||
class Block
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::size_t sizeFlags; // 00
|
||||
Block* prev; // 08
|
||||
};
|
||||
static_assert(sizeof(Block) == 0x10);
|
||||
|
||||
class FreeBlock :
|
||||
public Block // 00
|
||||
{
|
||||
public:
|
||||
// members
|
||||
FreeBlock* left; // 10
|
||||
FreeBlock* right; // 18
|
||||
};
|
||||
static_assert(sizeof(FreeBlock) == 0x20);
|
||||
|
||||
class FreeTreeNode :
|
||||
public FreeBlock // 00
|
||||
{
|
||||
public:
|
||||
// members
|
||||
FreeTreeNode** root; // 20
|
||||
FreeTreeNode* leftNode; // 28
|
||||
FreeTreeNode* rightNode; // 30
|
||||
std::size_t parentAndBlack; // 38
|
||||
};
|
||||
static_assert(sizeof(FreeTreeNode) == 0x40);
|
||||
|
||||
// NOLINTNEXTLINE(modernize-use-equals-default)
|
||||
~ScrapHeap() override { REX::W32::VirtualFree(baseAddress, 0, REX::W32::MEM_RELEASE); } // 00
|
||||
|
||||
// override (IMemoryStore)
|
||||
std::size_t Size(void const* a_mem) const override { return *static_cast<const std::size_t*>(a_mem) & ~(std::size_t{ 3 } << 62); } // 01
|
||||
void GetMemoryStats(MemoryStats*) override { return; } // 02
|
||||
bool ContainsBlockImpl(const void* a_block) const override { return baseAddress <= a_block && a_block <= endAddress; } // 03
|
||||
void* AllocateAlignImpl(std::size_t a_size, std::uint32_t a_alignment) override { return Allocate(a_size, a_alignment); } // 04
|
||||
void DeallocateAlignImpl(void*& a_block) override { Deallocate(a_block), a_block = nullptr; } // 05
|
||||
|
||||
void* Allocate(std::size_t a_size, std::size_t a_alignment)
|
||||
{
|
||||
using func_t = decltype(&ScrapHeap::Allocate);
|
||||
static REL::Relocation<func_t> func{ ID::ScrapHeap::Allocate };
|
||||
return func(this, a_size, a_alignment);
|
||||
}
|
||||
|
||||
void Deallocate(void* a_mem)
|
||||
{
|
||||
using func_t = decltype(&ScrapHeap::Deallocate);
|
||||
static REL::Relocation<func_t> func{ ID::ScrapHeap::Deallocate };
|
||||
return func(this, a_mem);
|
||||
}
|
||||
|
||||
// members
|
||||
FreeBlock* smallBlocks[6]{ nullptr }; // 08
|
||||
FreeTreeNode* freeList{ nullptr }; // 38
|
||||
Block* lastBlock{ nullptr }; // 40
|
||||
std::byte* baseAddress{ nullptr }; // 48
|
||||
std::byte* endAddress{ nullptr }; // 50
|
||||
std::byte* commitEnd{ nullptr }; // 58
|
||||
std::size_t reserveSize; // 60
|
||||
std::size_t minCommit{ 1u << 17 }; // 68
|
||||
std::size_t totalAllocated{ 0 }; // 70
|
||||
std::uint32_t keepPagesRequest{ 0 }; // 78
|
||||
std::uint32_t totalFreeBlocks{ 0 }; // 7C
|
||||
std::uint32_t freeSmallBlocks{ 0 }; // 80
|
||||
std::uint32_t totalAllocatedBlocks{ 0 }; // 84
|
||||
std::uint32_t pmpBarrier{ 0 }; // 88
|
||||
};
|
||||
static_assert(sizeof(ScrapHeap) == 0x90);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/E/ExamineConfirmMenu.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class __declspec(novtable) ScrapItemCallback :
|
||||
public ExamineConfirmMenu::ICallback // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::__ScrapItemCallback };
|
||||
static constexpr auto VTABLE{ VTABLE::__ScrapItemCallback };
|
||||
|
||||
ScrapItemCallback(ExamineMenu* a_thisMenu, std::uint32_t a_itemIndex) :
|
||||
ExamineConfirmMenu::ICallback(a_thisMenu),
|
||||
itemIndex(a_itemIndex)
|
||||
{
|
||||
REX::EMPLACE_VTABLE(this);
|
||||
}
|
||||
|
||||
virtual ~ScrapItemCallback() = default; // 00
|
||||
|
||||
// override
|
||||
virtual void OnAccept() override; // 01
|
||||
|
||||
F4_HEAP_REDEFINE_NEW(ScrapItemCallback);
|
||||
|
||||
// members
|
||||
std::uint32_t itemIndex; // 10
|
||||
};
|
||||
static_assert(sizeof(ScrapItemCallback) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class NiCamera;
|
||||
|
||||
namespace ScreenSplatter
|
||||
{
|
||||
enum class SCREENSPLATTER_TEXTURES : std::uint32_t
|
||||
{
|
||||
kColor = 0x0,
|
||||
kAlpha = 0x1,
|
||||
kFlare = 0x2,
|
||||
};
|
||||
|
||||
inline void Clear()
|
||||
{
|
||||
using func_t = decltype(&ScreenSplatter::Clear);
|
||||
static REL::Relocation<func_t> func{ ID::ScreenSplatter::Clear };
|
||||
return func();
|
||||
}
|
||||
|
||||
inline void Update()
|
||||
{
|
||||
using func_t = decltype(&ScreenSplatter::Update);
|
||||
static REL::Relocation<func_t> func{ ID::ScreenSplatter::Update };
|
||||
return func();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class ScreenSplatterType : std::uint32_t
|
||||
{
|
||||
kBlood = 0x0,
|
||||
kBlood2 = 0x1,
|
||||
kBlood3 = 0x2,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSInputEventUser.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class __declspec(novtable) ScreenshotHandler :
|
||||
public BSInputEventUser // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::ScreenshotHandler };
|
||||
static constexpr auto VTABLE{ VTABLE::ScreenshotHandler };
|
||||
|
||||
// members
|
||||
bool screenshotQueued; // 10
|
||||
bool multiScreenshotQueued; // 11
|
||||
};
|
||||
static_assert(sizeof(ScreenshotHandler) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSSimpleList.h"
|
||||
#include "RE/S/SCRIPT_HEADER.h"
|
||||
#include "RE/T/TESForm.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class COMPILER_NAME;
|
||||
class SCRIPT_FUNCTION;
|
||||
class SCRIPT_PARAMETER;
|
||||
class SCRIPT_REFERENCED_OBJECT;
|
||||
class ScriptCompiler;
|
||||
class ScriptLocals;
|
||||
class ScriptVariable;
|
||||
|
||||
class __declspec(novtable) Script :
|
||||
public TESForm // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::Script };
|
||||
static constexpr auto VTABLE{ VTABLE::TESForm };
|
||||
static constexpr auto FORM_ID{ ENUM_FORM_ID::kSCPT };
|
||||
|
||||
template <class... Args>
|
||||
static bool ParseParameters(const SCRIPT_PARAMETER* a_parameters, const char* a_compiledParams, std::uint32_t& a_offset, TESObjectREFR* a_refObject, TESObjectREFR* a_container, Script* a_script, ScriptLocals* a_scriptLocals, Args... a_args)
|
||||
{
|
||||
static_assert((std::is_pointer_v<Args> && ...), "arguments must all be pointers");
|
||||
using func_t = bool(const SCRIPT_PARAMETER*, const char*, std::uint32_t&, TESObjectREFR*, TESObjectREFR*, Script*, ScriptLocals*, ...);
|
||||
static REL::Relocation<func_t> func{ ID::Script::ParseParameters };
|
||||
return func(a_parameters, a_compiledParams, a_offset, a_refObject, a_container, a_script, a_scriptLocals, a_args...);
|
||||
}
|
||||
|
||||
void CompileAndRun(ScriptCompiler* a_compiler, COMPILER_NAME a_compilerIndex, TESObjectREFR* a_ownerObject)
|
||||
{
|
||||
using func_t = decltype(&Script::CompileAndRun);
|
||||
static REL::Relocation<func_t> func{ ID::Script::CompileAndRun };
|
||||
return func(this, a_compiler, a_compilerIndex, a_ownerObject);
|
||||
}
|
||||
|
||||
static bool GetProcessScripts()
|
||||
{
|
||||
using func_t = decltype(&Script::GetProcessScripts);
|
||||
static REL::Relocation<func_t> func{ ID::Script::GetProcessScripts };
|
||||
return func();
|
||||
}
|
||||
|
||||
static void SetProcessScripts(bool a_processScripts)
|
||||
{
|
||||
using func_t = decltype(&Script::SetProcessScripts);
|
||||
static REL::Relocation<func_t> func{ ID::Script::SetProcessScripts };
|
||||
return func(a_processScripts);
|
||||
}
|
||||
|
||||
void SetText(std::string_view a_text)
|
||||
{
|
||||
if (text) {
|
||||
free(text);
|
||||
text = nullptr;
|
||||
}
|
||||
|
||||
text = calloc<char>(a_text.length() + 1);
|
||||
std::memset(text, '\0', a_text.length() + 1);
|
||||
std::memcpy(text, a_text.data(), a_text.length());
|
||||
}
|
||||
|
||||
// members
|
||||
SCRIPT_HEADER header; // 20
|
||||
char* text; // 38
|
||||
std::byte* data; // 40
|
||||
float profilerTimer; // 48
|
||||
float questScriptDelay; // 4C
|
||||
float questScriptGetSecondsBuffer; // 50
|
||||
TESQuest* parentQuest; // 58
|
||||
BSSimpleList<SCRIPT_REFERENCED_OBJECT*> refObjects; // 60
|
||||
BSSimpleList<ScriptVariable*> variables; // 70
|
||||
};
|
||||
static_assert(sizeof(Script) == 0x80);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSSimpleList.h"
|
||||
#include "RE/B/BSStringT.h"
|
||||
#include "RE/S/SCRIPT_HEADER.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
enum class COMPILER_NAME;
|
||||
enum class SCRIPT_ERROR;
|
||||
class SCRIPT_LINE;
|
||||
class SCRIPT_REFERENCED_OBJECT;
|
||||
class ScriptVariable;
|
||||
|
||||
class ScriptCompileData
|
||||
{
|
||||
public:
|
||||
// members
|
||||
const char* input; // 00
|
||||
std::uint32_t inputOffset; // 08
|
||||
REX::TEnumSet<COMPILER_NAME, std::int32_t> compilerIndex; // 0C
|
||||
BSString scriptName; // 10
|
||||
SCRIPT_ERROR lastError; // 20
|
||||
bool isPartialScript; // 24
|
||||
std::uint32_t uiLastLineNumber; // 28
|
||||
char* output; // 30
|
||||
std::uint32_t outputOffset; // 38
|
||||
SCRIPT_HEADER header; // 3C
|
||||
BSSimpleList<ScriptVariable*> listVariables; // 50
|
||||
BSSimpleList<SCRIPT_REFERENCED_OBJECT*> listRefObjects; // 60
|
||||
Script* currentScript; // 70
|
||||
BSSimpleList<SCRIPT_LINE*> listLines; // 78
|
||||
};
|
||||
static_assert(sizeof(ScriptCompileData) == 0x88);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class ScriptCompiler
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(std::is_empty_v<ScriptCompiler>);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSSimpleList.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class ACTION_OBJECT;
|
||||
class SCRIPT_EFFECT_DATA;
|
||||
class SCRIPT_LOCAL;
|
||||
|
||||
class ScriptLocals
|
||||
{
|
||||
public:
|
||||
// members
|
||||
Script* masterScript; // 00
|
||||
std::int8_t flags; // 08
|
||||
BSSimpleList<ACTION_OBJECT*>* actionList; // 10
|
||||
BSSimpleList<SCRIPT_LOCAL*>* localList; // 18
|
||||
SCRIPT_EFFECT_DATA* scriptEffectData; // 20
|
||||
};
|
||||
static_assert(sizeof(ScriptLocals) == 0x28);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSStringT.h"
|
||||
#include "RE/S/SCRIPT_LOCAL.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class ScriptVariable
|
||||
{
|
||||
public:
|
||||
// members
|
||||
SCRIPT_LOCAL data; // 00
|
||||
BSString name; // 10
|
||||
};
|
||||
static_assert(sizeof(ScriptVariable) == 0x20);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BGSDestructibleObjectForm.h"
|
||||
#include "RE/B/BGSModelMaterialSwap.h"
|
||||
#include "RE/B/BGSPickupPutdownSounds.h"
|
||||
#include "RE/S/SpellItem.h"
|
||||
#include "RE/T/TESValueForm.h"
|
||||
#include "RE/T/TESWeightForm.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class __declspec(novtable) ScrollItem :
|
||||
public SpellItem, // 000
|
||||
public BGSModelMaterialSwap, // 130
|
||||
public BGSDestructibleObjectForm, // 170
|
||||
public BGSPickupPutdownSounds, // 180
|
||||
public TESWeightForm, // 198
|
||||
public TESValueForm // 1A8
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::ScrollItem };
|
||||
static constexpr auto VTABLE{ VTABLE::ScrollItem };
|
||||
static constexpr auto FORM_ID{ ENUM_FORM_ID::kSCRL };
|
||||
};
|
||||
static_assert(sizeof(ScrollItem) == 0x1B8);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class HUDModeType;
|
||||
|
||||
namespace SendHUDMessage
|
||||
{
|
||||
inline void PopHUDMode(const HUDModeType& a_hudMode)
|
||||
{
|
||||
using func_t = decltype(&SendHUDMessage::PopHUDMode);
|
||||
static REL::Relocation<func_t> func{ ID::SendHUDMessage::PopHUDMode };
|
||||
return func(a_hudMode);
|
||||
}
|
||||
|
||||
inline void PushHUDMode(const HUDModeType& a_hudMode)
|
||||
{
|
||||
using func_t = decltype(&SendHUDMessage::PushHUDMode);
|
||||
static REL::Relocation<func_t> func{ ID::SendHUDMessage::PushHUDMode };
|
||||
return func(a_hudMode);
|
||||
}
|
||||
|
||||
inline void SetPowerArmorMode(bool a_inPowerArmor)
|
||||
{
|
||||
using func_t = decltype(&SendHUDMessage::SetPowerArmorMode);
|
||||
static REL::Relocation<func_t> func{ ID::SendHUDMessage::SetPowerArmorMode };
|
||||
return func(a_inPowerArmor);
|
||||
}
|
||||
|
||||
inline void ShowHUDMessage(const char* a_message, const char* a_sound, bool a_throttle, bool a_warning)
|
||||
{
|
||||
using func_t = decltype(&SendHUDMessage::ShowHUDMessage);
|
||||
static REL::Relocation<func_t> func{ ID::SendHUDMessage::ShowHUDMessage };
|
||||
return func(a_message, a_sound, a_throttle, a_warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SetCullMarkersFunctor
|
||||
{
|
||||
public:
|
||||
// members
|
||||
bool cull; // 00
|
||||
};
|
||||
static_assert(sizeof(SetCullMarkersFunctor) == 0x1);
|
||||
}
|
||||
@@ -0,0 +1,413 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSFixedString.h"
|
||||
#include "RE/B/BSSimpleList.h"
|
||||
#include "RE/B/BSTBTree.h"
|
||||
#include "RE/M/MemoryManager.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
union SETTING_VALUE
|
||||
{
|
||||
std::int8_t c;
|
||||
bool b;
|
||||
float f;
|
||||
std::uint8_t h;
|
||||
std::int32_t i;
|
||||
char* s;
|
||||
std::uint32_t u;
|
||||
std::uint32_t r;
|
||||
std::uint32_t a;
|
||||
};
|
||||
|
||||
class __declspec(novtable) Setting
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::Setting };
|
||||
static constexpr auto VTABLE{ VTABLE::Setting };
|
||||
|
||||
enum class SETTING_TYPE
|
||||
{
|
||||
kBinary, // b
|
||||
kChar, // c
|
||||
kUChar, // h
|
||||
kInt, // i
|
||||
kUInt, // u
|
||||
kFloat, // f
|
||||
kString, // s/S
|
||||
kRGB, // r
|
||||
kRGBA, // a
|
||||
kNone
|
||||
};
|
||||
|
||||
Setting(const char* a_key, char a_value)
|
||||
{
|
||||
_key = a_key;
|
||||
_value.c = a_value;
|
||||
}
|
||||
|
||||
Setting(const char* a_key, bool a_value)
|
||||
{
|
||||
_key = a_key;
|
||||
_value.b = a_value;
|
||||
}
|
||||
|
||||
Setting(const char* a_key, float a_value)
|
||||
{
|
||||
_key = a_key;
|
||||
_value.f = a_value;
|
||||
}
|
||||
|
||||
Setting(const char* a_key, std::uint8_t a_value)
|
||||
{
|
||||
_key = a_key;
|
||||
_value.h = a_value;
|
||||
}
|
||||
|
||||
Setting(const char* a_key, std::int32_t a_value)
|
||||
{
|
||||
_key = a_key;
|
||||
_value.i = a_value;
|
||||
}
|
||||
|
||||
Setting(const char* a_key, const char* a_value)
|
||||
{
|
||||
_key = a_key;
|
||||
_value.s = _strdup(a_value);
|
||||
}
|
||||
|
||||
Setting(const char* a_key, std::uint32_t a_value)
|
||||
{
|
||||
_key = a_key;
|
||||
_value.u = a_value;
|
||||
}
|
||||
|
||||
virtual ~Setting() // 00
|
||||
{
|
||||
if (_key && _key[0] == 'S') {
|
||||
free(const_cast<char*>(_key));
|
||||
_key = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// add
|
||||
[[nodiscard]] virtual bool IsPrefSetting() { return false; } // 01
|
||||
|
||||
F4_HEAP_REDEFINE_NEW(Setting);
|
||||
|
||||
[[nodiscard]] bool GetBinary() const noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kBinary);
|
||||
return _value.b;
|
||||
}
|
||||
|
||||
[[nodiscard]] char GetChar() const noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kChar);
|
||||
return _value.c;
|
||||
}
|
||||
|
||||
[[nodiscard]] float GetFloat() const noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kFloat);
|
||||
return _value.f;
|
||||
}
|
||||
|
||||
[[nodiscard]] std::int32_t GetInt() const noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kInt);
|
||||
return _value.i;
|
||||
}
|
||||
|
||||
[[nodiscard]] std::string_view GetKey() const noexcept { return _key ? _key : ""sv; }
|
||||
|
||||
[[nodiscard]] std::span<const std::uint8_t, 3> GetRGB() const noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kRGB);
|
||||
return std::span<const std::uint8_t, 3>{
|
||||
reinterpret_cast<const std::uint8_t(&)[3]>(*std::addressof(_value.r))
|
||||
};
|
||||
}
|
||||
|
||||
[[nodiscard]] std::span<const std::uint8_t, 4> GetRGBA() const noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kRGBA);
|
||||
return std::span<const std::uint8_t, 4>{
|
||||
reinterpret_cast<const std::uint8_t(&)[4]>(*std::addressof(_value.a))
|
||||
};
|
||||
}
|
||||
|
||||
[[nodiscard]] std::string_view GetString() const noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kString);
|
||||
return _value.s ? _value.s : ""sv;
|
||||
}
|
||||
|
||||
[[nodiscard]] SETTING_TYPE GetType() const noexcept
|
||||
{
|
||||
if (_key) {
|
||||
switch (_key[0]) {
|
||||
case 'b':
|
||||
return SETTING_TYPE::kBinary;
|
||||
case 'c':
|
||||
return SETTING_TYPE::kChar;
|
||||
case 'h':
|
||||
return SETTING_TYPE::kUChar;
|
||||
case 'i':
|
||||
return SETTING_TYPE::kInt;
|
||||
case 'u':
|
||||
return SETTING_TYPE::kUInt;
|
||||
case 'f':
|
||||
return SETTING_TYPE::kFloat;
|
||||
case 's':
|
||||
case 'S':
|
||||
return SETTING_TYPE::kString;
|
||||
case 'r':
|
||||
return SETTING_TYPE::kRGB;
|
||||
case 'a':
|
||||
return SETTING_TYPE::kRGBA;
|
||||
default:
|
||||
return SETTING_TYPE::kNone;
|
||||
}
|
||||
} else {
|
||||
return SETTING_TYPE::kNone;
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] std::uint8_t GetUChar() const noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kUChar);
|
||||
return _value.h;
|
||||
}
|
||||
|
||||
[[nodiscard]] std::uint32_t GetUInt() const noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kUInt);
|
||||
return _value.u;
|
||||
}
|
||||
|
||||
void SetBinary(bool a_value) noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kBinary);
|
||||
_value.b = a_value;
|
||||
}
|
||||
|
||||
void SetChar(char a_value) noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kChar);
|
||||
_value.c = a_value;
|
||||
}
|
||||
|
||||
void SetFloat(float a_value) noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kFloat);
|
||||
_value.f = a_value;
|
||||
}
|
||||
|
||||
void SetInt(std::int32_t a_value) noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kInt);
|
||||
_value.i = a_value;
|
||||
}
|
||||
|
||||
void SetRGB(std::span<const std::uint8_t, 3> a_value) noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kRGB);
|
||||
std::copy(
|
||||
a_value.begin(),
|
||||
a_value.end(),
|
||||
std::addressof(_value.r));
|
||||
}
|
||||
|
||||
void SetRGBA(std::span<const std::uint8_t, 4> a_value) noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kRGBA);
|
||||
std::copy(
|
||||
a_value.begin(),
|
||||
a_value.end(),
|
||||
std::addressof(_value.r));
|
||||
}
|
||||
|
||||
void SetString(char* a_value) noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kString);
|
||||
_value.s = a_value;
|
||||
}
|
||||
|
||||
void SetUChar(std::uint8_t a_value) noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kUChar);
|
||||
_value.h = a_value;
|
||||
}
|
||||
|
||||
void SetUInt(std::uint32_t a_value) noexcept
|
||||
{
|
||||
assert(GetType() == SETTING_TYPE::kUInt);
|
||||
_value.u = a_value;
|
||||
}
|
||||
|
||||
private:
|
||||
// members
|
||||
SETTING_VALUE _value; // 08
|
||||
const char* _key; // 10
|
||||
};
|
||||
static_assert(sizeof(Setting) == 0x18);
|
||||
|
||||
template <class T>
|
||||
class __declspec(novtable) SettingT :
|
||||
public Setting // 00
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
class GameSettingCollection;
|
||||
class INIPrefSettingCollection;
|
||||
class INISettingCollection;
|
||||
class LipSynchroSettingCollection;
|
||||
class RegSettingCollection;
|
||||
|
||||
extern template class SettingT<GameSettingCollection>;
|
||||
extern template class SettingT<INIPrefSettingCollection>;
|
||||
extern template class SettingT<INISettingCollection>;
|
||||
extern template class SettingT<LipSynchroSettingCollection>;
|
||||
extern template class SettingT<RegSettingCollection>;
|
||||
|
||||
template <class T>
|
||||
class __declspec(novtable) SettingCollection
|
||||
{
|
||||
public:
|
||||
virtual ~SettingCollection() = default; // 00
|
||||
|
||||
// add
|
||||
virtual void Add(T* a_setting) = 0; // 01
|
||||
virtual void Remove(T* a_setting) = 0; // 02
|
||||
virtual bool WriteSetting(T& a_setting) = 0; // 03
|
||||
virtual bool ReadSetting(T& a_setting) = 0; // 04
|
||||
virtual bool Open([[maybe_unused]] bool a_write) { return false; } // 05
|
||||
virtual bool Close() { return true; } // 06
|
||||
virtual bool ReadSettingsFromProfile() { return false; } // 07
|
||||
virtual bool WriteSettings() { return handle != nullptr; } // 08
|
||||
virtual bool ReadSettings() { return handle != nullptr; } // 09
|
||||
|
||||
// members
|
||||
char settingFile[260]; // 008
|
||||
void* handle; // 110
|
||||
};
|
||||
|
||||
extern template class SettingCollection<Setting>;
|
||||
|
||||
template <class T>
|
||||
class __declspec(novtable) SettingCollectionList :
|
||||
public SettingCollection<T>
|
||||
{
|
||||
public:
|
||||
// members
|
||||
BSSimpleList<T*> settings; // 118
|
||||
};
|
||||
|
||||
extern template class SettingCollectionList<Setting>;
|
||||
|
||||
class __declspec(novtable) INISettingCollection :
|
||||
public SettingCollectionList<Setting> // 000
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::INISettingCollection };
|
||||
static constexpr auto VTABLE{ VTABLE::INISettingCollection };
|
||||
|
||||
[[nodiscard]] static INISettingCollection* GetSingleton()
|
||||
{
|
||||
static REL::Relocation<INISettingCollection**> singleton{ ID::Setting::INISettingCollection::Singleton };
|
||||
return *singleton;
|
||||
}
|
||||
|
||||
[[nodiscard]] Setting* GetSetting(std::string_view a_name)
|
||||
{
|
||||
for (auto& setting : settings) {
|
||||
if (setting->GetKey() == a_name) {
|
||||
return setting;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(INISettingCollection) == 0x128);
|
||||
|
||||
class __declspec(novtable) INIPrefSettingCollection :
|
||||
public INISettingCollection // 000
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::INIPrefSettingCollection };
|
||||
static constexpr auto VTABLE{ VTABLE::INIPrefSettingCollection };
|
||||
|
||||
[[nodiscard]] static INIPrefSettingCollection* GetSingleton()
|
||||
{
|
||||
static REL::Relocation<INIPrefSettingCollection**> singleton{ ID::Setting::INIPrefSettingCollection::Singleton };
|
||||
return *singleton;
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(INIPrefSettingCollection) == 0x128);
|
||||
|
||||
namespace detail
|
||||
{
|
||||
class SettingCollectionMapCompare
|
||||
{
|
||||
public:
|
||||
[[nodiscard]] bool operator()(const RE::BSFixedString& a_lhs, const RE::BSFixedString& a_rhs) const noexcept
|
||||
{
|
||||
return a_lhs.c_str() < a_rhs.c_str();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
template <class T>
|
||||
class __declspec(novtable) SettingCollectionMap :
|
||||
public SettingCollection<T> // 000
|
||||
{
|
||||
public:
|
||||
// members
|
||||
BSTBTree<BSFixedString, T*, detail::SettingCollectionMapCompare> settings; // 118
|
||||
};
|
||||
|
||||
extern template class SettingCollectionMap<Setting>;
|
||||
|
||||
class __declspec(novtable) GameSettingCollection :
|
||||
public SettingCollectionMap<Setting> // 000
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::GameSettingCollection };
|
||||
static constexpr auto VTABLE{ VTABLE::GameSettingCollection };
|
||||
|
||||
static void InitCollection()
|
||||
{
|
||||
using func_t = decltype(&GameSettingCollection::InitCollection);
|
||||
static REL::Relocation<func_t> func{ ID::Setting::GameSettingCollection::InitCollection };
|
||||
return func();
|
||||
}
|
||||
|
||||
[[nodiscard]] static GameSettingCollection* GetSingleton()
|
||||
{
|
||||
static REL::Relocation<GameSettingCollection**> singleton{ ID::Setting::GameSettingCollection::Singleton };
|
||||
return *singleton;
|
||||
}
|
||||
|
||||
[[nodiscard]] Setting* GetSetting(std::string_view a_name)
|
||||
{
|
||||
auto it = settings.find(a_name);
|
||||
return it != settings.end() ? it->second : nullptr;
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(GameSettingCollection) == 0x138);
|
||||
|
||||
inline Setting* GetINISetting(std::string_view a_name)
|
||||
{
|
||||
Setting* setting = nullptr;
|
||||
|
||||
auto iniPrefs = INIPrefSettingCollection::GetSingleton();
|
||||
setting = iniPrefs ? iniPrefs->GetSetting(a_name) : nullptr;
|
||||
if (!setting) {
|
||||
auto ini = INISettingCollection::GetSingleton();
|
||||
setting = ini ? ini->GetSetting(a_name) : nullptr;
|
||||
}
|
||||
return setting;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSMagicShaderParticles.h"
|
||||
#include "RE/B/BSModelDB.h"
|
||||
#include "RE/B/BSSoundHandle.h"
|
||||
#include "RE/B/BSTArray.h"
|
||||
#include "RE/B/BSTTuple.h"
|
||||
#include "RE/N/NiPointer.h"
|
||||
#include "RE/R/ReferenceEffect.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class BSEffectShaderData;
|
||||
class NiAVObject;
|
||||
class NiSourceTexture;
|
||||
class NiTexture;
|
||||
|
||||
class __declspec(novtable) ShaderReferenceEffect :
|
||||
public ReferenceEffect // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::ShaderReferenceEffect };
|
||||
static constexpr auto VTABLE{ VTABLE::ShaderReferenceEffect };
|
||||
static constexpr auto Ni_RTTI{ Ni_RTTI::ShaderReferenceEffect };
|
||||
static constexpr auto TYPE{ TEMP_EFFECT_TYPE::kRefShader };
|
||||
|
||||
~ShaderReferenceEffect() override;
|
||||
|
||||
enum class Flag
|
||||
{
|
||||
kThirdPerson = 0x0,
|
||||
kInterfaceEffect = 0x1,
|
||||
kRestart = 0x2,
|
||||
kAllTexturesAvailable = 0x3,
|
||||
kParticleShadersStarted = 0x4,
|
||||
kSuspended = 0x5,
|
||||
kDisallowTargetRoot = 0x6
|
||||
};
|
||||
|
||||
// members
|
||||
BSMagicShaderParticles particles; // 048
|
||||
BSTArray<BSTTuple<void*, NiPointer<NiTexture>*>> textureRequests; // 068 - TextureDB::Handle
|
||||
BSTArray<NiPointer<NiAVObject>> addOnObjects; // 080
|
||||
BSTArray<void*> modelHandles; // 098 - BSModelDB::Handle
|
||||
BSTArray<NiPointer<NiAVObject>> targetArray; // 0B0
|
||||
BSSoundHandle soundHandle; // 0C8
|
||||
NiPointer<NiSourceTexture> textureShaderTexture; // 0D0
|
||||
NiPointer<NiSourceTexture> textureBlockOutTexture; // 0D8
|
||||
NiPointer<NiSourceTexture> texturePaletteTexture; // 0E0
|
||||
TESBoundObject* wornObject; // 0E8
|
||||
TESEffectShader* effectData; // 0F0
|
||||
BSEffectShaderData* effectShaderData; // 0F8
|
||||
NiPointer<NiAVObject> lastRootNode; // 100
|
||||
float alphaTimer; // 104
|
||||
float addonAlpha; // 108
|
||||
float addonScale; // 10C
|
||||
float effectShaderAge; // 110
|
||||
std::uint32_t flags; // 114
|
||||
std::uint32_t pushCount; // 118
|
||||
};
|
||||
static_assert(sizeof(ShaderReferenceEffect) == 0x120);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSTEvent.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class ShowingDialogueSpeechChallengeAnim :
|
||||
public BSTValueEvent<bool>
|
||||
{
|
||||
public:
|
||||
};
|
||||
static_assert(sizeof(ShowingDialogueSpeechChallengeAnim) == 0x2);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSTSmartPointer.h"
|
||||
#include "RE/I/IAnimationGraphManagerHolder.h"
|
||||
#include "RE/N/NiPointer.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class BSAnimationGraphManager;
|
||||
class SimpleAnimationGraphManagerLoadingTask;
|
||||
|
||||
class __declspec(novtable) SimpleAnimationGraphManagerHolder :
|
||||
public IAnimationGraphManagerHolder
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::SimpleAnimationGraphManagerHolder };
|
||||
static constexpr auto VTABLE{ VTABLE::SimpleAnimationGraphManagerHolder };
|
||||
|
||||
virtual ~SimpleAnimationGraphManagerHolder() = default; // 00
|
||||
|
||||
// add
|
||||
virtual void BackgroundTaskFinishedLoading() { return; } // 01
|
||||
|
||||
// members
|
||||
BSTSmartPointer<BSAnimationGraphManager> animationGraphManager; // 08
|
||||
NiPointer<SimpleAnimationGraphManagerLoadingTask> loadingTask; // 10
|
||||
};
|
||||
static_assert(sizeof(SimpleAnimationGraphManagerHolder) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSPointerHandle.h"
|
||||
#include "RE/G/GameMenuBase.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class __declspec(novtable) SitWaitMenu :
|
||||
public GameMenuBase // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::SitWaitMenu };
|
||||
static constexpr auto VTABLE{ VTABLE::SitWaitMenu };
|
||||
static constexpr auto MENU_NAME{ "SitWaitMenu"sv };
|
||||
|
||||
virtual ~SitWaitMenu(); // 00
|
||||
|
||||
// override (GameMenuBase)
|
||||
virtual void Call(const Params&) override; // 01
|
||||
virtual void MapCodeObjectFunctions() override; // 02
|
||||
virtual UI_MESSAGE_RESULTS ProcessMessage(UIMessage& a_message) override; // 03
|
||||
virtual void OnMenuStackChanged(const BSFixedString& a_topMenuName, bool a_passesTopMenuTest) override; // 09
|
||||
|
||||
static void OnEnterFurniture(ObjectRefHandle a_handle)
|
||||
{
|
||||
using func_t = decltype(&SitWaitMenu::OnEnterFurniture);
|
||||
static REL::Relocation<func_t> func{ ID::SitWaitMenu::OnEnterFurniture };
|
||||
return func(a_handle);
|
||||
}
|
||||
|
||||
static void OnExitFurniture()
|
||||
{
|
||||
using func_t = decltype(&SitWaitMenu::OnExitFurniture);
|
||||
static REL::Relocation<func_t> func{ ID::SitWaitMenu::OnExitFurniture };
|
||||
return func();
|
||||
}
|
||||
|
||||
// members
|
||||
BSTArray<BSFixedString> overridingMenus; // E0
|
||||
};
|
||||
static_assert(sizeof(SitWaitMenu) == 0xF8);
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSPointerHandle.h"
|
||||
#include "RE/B/BSSimpleList.h"
|
||||
#include "RE/B/BSTArray.h"
|
||||
#include "RE/B/BSTTuple.h"
|
||||
#include "RE/N/NiColor.h"
|
||||
#include "RE/N/NiPointer.h"
|
||||
#include "RE/S/SkyEffectController.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class Atmosphere;
|
||||
class BSMultiBoundNode;
|
||||
class Clouds;
|
||||
class ImageSpaceModifierInstanceForm;
|
||||
class Moon;
|
||||
class NiNode;
|
||||
class NiTexture;
|
||||
class Precipitation;
|
||||
class ReferenceEffect;
|
||||
class SkySound;
|
||||
class Stars;
|
||||
class Sun;
|
||||
|
||||
class __declspec(novtable) Sky
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::Sky };
|
||||
static constexpr auto VTABLE{ VTABLE::Sky };
|
||||
|
||||
enum class Mode
|
||||
{
|
||||
kNone = 0x0,
|
||||
kInterior = 0x1,
|
||||
kSkyDomeOnly = 0x2,
|
||||
kFull = 0x3,
|
||||
|
||||
kTotal = 0x4
|
||||
};
|
||||
|
||||
enum class Flags
|
||||
{
|
||||
kNone = 0,
|
||||
kFastTravel = 1 << 4,
|
||||
kHideSky = 1 << 7,
|
||||
kUpdateSunriseBegin = 1 << 9,
|
||||
kUpdateSunriseEnd = 1 << 10,
|
||||
kUpdateSunsetBegin = 1 << 11,
|
||||
kUpdateSunsetEnd = 1 << 12,
|
||||
kUpdateColorsSunriseBegin = 1 << 13,
|
||||
kUpdateColorsSunsetEnd = 1 << 14,
|
||||
kUpdateWind = 1 << 20,
|
||||
kReleaseWeatherOverride = 1 << 21
|
||||
};
|
||||
|
||||
enum class WeatherStateOperation
|
||||
{
|
||||
kSave = 0x0,
|
||||
kRestore = 0x1,
|
||||
kClear = 0x2
|
||||
};
|
||||
|
||||
enum class FogDistance
|
||||
{
|
||||
kNear = 0x0,
|
||||
kFar = 0x1,
|
||||
kWaterNear = 0x2,
|
||||
kWaterFar = 0x3,
|
||||
kHeightMid = 0x4,
|
||||
kHeightRange = 0x5,
|
||||
kFarHeightMid = 0x6,
|
||||
kFarHeightRange = 0x7
|
||||
};
|
||||
|
||||
class SkyStaticRefData
|
||||
{
|
||||
public:
|
||||
// members
|
||||
BSTTuple<ObjectRefHandle, std::uint8_t> data; // 00
|
||||
};
|
||||
static_assert(sizeof(SkyStaticRefData) == 0x8);
|
||||
|
||||
virtual ~Sky(); // 00
|
||||
|
||||
[[nodiscard]] static Sky* GetSingleton()
|
||||
{
|
||||
using func_t = decltype(&Sky::GetSingleton);
|
||||
static REL::Relocation<func_t> func{ ID::Sky::Singleton };
|
||||
return func();
|
||||
}
|
||||
|
||||
void ForceWeather(TESWeather* a_weather, bool a_override)
|
||||
{
|
||||
using func_t = decltype(&Sky::ForceWeather);
|
||||
static REL::Relocation<func_t> func{ ID::Sky::ForceWeather };
|
||||
return func(this, a_weather, a_override);
|
||||
}
|
||||
|
||||
void ReleaseWeatherOverride()
|
||||
{
|
||||
if (overrideWeather) {
|
||||
flags.set(Flags::kReleaseWeatherOverride);
|
||||
overrideWeather = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void ResetWeather()
|
||||
{
|
||||
using func_t = decltype(&Sky::ResetWeather);
|
||||
static REL::Relocation<func_t> func{ ID::Sky::ResetWeather };
|
||||
return func(this);
|
||||
}
|
||||
|
||||
// members
|
||||
NiPointer<BSMultiBoundNode> root; // 008
|
||||
NiPointer<NiNode> moonsRoot; // 010
|
||||
NiPointer<NiNode> auroraRoot; // 018
|
||||
void* aurora3d; // 020 - BSModelDB::Handle
|
||||
BGSLightingTemplate* extLightingOverride; // 028
|
||||
ObjectRefHandle currentRoom; // 030
|
||||
ObjectRefHandle previousRoom; // 034
|
||||
float lightingTransition; // 038
|
||||
float lightingTransitionTimer; // 03C
|
||||
TESClimate* currentClimate; // 040
|
||||
TESWeather* currentWeather; // 048
|
||||
TESWeather* lastWeather; // 050
|
||||
TESWeather* defaultWeather; // 058
|
||||
TESWeather* overrideWeather; // 060
|
||||
TESRegion* currentRegion; // 068
|
||||
Atmosphere* atmosphere; // 070
|
||||
Stars* stars; // 078
|
||||
Sun* sun; // 080
|
||||
Clouds* clouds; // 088
|
||||
Moon* masser; // 090
|
||||
Moon* secunda; // 098
|
||||
Precipitation* precip; // 0A0
|
||||
NiColor skyColor[19]; // 0A8
|
||||
NiColor prevSkyColorA[19]; // 18C
|
||||
NiColor prevDirAmbColorsA[3][2]; // 270
|
||||
NiColorA prevSpecTintFres; // 2B8
|
||||
TESImageSpace* prevImageSpace; // 2C8
|
||||
float prevFogDistancesA[8]; // 2D0
|
||||
float prevFogHeight; // 2F0
|
||||
float prevFogPower; // 2F4
|
||||
float prevFogClamp; // 2F8
|
||||
float prevFogHighDensityScale; // 2FC
|
||||
float lastExtWetness; // 300
|
||||
NiColor waterFogColor; // 304
|
||||
NiColor sunSpecularColor; // 310
|
||||
float windSpeed; // 31C
|
||||
float windAngle; // 320
|
||||
float windTurbulence; // 324
|
||||
float fogDistances[8]; // 328
|
||||
float fogHeight; // 348
|
||||
float fogPower; // 34C
|
||||
float fogClamp; // 350
|
||||
float fogHighDensityScale; // 354
|
||||
float currentGameHour; // 358
|
||||
float lastWeatherUpdate; // 35C
|
||||
float currentWeatherPct; // 360
|
||||
float lastWindDirection; // 364
|
||||
float lastWindDirectionRange; // 368
|
||||
REX::TEnumSet<Mode, std::uint32_t> mode; // 36C
|
||||
BSSimpleList<SkySound*>* skySoundList; // 370
|
||||
float flash; // 378
|
||||
std::uint64_t flashTime; // 380
|
||||
std::uint32_t lastMoonPhaseUpdate; // 388
|
||||
float windowReflectionTimer; // 38C
|
||||
float accelBeginPct; // 390
|
||||
REX::TEnumSet<Flags, std::uint32_t> flags; // 394
|
||||
ImageSpaceModifierInstanceForm* currentWeatherImageSpaceMod; // 398
|
||||
ImageSpaceModifierInstanceForm* currentWeatherImageSpaceMod2; // 3A0
|
||||
ImageSpaceModifierInstanceForm* lastWeatherImageSpaceMod; // 3A8
|
||||
ImageSpaceModifierInstanceForm* lastWeatherImageSpaceMod2; // 3B0
|
||||
NiColor directionalAmbientColorsA[3][2]; // 3B8
|
||||
NiColor ambientSpecularTint; // 400
|
||||
float ambientSpecularFresnel; // 40C
|
||||
float auroraInStart; // 410
|
||||
float auroraIn; // 414
|
||||
float auroraOutStart; // 418
|
||||
float auroraOut; // 41C
|
||||
NiPointer<ReferenceEffect> currentReferenceEffect; // 420
|
||||
NiPointer<ReferenceEffect> lastReferenceEffect; // 428
|
||||
SkyEffectController effectController; // 430
|
||||
BSTArray<NiPointer<NiTexture>> storedCloudTextures; // 438
|
||||
BSTArray<NiPointer<NiTexture>> storedWorldMapCloudTextures; // 450
|
||||
BSTArray<SkyStaticRefData> skyStaticRefData; // 468
|
||||
};
|
||||
static_assert(sizeof(Sky) == 0x480);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/R/ReferenceEffectController.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class __declspec(novtable) SkyEffectController :
|
||||
public ReferenceEffectController // 00
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::SkyEffectController };
|
||||
static constexpr auto VTABLE{ VTABLE::SkyEffectController };
|
||||
|
||||
// override (ReferenceEffectController)
|
||||
void RemoveHitEffect(ReferenceEffect* a_refEffect) override; // 0A - { return; }
|
||||
TESObjectREFR* GetTargetReference() override; // 0B - { return g_thePlayer; }
|
||||
BGSArtObject* GetHitEffectArt() override; // 0C - { return GetSkyReferenceEffectArt(); }
|
||||
TESEffectShader* GetHitEffectShader() override; // 0D - { return 0; }
|
||||
bool GetManagerHandlesSaveLoad() override; // 0E - { return 0; }
|
||||
NiAVObject* GetAttachRoot() override; // 0F
|
||||
bool EffectAttachesToCamera() override; // 1A - { return true; }
|
||||
bool EffectRotatesWithCamera() override; // 1B
|
||||
};
|
||||
static_assert(sizeof(SkyEffectController) == 0x8);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/S/Sky.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class __declspec(novtable) SkyObject
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::SkyObject };
|
||||
static constexpr auto VTABLE{ VTABLE::SkyObject };
|
||||
|
||||
virtual ~SkyObject();
|
||||
|
||||
// add
|
||||
virtual NiNode* GetRoot(); // 01
|
||||
virtual void Update(Sky* a_formal, float a_unk); // 02
|
||||
|
||||
// members
|
||||
NiPointer<NiNode> root; // 08
|
||||
};
|
||||
static_assert(sizeof(SkyObject) == 0x10);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/P/PlayerInputHandler.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SneakHandler :
|
||||
public PlayerInputHandler
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::SneakHandler };
|
||||
static constexpr auto VTABLE{ VTABLE::SneakHandler };
|
||||
|
||||
explicit constexpr SneakHandler(PlayerControlsData& a_data) noexcept :
|
||||
PlayerInputHandler(a_data)
|
||||
{}
|
||||
};
|
||||
static_assert(sizeof(SneakHandler) == 0x20);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/U/UnloadedRefData.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SpecialRefData
|
||||
{
|
||||
public:
|
||||
// members
|
||||
BGSLocationRefType* type; // 00
|
||||
UnloadedRefData refData; // 08
|
||||
};
|
||||
static_assert(sizeof(SpecialRefData) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSTArray.h"
|
||||
#include "RE/N/NiPoint3.h"
|
||||
#include "RE/N/NiPointer.h"
|
||||
#include "RE/T/TESPackage.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class NiAVObject;
|
||||
class SpectatorThreatInfo;
|
||||
|
||||
class __declspec(novtable) SpectatorPackage :
|
||||
public TESPackage // 000
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::SpectatorPackage };
|
||||
static constexpr auto VTABLE{ VTABLE::SpectatorPackage };
|
||||
static constexpr auto FORM_ID{ ENUM_FORM_ID::kPACK };
|
||||
|
||||
// members
|
||||
std::time_t lastPathRequestTime; // 0C8
|
||||
float timer; // 0D0
|
||||
float conversationTimer; // 0D4
|
||||
float eventRadius; // 0D8
|
||||
bool flagCompleted; // 0DC
|
||||
NiPoint3 eventCenter; // 0E0
|
||||
BSTArray<SpectatorThreatInfo> threatInfoList; // 0F0
|
||||
NiPointer<NiAVObject> debugGeometry; // 108
|
||||
};
|
||||
static_assert(sizeof(SpectatorPackage) == 0x110);
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSPointerHandle.h"
|
||||
#include "RE/N/NiPoint3.h"
|
||||
#include "RE/N/NiPointer.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class NiAVObject;
|
||||
|
||||
class SpectatorThreatInfo
|
||||
{
|
||||
public:
|
||||
enum class THREAT_LEVEL : std::int32_t
|
||||
{
|
||||
kNone = 0,
|
||||
kMeleeWeapons = 1,
|
||||
kProjectileWeapons = 2,
|
||||
kExplosion = 3,
|
||||
kInsane = 4
|
||||
};
|
||||
|
||||
// members
|
||||
ActorHandle source; // 00
|
||||
ActorHandle target; // 04
|
||||
THREAT_LEVEL threatLevel; // 08
|
||||
std::time_t lastPerceivedTime; // 10
|
||||
float radius; // 18
|
||||
NiPoint3 lastKnownPosSource; // 1C
|
||||
NiPoint3 lastKnownPosTarget; // 28
|
||||
bool hasSource; // 34
|
||||
bool hasTarget; // 35
|
||||
NiPointer<NiAVObject> debugGeometry; // 38
|
||||
};
|
||||
static_assert(sizeof(SpectatorThreatInfo) == 0x40);
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BGSEquipType.h"
|
||||
#include "RE/B/BGSMenuDisplayObject.h"
|
||||
#include "RE/M/MagicItem.h"
|
||||
#include "RE/T/TESDescription.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
namespace MagicSystem
|
||||
{
|
||||
enum class CastingType;
|
||||
enum class Delivery;
|
||||
enum class SpellType;
|
||||
}
|
||||
|
||||
class __declspec(novtable) SpellItem :
|
||||
public MagicItem, // 000
|
||||
public BGSEquipType, // 0D0
|
||||
public BGSMenuDisplayObject, // 0E0
|
||||
public TESDescription // 0F0
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::SpellItem };
|
||||
static constexpr auto VTABLE{ VTABLE::SpellItem };
|
||||
static constexpr auto FORM_ID{ ENUM_FORM_ID::kSPEL };
|
||||
|
||||
class Data :
|
||||
public MagicItem::Data // 00
|
||||
{
|
||||
public:
|
||||
// members
|
||||
REX::TEnumSet<MagicSystem::SpellType, std::int32_t> spellType; // 08
|
||||
float chargeTime; // 0C
|
||||
REX::TEnumSet<MagicSystem::CastingType, std::int32_t> castingType; // 10
|
||||
REX::TEnumSet<MagicSystem::Delivery, std::int32_t> delivery; // 14
|
||||
float castDuration; // 18
|
||||
float range; // 1C
|
||||
BGSPerk* castingPerk; // 20
|
||||
};
|
||||
static_assert(sizeof(Data) == 0x28);
|
||||
|
||||
// members
|
||||
Data data; // 108
|
||||
};
|
||||
static_assert(sizeof(SpellItem) == 0x130);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
namespace SplineUtils
|
||||
{
|
||||
inline void DisconnectSpline(TESObjectREFR& a_spline)
|
||||
{
|
||||
using func_t = decltype(&DisconnectSpline);
|
||||
static REL::Relocation<func_t> func{ ID::SplineUtils::DisconnectSpline };
|
||||
return func(a_spline);
|
||||
}
|
||||
|
||||
inline void ConnectSpline(TESObjectREFR* akEndpoint1, int32_t linkType1, TESObjectREFR* akEndpoint2, int32_t linkType2, TESObjectREFR* akWireRef)
|
||||
{
|
||||
using func_t = decltype(&ConnectSpline);
|
||||
static REL::Relocation<func_t> func{ ID::SplineUtils::ConnectSpline };
|
||||
return func(akEndpoint1, linkType1, akEndpoint2, linkType2, akWireRef);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSTOptional.h"
|
||||
#include "RE/D/DifficultyLevel.h"
|
||||
#include "RE/G/GameMenuBase.h"
|
||||
#include "RE/P/PlayerCharacter.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class __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
|
||||
|
||||
DifficultyLevel GetMenuDifficultyLevel()
|
||||
{
|
||||
using func_t = decltype(&StartMenuBase::GetMenuDifficultyLevel);
|
||||
static REL::Relocation<func_t> func{ ID::StartMenuBase::GetMenuDifficultyLevel };
|
||||
return func(this);
|
||||
}
|
||||
|
||||
// members
|
||||
std::unique_ptr<BSGFxShaderFXTarget> mainPanel; // 0E0
|
||||
std::unique_ptr<BSGFxShaderFXTarget> versionText; // 0E8
|
||||
std::unique_ptr<BSGFxShaderFXTarget> mainPanelBackground; // 0F0
|
||||
std::unique_ptr<BSGFxShaderFXTarget> loadPanelBackground; // 0F8
|
||||
std::unique_ptr<BSGFxShaderFXTarget> loadPanelBrackets; // 100
|
||||
std::unique_ptr<BSGFxShaderFXTarget> loadPanelList; // 108
|
||||
std::unique_ptr<BSGFxShaderFXTarget> loadPanelPlayerInfo; // 110
|
||||
std::unique_ptr<BSGFxShaderFXTarget> confirmText; // 118
|
||||
std::unique_ptr<BSGFxShaderFXTarget> levelText; // 120
|
||||
std::unique_ptr<BSGFxShaderFXTarget> playtimeText; // 128
|
||||
std::unique_ptr<BSGFxShaderFXTarget> locationText; // 130
|
||||
std::unique_ptr<BSGFxShaderFXTarget> levelMeter; // 138
|
||||
std::unique_ptr<BSGFxShaderFXTarget> modsLoadedText; // 140
|
||||
std::unique_ptr<BSGFxShaderFXTarget> settingsCategoryList; // 148
|
||||
std::unique_ptr<BSGFxShaderFXTarget> settingsList; // 150
|
||||
std::unique_ptr<BSGFxShaderFXTarget> DLCList; // 158
|
||||
std::unique_ptr<BSGFxShaderFXTarget> loadingIcon; // 160
|
||||
std::unique_ptr<BSGFxShaderFXTarget> colorReference; // 168
|
||||
std::unique_ptr<BSGFxShaderFXTarget> splashScreenText; // 170
|
||||
std::unique_ptr<BSGFxShaderFXTarget> controlsPanel; // 178
|
||||
std::unique_ptr<BSGFxShaderFXTarget> helpPanelBackground; // 180
|
||||
std::unique_ptr<BSGFxShaderFXTarget> helpListBackground; // 188
|
||||
std::unique_ptr<BSGFxShaderFXTarget> gamerTagPanel; // 190
|
||||
std::unique_ptr<BSGFxShaderFXTarget> gamerTagText; // 198
|
||||
std::unique_ptr<BSGFxShaderFXTarget> gamerTagIcon; // 1A0
|
||||
std::unique_ptr<BSGFxShaderFXTarget> bethesdaLogo; // 1A8
|
||||
std::unique_ptr<BSGFxShaderFXTarget> characterSelectList; // 1B0
|
||||
std::unique_ptr<BSGFxShaderFXTarget> remapPrompt; // 1B8
|
||||
std::unique_ptr<BSGFxShaderFXTarget> settingGuideText; // 1C0
|
||||
std::unique_ptr<BSGFxShaderFXTarget> blackBackground; // 1C8
|
||||
std::unique_ptr<BSGFxShaderFXTarget> modManager; // 1D0
|
||||
std::unique_ptr<BSGFxShaderFXTarget> DLCImageSizer; // 1D8
|
||||
std::unique_ptr<BSGFxShaderFXTarget> DLCPanelBrackets; // 1E0
|
||||
std::unique_ptr<BSGFxShaderFXTarget> loginObj; // 1E8
|
||||
std::unique_ptr<BSGFxShaderFXTarget> motD; // 1F0
|
||||
BSTOptional<DifficultyLevel> currentDisplayDifficultyLevel; // 1F8
|
||||
Scaleform::GFx::Value saveLoadPanelObj; // 218
|
||||
bool gameDataReady; // 220
|
||||
bool controlsChanged; // 221
|
||||
};
|
||||
static_assert(sizeof(StartMenuBase) == 0x228);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class StolenItemValueStruct
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::uint32_t stolenItemValueNoCrime; // 0
|
||||
std::uint32_t istolenItemValueCrime; // 4
|
||||
};
|
||||
static_assert(sizeof(StolenItemValueStruct) == 0x8);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSFixedString.h"
|
||||
#include "RE/S/SubgraphIdentifier.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SubGraphIdleRootData
|
||||
{
|
||||
public:
|
||||
// members
|
||||
SubgraphIdentifier subGraphID; // 00
|
||||
BSFixedString idleRootName; // 08
|
||||
std::int8_t count; // 10
|
||||
std::int8_t activeCount; // 11
|
||||
bool forFirstPerson; // 12
|
||||
};
|
||||
static_assert(sizeof(SubGraphIdleRootData) == 0x18);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SubgraphHandle
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::uint64_t handle; // 0
|
||||
};
|
||||
static_assert(sizeof(SubgraphHandle) == 0x8);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SubgraphIdentifier
|
||||
{
|
||||
public:
|
||||
// members
|
||||
std::size_t identifier; // 0
|
||||
};
|
||||
static_assert(sizeof(SubgraphIdentifier) == 0x8);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/S/SUBTITLE_PRIORITY.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SubtitleInfo
|
||||
{
|
||||
public:
|
||||
// members
|
||||
ObjectRefHandle speaker; // 00
|
||||
BSFixedStringCS subtitleText; // 08
|
||||
TESTopicInfo* topicInfo; // 10
|
||||
REX::TEnum<SUBTITLE_PRIORITY> priority; // 18
|
||||
float distFromPlayer; // 1C
|
||||
};
|
||||
static_assert(sizeof(SubtitleInfo) == 0x20);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSPointerHandle.h"
|
||||
#include "RE/B/BSTArray.h"
|
||||
#include "RE/B/BSTEvent.h"
|
||||
#include "RE/B/BSTSingleton.h"
|
||||
#include "RE/H/HUDSubtitleDisplayEvent.h"
|
||||
#include "RE/S/SubtitleInfo.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class SubtitleManager :
|
||||
public BSTSingletonSDM<SubtitleManager> // 00
|
||||
{
|
||||
public:
|
||||
[[nodiscard]] static SubtitleManager* GetSingleton()
|
||||
{
|
||||
static REL::Relocation<SubtitleManager**> singleton{ ID::SubtitleManager::Singleton };
|
||||
return *singleton;
|
||||
}
|
||||
|
||||
[[nodiscard]] static BSReadWriteLock& GetRWLock()
|
||||
{
|
||||
static REL::Relocation<BSReadWriteLock*> rwLock{ ID::SubtitleManager::RWLock };
|
||||
return *rwLock;
|
||||
}
|
||||
|
||||
// members
|
||||
BSTArray<SubtitleInfo, BSTArrayHeapAllocator> subtitlePriorityArray; // 08
|
||||
ObjectRefHandle currentSpeaker; // 20
|
||||
BSTValueEventSource<HUDSubtitleDisplayEvent> subtitleDisplayData; // 28
|
||||
};
|
||||
static_assert(sizeof(SubtitleManager) == 0x50);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/B/BSTEvent.h"
|
||||
#include "RE/N/NiPoint3.h"
|
||||
#include "RE/N/NiPointer.h"
|
||||
#include "RE/R/ReferenceEffect.h"
|
||||
#include "RE/S/SimpleAnimationGraphManagerHolder.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class BGSArtObjectCloneTask;
|
||||
class NiAVObject;
|
||||
class BSAnimationGraphEvent;
|
||||
|
||||
class __declspec(novtable) SummonPlacementEffect :
|
||||
public ReferenceEffect, // 00
|
||||
public SimpleAnimationGraphManagerHolder, // 48
|
||||
public BSTEventSink<BSAnimationGraphEvent> // 60
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::SummonPlacementEffect };
|
||||
static constexpr auto VTABLE{ VTABLE::SummonPlacementEffect };
|
||||
static constexpr auto Ni_RTTI{ Ni_RTTI::SummonPlacementEffect };
|
||||
static constexpr auto TYPE{ TEMP_EFFECT_TYPE::kMagicSummon };
|
||||
|
||||
~SummonPlacementEffect() override;
|
||||
|
||||
// members
|
||||
BGSArtObject* artObject; // 70
|
||||
NiPoint3 fixedLocation; // 78
|
||||
NiPointer<NiAVObject> artObject3D; // 88
|
||||
void* loadedDataSubBuffer; // 90
|
||||
NiPointer<BGSArtObjectCloneTask> cloneTask; // 98
|
||||
bool animationComplete; // 99
|
||||
};
|
||||
static_assert(sizeof(SummonPlacementEffect) == 0xA0);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class __declspec(novtable) Sun :
|
||||
public SkyObject
|
||||
{
|
||||
public:
|
||||
static constexpr auto RTTI{ RTTI::Sun };
|
||||
static constexpr auto VTABLE{ VTABLE::Sun };
|
||||
|
||||
virtual ~Sun();
|
||||
|
||||
// members
|
||||
NiPointer<NiBillboardNode> sunBaseNode; // 10
|
||||
NiPointer<NiBillboardNode> sunGlareNode; // 18
|
||||
NiPointer<BSTriShape> sunBase; // 20
|
||||
NiPointer<BSTriShape> sunQuery; // 28
|
||||
NiPointer<BSTriShape> sunGlare; // 30
|
||||
NiPointer<NiDirectionalLight> light; // 38
|
||||
NiPointer<NiDirectionalLight> cloudLight; // 40
|
||||
float glareScale; // 48
|
||||
bool doOcclusionTests; // 4C
|
||||
NiPointer<BSShaderAccumulator> sunAccumulator; // 50
|
||||
};
|
||||
static_assert(sizeof(Sun) == 0x58);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class BSGaphics
|
||||
{
|
||||
class OcclussionQuery;
|
||||
};
|
||||
|
||||
class SunOcclusionTest
|
||||
{
|
||||
public:
|
||||
BSGraphics::OcclusionQuery* occlusionQuery; // 00
|
||||
float percentOccluded; // 08
|
||||
std::uint32_t pixelCount; // 0C
|
||||
std::uint32_t frameCount; // 10
|
||||
bool waiting; // 14
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user